reposting because it seams posting with my current email in from address 
still fails to post. May be an issue with gmane gateway...

---------- Reposted message ----------

It would appear that on Sep 6, Joe did say:

> LyX -> word.doc via Libreoffice -> smashwords "paragraph marks"
> 
> I can't begin to list all the reasons why I want to write with LyX.
> I can't begin to describe how messed up my 'work' would be if I had
> to create and/or edit the text with ANY standard word processor.
> 
> So what I'm doing is writing in LyX, *exporting {sort of} to the word.doc*
        **that smashwords wants me to upload my work as...
I say sort of: I'm going with a hands on manual conversion process. That 
is at least repeatable. Which matters to me in case I decide to self 
publish more of them this way.

> When I export to plain text, LyX adds all those extra carriage returns, like
> I'd need if I wanted to read the exported text with something that doesn't
> wrap the text, such as leafpad.

And the thing I most want to preserve is the exact position of the
paragraph marks, so I don't want the LyX to assume that the only way I want
plain text output, is to send it to an old dot matrix printer that doesn't
know how to word wrap.

> I came up with a partial workaround. As long as there aren't any comment or 
> ert
> boxes etc...: I open the .lyx file with LyX: {ctrl+a}{ctrl+c}
> open a blank leafpad doc: {ctrl+v}
> *find a way to strip out all those blank lines caused by LyX effectively using
> double CRs as paragraph markers. I couldn't think of the syntax to strip
> them out with sed,

did a web search for it and came up with the answer to that part:
code ===============================
sed '/^$/d' input.txt > output.txt
or
grep -v '^$' input.txt > output.txt
/code ===============================

Now the problem with this resulting output is the lack of a TOC.

So What I'm doing is exporting one copy to plain text in spite of all those
pesky line feeds. I truncate the exported file right below the TOC listing.

Then I apply the above workaround.
Append the results to the first file.
Open it for editing with my chosen text editor. And delete one or the 
other of the duplicated 'front-matter' lines.

Then I copy the entire text file to the clipboard. Open a copy of the blank
word.doc I'm using for a template with libreoffice.

This "blank" file does have all the custom paragraph styles I need to
reformat the final result to resemble how LyX would have formatted a pdf.
But first I need to paste all that text from that text file into the
"word.doc" So that I can start at the top, and apply the paragraph styles
as needed.

When I get to the TOC I use the list of chapters as a source for search
strings that let me find the corresponding line in the text body that 
needs to have my custom "chapter header" style applied to it. And while I'm at
it, I set an appropriately named bookmark to it. Reuse the search string to
get back to the correct TOC entry, and make the hyperlink.

Then I start on the text of each chapter. The majority of which is to
simply select the first paragraph, apply a style I call MyIndent1st.
And select the following paragraphs. to which I apply MyIndentSTD

I also have MyDreamSequence1st and MyDreamSequenceSTD styles, among others.
So I do have to pay attention as I apply the paragraph styles. But I'm not
having much trouble with that part.

You can tell me that I'm doing this the hard way if you want. But I'll get
consistent results, every time I do it this way. So If I should decide to
write a series of Ebooks, I'll get consistent results every time I self
publish one.

Of course I doubt this would work so good if I was writing something that
needed tables, or other constructs that wouldn't make it through smashwords so
called meat-grinder. But I'm writing fiction. So this will work for me, until
I find a better way.

If anyone knows of a better way to get the resulting word.doc, formatted to
the exacting standards described in the smashwords style guide. And still
look like the output LyX thought I meant when I composed with LyX. So that
it could keep me from fat fingering extra spaces, and all the other
formatting mistakes that would creep in to my work, if I tried to compose
with a mere word processor. Then please give me a clue. Cause this
repeatable kludge is a real PITA!

Thank you!

-- 
JtWdyP


Reply via email to