Dear all

I have been able to reproduce the problem. Attached there is a minimal lyx file together with a minimal preamble (foo.tex) which reproduces the problem.

* if the lyx preamble consists of \input{foo.tex} it does not work and the aforementioned error appears. If I enclose \input{foo.tex} between \makeatletter and \makeatother then it works, which really puzzles me.

*if the content of the preamble foo.tex is directly included in the lyx preamble
everything work like expected.

I am completely shocked about such behaviour. I am not sure what is going on and I'd appreciate somebody could comment about this. I have thought that could be related to master-child documents (the initial lyx file was a master and several child but now it is just one document) but it does not make any sense at all.

I usually write the preamble into an external text file, especially when the preamble is complicated like the one of the book in order to be able to easily edit it. However, I enclosing the lyx preamble of the actual book between \makeatletter and \makeatother another errors appear as it would be expected. So, I am completely lost and I do not know how the problem could be solved. Perhaps I am missing something quite evident and I am writing rubbish. Any comment or suggestion is appreciated.

Thank you very much for all your help
Best regards
Oscar


Oscar Lopez wrote:
Dear Lyxers

I am trying to use a lyx template which uses the memoir book class that worked pretty well with lyx-1.5.4 but now with lyx-1.6.2 refuses to compile because the lyx error (in fact latex error) says: \pagestyle{myMainheading} I've run across a `}' that doesn't seem to match anything. For example, `\def\a#1{...}' and `\a}' would produce this error. If you simply proceed now, the `\par' that I've just inserted will cause me to report a runaway argument that might be the root of the problem. But if your `}' was spurious, just type `2' and it will go away.

I thought that the problem could be related to this chunk of code

\makepsmarks{companion}{%
\l...@mkboth\markboth
\def\chaptermark##1{\markboth{##1}{##1}}% % left & right marks
\def\sectionmark##1{\markright{% % right mark
\ifnum \...@secnumdepth>\z@
\thesection. \% % section number
\fi
##1}}
}

because when I remove it, everything works (the above code is a copy of the memoir manual) I've tried to reproduce the error in a minimal document but unfortunately I am not able to reproduce the error which suggest me that it could be a problem related with other packages.

My question is that if there have been some modifications to the memoir layout from lyx-1.5 which can be responsible of the error. Do you have some advises to debug the problem because I am running out of ideas?

Thank you very much for all your help
Best regards
Oscar


%-----------------------------------------------------------------------
% Definir los encabezados y pies de los capitulos
\makepagestyle{myMainheading}
\makerunningwidth{myMainheading}{\textwidth}
\makeheadposition{myMainheading}{flushright}{flushleft}{}{}
\makepsmarks{myMainheading}{%
  \l...@mkboth\markboth
  \def\chaptermark##1{\markboth{##1}{##1}}% % left & right marks
  \def\sectionmark##1{\markright{%          % right mark
    \ifnum \...@secnumdepth>\z@
      \thesection .\hspace{4pt}                       % section number
    \fi
    ##1}}
}
\makeevenhead{myMainheading}{\normalfont\footnotesize\thepage}{}%
                        {\normalfont\footnotesize\leftmark}
\makeoddhead{myMainheading}{\normalfont\footnotesize\rightmark}{}%
                       {\normalfont\footnotesize\thepage}

Attachment: plantilla.lyx
Description: application/lyx

Reply via email to