平均能量损失

平均能量损失

这是我之前问的一个问题的后续问题“如何在 biblatex-chicago 中调整 volcite,使用以冒号分隔的阿拉伯数字引用卷数和页数“。

我想知道是否有任何方法(当使用冒号分隔卷和页码引用时,但仅当同时给出卷和页码时)进一步指示biblatex-chicago在引用和卷/页码之间省略逗号两个都适用以下条件:

  1. 正在使用字段shorthand(即,bib 条目具有非空shorthand字段并且biblatex-chicago已设置为使用简写并且条件是此特定引文实际上将使用该简写)
  2. 卷和页均在引用命令中指明(例如\volcite{5}[102]{CCAG:astrology}

梅威瑟:

\documentclass{article}

\usepackage[notes]{biblatex-chicago}

\begin{filecontents*}{\jobname.bib}
@book{CCAG:astrology,
    Address = {Brussels},
    Date = {1898/1953},
    Editor = {Cumont, Franz},
    Title = {Catalogus codicum astrologorum graecorum},
    Shorthand = {\emph{CCAG}}}
\end{filecontents*}
\addbibresource{\jobname.bib}

% VOLCITE USING COLON (solution by David Purton)
\renewcommand*{\volcitedelim}{\addcolon}
\renewrobustcmd*{\mkvolcitenote}[2]{%
  \ifblank{#2}
    {\printtext[volcitevolume]{#1}}
    {\printtext{#1}\volcitedelim\printtext{#2}}}

\begin{document}
\volcite{5}[102]{CCAG:astrology}.\mancite

\volcite{5}[102]{CCAG:astrology}.
\end{document}

我希望第二段的输出是

中亚化学学会5:102。

代替

中亚化学学会,5:102。

但希望其他一切保持不变。

答案1

噢!我做到了!

别问我它是怎么运作的。这基本上就是反复试验。

\volcite它与\volcites以及各种ibid相关选项一起工作。

它只是不适用于类似的东西,但我认为在这种情况下\volcite{5}[102]{knuth:ct,CCAG:astrology}使用它会更好。\volcites

平均能量损失

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@mvbook{CCAG:astrology,
  Address = {Brussels},
  Date = {1898/1953},
  Editor = {Cumont, Franz},
  Title = {Catalogus codicum astrologorum graecorum},
  Shorthand = {\emph{CCAG}}
}
\end{filecontents}

\usepackage[notes]{biblatex-chicago}
\addbibresource{biblatex-examples.bib}
\addbibresource{\jobname.bib}

\renewcommand*{\volcitedelim}{\addcolon}
\newcommand*{\volcitepostnotedelim}{\addcomma\space}

\renewrobustcmd*{\mkvolcitenote}[2]{%
  \ifblank{#2}
    {\printtext[volcitevolume]{#1}}
    {\printtext{#1}\volcitedelim\printtext{#2}}}

\makeatletter

\newtoggle{blx@use@volcitepostnotedelim}

\newrobustcmd*{\blx@setvolcitepostnotedelim}{%
  \renewcommand*{\volcitepostnotedelim}{\addcomma\space}%
  \iffieldundef{shorthand}
    {}
    {\iftoggle{cms@shorthandibid}
       {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
          {}
          {\ifboolexpr{
             not togl {cms@firstshort}
             and
             not test {\ifciteseen}
           }
             {}
             {\renewcommand*{\volcitepostnotedelim}{\addspace}}}}
       {\ifboolexpr{
         not togl {cms@firstshort}
         and
         not test {\ifciteseen}
        }
          {}
          {\renewcommand*{\volcitepostnotedelim}{\addspace}}}}%
  \iftoggle{blx@use@volcitepostnotedelim}
    {\renewcommand*{\postnotedelim}{\volcitepostnotedelim}}
    {}}

\renewrobustcmd*{\volcitecmd}{%
  \AtNextCite{\DeclareFieldAlias{postnote}{volcitenote}}%
  \AtNextCitekey{\blx@setvolcitepostnotedelim}%
  \begingroup\let\blx@citeargs\blx@volciteargs}

\long\def\blx@volciteargs@i#1[#2]#3{%
  \@ifnextchar[%]
    {\toggletrue{blx@use@volcitepostnotedelim}%
     \eappto\blx@tempe{\toggletrue{blx@use@volcitepostnotedelim}}%
     \blx@volciteargs@ii{#1}{#2}{#3}}
    {\togglefalse{blx@use@volcitepostnotedelim}%
     \eappto\blx@tempe{\togglefalse{blx@use@volcitepostnotedelim}}%
     \blx@citeargs@iii{#1{#2}{{#3}{}}}}}

\protected\def\blx@volmciteargs#1{%
  \eappto\blx@tempe{\AtNextCitekey{\blx@setvolcitepostnotedelim}}%
  \@ifnextchar[%]
    {\blx@volciteargs@i{#1}}
    {\blx@volciteargs@i{#1}[]}}

\makeatother

\begin{document}
\volcite{1}[50]{knuth:ct}.\mancite

\volcite{1--2}{knuth:ct}.

\volcite{5}[102]{CCAG:astrology}.

\volcite{5}[103]{CCAG:astrology}.

\volcite{5}{CCAG:astrology}.

\volcites{1}[50]{knuth:ct}{5}[102]{CCAG:astrology}.

\volcites{5}[102]{CCAG:astrology}{1}[50]{knuth:ct}.

\volcites{1}{knuth:ct}{5}{CCAG:astrology}.

\volcites{5}{CCAG:astrology}{1}{knuth:ct}.

\end{document}

输出

相关内容