I have a problem, that came up after updating the whole package list of Miktex, and I am 100% sure it is due to the package xwatermarks. After compiling the text I get the following error, right before \begin{document}: ! Extra \endgroup. \document -&gt;\endgroup \let \BeforeStartOfDocument \@firstofone \cpt@beforest... l.161 \begin{document}  I am sure because removing the usage of \usepackage[printwatermark]{xwatermark} the documents get properly compiled. Below I report my full preamble (so as to be 100% accurate in my topic); I would like to ask if someone can help me in using xwatermarks anyhow and avoid the problem. As far as the final document anything is fine, it is enough to remove \usepackage[printwatermark]{xwatermark}. Thank you in advance for any eventual help. \documentclass[11pt,a4paper]{scrartcl} \usepackage{latexsym} \usepackage{textcomp} \usepackage{parskip} \usepackage{lipsum}  \usepackage{changepage} \usepackage{caption} \usepackage{soul} \usepackage{booktabs}                 \usepackage[english]{babel}                              \usepackage{placeins} \usepackage{hyperref} \usepackage{textcomp} \usepackage{graphicx} \usepackage[utf8]{inputenc} \usepackage{amsmath,amsfonts,amssymb} \usepackage{multicol} \usepackage{wasysym} \usepackage{datetime} \ddmmyyyydate \usepackage{longtable} \usepackage{multirow}   \usepackage{color} \usepackage[printwatermark]{xwatermark} \usepackage{xcolor} \usepackage{graphicx}   %%\new[allpages,color=red!50,angle=45,scale=3,xpos=0,ypos=0]{DRAFT} %Questo mette la filigrana sotto l'immagine %%\newwatermark[allpages,color=red!10,angle=45,scale=2,xpos=0,ypos=0]{DRAFT \today} %Questo mette la filigrana sopra l'immagine      \usepackage[TABTOPCAP, FIGBOTCAP]{subfigure} \newcommand{\figbox}[1]{%   \fcolorbox{white}{white}{     \vbox to 6.5 cm{%     \vfil     \hbox to 8 cm{%       \hfil       #1%       \hfil}%     \vfil}}}  \newcommand{\Bfigbox}[1]{%   \fcolorbox{white}{white}{%     \vbox to 5.6 cm{%     \vfil     \hbox to 7 cm{%       \hfil       #1%       \hfil}%     \vfil}}}     \newcommand{\Cfigbox}[1]{%   \fcolorbox{white}{white}{%     \vbox to 4.5 cm{%     \vfil     \hbox to 6.4 cm{%       \hfil       #1%       \hfil}%     \vfil}}}  \makeatletter \def\subfigtopskip{4pt} \def\subfigbottomskip{4pt} \def\subfigcapskip{2pt} \subtabletopcaptrue       \makeatletter \def\printtitle{                 {\centering \Large \normalfont \textbf{\@title}\par}}  \def\piedipagina{%                       { \textup{\@title}}}          \makeatother  \title{\large{Title}}    \makeatletter \def\printauthor{     {\large \@author}} \makeatother  \author{%     \textup{dt. Giacomo Del Bianco} \\     \textup{Research \&amp; Development \footnotesize{\textsc{Reactive Hot-Melts}}} \\     \vspace{50pt}     \textup{\today}\\     }   %%% Headers and footers \usepackage{fancyhdr} \pagestyle{fancy} \usepackage{lastpage}     \lhead{} \chead{} \rhead{} \footnotesize{\lfoot{\footnotesize ~\scshape{\piedipagina} $\cdot$ \footnotesize\today}} \cfoot{} \rfoot{\footnotesize Page \thepage\ of \pageref{LastPage}} \renewcommand{\headrulewidth}{0.0pt} \renewcommand{\footrulewidth}{0.4pt}   \setkomafont{sectioning}{\rmfamily\bfseries\boldmath}    \usepackage[runin]{abstract} \setlength\absleftindent{10pt} \setlength\absrightindent{10pt} \abslabeldelim{\quad} \setlength{\abstitleskip}{-10pt} \renewcommand{\abstracttextfont}{\small \slshape}  \textheight = 22 cm   \renewcommand{\figurename}{Figura}  \renewcommand{\listfigurename}{Indice delle figure}  \renewcommand{\listtablename}{Indice delle tabelle}   %%% Start of the document \begin{document} \end{document}
123681
I am using MikTeX with PDFLaTeX and it has worked fine. After an update if MikTeX xwatermark throws an error: ! Extra \endgroup.  \document -&gt;\endgroup  \let \BeforeStartOfDocument \@firstofone \cpt@beforest...  l.5 \begin{document}  Things are pretty mixed up, but I think the worst is over.  Test tex file: \documentclass{article}  \usepackage{xwatermark}  \begin{document} Text \end{document}  But as I understand it Xwatermark has not been updated since 2012!? What could be producing the error?
111641
There is a compatibility problem between the  and the subcaption package. When I compile the following example (with PDFLaTex): \documentclass{cifa}  \usepackage{subcaption}  \begin{document} \begin{figure} \parbox{4cm}{\subcaption{This is a subcaption}\label{sub}}  \caption{nothing} \label{nothing} \end{figure}  See figure \ref{nothing}: there is \ref{sub} inside...  \end{document}  These warnings are displayed:  Package caption Warning: Unsupported document class (or package) detected, Package caption Warning: \caption will not be redefined since it's already  In addition the words &quot;figure&quot; and &quot;subfigure&quot; are displayed AFTER the captions. How to fix this issue?
52624
I'm using subfiles within my report (written on sharelatex), when I compile a subfile it produces a warning. Am I doing something wrong or is this normal?  Example  \documentclass[report.tex]{subfiles} % \usepackage{acronym} \begin{document}  some text  \end{document}   Error     /usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/auxhook.sty   Package auxhook Warning: Cannot patch \document, using \AtBeginDocument instead.   When I compile the main document it does not produce this warning.  The raw log file produces this warning     ......   Package: auxhook 2011/03/04 v1.3 Hooks for auxiliary files (HO)   Package auxhook Warning: Cannot patch \document,   (auxhook)                using \AtBeginDocument instead.   ) (/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/kvoptions.sty   Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO)   ....    Packages  I'm using the following packages:    \documentclass[whitelogo]{tudelft-report}   % Used for referencing   \usepackage{natbib}   % For writing remarks in the text (is this going to be used?)   \usepackage{changes}   % used to write and render different subfiles   \usepackage{subfiles}   % used to draw boxed problems   \usepackage{mdframed}   % for subcaptions in combined figures   \usepackage{subcaption}    % used for Epigraphs of course   \usepackage{epigraph}   % Makes weblinks clickable   \usepackage{hyperref}   % used to display pictures   \usepackage{graphicx}   % used to add urls with strange symbols   \usepackage{grffile}   % used for H command in figures   \usepackage{float}   % used for tickz pictures (Causes a warning)   %\usepackage{pgfplots}   %used for the acronym page [printonlyused,withpage] are options   \usepackage{acronym}    % ######################### open section for code appendix #######################   \usepackage[utf8]{inputenc}   \usepackage{listings}   \usepackage{color}   \definecolor{codegreen}{rgb}{0,0.6,0}   \definecolor{codegray}{rgb}{0.5,0.5,0.5}   \definecolor{codepurple}{rgb}{0.58,0,0.82}   \definecolor{backcolour}{rgb}{0.95,0.95,0.92}
46935
Whenever I try to compile my .tex file, I get the following error:      ! LaTeX Error: File ngerman.sty not found.   Type X to quit or  to proceed,   or enter new name. (Default extension: sty)   Enter file name:   ! Emergency stop.      l.3 \begin   Here's a MWE:  \documentclass[a4paper,12pt]{article} \usepackage{ngerman} \begin{document} xyz \end{document}   This happens even though the ngerman.sty package can be found in the following directories:   /usr/share/texlive/texmf/tex/latex /usr/share/texmf/tex/latex   I also tried running the texhash command.
120148
I ran into a weird problem after a recent MikTeX update. I used to use \usepackage{fixltx2e} to get the command \textsubscript{}. However, if I do this now I get the warning Package fixltx2e Warning: fixltx2e is not required with releases after 2015, which is explained on CTAN. Nevertheless, with or without \usepackage{fixltx2e} I get the error that \textsubscript is an undefined control sequence. Was this command replaced/renamed somwhow or where does the problem lie here?  \documentclass{article} \usepackage{fixltx2e}  \begin{document} Test\textsuperscript{1} Test\textsubscript{1} \end{document}   Log file:  This is pdfTeX, Version 3.14159265-2.6-1.40.15 (MiKTeX 2.9) (preloaded format=pdflatex 2015.4.7)  5 JUN 2015 17:53 entering extended mode **LaTeX1.tex (LaTeX1.tex LaTeX2e &lt;2014/05/01&gt; Babel &lt;3.9l&gt; and hyphenation patterns for 68 languages loaded. ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\article.cls" Document Class: article 2014/09/29 v1.4h Standard LaTeX document class ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\size10.clo" File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option) ) \c@part=\count79 \c@section=\count80 \c@subsection=\count81 \c@subsubsection=\count82 \c@paragraph=\count83 \c@subparagraph=\count84 \c@figure=\count85 \c@table=\count86 \abovecaptionskip=\skip41 \belowcaptionskip=\skip42 \bibindent=\dimen102 ) ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\fixltx2e.sty" Package: fixltx2e 2015/02/21 v2.0a fixes to LaTeX (obsolete)   Package fixltx2e Warning: fixltx2e is not required with releases after 2015 (fixltx2e)                All fixes are now in the LaTeX kernel. (fixltx2e)                See the latexrelease package for details.  ) (LaTeX1.aux) LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 4. LaTeX Font Info:    ... okay on input line 4. LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 4. LaTeX Font Info:    ... okay on input line 4. LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 4. LaTeX Font Info:    ... okay on input line 4. LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 4. LaTeX Font Info:    ... okay on input line 4. LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 4. LaTeX Font Info:    ... okay on input line 4. LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 4. LaTeX Font Info:    ... okay on input line 4. LaTeX Font Info:    External font `cmex10' loaded for size (Font)              &lt;7&gt; on input line 5. LaTeX Font Info:    External font `cmex10' loaded for size (Font)              &lt;5&gt; on input line 5.  ! Undefined control sequence. l.5 Test\textsuperscript{1} Test\textsubscript                                               {1} The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined.  [1  {C:/Users/Manuel/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}] (LaTeX1.aux) )  Here is how much of TeX's memory you used:  211 strings out of 493698  2321 string characters out of 3141992  52149 words of memory out of 3000000  3619 multiletter control sequences out of 15000+200000  3640 words of font info for 14 fonts, out of 3000000 for 9000  1025 hyphenation exceptions out of 8191  23i,4n,17p,135b,107s stack positions out of 5000i,500n,10000p,200000b,50000s &lt;C:/Program Files (x86)/MiKTeX 2.9/fo nts/type1/public/amsfonts/cm/cmr10.pfb&gt;&lt;C:/Program Files (x86)/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr7.pfb&gt; Output written on LaTeX1.pdf (1 page, 18746 bytes). PDF statistics:  14 PDF objects out of 1000 (max. 8388607)  0 named destinations out of 1000 (max. 500000)  1 words of extra memory for PDF output out of 10000 (max. 10000000)
17615
I am really new to LaTeX and I need a comprehensive solution for my Thesis  I have this problem since two days and I couldn't find any solution in any other post.  I work with BibDesk on Mac  And I used Packages apacite and natbib  @article{Ha89, Author = {Peter M. Haas}, Date-Added = {2017-02-06 21:15:57 +0000}, Date-Modified = {2017-02-06 21:45:06 +0000}, Journal = {International Organization}, Lastchecked = {03/02/2010 12:54}, Number = {3}, Pages = {377-403}, Publisher = {Peter Haas}, Read = {0}, Title = {Do regimes matter? Epistemic communities and Mediterranean pollution control}, Urldate = { http://www.jstor.org/stable/2706652}, Volume = {43}, Year = {1989}}   this is a stripped version of my document:  \documentclass[11pt, oneside]{article}  \usepackage{lipsum} \usepackage[margin=1in, left=1.5in, includefoot]{geometry}   \usepackage{ragged2e} % REFERENCE PREAMBLE %\usepackage{url} \usepackage{apacite} \usepackage{natbib} %\usepackage{biblatex-apa}                                                   % Bullet preamble \renewcommand{\labelitemi}{$\bullet$} \renewcommand{\labelitemii}{$\diamond$} \renewcommand{\labelitemiii}{$\circ$} % graphics preamble \usepackage{graphicx}   %Allows you to import images \usepackage{float}      %Allows for control of float positions %HEADER AND FOOTER STUFF \usepackage{fancyhdr}  \pagestyle{fancy} \usepackage{graphicx}        \usepackage{amssymb} %Zeilenabstand 1,5 wenn aktiviert  \usepackage{setspace}\makeatletter\newcommand{\MSonehalfspacing}{\setstretch{1.44}\ifcase \@ptsize \relax\setstretch {1.448}\or\setstretch {1.399}\or\setstretch {1.433}\fi}\newcommand{\MSdoublespacing}{\setstretch {1.92}\ifcase \@ptsize \relax\setstretch {1.936}\or\setstretch {1.866}\or\setstretch{1.902}\fi}\makeatother\MSonehalfspacing %Zeilenabstand Code fertig \usepackage[hidelinks]{hyperref}   %allows for clickable reference %                       BEGIN OF DOCUMENT \citeA{source} %                       REFERENCES  \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} \fancyhf{} \rhead{\fancyplain{}{Identifying the Regime}} \lhead{\fancyplain{}{List of References}} \cfoot{\fancyplain{}{\thepage}}  \setlength\bibitemsep{1.9\itemsep} \bibliography{/User/Desktop/Thesis/references/mybib.bib}                   \bibliographystyle{apa} \addcontentsline{toc}{section {\numberline{}References}                                                       \end{document}   I would like to have the bibliography entry include a retrieved from    I tried to deactivate hyperref – as suggested in another post – but it didn't work. I also tried to activate and deactivate natbib and apacite as well.   I would really appreciate any help...
69164
I am trying to create the FMT file by using the latex.ltx for the following procedures.   Copy latex.ltx file from the base directory to my local working directory. Rename this file. I Load my orginal source files for the following commands before the \dump command.  \input xmltex.tex \input Sample.cfg \input Sample.xmt \LoadClass{article} \dump \endinput   I am compailing the ltx file for the following command like latex -ini filename.ltx  First i am getting the following error.  ! LaTeX requires e-TeX. l.98     {LaTeX requires e-TeX}  ?   So i comment the those lines from the ltx file and try to run the ltx file.  %   \errmessage %     {LaTeX requires e-TeX} %   \expandafter\endinput   After comment those lines from the ltx file, i will run the ltx file once again. But i am getting the below mentioned errors.   So, i will change my compilation command etex -ini filename.ltx. But the same errors are repeated.   The .ltx show the plenty of errors during the compilation process  \utfthreeuniglyph ... \expandafter {\the \numexpr                                                   4096*(#1-224)+64*(  ! Extra \else. \unicodechar ...nichar@\number #1\endcsname \else                                                   \errmessage {Unicode   I am unable to fix this error. I place my MWE for your reference.  %%Sample.tex%% \def\xmlfile{sample.xml} \input xmltex  %%Sample.xml &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE article SYSTEM "JATS-journalpublishing1.dtd"&gt; &lt;article&gt; &lt;front&gt; &lt;article-meta&gt; &lt;title-group&gt; &lt;article-title&gt;The sample title&lt;/article-title&gt; &lt;/title-group&gt; &lt;/article-meta&gt; &lt;/front&gt; &lt;body&gt; &lt;sec id="j_nanoph-2018-0214_s_001"&gt; &lt;title&gt;Introduction&lt;/title&gt; &lt;p&gt;The &lt;bold&gt;Sample.cfg, Sample.xmt, Sample-entity.sty&lt;/bold&gt; files needs to be converted into unreadable format &amp;#x00C1; &amp;#x00E1;.&lt;/p&gt; &lt;/body&gt; &lt;/article&gt;  %%Sample.xmt%%  \XMLentity{TeX}{\TeX} \XMLentity{LaTeX}{\LaTeX}  %%%%Main Root Tag%%%% \XMLelement{article}%     {}%     {\documentclass{article}%     \begin{document}}%     {\end{document}}% %%%%  \XMLelement{bold}{}{\xmlgrab}{\textbf{#1}}   %%%%Front Matter Tags%%%% \XMLelement{front}{}{}{%   \date{}   \maketitle% }% %%%%  \XMLelement{article-title}{}{\xmlgrab}{\title{#1}}  \XMLelement{title}{}{\xmlgrab}{\section*{#1}}  \XMLelement{p}{}{}{\par}%   Could you please advice how to clear those errors and getting the successful FMT creation for the following source files.
54323
I'm using Eclipse for Java development. All my sources compile fine and the resulting application compiles fine. However, I keep getting an "red-x" error notification in the Package Explorer.  All my sources in this source directory (too long for the snapshot) compile fine, none of the show the "red-x" error icon.  Any suggestions on how to fix the problem would be highly appreciated.
115968
I just got the error  Too many math alphabets used in version normal.   on a document I'm editing.  What can I do to fix this, other than stop using an alphabet?  All I've found online is instructions on what to do if you're using the bm.sty package, which I'm not calling (but maybe it's hidden in the AMS stuff?).  I'll note, the thing that broke it was adding mathrsfs and using \mathscr.  Anyways, as you'll see in my preamble, I tried what they suggested anyways, and it didn't work.  My preamble:  \documentclass[11pt]{amsart}   \newcommand{\bmmax}{0}   \newcommand{\hmmax}{0}   \usepackage{amsmath, amssymb, amsthm, latexsym, amscd, enumerate, MnSymbol,bbm, etex,nicefrac,mathrsfs}   I'm using   \mathbf \mathcal \mathfrak \mathscr \mathsf \mathbb \mathbbm %(for a lower case blackboard bold letter)   I recognize this is a lot of math fonts, but doesn't seem unreasonable.    EDIT: getting rid of MnSymbol fixed things...
87901
There is some conflict or error I don't understand. I can skip it and nothing visible happens. The output is okay and everything seems to be fine. Still I would like to get rid of the error message. If I run the following minimal example:   \documentclass[]{scrbook}  \usepackage[applemac, grafiken]{tahbiblatex} \usepackage[ngerman]{babel}   \begin{document}  Testing äüöaüä.  \end{document}   I get the error message:      ! Missing = inserted for \ifnum. &lt;to be read again&gt;                     , l.4 \usepackage                [ngerman]{babel} ?  ! Missing number, treated as zero. &lt;to be read again&gt;                     , l.4 \usepackage                [ngerman]{babel}   Here is my .sty file:  \NeedsTeXFormat{LaTeX2e}\relax \ProvidesPackage{tahbiblatex}[2012, by tah modified by sm]  \RequirePackage{ifthen}  \DeclareOption{latin1}{\PassOptionsToPackage{\CurrentOption}{inputenc}} \DeclareOption{applemac}{\PassOptionsToPackage{\CurrentOption}{inputenc}} \DeclareOption{cp850}{\PassOptionsToPackage{\CurrentOption}{inputenc}} \DeclareOption{utf8}{\PassOptionsToPackage{\CurrentOption}{inputenc}}  \DeclareOption{dvi}{% \newif\ifpdf \ifx\pdfoutput\undefined     \pdffalse \else     \pdfoutput=0     \pdftrue \fi}  \newcounter{Grafiken}\setcounter{Grafiken}{0} \DeclareOption{grafiken}{\setcounter{Grafiken}{1}}  \newcounter{Randausgleich}\setcounter{Randausgleich}{0} \DeclareOption{randausgleich}{\setcounter{Randausgleich}{1}}  \newcounter{Tabellen}\setcounter{Tabellen}{0} \DeclareOption{tabellen}{\setcounter{Tabellen}{1}}  \newcounter{Sync}\setcounter{Sync}{0} \DeclareOption{sync}{\setcounter{Sync}{1}}  \ProcessOptions  \RequirePackage{fixltx2e} \RequirePackage{inputenc} \RequirePackage[T1]{fontenc} \RequirePackage[T1]{url} \RequirePackage{setspace} %\RequirePackage[german]{varioref} \RequirePackage{textcomp}  \newcommand{\urlangabe}[2]{% $\langle$\url{#1}$\rangle$ -- Zugriff am #2}  \def\hierlockern {\begingroup \def\par{\endgraf\endgroup}%   \tolerance 1414%   \hbadness 1414%   \emergencystretch 1.5em%   \hfuzz 0.3pt%   \vfuzz \hfuzz%   \raggedbottom% }  \newcommand{\alleslockern}{%   \tolerance 1414%   \hbadness 1414%   \emergencystretch 1.5em%   \hfuzz 0.3pt%   \vfuzz \hfuzz%   \raggedbottom% } \ifthenelse{\value{Grafiken}=1}   {   \ifx\pdfoutput\undefined \newcount\pdfoutput \fi   \ifcase\pdfoutput       \RequirePackage[dvips]{graphicx}       \DeclareGraphicsExtensions{.eps}       \typeout{Paket tah Meldung: Die Option `grafiken' fuer DVI wurde gewaehlt.}% \else     \RequirePackage[pdftex]{graphicx}     \DeclareGraphicsExtensions{.jpg,.tif,.png,.pdf}     \typeout{Paket tah Meldung: Die Option `grafiken' fuer PDF wurde gewaehlt.}%   \fi}   {}  \ifthenelse{\value{Sync}=1}   {     \ifx\pdfoutput\undefined \newcount\pdfoutput \fi     \ifcase\pdfoutput     \RequirePackage{srcltx}     \typeout{Paket tah Meldung: Die Option `sync' fuer DVI wurde gewaehlt.}%     \else     \RequirePackage{pdfsync}     \typeout{Paket tah Meldung: Die Option `sync' fuer PDF wurde gewaehlt.}%     \fi }   {}   \ifthenelse{\value{Randausgleich}=1}   {\typeout{Paket tah Meldung: Die Option `randausgleich' wurde gewaehlt.}%   \RequirePackage[activate]{pdfcprot}}   {}  \ifthenelse{\value{Tabellen}=1}   {\typeout{Paket tah Meldung: Die Option `tabellen' wurde gewaehlt.}%   \RequirePackage{tabularx}   \RequirePackage{ragged2e}   \RequirePackage{dcolumn}   \RequirePackage{booktabs}   \newcolumntype{L}{&gt;{\RaggedRight\hspace{0pt}\arraybackslash}l}   \newcolumntype{Y}{&gt;{\RaggedRight\hspace{0pt}\arraybackslash}X}   \newcolumntype{d}[1]{&gt;{\DC@{.}{,}{#1}}l&lt;{\DC@end}}   }   {}    \endinput   I also don't really need all the features. So it would be nice to reduce it to minimal features, which are needed..
30056
Done Major Edit, to make the question clear.  Removing the last chapter line works. But keeping it makes latex go crazy. It prints numbers till 65536.. and errors: ** ERROR ** Page number 65536l too large!    MikTex, XeLatex, PdfLatex (endures a few more section, but then, the same error).  Drilling down, I have found that the problem is because of mdframed, specially usetwoside option. The error also seems to be a result of the following warnings:    The log is here:   \documentclass{book} \usepackage{xcolor} \usepackage{mdframed} \usepackage{titletoc} \usepackage{etoolbox}   \definecolor{secnum}{RGB}{13,151,225} \definecolor{ptcbackground}{RGB}{212,237,252} \definecolor{ptctitle}{RGB}{0,177,235}  \pretocmd{\tableofcontents}{\begin{mdframed}[backgroundcolor=ptcbackground,hidealllines=true]}{}{} \apptocmd{\tableofcontents}{\end{mdframed}}{}{} \patchcmd{\tableofcontents}{\contentsname}{\color{ptctitle}\contentsname}{}{}  \setcounter{tocdepth}{1}  \titlecontents{section}   [4em]{\sffamily}   {\color{secnum}\contentslabel{2.3em}\normalcolor}{}   {\titlerule*[1000pc]{.}\contentspage\\\hspace*{-3em}\vspace*{2pt}%     \color{white}\rule{\dimexpr\textwidth-20pt\relax}{1pt}}  \titlecontents{lsection}   [5.8em]{\sffamily}   {\color{secnum}\contentslabel{2.3em}\normalcolor}{}   {\titlerule*[1000pc]{.}\contentspage\\\hspace*{-5.8em}\vspace*{2pt}%     \color{white}\rule{\dimexpr\textwidth-15.5pt\relax}{1pt}}  \makeatletter \renewcommand*\l@chapter[2]{%   \ifnum \c@tocdepth &gt;\m@ne     \addpenalty{-\@highpenalty}%     \vskip 1.0em \@plus\p@     \setlength\@tempdima{1.5em}%     \begingroup       \parindent \z@ \rightskip \@pnumwidth       \parfillskip -\@pnumwidth       \leavevmode       \advance\leftskip\@tempdima       \hskip -\leftskip       \colorbox{ptctitle}{\strut%         \makebox[\dimexpr\textwidth-2\fboxsep-7pt\relax][l]{%           \color{white}\bfseries\sffamily#1%           \nobreak\hfill\nobreak\hb@xt@\@pnumwidth{\hss #2}}}\par\smallskip       \penalty\@highpenalty     \endgroup   \fi} \makeatother \newcommand\PartialToC{% \startcontents[chapters]% \begin{mdframed}[backgroundcolor=ptcbackground,hidealllines=true] \printcontents[chapters]{l}{1}{\colorbox{ptctitle}{%   \parbox[t]{\dimexpr\textwidth-2\fboxsep\relax}{%     \strut\color{white}\bfseries\sffamily\makebox[5em]{%       Chapter~\thechapter\hfill}Contents}}\vskip5pt} \end{mdframed}% }  \begin{document}  \tableofcontents  \chapter{Chapter One} \PartialToC \section{Section One One} \section{Section One Two} \section{Section One Three} \section{Section One Four}  \stopcontents[chapters] \chapter{Chapter Two} \PartialToC \section{Section Two One} \section{Section Two Two} \section{Section Two Three}  \stopcontents[chapters] \chapter{Chapter Three} \PartialToC \section{Section Three One} \section{Section Three Two} \section{Section Three Three} \section{Section Three Four} \section{Section Three Five} \stopcontents[chapters]  \chapter{Chapter Three}  \end{document}
77508
I have used quite some time searching for a solution to my compile problem. The document worked fine untill yesterday. After adding some new references, compiling stoped working properly. I have however used latex only for a few months, so the error might be an easy fix.   My error code in the blg file is:    [836] Utils.pm:209&gt; ERROR - BibTeX subsystem:  C:\Users\andre\AppData\Local\Temp\yb9w7ETEpQ\thesisbiblo.bib_16800.utf8,  line 1375, syntax error: found ",", expected one of: number, name (entry  type, key, field, or macro name), end of entry ("}" or ")") or quoted string  ({...} or "...").    I have biber 2.11 and miktex 2.9 and thought it could have been the cache file as suggested in a previous thread with 2.11 versions, but it did not do the trick to delete that either.  Thanks  This is how my "main" document looks like:  \documentclass[man,12pt,a4paper,babel,english]{apa6}  \usepackage{babel,duomasterforside} \usepackage[utf8]{inputenc} \usepackage[hidelinks]{hyperref}  % Math syntax  \usepackage{siunitx} \usepackage{upgreek} \usepackage{gensymb} \usepackage{amsmath} \usepackage{mathtools} \DeclarePairedDelimiter{\abs}{\lvert}{\rvert}  % Figures \usepackage{graphicx} \graphicspath{{Figures/}} \usepackage{float} \usepackage{subcaption}  % Biblography and citing \usepackage[style=apa,backend=biber,sortcites=true,sorting=nyt,autocite=inline,uniquename=false]{biblatex} \addbibresource{thesisbiblo.bib}  % Frontpage \usepackage{pdfpages}   \begin{document}  % Frontpage      \includepdf[pages=1-]{titlepage.pdf}  % Abstract \input{Abstract} \newpage  % Table of contents \tableofcontents \newpage  % Document \input{Introduction.theory} \newpage \input{Methods} \newpage \input{Results} \newpage \input{Discussion} \newpage \input{Conclusion} \newpage  % References                         \printbibliography  \end{document}
76728
Whenever I try to use the gnuplottex package, I get the following error messages:  /usr/share/texlive/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty:79: Argument of " has an extra }. [...te\write18{rm -f "\jobname.gnuploterrors"}] /usr/share/texlive/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty:79: Paragraph ended before " was complete. [...te\write18{rm -f "\jobname.gnuploterrors"}] /home/myDocument.tex:118: Package catchfile Error: File `myDocument.gnuploterrors' not found. [\end{document}] TeX STOPPED: File ended while scanning use of \gnuploterrors@eatpa\ifx \gnuploterrors@ \@empty \else \PackageWarningNoLine {gnuplottex} TeX reports the error was in file: myDocument.tex   Line 79 of gnuplottex.sty reads \immediate\write18{rm -f "\jobname.gnuploterrors"}, so it not being executed seems to be the cause for the other errors.  Everything worked fine before, but I upgraded to Xubuntu 16.04 LTS lately, so this may be the cause. I already tried removing gnuplot and TeX Live completly and installing them again, but the error remains.  Edit:  I'm using pdflatex and Version 0.9.1 of gnuplottex. All it needs to produce this error is just a \usepackage{gnuplottex}, so for example this document doesn't compile:  %!TEX options = "--shell-escape"  \documentclass[a4paper]{article}  \usepackage{gnuplottex}   \begin{document} \end{document}   However, I noticed that with this minimal file, only the last 3 lines of the error message from above are shown. All 5 lines are only shown if I also add \usepackage{ngerman}.
107874
After a recent update of MikTeX (and TeX Live!) on my computers (right after my vacation :)) I am not able to compile my book. The book is big and complex, uses many \if \else \fi constructions in the preamble, uses my own custom macros and environments some of which ceased to work properly. Here is one of the troubles identified so far.  The following minimal text is not compiled by XeTeX both in MkTeX and TeX Live.  \documentclass{article}  % Load fontspec and define a document font: \usepackage{fontspec} \setmainfont{TeX Gyre Pagella}  % Load unicode-math and define a math font: \usepackage{unicode-math} \setmathfont{texgyrepagella-math.otf}  \begin{document}    \providecommand{\tensor}[1]{\overleftrightarrow{{\mathbf{#1}}}}%    \begin{equation}   \tensor{\pi}   \end{equation}  \end{document}   Compilation aborts with 0 pages of output after issuing the message:  ! Internal error: fad native font flag in `map_char_to_glyph'   I am absolutely sure that 3 months ago the above example would be succesfully compiled.   What's wrong now? Should I change the above definition of the \tensor macro?   Here is complete defintion of the \tensor macro in my own package.   %\makeatletter \@ifpackageloraded{unicode-math}{%   \providecommand{\tensor}[1]{\overleftrightarrow{{\mathbf{#1}}}}%   \PackageInfo{handy}{\string\tensor\space has been declared using ^^J\space\space \string\overleftrightarrow\space from unicode-math package}% }{%   \@ifpackageloaded{accents}{%     \providecommand{\tensor}[1]{\accentset{\leftrightarrow}{{\mathbf{#1}}}}%     \PackageInfo{handy}{\string\tensor\space has been declared using ^^J\space\space \string\accentset\space from in accents package}%   }{%     \@ifpackageloaded{revsymb4-1}{%       \PackageWarningNoLine{handy2}{\string\tensor\space has been taken from revsymb4-1 package.^^J You are recommended to load `accents' package before me}%     }{     \@ifpackageloaded{revsymb}{%         \PackageWarningNoLine{handy2}{\string\tensor\space has been taken from revsymb package.^^J You are recommended to load `accents' package before me}%       }{%         \ifx\undefined\overset         \else           \providecommand{\tensor}[1]{\overset{\leftrightarrow}{\vec{#1}}}           \PackageWarningNoLine{handy2}{\string\tensor\space has been declared using ^^J\space\space \string\overset\space from amsmath package.^^J You are recommended to load `accents' package before me}%         \fi       }%     }%   }% }% %\makeatother   It uses 4 alternatives depending on what package is loaded. The most preferable alternative goes first and it assumes that unicode-math package is available.
100601
I tried to compile a (flawlessly working) LaTeX document on a different computer, and suddenly was faced with the above error message printed by the xparse package (after that, many errors follow).  I'm working on both computers with miktex 2.9 (and Texnic-Center) on Windows 7 (64 bit).  I tried EVERYTHING I found on stackexchange or anywhere else on the web, including:   Updating all packages Removing the l3 packages and reinstalling them Doing the above for both the current user and in admin mode Removing the complete miktex distribution and re-installing it   for only the current user for "anyone who uses this computer" with all packages only the basic packages  Downloading the newest l3 packages manually from CTAN and copying them into the miktex folder Refreshing the FNDB and updating formats afterwards   Nothing worked. Right now, I'm just out of ideas. ANY suggestions??  EDIT: After performing UlrikeFischer's suggestion, I get different errors. After a long compilation process, this is the log file I get:
24023
Restated Problem and a Solution  The use of a times font using the package txfonts will cause tables to be improperly displayed (see below for an image) if a character such as ę,ą or a different character with an ogonek is used.   This has something to do with the procedure involved not being local, that is, having unwanted side effects elsewhere.   An effective way of keeping whatever is done local is by enclosing it in brackets {ę}. This can be generally invoked for any mention of the character in question by mapping ę to {ę}, a to {ą} and so on in the preamble by the following:  \DeclareUnicodeCharacter {281}{{ę}} % 281 is the decimal utf-8 code of ę ...   This will solve the problem for the whole document  A more general solution still that fixes the error introduced in the source file of txfonts is described below under the heading WORKAROUND. However, if you do not want to fiddle with the way the package is called (possibly because it is called in a stylesheet you do not want to change) redefining the characters is a good solution  Initial question  I am typesetting a multilingual document with pdflatex (MikTeX, all packages up to date). I need to use Times font, and, for the time being, I cannot switch to LuaLatex or XeLatex since I am in the final phase of typesetting a book with a class provided by my publisher and I would need to adjust my code in order to use these above.   Using Polish characters with txfonts causes the tables to crash:   \documentclass{article}  \usepackage{txfonts} %\usepackage{mathptmx} \usepackage[polish, english]{babel} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc}        \newcommand{\ee}{\selectlanguage{english}\fontencoding{T1}} \newcommand{\pl}{\selectlanguage{polish}\fontencoding{T1}} \begin{document} \textbf{A minimal example using a times font} As soon as I enter the Polish character \pl ę  \ee the tables crash  (the lines of the table get printed onto each other). \begin{table}\begin{center}\begin{tabular}{|l||l|l|} \hline type&amp;n    &amp;rel        \\ \hline \hline One line in the table &amp;260&amp; many  \\ Another line in the table      &amp;792&amp;49  \\ A third line in the table       &amp;288&amp;1  \\ \hline \end{tabular}\end{center}\caption{A test table.}\end{table} \end{document}   The alternative package mathptmx does not cause this problem; however, it does not provide the Greek characters I need. This is demonstrated in the following minimal example:  \documentclass{article}  %\usepackage{mathptmx} \usepackage{txfontsb} \usepackage[polutonikogreek,polish, english]{babel} \usepackage[utf8x]{inputenc} \usepackage[LGR,T1]{fontenc}        \newcommand{\ee}{\selectlanguage{english}\fontencoding{T1}} \newcommand{\grrk}{\selectlanguage{polutonikogreek}\fontencoding{LGR}} \begin{document} \textbf{A minimal example using a times font} I need to  print polytonic Greek (and other special characters) using a  times font (e.g. \grrk ἐᾶν \textbf{ἐᾶν})! \ee   I use the \emph{txfonts} (or   \emph{txfontsb}) package, the alternative \emph{mathptmx} cannot find the metric files (``Couldn't find `grtm.cfg''').  \end{document}   How can I use txfonts and still prevent the tables from crashing? I have also tried out txfontsb!  Update: I see now the has nothing to do with Polish, it's the diacritic in ę (the ogonek) that causes the problem. The same problem appears in the following code with an ogonek on an m:       \documentclass{article}      \usepackage{txfonts}     \usepackage[T1]{fontenc}            \begin{document}     text with ogonek:        \k{m}       \begin{table}\begin{center}\begin{tabular}{|l||l|l|}     \hline     type&amp;n    &amp;rel        \\     \hline     \hline     One line in the table &amp;260&amp; many  \\     Another line &amp;792&amp;49  \\     A third line in the table       &amp;288&amp;1  \\     \hline     \end{tabular}\end{center}\caption{A test table.}\end{table}     \end{document}   If \k{m} is enclosed in brackets {\k{m}} the tables work fine. So it has something to do with  locality and the way txfonts apply the ogonek.
80472
I recently updated MikTex and it seems Xelatex is not able to place figures correctly anymore. Before updating all figures were shown correctly. I work with Texworks and Miktex 2.9  Here it is the code that I run:  \documentclass[10pt,a4paper]{report} \usepackage{graphicx} \graphicspath{{method1/}{method2/}{dpfig/}}  \begin{document}  \begin{figure}[!htbp] \centering \begin{tabular}{cc} \includegraphics[trim=6cm 2.5cm 6cm 2.5cm,clip=true,width=0.33\textwidth]{figure1.eps}&amp; \includegraphics[trim=6cm 2.5cm 6cm 2.5cm,clip=true,width=0.33\textwidth]{figure2.eps}\\ \end{tabular} \caption{Two figures} \end{figure} \end{document} \end{figure}   With this code, figures are correctly trimmed and the relative position between figure 1 and figure 2 is maintained. However, the position in the document is wrong: figure are placed upper and more right than expected (as the bottom-left corner of the table was placed in the middle of the page). The unusual thing is that this does not happen in draft mode and picture are shown centered as it would be.  I usually compile with Xelatex, Makeindex and Bibtex.  I hope to have been clear.. bye!  EDIT: Sorry, I forgot to add the images I prepared from the file that run that script: