LaTeX forum ⇒ LyXLyx compilation error

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

Lyx compilation error

Postby Dyon » Fri May 15, 2015 3:03 pm

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

  1. 1. \documentclass[titlepage]{
  2. csetr-notr}
  3. The document may only declare one class.
  4.  
  5. 2. \trnumber
  6. {0701}
  7. The control sequence at the end of the top line
  8. of your error message was never \def'ed. If you have
  9. misspelled it (e.g., `\hobx'), type `I' and the correct
  10. spelling (e.g., `I\hbox'). Otherwise just continue,
  11. and I'll forget about whatever was undefined.
  12.  
  13. 3. \trnumber{0
  14. 701}
  15. You're in trouble here. Try typing <return> to proceed.
  16. If that doesn't work, type X <return> to quit.
  17.  
  18.  
  19. 4. \trdate
  20. {\reportDate}
  21. The control sequence at the end of the top line
  22. of your error message was never \def'ed. If you have
  23. misspelled it (e.g., `\hobx'), type `I' and the correct
  24. spelling (e.g., `I\hbox'). Otherwise just continue,
  25. and I'll forget about whatever was undefined.


Does someone have any answers for why this is happening ?
  1. \documentclass[titlepage]{csetr-notr}
  2. \usepackage{graphicx}
  3. \usepackage{amsmath,amsfonts,amsthm,amssymb}
  4. \usepackage{setspace}
  5. \usepackage{url}
  6. \usepackage{fancyhdr}
  7. \usepackage{lastpage}
  8. \usepackage[font={small,it},belowskip=-10pt,aboveskip=5pt]{caption}
  9. \usepackage{multicol}
  10.  
  11. \renewcommand{\and}{\hspace{.5cm}}
  12. \newcommand{\zz}{\hspace{.5cm}}
  13.  
  14. \trnumber{0701}
  15. \trdate{\reportDate}
  16.  
  17. \newcommand{\SupervisorName}{Prof. Sanjay Jha}
  18. \newcommand{\StudentName}{Mohsen\ Rezvani}
  19. \newcommand{\StudentID}{3387679}
  20. \newcommand{\StudentEmail}{mrezvani@cse.unsw.edu.au}
  21. \newcommand{\reportDate}{August\ 15,\ 2012}
  22. \newcommand{\researchTitle}{Thesis Proposal \\ \vspace{.8in}\textbf{Anomaly Based Intrusion Detection System in Cloud Computing}}
  23. \newcommand{\assignmentTitle}{GSOE9400\ Assignment\ 3}
  24.  
  25. \title{%
  26. \researchTitle
  27. }
  28. \author{%
  29. \StudentName\ (\StudentID)\\%[2em]
  30. \email{\StudentEmail}
  31. }
  32.  
  33.  
  34. \date{}
  35. \pagestyle{fancy}
  36. \pagestyle{fancy}
  37. \lhead{\StudentName}
  38. \chead{}
  39. \rhead{\assignmentTitle}
  40. \lfoot{\reportDate}
  41. \cfoot{}
  42. \rfoot{Page\ \thepage\ of\ \pageref{LastPage}}
  43. %\renewcommand\headrulewidth{0.4pt}
  44. %\renewcommand\footrulewidth{0.4pt}
  45.  
  46. %\fancypagestyle{plain}{
  47. % \fancyhf{} %clear all header and footer fields on pagestyle plain for chapter titles
  48. % \lhead{\StudentName}
  49. % \chead{}
  50. % \rhead{\assignmentTitle}
  51. % \lfoot{\reportDate}
  52. % \cfoot{}
  53. %\rfoot{Page\ \thepage\ of\ \pageref{LastPage}}
  54. % \renewcommand\headrulewidth{0.4pt}
  55. % \renewcommand\footrulewidth{0.4pt}
  56. %}
  57.  
  58. %\setcounter{tocdepth}{4}
  59. %\setcounter{secnumdepth}{4}
  60. %\let\stdsection\section
  61. %\renewcommand\section{\newpage\stdsection}
  62.  
  63.  
  64.  
  65. %% Hack by Heiko Oberdiek (on de.comp.text.tex)
  66. \usepackage{tabularx}
  67.  
  68. %% Redefine the standard table
  69. \let\ORIGtabular\tabular
  70. \let\ORIGendtabular\endtabular
  71. \let\ORIGtabularx\tabularx
  72. \renewcommand*{\tabularx}{%
  73. \def\tabular{%
  74. \let\endtabular\ORIGendtabular
  75. \ORIGtabular
  76. }%
  77. \ORIGtabularx
  78. }
  79.  
  80. \renewcommand{\tabular}{%
  81. %% The width of the table. Adjust if needed
  82. \tabularx{\linewidth}%
  83. }
  84.  
  85. \renewcommand{\endtabular}{\endtabularx}


Your thoughts will be much appreciated.

Thanks

Tags:

StarValkyrie
Posts: 89
Joined: Fri Jan 24, 2014 12:42 am

Postby StarValkyrie » Fri May 15, 2015 9:33 pm

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

Postby Dyon » Sun May 17, 2015 1:54 pm

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

Postby StarValkyrie » Mon May 18, 2015 12:39 am

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.


Return to “LyX”

Who is online

Users browsing this forum: No registered users and 2 guests