I'm converting a LYX file to PDF from the command line and the conversion
apparently fails, the exit code of the process is 1:
$ lyx -e pdf2 docs/myfile.lyx -dbg latex

The process reports failure even though it did actually create a PDF file
which seems to be complete and usable. Is it safe to ignore the exit code
in case it managed to create the PDF?

When I do the export to PDF from the UI, I get the errors below. Why do
they appear twice?
LaTeX Error: \begin{document} ended by \end{thenomenclature}.
Extra \endgroup.
LaTeX Error: \begin{document} ended by \end{thenomenclature}.
Extra \endgroup.

The same errors appear like this when starting the conversion in the
console:
LaTeX.cpp (658): Log line: [3] (./myfile.nls
LaTeX.cpp (658): Log line:
LaTeX.cpp (658): Log line: ! LaTeX Error: \begin{document} ended by
\end{thenomenclature}.
LaTeX.cpp (848): line: 8
Desc: LaTeX Error: \begin{document} ended by \end{thenomenclature}.
Text:  \end{thenomenclature}

Your command was ignored.
Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.

LaTeX.cpp (658): Log line: ! Extra \endgroup.
LaTeX.cpp (848): line: 8
Desc: Extra \endgroup.
Text:  \end{thenomenclature}

Things are pretty mixed up, but I think the worst is over.

LaTeX.cpp (658): Log line: ) [4]

Since the usage of the nomenclature elements in the document is pretty
straight-forward, meaning I have no idea how to change or fix the document
to fix this error, I tried to manually remove parts of the lyx document to
get to a minimal example.lyx which has this problem, to report a bug.

I kept removing stuff and I got to a point where I have a section 2.2.3
containing some simple text and if I remove its text leaving the section
empty (only the title), exporting to PDF succeeds with no errors, whereas
before it failed. I don't see how I could minimize the lyx file to be able
to report the bug. Any suggestions?

Side question: Removing paragraphs led to broken refs: "BROKEN: Ref: ...".
To me these seem important, one would not want the final document to
contain them, but maybe I'm missing something. Why are these errors ignored
when exporting to PDF? Is there a way to validate a lyx file from the
command line, and in such a way that these errors are not ignored? I
searched for "compile lyx file" but did not find much.

Thanks,
Alex

Reply via email to