ERT is not working
Hello forum, I have managed to import a custom .cls file into the lyx .layout file and things have been working fine so far. I have been inserting the necessary parameter through class options of the lyx interface and ERT code. Now I am stuck with the following issue. I am trying to generate a page for notation of abbreviation. The custom class has an example for this and if I directly copy it into my structure it works file. The example as follows: // \begin{notation}% Passing the option "old" to the notation environment will redefine the notationtabular environment so that it produces an old style LaTeX tabular instead of a ctable.sty style tabular. \centering \begin{notationtabular}{Förkortningar}{Förkortning}{Betydelse} \abbrARMA\index{ARMA@\abbrARMA!abbreviation} & Auto-regressive moving average \\ \abbrPID\index{PID@\abbrPID!abbreviation} & Proportional, integral, differential (regulator) \\ \end{notationtabular} \end{notation} // In my case I made the changes as follows , but it does not work : /// \begin{notation}% Passing the option "old" to the notation environment will redefine the notationtabular environment so that it produces an old style LaTeX tabular instead of a ctable.sty style tabular. \centering \begin{notationtabular}{Terminology}{Abbreviation}{Signifies} \abbrAM\index{AM@\abbrAM!abbreviation} & Additive manufacturing \\ \end{notationtabular} \end{notation} /// I could not find the mistake I am making here. The ERT code that is inserted is: // \selectlanguage{english} \makeFrontPage \frontmatter \maketitle \makeLibraryPage{\input{engelsk-sammanfattning}} \begin{abstract}[english] \input{engelsk-sammanfattning} \end{abstract} \include{tack} \tableofcontents{} \include{notation} \mainmatter / when i run pdflatex I get the following information at the console: // [7]) [8] (./notation.tex (/usr/share/texlive/texmf-dist/tex/latex/kpfonts/t1jkp.fd) ! Undefined control sequence. \abbrAM l.4 \abbrAM \index{AM@\abbrAM!abbreviation} & Additive manufacturing \\ /// The pdf is generated though, but the notation page does not show AM, only the elaboration is shown. Some hint is urgently needed. Thanks
Re: ERT is not working
On 2016-01-11, Sajjad wrote: Hej Sajjad, > I have managed to import a custom .cls file into the lyx .layout file and > things have been working fine so far. I have been inserting the necessary > parameter through class options of the lyx interface and ERT code. Now I am > stuck with the following issue. I am trying to generate a page for notation > of abbreviation. The custom class has an example for this and if I directly > copy it into my structure it works file. The example as follows: ... Without the time to go into detail about your example, a couple of things to try: * if you have a LaTeX file that works and a LyX file that does not, export the LyX file to LaTeX (make sure not to overwrite your working example) and watch for differences. Alternatively, open the source panel (View>Source), set "complete document" and compare this with the working LaTeX example. * Adapting LaTeX code tips or examples to LyX, remember that some LaTeX code belongs to the document preamble (before \begin{document}). In LyX this must go to the user preamble (Document>Settings>LaTeX preamble). * Some options can be given to LyX loaded packages via the various Document>Settings, however, there are cases where a construct cannot be reproduced in a LyX document (sometimes this can be solved via a special layout). Günter