我是新来的,请您帮助我解决我的问题。我希望我能提供所有必要的信息。
根据本指南IEEE 引用要求以不同于释义的方式对直接引用进行样式化。直接引用应如下所示 [1: 100],释义应如下所示 [1, p. 120]。
以下是我的示例:
\documentclass[11pt,a4paper,twoside=false]{scrbook}
\usepackage[backend=biber,style=ieee,bibencoding=UTF8]{biblatex}
\addbibresource{sources.bib}
\begin{document}
\chapter{Issue}
\begin{quote}
A long direct quote. \cite[42]{man20}
\end{quote}
Some content \cite[1337]{she20}.
\printbibliography
\end{document}
这是 bib 文件的内容:
% Encoding: UTF-8
@Book{man20,
author = {Man, A},
title = {Men},
publisher = {The MEN},
year = {2020},
}
@Book{she20,
author = {She, The},
title = {Women},
publisher = {The WOMEN},
year = {2020},
}
你能给我一个解决方案吗?我在 Google 上搜索没有找到任何结果。
非常感谢您的帮助!
答案1
一个选择就是创建一个新的\directcite
宏:
\documentclass{article}
\begin{filecontents}[overwrite]{\jobname.bib}
@Book{man20,
author = {Man, A},
title = {Men},
publisher = {The MEN},
year = {2020},
}
@Book{she20,
author = {She, The},
title = {Women},
publisher = {The WOMEN},
year = {2020},
}
\end{filecontents}
\usepackage[style=ieee]{biblatex}
\addbibresource{\jobname.bib}
\DeclareCiteCommand{\directcite}%
{\usebibmacro{cite:init}%
\bibopenbracket
\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}%
\DeclareFieldFormat{postnote}{\mknormrange{##1}}%
\DeclareDelimFormat{postnotedelim}{\addcolon\space}%
\usebibmacro{postnote}%
\bibclosebracket
}
\begin{document}
\begin{quote}
A long direct quote. \directcite[42]{man20}
\end{quote}
Some content \cite[1337]{she20}.
\printbibliography
\end{document}