# “Undefined” error using LyX

I always get these errors when I try to show a file;

LaTeX Error: \eqdeclaration undefined.
LaTeX Error: \pagedeclaration undefined.
LaTeX Error: \nomname undefined.


I can't find a fix for that. I didn't find anything about it in the tutorial or in the manuals.

Some one had the same errors years ago. Found it in the LyX mailing list. But I can't find an answer. Can somebody help me?

I am using Manjaro Linux!

• Please post a minimal example. Does this happen with any document? If so, make a very simple document and paste it in here (a .lyx file is just plain text). For more information see wiki.lyx.org/FAQ/MinimalExample – scottkosty Oct 27 '15 at 23:53

You must define somewhere these control sequences. This can be done in the body of the document in a ERT box, and/or in the LaTeX preamble, directly ( writing yourself in plain TeX \def\eqdeclaration#1{#1 ...} or LaTeX code as as \newcommand{\eqdeclaration}[1]{#1...}, etc.) or including a .tex file with these macros (\input{mymacros}) or a package (.sty file) or selecting a document class (.cls file) that have these definitions or load these definitions of another file.

Among all these possibilities, without see a MWE, I'll guess watching my crystal ball: You need \usepackage{nomencl} in the LaTeX Preamble (menu Document > Settings... ) but this must be done automatically when you Insert any Nomenclature Entry..., so at the end, we simply need more information to know the source of these errors. First, make a plain tex file without Lyx named test.tex with any plain text editor:

\documentclass{article}
\usepackage{nomencl}
\begin{document}
\nomname
\eqdeclaration
\pagedeclaration
\end{document}


Then compile the next MWE in the system prompt with pdflatex test.tex. It should produce a test.pdf file with a non non-sense text:

Nomemclature, see equation (, page )")

... but without errors. Otherwise the problem is not related with LyX, but with the LaTeX installation.

• @Max My MWE cannot just copied & pasted in LyX. I added some clarification. I strongly suggest you first understand the very basic structure of LaTeX documents (explained in thousands of places) ad how are compiled without LyX, then you can understand how LyX make most of this work for you, and what you can do in case of LaTeX errors. – Fran Oct 30 '15 at 18:22