Am 08.07.2012 21:11, schrieb Georg Baum:

I don't understand. I can import XeTeX-polyglossia.tex and then re-export
it. Attached is the original file and the re-exported file. Diffing them
you see that everything is in place and nothing is lost.

Indeed. In case of XeTeX-polyglossia.tex there is a bug in the roundtrip
command of tex2lyx (it tries to export to latex instead of xelatex, I'll
have a look at it),

OK, but you can manually export it to XeTeX.

but CJK.lyx cannot be exported.

I can export it without problems to pdflatex.

I also don't understand
the note in CJK.lyx.lyx. The .tex file clearly states that the main language
is english.

No, this file is not in English! I wrote it in LyX using "Japanese (CJK)" as document language. The "english" is only a babel option and only appears because I used an English paragraph in the file.

But that is exactly why there is a note - we cannot know the document language.

IMO we should never put such notes into imported files. If there
is a bug it should be fixed, and if the .tex file does not carry enough
information to restore the .lyx document it was created from, then we should
do as best as we can and live with the differences.

There is no bug. LaTeX simply does not store the document language as we understand it. For CJK there is no such thing like we understand document language. We already do the best we can and giving the user the info to check what he thinks the document language could be is very helpful. I guess in 99% of the cases he clearly knows this and can set it quickly in the document settings.

Automated or not, I don't care, as long as they are run, but of course
automated is easier. Therefore I set up a very simple automatic test: Just
run

python src/tex2lyx/test/runtests.py <path rto tex2lyx binary>

and run git diff afterwards to see the regressions.

Thanks.

Question: Is it more convenient to let the test overwrite the reference
results, so that the differences are automatically seen by git, or should
the references better be kept in a separate location? I am unsure about
that.

I prefer the latter. The best would be to import a file "filename.tex", the 
import is saved as
"filename-imported.lyx"

If you run the regression tests, you will also see that some of your
changes broke the defaults for math package loading.

I don't see this at a quick look I now had. Could you please give me a
ponter to a case or file that does not work anymore?

Look at the attached diff. You changed the default of those packages from
off to auto. This breaks files that use user defined math commands that
trigger automatic package loading. If a user defines his own version of
\utilde the undertilde package must not be used automatically, since it
would conflict.

Thanks for the pointer, I had not in mind that the user could have defined own 
commands.
This is now fixed.

regards Uwe

Reply via email to