for 6 days now, I've been facing a strange behavior of LyX. In fact, in a part of my report ,full of texts codes and images, just a small change (in a portion of a code in the TeX box or addition of a short sentence in a paragraph)can cause a dozen of errors that prevents the production of PDFLaTeX or any other kind of files. and what intrigues me more is that when I cancel the modifications, the errors persist!

I suspect the order I used to include my packages in the preamble, but this may be senseless since the same order used to work perfectly before.
Here are some of the mistakes LyX put out:
there is a total of 26 errors.Extra \endcsname.
Undefined control sequence.
Missing number, treated as zero.
Missing { inserted.
File ended while scanning text of \write.
Undefined control sequence.
Incomplete \iffalse; all text was ignored after line 4940.
Forbidden control sequence found while scanning text of \write.
Argument of \@writefile has an extra }.
Paragraph ended before \@writefile was complete.
Missing \endcsname inserted.
Missing \endcsname inserted.
Missing \endcsname inserted.
All of those errors points to parts of report (apart from the modified passage) that have always worked for me (that's why I didn't post them here).
Here is my preamble :
Code: Select all
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{fancyhdr}
\usepackage[absolute]{textpos}
\usepackage{fancybox}
\usepackage{color}
\definecolor{gris}{gray}{0.25}
\usepackage{listings}
\usepackage{fullpage}
%----------Text margins-----------
\setlength {\hoffset} {-0.21in} %
\setlength {\voffset} {-0.724in} %
\setlength {\textheight} {24.7cm} %
\setlength {\headheight} {0.8cm} % Height of the page header.
\setlength {\headsep} {0.6cm} % Distance from bottom of header to the body of text on a page.
\setlength {\topmargin} { 0.2in} % Length of margin at top of page above all printing. 1 inch is added to this value.
\setlength {\textwidth} {17.5cm} %
\setlength {\parskip} {5pt} % Distance between paragraphs.
Code: Select all
\lstset{language=C++, basicstyle=\small\ttfamily, commentstyle=\color{blue}\textit}
\begin{lstlisting}[frame=tb]
#include "systemc.h"
SC_MODULE (sup_des) {
sc_in_clk clock ;
sc_in<bool> reset, load_i, decrypt_i, ready_o;
sc_in < sc_uint < 64 > > data_o, data_i, key_i;
sc_int<8> co_clk;
sc_time start_time, end_time ;
sc_bit operation_start;
void sup_clock () {
while(1) {
if(operation_start==1)
co_clk = co_clk + 1 ;
wait();
}
}
SC_CTOR(sup_des) {
SC_THREAD(sup_clock);
sensitive << clock.pos();
}
};
\end{lstlisting}
Thanks.