LyXPackage Inclusion Sequence and multiple Errors?

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
User avatar
tux_in_trouble
Posts: 3
Joined: Sat Dec 24, 2011 6:36 am

Package Inclusion Sequence and multiple Errors?

Post by tux_in_trouble »

Hi all,

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! :shock:

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:
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.
there is a total of 26 errors.

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.
This is a small exemple of code inside the TeX box (using listings package):

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}
I would be grateful for your help 'cause I'm really on a big trouble since I'm about missing the deposit deadline.

Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Package Inclusion Sequence and multiple Errors?

Post by Stefan Kottwitz »

Hi,

I would look at the first error first. Following errors could be caused by the first one, it could be many.

Just post the code here where the problem occurs. It can help to create a minimal working example and post it here. Have a look at the link for information why that's the best way for getting help.

Stefan
LaTeX.org admin
User avatar
tux_in_trouble
Posts: 3
Joined: Sat Dec 24, 2011 6:36 am

Package Inclusion Sequence and multiple Errors?

Post by tux_in_trouble »

Hi Stefan_K, thanks for replying.

following the MWE creation guide, I simplified and shortened my code so that I found that the errors occur only within a unique chapter (among 5 forming the report), but I couldn't shorten this one more and consequently, didn't find the cause of my problems,'cause as I said on my first post, any changing on this would cause the mentioned errors and it's not reasonable to post here my code of about 20 pages !
then I exported my Lyx file (my supposed MWE) to a tex format to to avoid those errors 'cause I suspect that Lyx has something to do with them, I installed TexLive and textworks but when tried to output a pdflatex I got error of missing figure thought it wasn't missing.

if this would be a cause, the first error of my code, which is Missing control sequence inserted, gives the message below :

Code: Select all

\contentsline
                   {subsection}{\numberline {1.4.3}\'Edition du mod\`ele ECI...
Please don't say `\def cs{...}', say `\def\cs{...}'.
I've inserted an inaccessible control sequence so that your
definition will be completed without mixing me up too badly.
You can recover graciously from this error, if you're
careful; see exercise 27.2 in The TeXbook.
I downloaded legaly the Texbook and I find the 27.2 Exercice (page 208/494) but I didn' know how to use it in my code.

Code: Select all

EXERCISE 27.2
Here's a case in which a backslash was inadvertently omitted:
! Missing control sequence inserted.
<inserted text>
\inaccessible
<to be read again>
m
l.10 \def m
acro{replacement}
TEX needs to see a control sequence after `\def', so it has inserted one that will allow
the processing to continue. (This control sequence is shown as `\inaccessible', but
it has no relation to any control sequence that you can actually specify in an error-free manuscript.) If you simply hit <return> at this point, TEX will define the inaccessible control sequence, but that won't do you much good; later references to \macro will be
undefined. Explain how to recover from this error so that the effect will be the same as if line 10 of the input le had said `\def\macro{replacement}'.
I sink into an endless spiral.
User avatar
tux_in_trouble
Posts: 3
Joined: Sat Dec 24, 2011 6:36 am

Re: Package Inclusion Sequence and multiple Errors?

Post by tux_in_trouble »

hi,

any suggestion or comment ?

thanks
Post Reply