LyXLyx compilation error

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
Dyon
Posts: 2
Joined: Sun Oct 19, 2014 4:23 pm

Lyx compilation error

Post by Dyon »

Hi I have the following code written in lyx preamble. It does not compile anymore and the following error messages are produced.

Code: Select all

1.  \documentclass[titlepage]{
                               csetr-notr}
The document may only declare one class.

2. \trnumber
              {0701}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

3. \trnumber{0
                701}
You're in trouble here.  Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.


4. \trdate
            {\reportDate}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Does someone have any answers for why this is happening ?

Code: Select all

    \documentclass[titlepage]{csetr-notr}
    \usepackage{graphicx}
    \usepackage{amsmath,amsfonts,amsthm,amssymb}
    \usepackage{setspace}
    \usepackage{url}
    \usepackage{fancyhdr}
    \usepackage{lastpage}
    \usepackage[font={small,it},belowskip=-10pt,aboveskip=5pt]{caption}
    \usepackage{multicol}

    \renewcommand{\and}{\hspace{.5cm}}
    \newcommand{\zz}{\hspace{.5cm}}

    \trnumber{0701}
    \trdate{\reportDate}

     \newcommand{\SupervisorName}{Prof. Sanjay Jha}
     \newcommand{\StudentName}{Mohsen\ Rezvani}
     \newcommand{\StudentID}{3387679}
     \newcommand{\StudentEmail}{mrezvani@cse.unsw.edu.au}
     \newcommand{\reportDate}{August\ 15,\ 2012}
     \newcommand{\researchTitle}{Thesis Proposal \\ \vspace{.8in}\textbf{Anomaly    Based Intrusion Detection System in Cloud Computing}}
     \newcommand{\assignmentTitle}{GSOE9400\ Assignment\ 3}

     \title{%
        \researchTitle
     }
     \author{%
      \StudentName\ (\StudentID)\\%[2em]
       \email{\StudentEmail}
     }


    \date{}
     \pagestyle{fancy}
      \pagestyle{fancy}
     \lhead{\StudentName}
    \chead{}
     \rhead{\assignmentTitle}
    \lfoot{\reportDate}
    \cfoot{}
    \rfoot{Page\ \thepage\ of\ \pageref{LastPage}}
    %\renewcommand\headrulewidth{0.4pt}
    %\renewcommand\footrulewidth{0.4pt}

    %\fancypagestyle{plain}{
       % \fancyhf{} %clear all header and footer fields on pagestyle plain for    chapter titles
       % \lhead{\StudentName}
      %  \chead{}
      %  \rhead{\assignmentTitle}
      %  \lfoot{\reportDate}
      %  \cfoot{}
         %\rfoot{Page\ \thepage\ of\ \pageref{LastPage}}
       % \renewcommand\headrulewidth{0.4pt}
        % \renewcommand\footrulewidth{0.4pt}
    %}

     %\setcounter{tocdepth}{4}
     %\setcounter{secnumdepth}{4}
    %\let\stdsection\section
     %\renewcommand\section{\newpage\stdsection}



      %% Hack by Heiko Oberdiek (on de.comp.text.tex)
      \usepackage{tabularx}

       %% Redefine the standard table
      \let\ORIGtabular\tabular
      \let\ORIGendtabular\endtabular
      \let\ORIGtabularx\tabularx
      \renewcommand*{\tabularx}{%
       \def\tabular{%
        \let\endtabular\ORIGendtabular
        \ORIGtabular
      }%
      \ORIGtabularx
    }

    \renewcommand{\tabular}{%
     %% The width of the table. Adjust if needed
       \tabularx{\linewidth}%
    }
 
     \renewcommand{\endtabular}{\endtabularx} 
Your thoughts will be much appreciated.

Thanks

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
StarValkyrie
Posts: 89
Joined: Fri Jan 24, 2014 12:42 am

Re: Lyx compilation error

Post by StarValkyrie »

Delete the line for document class from your Preamble and instead select that class from the Document>Document Settings>Document Class menu and type the titlepage option in the box right below that. That will clear up the "you can only declare one document class" error. Once that's sorted, post again showing whatever errors remain and I'll see what I can help with.
Dyon
Posts: 2
Joined: Sun Oct 19, 2014 4:23 pm

Re: Lyx compilation error

Post by Dyon »

Thanks StarValkyrie

Well this is what I get after I made those changes.

1. undefined control sequence

\trnumber
{0701}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

2.latex error: missing \begin{document}

\trnumber{0
701}
You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.

3. undefined control sequence
4. undefined control sequence
5. undefined control sequence
6. undefined control sequence
StarValkyrie
Posts: 89
Joined: Fri Jan 24, 2014 12:42 am

Re: Lyx compilation error

Post by StarValkyrie »

OK, it doesn't know what to do with the trnumber you've given it in the preamble. Check your package documentation and any templates you have to make sure you've formatted that part correctly.
Post Reply