带方括号的 Supercite

带方括号的 Supercite

要求相同这个问题。但是,当我尝试设置样式选项时,我收到此错误(参考书目宏‘站点’未定义):

MWE(注释第 3 行以重现错误):

\documentclass{article}
\usepackage{filecontents}
%\usepackage[style=chem-angew]{biblatex} % fails
\usepackage[]{biblatex}

\DeclareCiteCommand{\supercite}[\mkbibsuperscript]
  {\iffieldundef{prenote}
    {}
    {\BibliographyWarning{Ignoring prenote argument}}%
    \iffieldundef{postnote}
    {}
    {\BibliographyWarning{Ignoring postnote argument}}%
    \bibopenbracket}%
  {\usebibmacro{citeindex}%
    \usebibmacro{cite}}
  {\supercitedelim}
  {\bibclosebracket}

\begin{filecontents}{test.bib}
@book{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
@book{A02,
    author = {Author, A.},
    year = {2001},
    title = {Alpha},
}
\end{filecontents}
\addbibresource{test.bib}
\let\cite=\supercite
\begin{document}
Citing \supercite{A01, A02}.
\printbibliography
\end{document}

没有样式选项的输出:

答案1

好的,事实证明,如果我愿意的话,chem-angew 风格已经可以做到一切了。

问题在于我最初使用了 chem-acs 样式,它配置了没有括号的上标引用,这反过来又促使我去寻找方括号技巧。

只需将样式改为 chem-angew 即可:

\documentclass{article}
\usepackage{hyperref}
\usepackage[usenames, dvipsnames]{color}
\hypersetup{pdfpagemode=UseNone, colorlinks, citecolor=Blue, linkcolor=Blue, urlcolor=Blue}
%\usepackage[style=chem-acs]{biblatex}
\usepackage[style=chem-angew]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{test.bib}
@book{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
@book{A02,
    author = {Author, A.},
    year = {2001},
    title = {Alpha},
}
\end{filecontents}

\addbibresource{test.bib}

\begin{document}

Citing \autocite{A01, A02}.

\printbibliography

\end{document}

chem-acs:chem-angew:

相关内容