Как использовать стенографию с первого раза с verbose-trad1

Как использовать стенографию с первого раза с verbose-trad1

Я использую biblatex, Biber и style=verbose-trad1для моего документа LaTeX. Однако я хотел бы не печатать полное название в первый раз, когда использую сокращения, а чтобы сокращение также появлялось в первый раз в сноске.

Это было решено дляverbose здесьуже есть, но не работает при изменении стиля на verbose-trad1.

Поэтому я хотел бы сказать только одно:

КПВ

вместо

Кант 1968 (далее именуется KpV)

когда он появляется в первый раз.

Есть идеи, как решить эту проблему?

\documentclass{article}

\usepackage[style=verbose-trad1]{biblatex}

% Original definition
% \newbibmacro*{cite}{%
%   \usebibmacro{cite:citepages}%
%   \ifciteseen
%     {\iffieldundef{shorthand}
%        {\usebibmacro{cite:short}}
%        {\usebibmacro{cite:shorthand}}}
%     {\usebibmacro{cite:full}}}

\renewbibmacro*{cite}{%
  \usebibmacro{cite:citepages}%
  \iffieldundef{shorthand}
    {\ifciteseen
       {\usebibmacro{cite:short}}
       {\usebibmacro{cite:full}}}
    {\usebibmacro{cite:shorthand}}}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
@misc{Kan68,
  shorthand = {KpV},
  author = {Kant, Immanuel},
  year = {1968},
  title = {Kritik der praktischen Vernunft},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\null\vfill% just for the example

Some text.\autocite{Kan68}

Some text.\autocite{Kan68}

Some text.\autocite{A01}

Some text.\autocite{A01}

\printshorthands

\printbibliography

\end{document}

решение1

Вы можете попробовать это переопределение

\renewbibmacro*{cite}{%
  \usebibmacro{cite:citepages}%
  \global\togglefalse{cbx:loccit}%
  \bibhypertarget{cite\the\value{instcount}}{%
    \iffieldundef{shorthand}
      {\ifciteseen
         {\ifciteibid
            {\usebibmacro{cite:ibid}}
            {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
               {\usebibmacro{cite:idem}%
                \usebibmacro{cite:title}}
               {\ifnameundef{labelname}
                  {\usebibmacro{cite:title}}
                  {\usebibmacro{cite:name}%
                   \ifopcit
                     {\ifloccit
                {\usebibmacro{cite:loccit}}
                {\usebibmacro{cite:opcit}}}
                     {\usebibmacro{cite:title}}}}}%
          \usebibmacro{cite:save}}
         {\usebibmacro{cite:full}%
       \usebibmacro{cite:save}}}
      {\usebibmacro{cite:shorthand}}}}

Где мы всегда даем стенографии первый шанс (а не полной цитате). Фактически мы меняем порядок проверки на shorthandи \ifciteseen.

МВЭ

\documentclass{article}
\usepackage[style=verbose-trad1]{biblatex}

\renewbibmacro*{cite}{%
  \usebibmacro{cite:citepages}%
  \global\togglefalse{cbx:loccit}%
  \bibhypertarget{cite\the\value{instcount}}{%
    \iffieldundef{shorthand}
      {\ifciteseen
         {\ifciteibid
            {\usebibmacro{cite:ibid}}
            {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
               {\usebibmacro{cite:idem}%
                \usebibmacro{cite:title}}
               {\ifnameundef{labelname}
                  {\usebibmacro{cite:title}}
                  {\usebibmacro{cite:name}%
                   \ifopcit
                     {\ifloccit
                {\usebibmacro{cite:loccit}}
                {\usebibmacro{cite:opcit}}}
                     {\usebibmacro{cite:title}}}}}%
          \usebibmacro{cite:save}}
         {\usebibmacro{cite:full}%
       \usebibmacro{cite:save}}}
      {\usebibmacro{cite:shorthand}}}}

\addbibresource{biblatex-examples.bib}

\begin{document}
Some text.\autocite{kant:kpv}

Some text.\autocite{kant:kpv}

Some text.\autocite{worman}

Some text.\autocite{worman}

\printshorthands
\printbibliography
\end{document}

введите описание изображения здесь

Связанный контент