Missing endcsname inserted как исправить

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:DHLuan_Van_Tot_NghiepLatextriet_thesis_testLVTN.aux

asked Nov 26, 2013 at 16:07

Minh-Triet Pham Tran's user avatar

2

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.

0xC0000022L's user avatar

0xC0000022L

9352 gold badges8 silver badges25 bronze badges

answered Nov 26, 2013 at 17:27

egreg's user avatar

8

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.

answered Aug 25, 2017 at 13:42

JTIM's user avatar

JTIMJTIM

2,6692 gold badges13 silver badges11 bronze badges

1

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.

answered Nov 26, 2013 at 16:18

6

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}

answered Sep 6, 2020 at 19:14

Cyrille's user avatar

3

You must log in to answer this question.

Not the answer you’re looking for? Browse other questions tagged

.

mturan

Posts: 14
Joined: Wed Nov 10, 2010 10:01 pm

! Missing endcsname inserted. error when inserting figure

Hi there,

I am trying to figure out how to get my figure on my document and have no error message. When I use english babel, there is no problem, however when I use the turkish babel, I get the errors as shown below. I need to use the turkish babel for hyphenation. avl.jpg is attached. Do you have any idea why? Thanks for the help in advance

I use Texniccenter and the Miktex

! Missing endcsname inserted.
<to be read again>
relax
l.24 …raphics[width=0.5textwidth]{avl.jpg}

! Extra endcsname.
<recently read> endcsname
l.24 …raphics[width=0.5textwidth]{pics/avl.jpg}
I’m ignoring this, since I wasn’t doing a csname.

documentclass{article}
usepackage[latin5]{inputenc}
%usepackage[english]{babel}
usepackage[turkish]{babel}
usepackage{graphicx}
usepackage[left=4cm, right=2.5cm, top=2.5cm, bottom=2.5cm%, includefoot, headheight=13.6pt
]{geometry}
renewcommand{rmdefault}{phv} % Arial
renewcommand{sfdefault}{phv} % Arial %added by turan



begin{document}

section{MTRN}

LaTeXe{} 'de Türkçe metin.

Bugün de Devletler Hukukunun başlıca kişileri bağımsız devletler olmakla beraber,bunların yanı sıra yetkileri sınırlı devletler, devlet sayılmayan topluluklar vardır.

begin{figure}[h]
	centering
	includegraphics[width=0.5textwidth]{pics/avl.jpg}
	caption{deneme}
	label{fig:avl}
end{figure}


Değerlendirme merkezleri ise, işgörenin performansı ve iş yapış şekli ile ilgili olarak örgüt içinde kendisine bir geri bildirim sağlar. İşgörenlerin performansı karşılaştırılır ve kariyer gelişimi için uygun eğitimler belirlenir. 

end{document}
Attachments
avl.jpg
avl.jpg (24.76 KiB) Viewed 17904 times

Last edited by mturan on Wed Dec 22, 2010 12:31 pm, edited 3 times in total.


LaTeX Beginner's Guide LaTeX Cookbook

User avatar

frabjous

Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

! Missing endcsname inserted. error when inserting figure

Postby frabjous » Fri Dec 10, 2010 2:27 am

Seems to be a bug in babel regarding Turkish typesetting rules for inserting space around =; it’s applying it even in the untypeset “width=0.5” part of your includegraphics line.

There’s some discussion of this here.

A workaround seems to be to deactivate the = rule temporarily. For example, this works for me:

documentclass{article}
usepackage[utf8]{inputenc}
%usepackage[english]{babel}
usepackage[turkish]{babel}
usepackage{graphicx}
usepackage[left=4cm, right=2.5cm, top=2.5cm, bottom=2.5cm%, includefoot, headheight=13.6pt
]{geometry}
renewcommand{rmdefault}{phv} % Arial
renewcommand{sfdefault}{phv} % Arial %added by turan

begin{document}

section{MTRN}

LaTeXe{} 'de Türkçe metin.

Bugün de Devletler Hukukunun başlıca kişileri bağımsız devletler olmakla beraber,bunların yanı sıra yetkileri sınırlı devletler, devlet sayılmayan topluluklar vardır.

begin{figure}[h]
   centering
   shorthandoff{=}
   includegraphics[width=0.5textwidth]{avl.jpg}
   shorthandon{=}
   caption{deneme}
   label{fig:avl}
end{figure}


Değerlendirme merkezleri ise, işgörenin performansı ve iş yapış şekli ile ilgili olarak örgüt içinde kendisine bir geri bildirim sağlar. İşgörenlerin performansı karşılaştırılır ve kariyer gelişimi için uygun eğitimler belirlenir.

end{document}

(I changed the inputenc line to match my editor’s and the forum’s character encoding; you may need to change it back.)


mturan

Posts: 14
Joined: Wed Nov 10, 2010 10:01 pm

Re: ! Missing endcsname inserted. error when inserting figu

Postby mturan » Fri Dec 10, 2010 3:06 am

I read the discussion and used usepackage{xkeyval} initially which reduced the number of errors from 12 to 2 without a solution. Yours worked fine with me too but would there be any permanent solution to this issue somehow?


mturan

Posts: 14
Joined: Wed Nov 10, 2010 10:01 pm

! Missing endcsname inserted. error when inserting figure

Postby mturan » Wed Dec 22, 2010 11:35 am

This quote explains why it happens. Does anybody know how/what to change in the dtx file?

The file turkish.dtx defines all the language definition macros for the Turkish language. Turkish typographic rules specify that a little `white space’ should be added before the characters `:’, `!’ and `=’. In order to insert this white space automatically these characters are made `active’. Also frenhspacing is set.

from “Babel, a multilingual package for use with LATEX’s
standard document classes”

the way active characters are dealt with is completely changed. They are
called `shorthands’; one can have three levels of shorthands: on the user
level, the language level and on `system level’. A consequence of the new
way of handling active characters is that they are now written to auxiliary
les `verbatim’;

http://www.phys.ethz.ch/~ihn/latex/user.pdf


mturan

Posts: 14
Joined: Wed Nov 10, 2010 10:01 pm

! Missing endcsname inserted. error when inserting figure

Postby mturan » Wed Dec 22, 2010 12:31 pm

I made couple of changes in the turkish.ldf file and placed (save as) in the same directory where my project is at. Works fine now

Texniccenter 1.0 stable
Mixtex 2.9

   
1-%initiate@active@char{=}

2-addtoextrasturkish{%
  bbl@activate{:}bbl@activate{!}}%bbl@activate{=}}
3-%declare@shorthand{turkish}{=}{%
%  ifmmode
%    string=%
%  elserelax
%    ifhmode
%      ifdimlastskip>z@
%        unskipkernfontdimen2font
%        kern-1.4fontdimen3font
%      fi
%    fi
%    string=%
%  fi}


This is made by a bad label command (that you have not shown) it is best to only use a-z, 0-9 in label arguments. You have used some active character or a command that produced relax, most likely label{martedì}

Related videos on Youtube

LaTeX Tutorial 13 Two Common LaTeX errors

03 : 28

LaTeX Tutorial 13 Two Common LaTeX errors

How to Fix Missing Journal Names in Endnote

07 : 16

How to Fix Missing Journal Names in Endnote

Recover Hidden Column A.mp4

01 : 55

Recover Hidden Column A.mp4

[SOLVED] Are you missing a using directive or an assembly reference Visual Studio

01 : 57

[SOLVED] Are you missing a using directive or an assembly reference Visual Studio

How to Get Back Missing Safely Remove Hardware Icon for Pen Drive

03 : 26

How to Get Back Missing Safely Remove Hardware Icon for Pen Drive

Comments

  • I’m getting this error:

    Missing endcsname inserted. ...45}{martedìrelax }{figure.caption.21}{}}
    

    martedì.png is the name of the file (actually was, since I renamed it) and I get the same error for all files containing an accent.

    This is the line where I get the error in the .aux file:

    newlabel{fig:martedIeC {`i }}{{15a}{45}{martedìrelax }{figure.caption.21}{}}
    

    Do you have any suggestions?

    Thank you

    • you do not make it very easy for anyone to help. But this is made by a bad label command (that you have not shown) it is best to only use a-z, 0-9 in label arguments. You have used some active character or a command that produced relax

    • Don’t use accented letters in labels. You apparently did label{martedì}: you can’t. Well, in principle label{detokenize{martedì}} and ref{detokenize{martedì}} would work, but…

    • Thank you @DavidCarlisle, I removed accents from figures labels and captions and solved the problem. The (funny) thing is that I now included the file into my main one while before, when compiling it as a document itself I didn’t have any issue. Please answer the question so that the I could tick it

Recents


0

1

Уважаемые технари. Помогите медицине!
В программе Lyx. Компеляция русского текста в формат DVI происходит успешно.
Ссылки на литературные источники из bib файла на английском языке и добавление их в литературный обзор происходит успешно.
При попытке ссылки на литературный источник на русском языке происходит ошибка компиляции.
Помогите устранить ошибку.

Ошибки Latex.
Missing endcsname inserted.

…hammad2013}cite{Шихнабиева2013}

The control sequence marked <to be read again> should
not appear between csname and endcsname.

Missing endcsname inserted.
…hammad2013}cite{Шихнабиева2013}

The control sequence marked <to be read again> should
not appear between csname and endcsname.

Extra endcsname.
…hammad2013}cite{Шихнабиева2013}

I’m ignoring this, since I wasn’t doing a csname.

  • I have read and acknowledged this HOWTO article:
    Submitting a MiKTeX problem report

I publish code (Nautical Almanacs) that generate LaTeX and it worked flawlessly up MiKTeX version 21.3. Now it crashes with MiKTeX version 21.7 and it appears to be with the \[0.3cm] at the end of the includegraphics line. Is this a bug in MiKTeX?

The LaTeX code begins as follows…

documentclass[10pt, twoside, a4paper]{report}
%usepackage[utf8]{inputenc}
usepackage[english]{babel}
usepackage{fontenc}
usepackage[nomarginpar, top=10mm, bottom=15mm, left=10mm, right=10mm]{geometry}
usepackage[table]{xcolor}
% [table] option loads the colortbl package for coloring rows, columns, and cells within tables.
definecolor{LightCyan}{rgb}{0.88,1,1}
definecolor{darknight}{rgb}{0.18, 0.27, 0.33}
usepackage{booktabs}
definecolor{darknight}{rgb}{0.18, 0.27, 0.33}
definecolor{khaki}{rgb}{0.76, 0.69, 0.57}
usepackage{multirow}
newcommand{HRule}{rule{linewidth}{0.5mm}}
setlength{footskip}{15pt}
usepackage[pdftex]{graphicx}	% for includegraphics
usepackage{tikz}				% for draw  (load after 'graphicx')
%showboxbreadth=50  % use for logging
%showboxdepth=50    % use for logging
%DeclareUnicodeCharacter{00B0}{ensuremath{{}^circ}}
setlengthfboxsep{1.5pt}       % ONLY used by colorbox in alma_skyfield.py
begin{document}
% for the title page only...
newgeometry{nomarginpar, top=21mm, bottom=15mm, left=10mm, right=10mm}
    begin{titlepage}
    begin{center}
    textsc{Large Generated using Ephem and Skyfield}\
    large http://rhodesmill.org/skyfield/\[0.7cm]
    % TRIM values: left bottom right top
    includegraphics[clip, trim=12mm 20cm 12mm 21mm, width=0.92textwidth]{C:\Python39\Lib\site-packages\skyalmanac\data\A4chart0-180_P.pdf}\[0.3cm]
    includegraphics[clip, trim=12mm 20cm 12mm 21mm, width=0.92textwidth]{C:\Python39\Lib\site-packages\skyalmanac\data\A4chart180-360_P.pdf}\[1.5cm]
    textsc{huge The Nautical Almanac}\[1.0cm]
    HRule \[0.5cm]
    { Huge bfseries 2021}\[0.2cm]
    HRule \
    begin{center}begin{tabular}[t]{rl}
    largeemph{Author:} & large Andrew textsc{Bauer}\
    largeemph{Original concept from:} & large Enno textsc{Rodegerdts}\
    end{tabular}end{center}
    {large today}
    HRule \[0.2cm]
    end{center}
    begin{description}footnotesize
    item[Disclaimer:] These are computer generated tables - use them at your own risk.
    The accuracy has been randomly checked with JPL HORIZONS System, but cannot be guaranteed.
    This means I cannot be held liable if you get lost on the oceans because of errors in this publication.
    Besides, this publication only contains the 'daily pages' of the Nautical Almanac: an official version of the Nautical Almanac is indispensable.
    end{description}
end{titlepage}

and pdflatex filename.tex fails as follows:


This is pdfTeX, Version 3.141592653-2.6-1.40.23 (MiKTeX 21.7)
entering extended mode
(almanac_2021.tex
LaTeX2e <2021-06-01> patch level 1
L3 programming layer <2021-07-12>
(C:Program FilesMiKTeXtex/latex/basereport.cls
Document Class: report 2021/02/12 v1.4n Standard LaTeX document class
(C:Program FilesMiKTeXtex/latex/basesize10.clo))
(C:Program FilesMiKTeXtex/generic/babelbabel.sty
(C:Program FilesMiKTeXtex/generic/babelbabel.def
(C:Program FilesMiKTeXtex/generic/babeltxtbabel.def))
*************************************
* Local config file bblopts.cfg used
*
(C:Program FilesMiKTeXtex/latex/arabibblopts.cfg)
(C:Program FilesMiKTeXtex/latex/babel-englishenglish.ldf))
(C:Program FilesMiKTeXtex/latex/basefontenc.sty)
(C:Program FilesMiKTeXtex/latex/geometrygeometry.sty
(C:Program FilesMiKTeXtex/latex/graphicskeyval.sty)
(C:Program FilesMiKTeXtex/generic/iftexifvtex.sty
(C:Program FilesMiKTeXtex/generic/iftexiftex.sty))
(C:Program FilesMiKTeXtex/latex/geometrygeometry.cfg))
(C:Program FilesMiKTeXtex/latex/xcolorxcolor.sty
(C:Program FilesMiKTeXtex/latex/graphics-cfgcolor.cfg)
(C:Program FilesMiKTeXtex/latex/graphics-defpdftex.def)
(C:Program FilesMiKTeXtex/latex/colortblcolortbl.sty
(C:Program FilesMiKTeXtex/latex/toolsarray.sty)))
(C:Program FilesMiKTeXtex/latex/booktabsbooktabs.sty)
(C:Program FilesMiKTeXtex/latex/multirowmultirow.sty)
(C:Program FilesMiKTeXtex/latex/graphicsgraphicx.sty
(C:Program FilesMiKTeXtex/latex/graphicsgraphics.sty
(C:Program FilesMiKTeXtex/latex/graphicstrig.sty)
(C:Program FilesMiKTeXtex/latex/graphics-cfggraphics.cfg)))
(C:Program FilesMiKTeXtex/latex/pgf/frontendlayertikz.sty
(C:Program FilesMiKTeXtex/latex/pgf/basiclayerpgf.sty
(C:Program FilesMiKTeXtex/latex/pgf/utilitiespgfrcs.sty
(C:Program FilesMiKTeXtex/generic/pgf/utilitiespgfutil-common.tex
(C:Program FilesMiKTeXtex/generic/pgf/utilitiespgfutil-common-lists.tex))
(C:Program FilesMiKTeXtex/generic/pgf/utilitiespgfutil-latex.def)
(C:Program FilesMiKTeXtex/generic/pgf/utilitiespgfrcs.code.tex
(C:Program FilesMiKTeXtex/generic/pgfpgf.revision.tex)))
(C:Program FilesMiKTeXtex/latex/pgf/basiclayerpgfcore.sty
(C:Program FilesMiKTeXtex/latex/pgf/systemlayerpgfsys.sty
(C:Program FilesMiKTeXtex/generic/pgf/systemlayerpgfsys.code.tex
(C:Program FilesMiKTeXtex/generic/pgf/utilitiespgfkeys.code.tex
(C:Program FilesMiKTeXtex/generic/pgf/utilitiespgfkeysfiltered.code.tex))
(C:Program FilesMiKTeXtex/generic/pgf/systemlayerpgf.cfg)
(C:Program FilesMiKTeXtex/generic/pgf/systemlayerpgfsys-pdftex.def
(C:Program FilesMiKTeXtex/generic/pgf/systemlayerpgfsys-common-pdf.def)))
(C:Program FilesMiKTeXtex/generic/pgf/systemlayerpgfsyssoftpath.code.tex)
(C:Program FilesMiKTeXtex/generic/pgf/systemlayerpgfsysprotocol.code.tex))
(C:Program FilesMiKTeXtex/generic/pgf/basiclayerpgfcore.code.tex
(C:Program FilesMiKTeXtex/generic/pgf/mathpgfmath.code.tex
(C:Program FilesMiKTeXtex/generic/pgf/mathpgfmathcalc.code.tex
(C:Program FilesMiKTeXtex/generic/pgf/mathpgfmathutil.code.tex)
(C:Program FilesMiKTeXtex/generic/pgf/mathpgfmathparser.code.tex)
(C:Program FilesMiKTeXtex/generic/pgf/mathpgfmathfunctions.code.tex
(C:Program FilesMiKTeXtex/generic/pgf/mathpgfmathfunctions.basic.code.tex)
(C:Program FilesMiKTeXtex/generic/pgf/mathpgfmathfunctions.trigonometric.co
de.tex)
(C:Program FilesMiKTeXtex/generic/pgf/mathpgfmathfunctions.random.code.tex)

(C:Program FilesMiKTeXtex/generic/pgf/mathpgfmathfunctions.comparison.code.
tex)
(C:Program FilesMiKTeXtex/generic/pgf/mathpgfmathfunctions.base.code.tex)
(C:Program FilesMiKTeXtex/generic/pgf/mathpgfmathfunctions.round.code.tex)
(C:Program FilesMiKTeXtex/generic/pgf/mathpgfmathfunctions.misc.code.tex)
(C:Program FilesMiKTeXtex/generic/pgf/mathpgfmathfunctions.integerarithmeti
cs.code.tex)))
(C:Program FilesMiKTeXtex/generic/pgf/mathpgfmathfloat.code.tex))
(C:Program FilesMiKTeXtex/generic/pgf/mathpgfint.code.tex)
(C:Program FilesMiKTeXtex/generic/pgf/basiclayerpgfcorepoints.code.tex)
(C:Program FilesMiKTeXtex/generic/pgf/basiclayerpgfcorepathconstruct.code.t
ex)
(C:Program FilesMiKTeXtex/generic/pgf/basiclayerpgfcorepathusage.code.tex)
(C:Program FilesMiKTeXtex/generic/pgf/basiclayerpgfcorescopes.code.tex)
(C:Program FilesMiKTeXtex/generic/pgf/basiclayerpgfcoregraphicstate.code.te
x)
(C:Program FilesMiKTeXtex/generic/pgf/basiclayerpgfcoretransformations.code
.tex) (C:Program FilesMiKTeXtex/generic/pgf/basiclayerpgfcorequick.code.tex
) (C:Program FilesMiKTeXtex/generic/pgf/basiclayerpgfcoreobjects.code.tex)
(C:Program FilesMiKTeXtex/generic/pgf/basiclayerpgfcorepathprocessing.code.
tex) (C:Program FilesMiKTeXtex/generic/pgf/basiclayerpgfcorearrows.code.tex
) (C:Program FilesMiKTeXtex/generic/pgf/basiclayerpgfcoreshade.code.tex)
(C:Program FilesMiKTeXtex/generic/pgf/basiclayerpgfcoreimage.code.tex
(C:Program FilesMiKTeXtex/generic/pgf/basiclayerpgfcoreexternal.code.tex))
(C:Program FilesMiKTeXtex/generic/pgf/basiclayerpgfcorelayers.code.tex)
(C:Program FilesMiKTeXtex/generic/pgf/basiclayerpgfcoretransparency.code.te
x) (C:Program FilesMiKTeXtex/generic/pgf/basiclayerpgfcorepatterns.code.tex
) (C:Program FilesMiKTeXtex/generic/pgf/basiclayerpgfcorerdf.code.tex)))
(C:Program FilesMiKTeXtex/generic/pgf/modulespgfmoduleshapes.code.tex)
(C:Program FilesMiKTeXtex/generic/pgf/modulespgfmoduleplot.code.tex)
(C:Program FilesMiKTeXtex/latex/pgf/compatibilitypgfcomp-version-0-65.sty)
(C:Program FilesMiKTeXtex/latex/pgf/compatibilitypgfcomp-version-1-18.sty))
 (C:Program FilesMiKTeXtex/latex/pgf/utilitiespgffor.sty
(C:Program FilesMiKTeXtex/latex/pgf/utilitiespgfkeys.sty
(C:Program FilesMiKTeXtex/generic/pgf/utilitiespgfkeys.code.tex))
(C:Program FilesMiKTeXtex/latex/pgf/mathpgfmath.sty
(C:Program FilesMiKTeXtex/generic/pgf/mathpgfmath.code.tex))
(C:Program FilesMiKTeXtex/generic/pgf/utilitiespgffor.code.tex
(C:Program FilesMiKTeXtex/generic/pgf/mathpgfmath.code.tex)))
(C:Program FilesMiKTeXtex/generic/pgf/frontendlayer/tikztikz.code.tex
(C:Program FilesMiKTeXtex/generic/pgf/librariespgflibraryplothandlers.code.
tex) (C:Program FilesMiKTeXtex/generic/pgf/modulespgfmodulematrix.code.tex)

(C:Program FilesMiKTeXtex/generic/pgf/frontendlayer/tikz/librariestikzlibra
rytopaths.code.tex)))
(C:Program FilesMiKTeXtex/latex/l3backendl3backend-pdftex.def)
No file almanac_2021.aux.
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
(C:Program FilesMiKTeXtex/context/base/mkiisupp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (C:Program FilesMiKTeXtex/latex/epstopdf-pkgepstopdf-base.sty
(C:Program FilesMiKTeXtex/latex/00miktexepstopdf-sys.cfg))
! Missing endcsname inserted.
<to be read again>
                   unskip
l.30 ...ges\skyalmanac\data\A4chart0-180_P.pdf}
                                                  \[0.3cm]
?

Any suggestions on how I can fix my code (or is this a new MiKTeX issue)?

Kind Regards … all assistance greatly appreciated.

Добавить комментарий