今天收到错误消息时我感到很惊讶Package csquotes Error: Unbalanced groups or invalid nesting
。过了一会儿,我在我的书目文件中找到了罪魁祸首。它是一个书目项目,其标题包含两个嵌套\mkbibquote
命令,例如
Title = {aaa aaa \mkbibquote{bbb bbb \mkbibquote{ccc ccc} bbb bbb} aaa aaa}
我不得不说,我很惊讶这竟然会引起任何问题,尤其是 David 向我演示了别处biblatex 命令“被定义为默认扩展为常规命令”。他所说的“常规命令”是指诸如 这样的命令\enquote
,这样写肯定没aaa aaa \enquote{bbb bbb \enquote{ccc ccc} bbb bbb} aaa aaa
问题,不是吗?
我的胸围物品有什么问题?
梅威瑟:
% !TEX TS-program = lualatexmk
\documentclass{scrartcl}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Times New Roman}
\usepackage{csquotes}
\usepackage[style=verbose,abbreviate=false,backend=biber]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{example,
Author = {Author},
Journaltitle = {Journaltitle},
Title = {aaa aaa \mkbibquote{bbb bbb \mkbibquote{ccc ccc} bbb bbb} aaa aaa},
Year = {2014}}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\fullcite{example}.
\end{document}
答案1
查看文件log
你会看到:
此时 3 级报价无效。最高级别为 2。
导致标题已在 内。只需将选项bibmkquote=enquote
传递给 即可更改允许的最大级别:maxlevel
csquotes
\documentclass{scrartcl}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Times New Roman}
\usepackage[maxlevel=3]{csquotes}
\usepackage[style=verbose,abbreviate=false,backend=biber]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{example,
Author = {Author},
Journaltitle = {Journaltitle},
Title = {aaa aaa \mkbibquote{bbb bbb \mkbibquote{ccc ccc} bbb bbb} aaa aaa},
Year = {2014}}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\fullcite{example}.
\end{document}