Dear Charles, 
It is very cool grasping how to use sed in however a primitive way.  But on
further investigation it seems one needs it for a LyX friendly use of
``writer2latex'' only if the document has tables, math, images ... or French. 
With a fairly wide but unscientifically chosen variety of English documents, I
found that the desiderata of: 
(a) retaining crucial formatting that an English language Word or OpenOffice or
docs.google user would likely employ 
and: 
(b) avoiding a demoralizing film of ERT 
by messing with the preferences in writer2latex.xml.  

The accursed red {}- is what remains, though the obvious expedient of a find and
replace in the latex file before importing into LyX is clearly the way to go if
that's all there is.  I think it has to do with the ucs.sty that is used in
connection with the choice of utf8 among the 'inputencoding' options. But this
is way over my head. 

I don't know how far this depends on how various things are adjusted on the (mac
)computer I was using - doc->odt->latex->lyx involves a lot of adjustments - but
for the heck of it I will list the alterations from the defaults that seemed to
maximize what is preserved subject to the principle of ERT avoidance:

<option name="inputencoding" value="utf8" />
<option name="multilingual" value="false" />
in place  of 
<option name="inputencoding" value="ascii" />
<option name="multilingual" value="true" />


<option name="formatting" value="ignore_most" />
<option name="page_formatting" value="ignore_all" />
<option name="ignore_hard_page_breaks" value="true" />
<option name="ignore_hard_line_breaks" value="true" />
<option name="ignore_empty_paragraphs" value="true" />
<option name="ignore_double_spaces" value="true" />
in place of
<option name="formatting" value="convert_basic" />
<option name="page_formatting" value="convert_all" />
<option name="ignore_hard_page_breaks" value="false" />
<option name="ignore_hard_line_breaks" value="false" />
<option name="ignore_empty_paragraphs" value="false" />
<option name="ignore_double_spaces" value="false" />

These choices keep the amount of junk in the preamble to a minimum too.  The
more I fiddle with it the sounder writer2latex seems to be; I wouldn't have
thought it was possible.  Again, this is all over my head, though now primitive
text-altering script-composition isn't, to my amazement - so,
or rather, {}- so, 
thanks, 
Michael 

Reply via email to