
ディストリビューション (2015)内のすべてのパッケージの更新を実行したところ、 + をパッケージとtexlive
組み合わせる際に問題が発生しました。biber
biblatex
microtype
エラーは、bib
ファイル内で「特殊」文字を使用した場合、および参考文献の印刷を要求した場合にのみ発生するようです。以下に簡単な例を示します。
\documentclass{article}
\usepackage{filecontents}
\usepackage{microtype}
\usepackage[backend=biber]{biblatex}
\begin{filecontents}{\jobname.bib}
@book{renyi1970,
author = {R\'enyi, Alfr\'ed},
location = {San Francisco},
publisher = {Holden-Day},
title = {Foundations of Probability},
year = {1970},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\cite{renyi1970}
\printbibliography
\end{document}
表示されるエラー メッセージは次のようになります:
! Argument of \MT@res@a has an extra }.
<inserted text>
\par
l.23
I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.
Runaway argument?
##1,\OT1/cmr/m/n/10 ,##2##3\@nnil {\ifx ##2\@empty \MT@inlist@false \else \ETC.
! Paragraph ended before \MT@res@a was complete.
<to be read again>
\par
l.23
\printbibliography
引用スタイルを使用している場合でも、コマンドを削除すると問題はなくなりauthoryear
、発音区別符号だけでは問題が発生しなくなります。つまり、次のコードは期待どおりにコンパイルされます。
\documentclass{article}
\usepackage{filecontents}
\usepackage{microtype}
\usepackage[backend=biber, citestyle=authoryear]{biblatex}
\begin{filecontents}{\jobname.bib}
@book{renyi1970,
author = {R\'enyi, Alfr\'ed},
location = {San Francisco},
publisher = {Holden-Day},
title = {Foundations of Probability},
year = {1970},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\cite{renyi1970}
\end{document}
microtype
エラーはとの相互作用に関係しているようですbiber
。どちらか一方だけでは発生しないからです (を のバックエンドとしてmicrotype
使用して試したところ、問題なく動作しました。 を使用せずに試したところ、やはり問題なく動作しました)。bibtex
biblatex
biber
microtype
2013 年以降更新されていないようですので、問題は (2.4) の新しいバージョンまたは(3.3)の新しいバージョンmicrotype
で発生したものと思われます。biber
biblatex
答え1
これは次のバグだと思いますbiblatex
:
biblatex_.sty
(で使用される非レガシー バージョン)ではbiber
、冒頭に次の記述があります。
% Tests for emptiness, regardless whether the arg is macro or literal
% Expand everything and test as string
\def\ifempty#1{%
\edef\z{#1}%
\expandafter\ifblank\expandafter{\z}}
さて、\edef
ユーザー入力を「する」というのは、決してしてはいけないことです。
OP の最小限の例は、 を(LaTeX の「ユーザーセーフ」バージョンの)\edef
に置き換えると機能しますが、これによって他にどのような結果が生じるかは予測できません。\protected@edef
\edef
答え2
これは、biblatex の変更によるものです。私は、namepart の変更からユーザーをできるだけ隔離しようとしましたが、このような結果になるので、これは実際には実現可能ではありません。前述のように、fontenc を使用する場合は問題は発生しません。これは、いずれにしても使用する必要があると思います。ただし、DEV の biblatex 3.4 で問題のあるテストを変更したところ、問題は発生しなくなりました。
答え3
を追加するだけではエラーは発生しません。エンコードが OT1 の場合、\usepackage[T1]{fontenc}
どこで問題が発生するかは明確ではありません。microtype
biblatex 2016/03/03 v3.3
そしてbiber version: 2.4
\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{renyi1970,
author = {R\'enyi, Alfr\'ed},
location = {San Francisco},
publisher = {Holden-Day},
title = {Foundations of Probability},
year = {1970},
}
\end{filecontents}
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[backend=biber]{biblatex}
\usepackage{microtype}
\addbibresource{\jobname.bib}
\begin{document}
\cite{renyi1970}
\printbibliography
\end{document}
答え4
biber
一緒に走る
biber --output-safechars <file>
しかし、次のように書くほうが意味があります
author = {Rényi, Alfréd},
少なくともlualatex
`
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
のためにpdflatex