
biblatex で bib ラベルに接頭辞を使用する場合、特に長い接頭辞の場合は、接頭辞と実際の bib ラベルの間でハイフネーションが必要になることがよくあります。
これを回避するにはどうすればよいでしょうか?
ここで提供されるソリューション効果はないと思いますマイクロタイプほとんどの場合はこれで解決しますが、常に使用しているわけではないので、より安全な解決策が欲しいです。
についても認識しています\mbox{...}
が、すべての cite コマンドを手動でそこに配置するのは好ましくありません。
\begin{filecontents}{references.bib}
@InProceedings{Baader1989,
Title = {Direct self control of inverter-fed induction machine, a basis for speed control without speed-measurement},
Author = {Baader, U. and Depenbrock, M. and Gierse, Georg},
Booktitle = {Industry Applications Society Annual Meeting, 1989., Conference Record of the 1989 IEEE},
Year = {1989},
Month = {Oct},
Pages = {486-492 vol.1},
}
\end{filecontents}
\documentclass{article}
\usepackage[style=alphabetic,%
backend=biber,
maxnames=99,
maxalphanames=1,
backref=true,
doi=false,isbn=false,url=false,
backref=false,
]{biblatex}
\renewcommand*{\labelalphaothers}{}
\bibliography{references.bib}
\begin{document}
\noindent This is a looong sentence which will lead to hyphenation in the bib label: \cite{Baader1989}
\printbibliography[prefixnumbers = P-]
\end{document}
答え1
はprefixnumbers
最新バージョンの ではサポートされなくなりましたbiblatex
。
\begin{filecontents}{\jobname.bib}
@InProceedings{Baader1989,
Title = {Direct self control of inverter-fed induction machine, a basis for speed control without speed-measurement},
Author = {Baader, U. and Depenbrock, M. and Gierse, Georg},
Booktitle = {Industry Applications Society Annual Meeting, 1989., Conference Record of the 1989 IEEE},
Year = {1989},
Month = {Oct},
Pages = {486-492 vol.1},
}
\end{filecontents}
\documentclass{article}
\usepackage[style=alphabetic,%
backend=biber,
maxnames=99,
maxalphanames=1,
backref=true,
doi=false,isbn=false,url=false,
backref=false,
]{biblatex}
\renewcommand*{\labelalphaothers}{}
\addbibresource{\jobname.bib}
\newrobustcmd{\safehyphen}{\ifincsname-\else\mbox{-}\fi}
\begin{document}
\newrefcontext[labelprefix=P\safehyphen]
\noindent This is a looong sentence which will lead to
hyphenation in the bib label: \cite{Baader1989}
\printbibliography
\end{document}
同じ戦略が古い方法でも機能すると思います。問題は、プレフィックスが印刷用と制御シーケンス名の形成用の 2 つの異なる場所で使用されるため、トリックを使用しない限り、そこにマクロを追加しても機能しないことです\ifincsname
。
注: TeX Live 2014でテストしましたが、
\newrobustcmd{\safehyphen}{\ifincsname-\else\mbox{-}\fi}
序文では
\printbibliography[prefixnumbers = P\safehyphen]
動作します。