86

here's my thesis Latex files: http://www.mediafire.com/download/c7q8z4v6gv864rk/triet_thesis_clean.rar

Please help me to fix the error, I've tried all the things I can find with Google :( :

   ! Missing \endcsname inserted.
   <to be read again>
   \begingroup
   l.52 ...}intopreamble]Deobfuscation}{{4.1.1}{xii}}
   The control sequence marked <to be read again> should
   not appear between \csname and \endcsname.
   (D:\DH\Luan_Van_Tot_Nghiep\Latex\triet_thesis_test\LVTN.aux

5 Answers5

78

You have a wrong character in one of your labels:

\subsection{LLVM}
\label{subsec:LLVMDeobfuscation}

where, between LLVM and Deobfuscation, you have the Unicode character U+200E (LEFT-TO-RIGHT MARK) that somehow sneaked in.

Retype the label and you should be OK.

egreg
  • 1,121,712
13

For others if you have not tried to delete all the generated files from pdflatex and bibtex, then do that before any other changes, because it could be a compilation error.

JTIM
  • 2,869
3

I never wrote Vietnamese and don't know if it can be done with pdflatex. However, if I use xelatex instead and

\documentclass[a4paper,oneside]{report}
%\usepackage[utf8x]{vietnam}%% xelatex is by default utf8
\usepackage{fontspec}%% load unicode fonts
\usepackage{graphicx}
\usepackage{pdfpages}
\usepackage{suthesis-2e}
\begin{document}
 ...

I'll get a proper output with out any errors.

  • 1
    Unfortunately, I have to write my thesis in Vietnamese :( . Could you help me a little bit further? – Minh-Triet Pham Tran Nov 26 '13 at 16:36
  • as I wrote: use may preamble and then run xelatex instead of pdflatex. Every editor ahopuld have such a button or topix for xelatex –  Nov 26 '13 at 16:41
  • 1
    No, the OP probably won't get proper output: the error is caused by a spurious (invisibile) character in a label and probably all references to it will not be resolved. – egreg Nov 26 '13 at 17:45
  • I get all references right with xelatex –  Nov 26 '13 at 18:29
  • 1
    You get references right provided you build \ref{...} by copy-pasting from the argument of \label. If you type directly \ref{subsec:LLVMDeobfuscation} you can't get a correct reference. – egreg Nov 27 '13 at 11:17
  • I did not used copy & paste! –  Nov 27 '13 at 11:33
3

If you use \usepackage{underscore} the '_' character in labels will cause this error.

To fix this add the following: \usepackage[english]{babel}

Edit

Here's an example to show the fix works.

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
% try commenting out the packages below
\usepackage{underscore}
\usepackage[english]{babel}
\begin{document}

The banana figure, see Figure \ref{banana_two}.

This is going to be a line with an underscored filename: Banana_getting_unpealed.png

\begin{figure} \caption{Bananas.} \label{banana_two} \end{figure}

\end{document}

Cyrille
  • 150
2

In some cases, malformed options in \includegraphics (from the graphicx package) will cause this error (! Missing \endcsname inserted.). One example is forgetting width=, thus \includegraphics[1.0\textwidth]{filename} instead of \includegraphics[width=1.0\textwidth]{filename}.

I am uncertain if this occurs in every case or just with particular documentclasses (beamer here) and in the presence of particular other packages.

0range
  • 263