
biblatex でコマンドを使用する場合\footcite
、テキスト内の区切りのコンマをどのように処理すればよいかが明確ではありません。たとえば、\footcite{key1},\footcite{key2}
通常のコンマが 2 つの指数を区切っているため、テキストでは が問題になります。代わりに が\footcite{key1}\textsuperscript{,}\footcite{key2}
推奨されますが、問題があります。期待どおりの結果を得るには、どのような方法が最適ですか?
答え1
のfnpct
これにはパッケージを使用できます。その主な目的は別のものですがの既知のコマンドに追加された\footcite
コマンドを複数処理することもできます。以下の例は、恥ずかしげもなく\footcite
fnpct
マルコ・ダニエルの回答以下のコードは fnpct バージョン 1.0 (2021 年 1 月リリース) 用であることに注意してください。
\documentclass{article}
\usepackage[style=authortitle,dashed=false]{biblatex}
\addbibresource{biblatex-examples.bib}
\usepackage{fnpct}
\AdaptNote\footcite{oo+m}[footnote]{%
\setfnpct{dont-mess-around}%
\IfNoValueTF{#1}
{#NOTE{#3}}
{\IfNoValueTF{#2}
{#NOTE[#1]{#3}}
{#NOTE[#1][#2]{#3}}}}
\begin{document}
Text\footcite{knuth:ct:a}
Text\footcite{knuth:ct:b}\footcite{ctan}
Text\footcite{knuth:ct:c}\footcite{companion}\footcite{knuth:ct:d}
Text\footcite{knuth:ct:a}\footcite{knuth:ct:b}\footcite{knuth:ct:c}\footcite{knuth:ct:d}\footcite{companion}
\printbibliography
\end{document}
答え2
使用方法はわかりませんbiblatex
が、独自に定義したコマンドを提案できます。
\documentclass{article}
\usepackage[style=authortitle,dashed=false]{biblatex}
\addbibresource{biblatex-examples.bib}
\usepackage{xparse}
\ExplSyntaxOn
\clist_new:N \l__pluton_input_clist
\NewDocumentCommand \myfootcite { m }
{
\int_compare:nNnTF
{ \clist_count:n { #1 } } > { 1 }
{ \__pluton_myfootcites:n { #1 } }
{ \footcite { #1 } }
}
\cs_set:Npn \__pluton_myfootcites:n #1
{
\clist_set:Nx \l__pluton_input_clist { #1 }
\int_case:nnn { \clist_count:N \l__pluton_input_clist }
{
{ 0 } { \footnote{\bfseries empty~argument} }
{ 1 } { \footcite{ \clist_item:Nn \l__pluton_input_clist { 1 } } }
{ 2 } { \footcite{ \clist_item:Nn \l__pluton_input_clist { 1 } }
\textsuperscript{,}
\footcite{ \clist_item:Nn \l__pluton_input_clist { 2 } } }
}
{
\footcite{ \clist_item:Nn \l__pluton_input_clist { 1 } }
\textsuperscript{,}
\clist_pop:NN \l__pluton_input_clist \l_tmpa_tl
\__pluton_myfootcites:n { \l__pluton_input_clist }
}
}
\ExplSyntaxOff
\begin{document}
Text\myfootcite{knuth:ct:a}
Text\myfootcite{knuth:ct:b,ctan}
Text\myfootcite{knuth:ct:c,companion,knuth:ct:d}
Text\myfootcite{knuth:ct:a,knuth:ct:b,knuth:ct:c,knuth:ct:d,companion}
\printbibliography
\end{document}
答え3
脚注で参照を別の行に配置する場合は、\multicitedelim
引用コマンドが脚注を生成する場合に限り、改行を追加するように再定義することを検討してください。
\documentclass{article}
\usepackage[style=authortitle]{biblatex}
\renewcommand*{\multicitedelim}{\iffootnote{\newline}{\addsemicolon\space}}
\renewcommand{\bibfootnotewrapper}[1]{\bibsentence #1}
\usepackage{scrextend}
\deffootnote{1.7em}{1em}{\textsuperscript{\thefootnotemark}}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{A01,
author = {Author, A.},
year = {2001},
title = {Alpha},
}
@misc{B02,
author = {Buthor, B.},
year = {2002},
title = {Bravo},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\null\vfill% just for the example
Some text \parencite{A01,B02}.
Some text.\footcite{A01,B02}
\printbibliography
\end{document}