tcolorbox 带有 minted 选项 + 词汇表 + biblatex:限制、不兼容还是错误?

tcolorbox 带有 minted 选项 + 词汇表 + biblatex:限制、不兼容还是错误?

一方面,当人们想要拥有超过五个“本地”词汇表和一个主词汇表(glossaries包),另一方面又想使用及其biblatex选项tcolorboxmintedLuaLaTeX 使用 --shell-escape 选项来获取minted类的其余内容)时,就会出现问题。

错误出现在第六个“glo 文件”(此处为 .local06-glo)中,其第一行规定:

[Loading MPS to PDF converter (version 2006.09.02).]

已完成以下测试(最多五个本地词汇表,一切正常)并给出结果:

  1. minted++ glossaries-- biblatex> 作品(6 个本地词汇表 + 主要词汇表)

  2. tcolorbox(没有minted选项但单独或与所有其他选项一起使用)++ glossaries-- biblatex> 有效(6 个本地词汇表 + 主要)

  3. tcolorbox仅使用 minted 选项 + glossaries--> 有效(6 个本地词汇表 + 主要词汇表)

  4. tcolorbox仅提供铸造选项glossaries++biblatex --> 失败(5本地方词汇表+主要著作)

显然,如果删除错误行,则xindy应用程序或makeglossaries脚本运行良好。

因此,傲慢包是否tcolorbox与其minted选项有关,或者责任是否属于这三个包的线性组合,从而导致不一致?

对我来说有点棘手,首先因为这是我第一次遇到这样的错误,但主要是因为我不知道在哪里寻找解决方案:这三个或四个包minted是必不可少的。

平均能量损失

\begin{filecontents*}{glossary-main.def}
\newglossaryentry{one-main}{
  name={main first},
  description={main first explanation},
}
\newglossaryentry{two-main}{
  name={main second},
  description={main second explanation},
}
\end{filecontents*}

\begin{filecontents*}{glossary-local01.def}
\newglossaryentry{one-local01}{
  type=local01,
  name={local01 first},
  description={local01 first explanation},
}
\newglossaryentry{two-local01}{
  type=local01,
  name={local01 second},
  description={local01 second explanation},
}
\end{filecontents*}

\begin{filecontents*}{glossary-local02.def}
\newglossaryentry{one-local02}{
  type=local02,
  name={local02 first},
  description={local02 first explanation},
}
\newglossaryentry{two-local02}{
  type=local02,
  name={local02 second},
  description={local02 second explanation},
}
\end{filecontents*}

\begin{filecontents*}{glossary-local03.def}
\newglossaryentry{one-local03}{
  type=local03,
  name={local03 first},
  description={local03 first explanation},
}
\newglossaryentry{two-local03}{
  type=local03,
  name={local03 second},
  description={local03 second explanation},
}
\end{filecontents*}

\begin{filecontents*}{glossary-local04.def}
\newglossaryentry{one-local04}{
  type=local04,
  name={local04 first},
  description={local04 first explanation},
}
\newglossaryentry{two-local04}{
  type=local04,
  name={local04 second},
  description={local04 second explanation},
}
\end{filecontents*}

\begin{filecontents*}{glossary-local05.def}
\newglossaryentry{one-local05}{
  type=local05,
  name={local05 first},
  description={local05 first explanation},
}
\newglossaryentry{two-local05}{
  type=local05,
  name={local05 second},
  description={local05 second explanation},
}
\end{filecontents*}

\begin{filecontents*}{glossary-local06.def}
\newglossaryentry{one-local06}{
  type=local06,
  name={local06 first},
  description={local01 first explanation},
}
\newglossaryentry{two-local06}{
  type=local06,
  name={local06 second},
  description={local06 second explanation},
}
\end{filecontents*}


\documentclass{book}

% OK with biblatex + glossaries (6 local + main)
%\usepackage{minted}

% OK with biblatex + glossaries (6 local + main)
\usepackage{tcolorbox}

% OK with biblatex + glossaries (5 local + main)
% FAILED with biblatex + glossaries (6 local + main)
\tcbuselibrary{minted}% loads also the `minted' package

\usepackage{biblatex}

\usepackage{hyperref}% Before `glossaries`

\usepackage[xindy,section=subsection]{glossaries}
\usepackage{glossaries-extra}

\newcommand{\glsmain}[1]{\gls{#1-main}}% For main glossary references

\usepackage{lipsum}

\newglossary*{local01}{Contextual glossary}
\newglossary*{local02}{Contextual glossary}
\newglossary*{local03}{Contextual glossary}
\newglossary*{local04}{Contextual glossary}
\newglossary*{local05}{Contextual glossary}
\newglossary*{local06}{Contextual glossary}

\makeglossaries

\loadglsentries{glossary-main.def}%
\loadglsentries{glossary-local01.def}%
\loadglsentries{glossary-local02.def}%
\loadglsentries{glossary-local03.def}%
\loadglsentries{glossary-local04.def}%
\loadglsentries{glossary-local05.def}%
\loadglsentries{glossary-local06.def}%

\parindent=0pt


\begin{document}


\chapter{First chapter}

\section{Test glossaries}

\lipsum[2]

Main glossary: \glsmain{one}, \glsmain{two}

First local glossary: \gls{one-local01}, \gls{two-local01}.

Second local glossary: \gls{one-local01}, \gls{two-local01}.

Third local glossary: \gls{one-local01}, \gls{two-local01}.

Fourth local glossary: \gls{one-local01}, \gls{two-local01}.

Fifth local glossary: \gls{one-local01}, \gls{two-local01}.

Sixth local glossary: \gls{one-local01}, \gls{two-local01}.


\section{Display local glossaries}

\glsaddallunused[local01]
\printunsrtglossary[type=local01]

\glsaddallunused[local02]
\printunsrtglossary[type=local02]

\glsaddallunused[local03]
\printunsrtglossary[type=local03]

\glsaddallunused[local04]
\printunsrtglossary[type=local04]

\glsaddallunused[local05]
\printunsrtglossary[type=local05]

\glsaddallunused[local06]
\printunsrtglossary[type=local06]


\chapter*{Main glossary}

\glsaddallunused[main]
\printglossary[type=main]

\end{document}

相关内容