I have a weird problem that has now been localised to either of the lines:
\usepackage[minted]{tcolorbox}
\makeglossaries{}
in my preamble. I am using luatex with shell-escape enabled (for minted).
I am using a custom document class PhDthesiscustomCls for my PhD thesis (available to download in this gist here.)
The class file loads tikz, pgfplots and a few other tikz/pgf related libraries, and sets up tikz externalisation.
Everything works fine if I exclude the minted option from the tcolorbox package usage. Things also work if I comment out the makeglossaries command. However, when including both of these, the code runs without error only if tikzexternalisation is disabled locally, i.e
- Works without the
mintedoption when loadingtcolorbox - Works without
makeglossaries - But when we desire to have both the above features, the code compiles only when
tikzexternalization is disabled locally.
Why is this happening and how do I fix it?
Here is minimum example to replicate the problem.
\documentclass[oneside,12pt,online,a4paper,pdfa1,biblatex,fontC]{PhDthesiscustomCls}
%\tikzset{external/force remake}
\usepackage[minted]{tcolorbox} % problematic with the "minted" option
\usepackage{graphics} % for improved inclusion of graphics
\usepackage{csquotes}
\usepackage{xcolor}
\loadglsentries{glossary}
\makeglossaries{}
%%%%%%%%%%% Document %%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\tableofcontents
\cleardoublepage
\listoffigures
\cleardoublepage
% \printglossaries{}
\tikzexternaldisable % force disable externalisation to compile without errors
\begin{figure}[h]
\centering
\includegraphics[width=\textwidth]{example1.tikz}
\caption{\LaTeX contributions}
\end{figure}
Hello world
\end{document}
The example1.tikz file here is
\begin{tikzpicture}
\begin{axis}[title = Contributions per category
at LaTeX-Community.org,
xbar,
y axis line style = { opacity = 1 },
axis x line = none,
tickwidth = 0pt,
enlarge y limits = 0.2,
enlarge x limits = 0.02,
symbolic y coords = {LaTeX, Tools, Distributions, Editors},
nodes near coords,
]
\addplot coordinates { (57727,LaTeX) (5672,Tools)
(2193,Distributions) (11106,Editors) };
\addplot coordinates { (14320,LaTeX) (1615,Tools)
(560,Distributions) (3075,Editors) };
\legend{Topics, Posts}
\end{axis}
\end{tikzpicture}
article.clsdoes it depend on that thesis class? – David Carlisle Jun 05 '18 at 20:10\usepackage{graphics} % for improved inclusion of graphicsseems a strange comment,graphicsis the basic interface (that you are not using) you wantgraphicxfor the[width=..]syntax (also it seems odd to use\includegraphicsto include a tikz file rather than\inputis that really the syntax defined somewhere? – David Carlisle Jun 05 '18 at 20:15tikzscale, but I don't think that is compatible with externalisation (if I remember correctly) and I'm not sure that syntax is appropriate for apgfplotsfigure, also if I remember correctly. (I think both dimensions are needed for plots.) – cfr Jun 06 '18 at 02:35has the sole specifier for a float. – cfr Jun 06 '18 at 02:36\acr{adc}{ADC}{Analog to Digital Converter}. I am using TL2018 with latest LuaTeX 1.07 I believe. The error issomething's missing. Perhaps a missing \itemand in the line where documentclass is definedthis is only allowed in the preamble. Everything works fine when disabling externalisation of Tikz. – Dr Krishnakumar Gopalakrishnan Jun 06 '18 at 08:50epsfigand has a lot of\makeatletter...\makeatotherinstances (which shouldn't be in a class). It also loadsglossariesbeforehyperref. – Nicola Talbot Jun 06 '18 at 11:12\newacronym(or\newabbreviation, sinceglossaries-extrahas been loaded) not with\acr. – Nicola Talbot Jun 06 '18 at 11:13\makeglossariesbefore\usepackage[minted]{tcolorbox}? – Nicola Talbot Jun 06 '18 at 11:14./main.toc|5 error| Something's wrong--perhaps a missing \item. See the LaTeX manual or LaTeX Companion for explanation. ... ...entsline {chapter}{Title Page}{i}{section*.1}. Furthermore the acr file is not created. – Dr Krishnakumar Gopalakrishnan Jun 06 '18 at 11:52glossaries.sty+\makeglossariestoglossaries-extra.sty+bib2gls. – Nicola Talbot Jun 07 '18 at 11:28