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? Stephan > The expected behaviour is that handle_package() is called with name == > "algorithm2e", and that it goes into the block at line 1006 where the module > is loaded. Somewhere on this path it does something else, and if it does not > even arrive in handle_package(), then you need to put a breakpoint in > Preamble::parse(), and step through that function to see why it does not go > into handle_package(). > > > Georg >