On Friday 22 December 2006 23:34, Stefano Franchi wrote:
> 1. I encountered problems with the input encoding. LyX seems to assume
> the encoding is always Latin1. That is not the default encoding on the
> Mac, though. Originally, I edited the sed script provided by Charles in
> a standard Mac editor (TextWrangler) without worrying about the
> encoding. The accented letters looked fine in TextWrangler, but got
> mangled up when imported into LyX. Solution: TextWrangler offers an
> optional choice of encodings when opening (and, consequently, saving) a
> file. I reopened the sed script as Latin1, and changed manually all the
> accented letters. This worked.
LyX can cope with several different encodings. The default is language
dependant, if you want to use something else you have to explicitly set it.
In your case you probably suffered from a tex2lyx bug. tex2lyx does not know
anything about encodings.
> 2. Either tex2Lyx or Lyx itself (either when exporting to Latex or when
> reading the file converted by tex2lyx) could not handle the user
> defined preamble properly. When I was finally able to import the file
> back into LyX with all the corrected accents, LyX would still refuse to
> produce pdf output (with pdfLaTeX), complaining about missing a
> \begin{document} command. Indeed, the preamble section of Document
> settings showed both the user preamble and the LyX generated preamble.
> Solution: erase the whole preamble from the converted file and cut and
> paste it back from the original file.
This is probably again a tex2lyx problem. While tex2lyx is pretty good at
converting the main text to LyX, it is pretty bad in preamble handling.
Good to see that you found a solution.
Georg