biblatex-gb7714-2015
biblatex-gb7714-2015 copied to clipboard
`biblatex-gb7714-2015` 宏包对于 `\cite[...]{...}` 的处理与默认不同.
下面是 mwe:
\documentclass{ctexart}
% \usepackage[style=gb7714-2015]{biblatex}
\usepackage{biblatex}
\begin{filecontents}{\jobname.bib}
@book{feynman2011feynman,
title={The Feynman lectures on physics, Vol. I: The new millennium edition: mainly mechanics, radiation, and heat},
author={Feynman, Richard P and Leighton, Robert B and Sands, Matthew},
volume={1},
year={2011},
publisher={Basic books}
}
\end{filecontents}
\addbibresource[]{\jobname.bib}
\begin{document}
text\cite[Thm. 3]{feynman2011feynman}
\printbibliography
\end{document}
不加载 gb7714-2015
的时候的输出为
加载 gb7714-2015
的输出为
请问这样做是由于国标的某项要求吗? 我刚翻了一下《GB/T 7714-2015》没发现对于引用的要求.
另外, 如果想恢复成上面默认形式的 \cite[..]{..}
应该如何处理呢?
国标要求引用标注的页码在括号外。\cite[]{}
的输入方式无法区分“Thm. 3”和页码,所以也放在了括号外。
gb7714-2015.bbx 2022/03/07 v1.1e
不会产生额外的逗号,可能你需要升级宏包的版本。
gb7714-2015.bbx 2022/03/07 v1.1e
不会产生额外的逗号,可能你需要升级宏包的版本。
我刚刚更新了宏包版本,不会产生额外的逗号了。
因为学校的规定和国标不太一致。需要什么改动可以达到和默认样式相同的效果吗
你的示例是行内命令是吧,做如下修改即可,放到导言区里。
\DeclareCiteCommand{\parencite}%[\mkbibbrackets]
{\mkbibleftborder\usebibmacro{cite:init}%
\usebibmacro{prenote}}%
{\usebibmacro{citeindex}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}\addcomma\addspace\printfield{postnote}\mkbibrightborder}
比如:
\documentclass{ctexart}
\usepackage[style=gb7714-2015]{biblatex}
%\usepackage{biblatex}
\begin{filecontents}{\jobname.bib}
@book{feynman2011feynman,
title={The Feynman lectures on physics, Vol. I: The new millennium edition: mainly mechanics, radiation, and heat},
author={Feynman, Richard P and Leighton, Robert B and Sands, Matthew},
volume={1},
year={2011},
publisher={Basic books}
}
\end{filecontents}
\addbibresource[]{\jobname.bib}
\DeclareCiteCommand{\parencite}%[\mkbibbrackets]
{\mkbibleftborder\usebibmacro{cite:init}%
\usebibmacro{prenote}}%
{\usebibmacro{citeindex}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}\addcomma\addspace\printfield{postnote}\mkbibrightborder}
\begin{document}
text\parencite[Thm. 3]{feynman2011feynman}
\printbibliography
\end{document}
结果为:
你的示例是行内命令是吧,做如下修改即可,放到导言区里。
\DeclareCiteCommand{\parencite}%[\mkbibbrackets] {\mkbibleftborder\usebibmacro{cite:init}% \usebibmacro{prenote}}% {\usebibmacro{citeindex}% \usebibmacro{cite:comp}} {} {\usebibmacro{cite:dump}\addcomma\addspace\printfield{postnote}\mkbibrightborder}
请问如果是上标的\cite
应该怎么改呢
\DeclareCiteCommand{\cite}[\mkbibsuperscript]%利用mkbibsuperbracket添加方括号
{\mkbibleftborder\usebibmacro{cite:init}%
\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}\addcomma\addspace%
\printfield{postnote}\mkbibrightborder}
\DeclareCiteCommand{\cite}[\mkbibsuperscript]%利用mkbibsuperbracket添加方括号 {\mkbibleftborder\usebibmacro{cite:init}% \usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{cite:comp}} {} {\usebibmacro{cite:dump}\addcomma\addspace% \printfield{postnote}\mkbibrightborder}
感谢
感谢, 我的问题已经得到了解决.
@hushidong 我测试了一下,按照上面的代码的话,不加[]
的时候,
仍然存在
\documentclass{ctexart}
\usepackage[style=gb7714-2015]{biblatex}
%\usepackage{biblatex}
\begin{filecontents}{\jobname.bib}
@book{feynman2011feynman,
title={The Feynman lectures on physics, Vol. I: The new millennium edition: mainly mechanics, radiation, and heat},
author={Feynman, Richard P and Leighton, Robert B and Sands, Matthew},
volume={1},
year={2011},
publisher={Basic books}
}
\end{filecontents}
\addbibresource[]{\jobname.bib}
\DeclareCiteCommand{\parencite}%[\mkbibbrackets]
{\mkbibleftborder\usebibmacro{cite:init}%
\usebibmacro{prenote}}%
{\usebibmacro{citeindex}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}\addcomma\addspace\printfield{postnote}\mkbibrightborder}
\begin{document}
text\parencite[Thm. 3]{feynman2011feynman}
text\parencite{feynman2011feynman}
\printbibliography
\end{document}
\DeclareCiteCommand{\parencite}%[\mkbibbrackets]
{\mkbibleftborder\usebibmacro{cite:init}%
\usebibmacro{prenote}}%
{\usebibmacro{citeindex}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}\setunit{\addcomma\addspace}\printfield{postnote}\mkbibrightborder}
\DeclareCiteCommand{\cite}[\mkbibsuperscript]%利用mkbibsuperbracket添加方括号
{\mkbibleftborder\usebibmacro{cite:init}%
\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}\setunit{\addcomma\addspace}%
\printfield{postnote}\mkbibrightborder}