在 biblatex-chicago 中省略速记引文的日期

在 biblatex-chicago 中省略速记引文的日期

当我用 引用带有简写的条目时biblatex-chicago,年份会与简写标签一起打印。有没有办法让 Bibtex 只打印简写而不打印年份,即像那样authoryear


\documentclass{article}
\usepackage[
    authordate,
    backend=biber,
    safeinputenc,
    natbib,
]{biblatex-chicago}

\begin{filecontents*}{\jobname.bib}
@book{paul2007,
    author      = {Hermann Paul},
    title       = {{Mittelhochdeutsche Grammatik}},
    shorthand   = {MhdG},
    edition     = {25. Aufl., neu bearbeitet von Thomas Klein, Hans-Jochim Solms und Klaus-Peter Wegera. Mit einer Syntax von Ingeborg Schröbler, neubearbeitet und erweitert von Heinz-Peter Prell},
    series      = {Sammlung kurzer Grammatiken germanischer Dialekte A. Hauptreihe},
    number      = {2},
    publisher   = {Niemeyer},
    location    = {Tübingen},
    year        = {2007},
    pagination  = {section},
}
\end{filecontents*}
\addbibresource{\jobname.bib}

\begin{document}
\citet{paul2007}
\printbibliography
\end{document}

结果如下:

参考书目中的文本引用格式错误

我希望文内引用看起来只是“MhdG”,没有“2007”。当然,如果有任何页面指示,则应保持正常方式。

答案1

这是从相关 bibmacros 中删除几行的问题。我们需要修改两个 bibmacros,textcite:authshort用于\textcite/\citetcite:shorthand所有其他 cite 命令。

\documentclass{article}
\usepackage[
    authordate,
    backend=biber,
    safeinputenc,
    natbib,
]{biblatex-chicago}

\makeatletter
\renewbibmacro*{cite:shorthand}{%
  \printtext[bibhyperref]{\printfield{shorthand}}%
  \usebibmacro{cite:reinit}}

\renewbibmacro*{textcite:authshort}{%
  \iffieldequals{fullhash}{\cbx@lasthash}%
  {\iffieldundef{postnote}%
    {\iffieldequals{fullhash}{\cbx@lastyear}%
      {\setunit{\multicitedelim}%
        \global\undef\cbx@lastyear}%
      {\iffieldequalstr{entrysubtype}{classical}%
        {\setunit{\multicitedelim}}%
        {\setunit{\compcitedelim}}}}%
    {\setunit{\multicitedelim}}%
    \iffieldequalstr{entrysubtype}{classical}%
    {\usebibmacro{cite:label}}%
    {\usebibmacro{cmscitesortdate}}}%
  {\iffieldundef{shorthand}%
    {\ifthenelse{\ifnameundef{labelname}\OR
        \ifentrytype{inreference}\OR
        \ifentrytype{reference}\OR
        \ifentrytype{mvreference}}%
      {\iffieldequalstr{entrysubtype}{classical}%
        {\setunit{%
            \global\booltrue{cbx:parens}%
            \cms@testspace\bibopenparen}%
          \ifnumequal{\value{citecount}}{1}%
          {\usebibmacro{prenote}}%
          {}%
          \usebibmacro{cite:label}}%
        {\usebibmacro{cite:label}%
          \ifboolexpr{%
            togl {cms@gencite}%
            and
            (
            test {\iffinalcitedelim}%
            or
            togl {cms@genallnames}%
            )
          }%
          {\thegen}%
          {}%
          \setunit{%
            \global\booltrue{cbx:parens}%
            \cms@testspace\bibopenparen}%
          \ifnumequal{\value{citecount}}{1}%
          {\usebibmacro{prenote}}%
          {}%
          \usebibmacro{cmscitesortdate}}}%
      {\printnames{labelname}%
        \ifboolexpr{%
          togl {cms@gencite}%
          and
          (
          test {\iffinalcitedelim}%
          or
          togl {cms@genallnames}%
          )
        }%
        {\thegen}%
        {}%
        \setunit{%
          \global\booltrue{cbx:parens}%
          \cms@testspace\bibopenparen}%
        \ifnumequal{\value{citecount}}{1}%
        {\usebibmacro{prenote}}%
        {}%
        \iffieldequalstr{entrysubtype}{classical}%
        {\usebibmacro{cite:label}}%
        {\usebibmacro{cmscitesortdate}}%
        \savefield{fullhash}{\cbx@lasthash}}}%
    {\printfield{shorthand}%
      \ifboolexpr{%
        togl {cms@gencite}%
        and
        (
        test {\iffinalcitedelim}%
        or
        togl {cms@genallnames}%
        )
      }%
      {\thegen}%
      {}%
      \setunit{%
        \global\booltrue{cbx:parens}%
        \cms@testspace\bibopenparen}%
      \ifnumequal{\value{citecount}}{1}%
      {\usebibmacro{prenote}}%
      {}%
      \iffieldequalstr{entrysubtype}{classical}%
      {\usebibmacro{cite:label}}%
      {}%
      \savefield{fullhash}{\cbx@lasthash}}%
    \stepcounter{textcitecount}}% Added ???
  \setunit{%
    \ifbool{cbx:parens}%
    {\bibcloseparen\global\boolfalse{cbx:parens}}%
    {}%
    \textcitedelim}}% Not \multicitedelim ???
\makeatother

\begin{filecontents*}{\jobname.bib}
@book{paul2007,
    author      = {Hermann Paul},
    title       = {{Mittelhochdeutsche Grammatik}},
    shorthand   = {MhdG},
    edition     = {25. Aufl., neu bearbeitet von Thomas Klein, Hans-Jochim Solms und Klaus-Peter Wegera. Mit einer Syntax von Ingeborg Schröbler, neubearbeitet und erweitert von Heinz-Peter Prell},
    series      = {Sammlung kurzer Grammatiken germanischer Dialekte A. Hauptreihe},
    number      = {2},
    publisher   = {Niemeyer},
    location    = {Tübingen},
    year        = {2007},
    pagination  = {section},
}
\end{filecontents*}
\addbibresource{\jobname.bib}

\begin{document}
\cite{paul2007}

\citep{paul2007}

\citet{paul2007}

\citet[5]{paul2007}
\printbibliography
\end{document}

MhdG (MhdG) MhdG MhdG,§ 5


以下代码可能有助于您获取括号内的后记\citet

\makeatletter
\renewbibmacro*{textcite:postnote}{%
  \iffieldundef{postnote}%
  {}%
  {\savefield{fullhash}{\cbx@lastyear}%
    \setunit{\ifbool{cbx:parens}{\postnotewrapper}{\addspace\global\booltrue{cbx:parens}\bibopenparen}}%delim}%
    \printfield{postnote}}%
  \ifthenelse{\value{multicitecount}=\value{multicitetotal}}%
  {\setunit{}%
    \printtext{%
      \ifbool{cbx:parens}%
      {\bibcloseparen\global\boolfalse{cbx:parens}}%
      {}}}%
  {\setunit{%
      \ifbool{cbx:parens}%
      {\bibcloseparen\global\boolfalse{cbx:parens}}%
      {}%
      \textcitedelim}}}% Not \multicitedelim ???
\makeatother

相关内容