My MWE  \documentclass[a4paper,12pt]{book} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage[turkish]{babel}  \addto\extrasturkish{%   \uccode`i=\string"9D \uccode\string"19 = `I   \lccode\string"9D=`i \lccode`I=\string"19 } \addto\noextrasturkish{%   \uccode`i=`I \lccode`I=`i }  \renewcommand{\contentsname}{\textit{İçindekiler}}  \begin{document}  %.... \begin{figure}[!ht] \centering \includegraphics[width=\textwidth]{Map.png} \caption{Map} \end{figure} %.... \end{document}   And Missing number, treated as zero in \includegraphics[width=\textwidth]{Map.png}  I find another same question. Does anyone know how to fix it?  Related to:   Related to:
27087
Here is my document :   \documentclass[12pt]{book}  % must-have packages \usepackage[turkish]{babel} \usepackage[utf8]{inputenc} % This package will support Turkish chars % must-have packages  \usepackage[a4paper,left=2.5cm,right=2cm]{geometry} \usepackage{graphicx} \usepackage{listings}  % settings \setcounter{secnumdepth}{0} % settings  \begin{document}  \framebox{\includegraphics[scale=0.5]{./images/image_3.png}}  \end{document}   When I try to build a pdf out of this file I received bunch of errors. here is one of them :      Missing \endcsname inserted   ...graphics[scale=0.5]{./images/image_3.png}}   When I remove the babel package, it runs smoothly. Even when I change the language to another language, it runs as well.  What is happening here?
3307
I'm having some problems with listings and UTF-8 in my document. Maybe someone can help me? Some characters work, like é and ó, but á and others appear at the beginning of words...  \documentclass[12pt,a4paper]{scrbook} \KOMAoptions{twoside=false,open=any,chapterprefix=on,parskip=full,fontsize=14pt}  \usepackage[portuguese]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{listingsutf8}  \usepackage{inconsolata} \lstset{     language=bash, %% Troque para PHP, C, Java, etc... bash é o padrão     basicstyle=\ttfamily\small,     numberstyle=\footnotesize,     numbers=left,     backgroundcolor=\color{gray!10},     frame=single,     tabsize=2,     rulecolor=\color{black!30},     title=\lstname,     escapeinside={\%*}{*)},     breaklines=true,     breakatwhitespace=true,     framextopmargin=2pt,     framexbottommargin=2pt,     extendedchars=false,     inputencoding=utf8 }  \begin{document} \begin{lstlisting} &lt;?php  echo 'Olá mundo!'; print 'Olá mundo!'; \end{lstlisting}  \end{document} \end{lstlisting}
65207
Dear friends: there is a problem with appendix and ápendice.  I have a scrbook document and I use appendix package,   \usepackage[title, titletoc]{appendix}    because I like the word "Apéndice" in the toc  \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc}   However, when I compile with latex there is an error in file.toc (maybe in file.aux before). The reason is that in the file.aux there is a line like this:  \@writefile{toc}{\contentsline {chapter}{Ap\IeC {\'e}ndice \numberline {A}Sobre el \LaTeX  }{27}{ApÈndice.1.Alph1}}   and in the second compilation the character "È" produces and error. If I compile with lualatex I have not any error.  I have tried to modify \indexname, \@chapapp but I can not find any solution.    Yes, that is a solution. I am going to clarify the problem with a MWE. In my opinion the problem is motivated by UTF-8 codify and inputenc package, as it is possible to see with this code:  \documentclass[paper=a4,10pt, twoside]{scrbook}%  \usepackage{etoolbox}  \usepackage{tgheros}    % (Una versión libre de Helvetica) \renewcommand{\sfdefault}{qhv} %qhv  %:Fuente para todo lo demás (Una versión libre de Times) \renewcommand{\rmdefault}{qtm} \usepackage{textcomp} \normalfont  \usepackage[T1]{fontenc}         \usepackage[utf8]{inputenc} %para LaTex   %:Paquetes relacionados con el idioma y codificación \usepackage[english, spanish, es-nosectiondot, es-noindentfirst, es-nolists, activeacute]{babel}  \spanishdecimal{.}  %:Para poner las referencias y los nombres de figuras y tablas en castellano \addto\captionsspanish {% \def\figurename{Figura}% \def\tablename{Tabla}% \def\listfigurename{Índice de Figuras} \def\listtablename{Índice de Tablas} \def\contentsname{Índice}% \def\chaptername{Capítulo} \def\Agradecimientos{Agradecimientos} \def\Prefacename{Prefacio}% \def\refname{Referencias}% \def\abstractname{Resumen}% \def\bibname{{Bibliografía}} \def\appendixname{Apéndice} \def\miapendice{\appendixname} \def\glossaryname{Glosario}% \def\indexname{{Índice Alfabético}} }  %:Para definir APÉNDICES \usepackage[title, titletoc]{appendix}  \usepackage{hyperref}   \begin{document}  \cleardoublepage \phantomsection \tableofcontents  %:Empieza el contenido del libro \mainmatter  \chapter{Primer capítulo} \section{Primera sección, primer capítulo}  \chapter{Segundo capítulo} \section{Primera sección, segundo capítulo}  \begin{appendices}  \chapter{Primer apéndice} \section{Primera sección, primer apéndice}  \chapter{Segundo apéndice} \section{Primera sección, segundo apéndice}  \end{appendices}  \end{document}   If you compile, you obtain this error message:     Package inputenc Error: Unicode char \u8:énd not set up for use with La- TeXSee the inputenc package documentation for explanation.Your command was ignored.Type I   to replace it with another command,or  to continue without it.ice.alph1.Alph11ice.alph1.Alph20P   But the solution proposed it is perfect. Thank you
115596
This code:  \documentclass[11pt,openright]{book} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \usepackage[british]{babel}  \usepackage{tikz} \usetikzlibrary{external} \tikzexternalize[prefix={"C:/Users/MyName MySurname/Documents/LaTeX/Figures/"}]  %\tikzexternalize[prefix={Figures/}]   \begin{document} \begin{tikzpicture}     \draw (0,0) circle (1cm); \end{tikzpicture} \end{document}   gives me the error:     ! I can't write on file `"C:/Users/MyName   MySurname/Documents/LaTeX/Figures/MyMWE-figure0.md5"'.   I'm working with Windows 10, MiKTeX 2.9 distibution.  Following the advice Tarass gave me on a comment of this question:  and as indicated here:  I've registered a user-managed TEXMF directory but I still get the same error.  With \tikzexternalize[prefix={Figures/}] all works perfectly but, since I'm using LyX, the files are stored in a LyX temp dir, hence I loose them when I close the program (making externalization useless), so I need to use an absolute path.
105234
Consider the following example:       \documentclass{article}  \usepackage{polyglossia} \setdefaultlanguage{russian} \setmainfont{CMU Serif}  \begin{document}      \itshape Text.  \end{document}   Compiling with XeLaTeX, surprisingly, you get in italics not only Text, but also the page number 1. The same for \setdefaultlanguage{greek}, but with \setdefaultlanguage{english} everything is ok (just like in ).  I know how to fix it, just use braces: { \itshape Text. }.  Now consider the following related example with amsthm:       \documentclass{article}  \usepackage{polyglossia} \setdefaultlanguage{russian} \setmainfont{CMU Serif}  \usepackage{amsthm} \newtheorem{theorem}{Theorem}  \begin{document}      Text.      \vspace{52em}      Text.      \begin{theorem}         Text.     \end{theorem}  \end{document}   Again you get the page number in italics:  Why is there such a problem and is there any workaround?
44938
My question is just like the title. Here is a MWE for my case :  \usepackage[paperwidth=16cm,paperheight=24cm]{geometry} \usepackage{amsmath,amsxtra,amssymb,latexsym,amscd,amsfonts,enumerate,ifthen,stmaryrd,amsthm,amstext} \usepackage[mathscr]{eucal} \usepackage[pdftex]{graphicx} \usepackage{xspace} \usepackage{multicol,color} \usepackage{mathrsfs} \usepackage{makeidx} \usepackage{indentfirst} \usepackage[utf8]{inputenc} \usepackage[utf8]{vietnam}  \usepackage{eso-pic} \usepackage{perpage}  \MakePerPage{footnote} \usepackage{fancyhdr} \renewcommand{\headrulewidth}{0pt}  \makeindex \begin{document} \pagenumbering{roman} \pagestyle{fancy} \tableofcontents  \chapter*{Foreword}  Blah blah blah  \chapter*{Preface}  \pagenumbering{arabic}     Blah Blah   Mirella gọi là papa, dạy toán ở nhà cho Mirella.   \thispagestyle{plain}  \chapter{Dido's problem}  \label{chapter:Dido}  \index{Dido (công chúa)} \index{bài toán công chúa Dido}    Blah blah blah   \end{document}   Why the unnumered chapter does not appear in the table of content ? Please help me. Thanks.
40555
\documentclass{UnimasThesis} \usepackage{graphicx} \usepackage[labelfont=bf]{caption} \captionsetup{labelfont=bf} \usepackage{pdflscape} \usepackage{adjustbox} \usepackage{dcolumn} \usepackage{booktabs} \usepackage{amsmath} \usepackage{cases} \usepackage[os=win]{menukeys} \usepackage[paper=a4paper]{geometry} \usepackage{multirow} %\usepackage{enumerate}   \usepackage{listings} \lstset{language=[LaTeX]TeX,columns=fullflexible, basicstyle=\ttfamily,texcsstyle=*\bfseries\color{NavyBlue}, commentstyle=\itshape\color{PaleVioletRed4}, frame=single,framesep=6pt, framexleftmargin=6pt,framexrightmargin=6pt, xleftmargin=12pt,xrightmargin=12pt, breaklines=true,breakatwhitespace=true}   \title{AUTOMATIC SEGMENTATION OF CARDIAC MAGNETIC RESONANCE IMAGES FOR OEDEMA ASSESSMENT} \author{Amajd Khan} \faculty{Faculty of Computer Science and Information Technology } \facultyColour{6c7a8c} %% 6-digit RGB hexadecimal code  \submissionyear{2017} \degreetype{Doctor of Philosophy\\(Computer Science)}  % If using APA bibliography style  \usepackage[natbibapa]{apacite} \bibliographystyle{plainnat} %\usepackage{natbib} %\bibliographystyle{apalike}  \makeatother  \begin{document} \maketitle  \frontmatter    \mainmatter % Each chapter from a separate file \input{chap1-Introduction}  % references are listed in refs.bib \bibliography{refs}  \end{document}   %%%refrence   @article{rao:2014,     title={Causes of Sudden Cardiac Death on Autopsy Findings; a Four-Year Report},     author={Rao, Dinesh., and Sood, Divya., and Pathak, P., and Dongre, Sudhir, D},     journal={Journal  of Emergency-An Academic Emergency Medicine},     volume={2},     number={1},     pages={12-17},     year={2014} }   %%%i use the chapter 1 file  (Example  this is my citation Rao et al.,(2014). (need to show like this
4892
Consider the following document:  \documentclass[10pt,a4paper]{report} \usepackage{xepersian}  \settextfont{FreeFarsi}% http://sourceforge.net/projects/fpf/ \begin{document} این یک متن فارسی  است. \LR{Ch4}  ادامه متن فارسی... \end{document}   It prints \LR{Ch4} as Ch۴, whereas I want it to be printed as Ch4. But I do not want this to effect other numbers in the text. How can I do this?  I could use \begin{latin}...\end{latin} or \latin ... \persian, but they add new lines before and after the contained text.
90389
I was using this:    To try and create numbered examples in my document.  However, when I load it and put the example exe in that link in one of the separate Tex files (Introduction.tex) I include in main.tex, I get:  ./Chapters/Introduction.tex:14: TeX capacity exceeded, sorry [parameter stack s ize=10000]. \gb@ifnextchar #1#2#3-&gt;                        \let \reserved@d =#1\def \reserved@a {#2}\def \reserv... l.14 ... and political news \cite{washington_post}                                                   .  More importantly, when ...   Which is not even referring to the exe example I inserted but a couple of blocks of tex above it.  For info, here is my full code before my document begins:  \documentclass{report} % [fontsize=11pt,border=5pt] % standalone for the tree \usepackage{forest} % This overrides warnings like http://tex.stackexchange.com/questions/52576/difference-between-bookmark-levels-greater-than-one-what-does-this-mean \usepackage{bookmark} \usepackage{amsmath} \usepackage{subcaption} \usepackage{standalone} \usepackage[round]{natbib} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[utf8]{inputenc} % This is for hyperlinks \usepackage{hyperref} \hypersetup{     colorlinks=true,     linkcolor=blue,     filecolor=magenta,           urlcolor=cyan, }  \urlstyle{same} % Not sure why I need to use this % \usepackage{graphicx} % \graphicspath{ {images/} } % \usepackage[pdftex]{graphicx} % fontsize=11pt,twoside]{scrartcl} % This is for numbered examples \usepackage{gb4e}   Would appreciate some help as I feel like my Latex is very messy here.
85135
I have the following LaTeX code which works fine:  \documentclass[12pt,a4paper]{article} \usepackage[a5paper]{geometry}% just for the example \usepackage[utf8x]{inputenc} \usepackage{listings} \usepackage[labelfont=bf, font=small]{caption} \usepackage[framemethod=tikz]{mdframed}   \lstset{ breaklines=true, breakatwhitespace=false, xleftmargin=1em, frame=single, numbers=left, numbersep=5pt, }  \newcommand\mylstcaption{}  \surroundwithmdframed[ hidealllines=true, middleextra={   \node[anchor=west] at (O|-P)     {\lstlistingname~\thelstlisting\  (Cont.):~\mylstcaption};}, secondextra={   \node[anchor=west] at (O|-P)     {\lstlistingname~\thelstlisting\  (Cont.):~\mylstcaption};}, splittopskip=2\baselineskip ]{lstlisting}  \begin{document}  \renewcommand\mylstcaption{Example listing of code} \begin{lstlisting}[language=C, caption=\mylstcaption, label=lst:c1]  struct safe_buffer { struct list_head node;  /* original request */ void    *ptr; size_t  size; int direction;  /* safe buffer info */ struct dmabounce_pool *pool; void    *safe; dma_addr_t  safe_dma_addr; };  struct dmabounce_pool { unsigned long   size; struct dma_pool *pool; #ifdef STATS unsigned long   allocs; #endif };  struct dmabounce_device_info { struct device *dev; struct list_head safe_buffers; #ifdef STATS unsigned long total_allocs; unsigned long map_op_count; unsigned long bounce_count; int attr_res; #endif struct dmabounce_pool   small; struct dmabounce_pool   large;  rwlock_t lock;  int (*needs_bounce)(struct device *, dma_addr_t, size_t); };  #ifdef STATS static ssize_t dmabounce_show(struct device *dev, struct device_attribute *attr, char *buf) { struct dmabounce_device_info *device_info = dev-&gt;archdata.dmabounce; return sprintf(buf, "%lu %lu %lu %lu %lu %lu\n", device_info-&gt;small.allocs, device_info-&gt;large.allocs, device_info-&gt;total_allocs - device_info-&gt;small.allocs - device_info-&gt;large.allocs, device_info-&gt;total_allocs, device_info-&gt;map_op_count, device_info-&gt;bounce_count); }  static DEVICE_ATTR(dmabounce_stats, 0400, dmabounce_show, NULL); #endif  \end{lstlisting}  \end{document}   Part of the result looks like:  page 1    page 2    Now I would like to have similar looking captions (same font size etc.) which is currently not the case.
31199
I'm working on overleaf v2. I wrote : \documentclass{article} \usepackage[utf8]{inputenc}  \usepackage[utf8]{inputenc}  % Accents codés dans la fonte \usepackage[frenchb]{babel}  % Les traductions françaises \usepackage{amsmath}  \usepackage{graphicx} \graphicspath{ {./images/} }  \usepackage{amsfonts}  \usepackage{biblatex} \begin{document} .... \begin{figure} \centering \includegraphics{comp_W_log.jpg} \caption{\textit{On compare la fonction de Lambert à $\log(x)-1$ dans un certain interval}} \label{fig:my_label} \end{figure}  .... \end{document}  But I just get, after compiling :  Can you help me plz ? Edit: png didn't work either
106439
The reference to my sub caption doesn't work  \documentclass{article}  \usepackage{mwe} \usepackage{subcaption} \usepackage{cleveref}  \begin{document}  \section{Section} \begin{center} \captionsetup{type=figure} \begin{subfigure}{0.4\textwidth} \includegraphics[width=\textwidth]{example-image-a.pdf} \caption*{Text 0} \end{subfigure} \begin{subfigure}{0.4\textwidth} \includegraphics[width=\textwidth]{example-image-b.pdf} \caption*{Text 1\label{here}} \end{subfigure} \captionof{figure}{Description} \end{center}  Look at \Cref{here}. \end{document}   Output:   Maybe also see     UPDATE:  It should produce Look at Text 1  Actually it's always the same text, so I would really like a solution where my counter is 0,1, ... at the and of the caption. Or (maybe to use with \caption{\empty} where my counter is Text 0, Text 1, ...
70730
I get this error message, during compiling my .tex-document.  line 234 - ! Package inputenc Error: Unicode char ́ (U+301)(inputenc) not set up for use with LaTeX.See the inputenc package documentation for explanation.Type H &lt;return&gt; for immediate help.... \cleardoublepage   I am writing my thesis right now and I am very confused about this error message, since it seems to be connected to a special character, which I do not use in my manuscript. The solution up to now was the reloading of an older version of my manuscript...after some hours of work and after several times of successful compiling this error suddenly occurs again. I don't get it why, since I just write some text, add some figures and nothing more...  any suggestions, how I can solve that issue? I have no idea, what kind of MWE I should post here :( where does this comment "line234" refer to. Line 234 is normal text in my manuscript...
17855
I'm trying to get siunitx working. For some reason I keep getting this error:  ! Missing = inserted for \ifnum. &lt;to be read again&gt;                     - l.3 \begin           {document}^^M   I have tried a minimal document to make sure it is not some kind of compatibility issue. And I get that same error in the most minimal document possible.  I'm using pdfLaTeX to compile, and have tried both from TeXWorks and from bash. I'm using TeXLive, if that matters. I have also tried reinstalling siunitx, l3packages, and l3kernel. There was an issue with l3kernel before this, due to an apparently old version. But all three packages are now up to date. I've also reinstalled expl3 while trying to debug the original issue.  My minimal document is:  \documentclass{article} \usepackage{siunitx} \begin{document} \end{document}   The output I get is:  This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode (./untitled-2.tex LaTeX2e &lt;2016/02/01&gt; Babel &lt;3.9q&gt; and hyphenation patterns for 81 language(s) loaded. (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2014/09/29 v1.4h Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo)) (/home/&lt;name&gt;/texmf/tex/latex/siunitx/siunitx.sty (/home/&lt;name&gt;/texmf/tex/latex/l3kernel/expl3.sty (/home/&lt;name&gt;/texmf/tex/latex/l3kernel/expl3-code.tex) (/home/&lt;name&gt;/texmf/tex/latex/l3kernel/l3pdfmode.def)) (/home/&lt;name&gt;/texmf/tex/latex/l3packages/xparse/xparse.sty) (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty)) (/usr/share/texlive/texmf-dist/tex/latex/tools/array.sty) (/home/&lt;name&gt;/texmf/tex/latex/l3packages/l3keys2e/l3keys2e.sty) (/usr/share/texlive/texmf-dist/tex/latex/beamer/translator/translator.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/share/texlive/texmf-dist/tex/latex/beamer/translator/translator-language- mappings.tex))) ! Missing = inserted for \ifnum. &lt;to be read again&gt;                    - l.3 \begin          {document}^^M ?   Does anyone have any idea what might be going wrong here?
60154
Consider the Code below:  \documentclass[%     paper=A4,     twoside=true,     fontsize=12pt,     titlepage=true,     listof=totoc,     bibliography=totoc,     listof=flat,     open=right,     cleardoublepage=empty,     headsepline=true,     footsepline=false,     captions=tableheading,     numbers=noendperiod,     parskip=half-,     headings=normal]{scrbook} \usepackage[a4paper]{geometry} \geometry{     includehead=true,     hmarginratio=1:2,     vmarginratio=3:5,     textwidth=170mm,     textheight=230mm,     headheight=20pt,     footskip=15mm,     bindingoffset=6mm} \usepackage{showframe} \usepackage{blindtext} \usepackage[tocindentauto]{tocstyle} \usetocstyle{KOMAlike} \begin{document} \frontmatter \tableofcontents \cleardoublepage \mainmatter \blinddocument\blindtext \pagenumbering{Roman} \setcounter{page}{20} \appendix \blinddocument \end{document}   The roman pagenumbers in the table of contents are too wide. How to fix this?
37681
This code works correctly:  \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning,calc} \begin{document}  \begin{tikzpicture}   \tikzset{     every picture/.prefix style={       execute at begin picture=\shorthandoff{;}     }   }   \def\names{{"1", "2"}}   \foreach \i in {0,1} {%     \ifnum\i=0\relax       \node (\i) [draw] {\pgfmathparse{\names[\i]}\pgfmathresult};     \else       \pgfmathparse{int(\i-1)}       \node (\i) [draw,right= 1cm of \pgfmathresult]             {\pgfmathparse{\names[\i]}\pgfmathresult};       \draw[dotted] ($(\pgfmathresult.south east) !.5! (\i.south west)$)             -- +(0,1cm);   \fi } \end{tikzpicture} \end{document}   But when I add  \usepackage[utf8]{inputenc} \usepackage[german]{babel}   to the preamble, it starts giving an error:  ! Argument of \language@active@arg" has an extra }. &lt;inserted text&gt;                  \par  l.25 }   the same for russian. It is somehow related to the quotes in the array:   \def\names{{"1", "2"}}   I tried the tricks, shown here for the french, but they don't work.
67604
My problem is already stated , but I don't have enough reputation to comment on it :-/ I want to know if there are any fixes or solutions to the problem with the hepthesis class?  The last page of the table of contents is numbered with arabic numerals rather than roman numerals. Here is an MWE:  \documentclass[oneside]{hepthesis}  \begin{document}   \begin{frontmatter}     \tableofcontents   \end{frontmatter}    \begin{mainmatter}     \chapter{Introduction}       lalala   \end{mainmatter}  \end{document}