Am 24.01.2016 um 13:00 schrieb Stephan Witt <st.w...@gmx.net>:
> 
> Am 24.01.2016 um 12:12 schrieb Georg Baum <georg.b...@post.rwth-aachen.de>:
>> 
>> Stephan Witt wrote:
>> 
>>> You are asking for running tex2lyx in the debugger? Yes, I’m able to do
>>> so. What should I try exactly?
>>> 
>>> I started tex2lyx in debugger with these options:
>>> -f
>>> -roundtrip
>>> /Users/stephan/git/lyx/src/tex2lyx/test/algo2e.tex
>>> /Users/stephan/git/lyx-build/algo2e.lyx
>>> 
>>> I got the attached algo2e.lyx and algo2e.tex.
>> 
>> This shows that the bug is reproducible in the debugger (which is good). Now 
>> please put a breakpoint in Preamble::handle_package(). Is the breakpoint hit 
>> at all? If yes, is name == "algorithm2e“?
> 
> Yes and no.
> 
> I’ve put a debug line at the start of it already.
> 
>       cerr << "package: " << name << ", options = " << opts << endl;
> 
> The program output is with it:
> Creating file /Users/stephan/git/lyx-build/algo2e.lyx
> package: fontenc, options = T1
> package: inputenc, options = latin1
> (dbg) Program ended with exit code: 0
> 
> There is something fishy with the Parser/Tokenizer. After processing the
> second usepackage token with options the next token of the
> while (is_full_document && p.good()) loop is the letter „u“ and then „s“.
> 
> Somehow the backslash before is misinterpreted or missed?

I’ve tried to follow the tokenizing and parsing program flow.

While processing the „latin1“ option of „inputenc“ the encoding of
the idocstream is changed. (Line 395 of support/docstream.cpp is called)

Perhaps this is the problem.

Stephan

Reply via email to