我想将 产生的引文编号排版为\textcite
上标数字,而不是用括号括起来,以与文档的其余部分保持一致。当autocite
设置为时,是否可以排版“作者 ^1” superscript
,而不是默认的“作者 1”?
\documentclass{report}
\usepackage[backend=bibtex8,autocite = superscript]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{ABib.bib}
@article {article1,
AUTHOR = {Author, A. N.},
TITLE = {A sample paper},
JOURNAL = {Sample journal},
VOLUME = {1},
YEAR = {2013},
NUMBER = {1},
PAGES = {1--2}}
\end{filecontents}
\addbibresource{ABib.bib}
\begin{document}
Someone saw something \autocite{article1}.
\textcite{article1} saw something.
\end{document}
答案1
我认为这样就可以了:这主要是将与 相关的定义复制\supercite
到定义 的命令中\textcite
。请注意,我已经“硬连线”了这一点,换句话说,它不会自动适应“autocite”中的变化,因此如果您停止使用“autocite=superscript”,您也需要删除重新定义。
此外,与其他上标参考一样,不会打印前后注,但会在日志中写入警告。
\documentclass{report}
\usepackage[backend=bibtex8,autocite = superscript]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{ABib.bib}
@article {article1,
AUTHOR = {Author, A. N.},
TITLE = {A sample paper},
JOURNAL = {Sample journal},
VOLUME = {1},
YEAR = {2013},
NUMBER = {1},
PAGES = {1--2}}
\end{filecontents}
\addbibresource{ABib.bib}
\makeatletter
\renewbibmacro*{textcite}{%
\iffieldequals{namehash}{\cbx@lasthash}
{\mkbibsuperscript{\supercitedelim}}
{\cbx@tempa
\ifnameundef{labelname}
{\printfield[citetitle]{labeltitle}}
{\printnames{labelname}}}%
\ifnumequal{\value{citecount}}{1}
{}
{}%
\mkbibsuperscript{\usebibmacro{cite}}%
\savefield{namehash}{\cbx@lasthash}%
\gdef\cbx@tempa{\addspace\multicitedelim}}%
\DeclareCiteCommand{\textcite}
{\let\cbx@tempa=\empty
\undef\cbx@lasthash
\iffieldundef{prenote}
{}
{\BibliographyWarning{Ignoring prenote argument}}%
\iffieldundef{postnote}
{}
{\BibliographyWarning{Ignoring postnote argument}}}
{\usebibmacro{citeindex}%
\usebibmacro{textcite}}
{}
{}
\makeatother
\begin{document}
Someone saw something \autocite{article1}.
\textcite{article1} saw something.
\end{document}
制作:
答案2
如果使用 biblatex 包中的 natbib 和 biber 选项,另一个更简单的可能性是:
\usepackage[
backend=biber,
style=chem-acs,
sortlocale=de_DE,
natbib=true,
url=false,
doi=true,
eprint=true,
autocite=superscript
]{biblatex}
\newcommand{\authorcite}[1]{\citeauthor{#1}\,\supercite{#1}}
\authorcite{CitationKey}
将导致 Author1 和 Author^1