I would like to create a LyX module for the environment that I borrowed from the tex version of memoir book (code e in blue). I used Steve Litt's tutorial to experiment with it (code in green), when I run I get two errors in red.
I would appreciate if you explain to me what I am doing wrong. Also, It is preferable t have this as module rater than layout how should I go about doing it as a module? Many thanks, Artimess ! LaTeX Error: Environment Syntax undefined. ! LaTeX Error: \begin{document} ended by \end{Syntax}. %%%%% LaTeX syntax %%%% control space above/below center environment \newcommand*{\tightcenter}{% \topsep=0.25\onelineskip\trivlist \centering\item\relax} \def\endtightcenter{\endtrivlist} \newenvironment{syntax}{\begin{tightcenter} \begin{tabular}{|p{0.9\linewidth}|} \hline}% {\hline \end{tabular} \end{tightcenter}} #% Do not delete the line below; configure depends on this # \DeclareLaTeXClass[book]{mybook} Input stdclass.inc Preamble %%%%% LaTeX syntax %%%% control space above/below center environment \newcommand*{\tightcenter}{% \topsep=0.25\onelineskip\trivlist \centering\item\relax} \def\endtightcenter{\endtrivlist} \newenvironment{syntax}{% ~\\ \begin{tightcenter} \begin{tabular}{|p{0.9\linewidth}|} \hline}% {\hline \end{tabular} \end{tightcenter} ~\\ } EndPreamble Style Syntax Style Syntax CopyStyle Standard LatexType Environment LatexName Syntax LeftMargin "MMMMMM" RightMargin "MMMMMM" Font Shape Italic EndFont End