我目前正在写论文,在参考文献方面遇到了很多困难。在阅读了大量资料(StackExchange)后,我决定改用biblatex
/bibtex。我目前使用的physrj
样式与 phys 样式相同,但有一些细微的更改(借助本论坛上的当前答案实现)。
最后我想做一点改动,但我不知道该怎么做。我想改变图书的列出方式:
TL Wilson、K. Rohlfs 和 S. Huttemeister,射电天文学工具,第 6 版(Springer,海德堡,2013 年)。
到:
TL Wilson、K. Rohlfs 和 S. Huttemeister,射电天文学工具,第6版,Springer,海德堡(2013 年)。
其中版本和位置是可选的/如果可用的话。
要改变这种情况需要做什么?谢谢您的帮助。
我目前解决这个问题的 MWE 是:
\begin{filecontents}{Books.bib}
@BOOK{TRA,
author = {{Wilson}, T.~L. and {Rohlfs}, K. and {H\"{u}ttemeister}, S.},
title = "{Tools of radio astronomy}",
keywords = {RADIO ASTRONOMY},
publisher = {Springer},
location = {Heidelberg},
edition = 6,
year = 2013}
\end{filecontents}
\documentclass[12pt,fleqn,a4paper]{book}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[sorting=none,style=phys,natbib=true,backend=bibtex]{biblatex}
\addbibresource{Books.bib}
\begin{document}
We cite a book \citep{TRA}.
\printbibliography
\end{document}
答案1
你可以使用
\makeatletter
\DefineBibliographyExtras{english}{%
\protected\def\mkbibordinal#1{%
\begingroup
\@tempcnta0#1\relax\number\@tempcnta
\@whilenum\@tempcnta>100\do{\advance\@tempcnta-100\relax}%
\ifnum\@tempcnta>20
\@whilenum\@tempcnta>9\do{\advance\@tempcnta-10\relax}%
\fi
\textsuperscript{\ifcase\@tempcnta th\or st\or nd\or rd\else th\fi}%
\endgroup}%
}
\makeatother
要获得“edition”而不是“ed.”,请使用选项加载包abbreviate=false
。
括号最后修改为
\renewbibmacro*{institution+location+date}{%
\printlist{institution}%
\newunit
\printlist{location}%
\setunit{\addspace}%
\printtext[parens]{\usebibmacro{date}}%
}
\newbibmacro*{organization+date}{%
\printlist{organization}%
\setunit{\addspace}%
\printtext[parens]{\usebibmacro{date}}%
\newunit
}
\renewbibmacro*{publisher+location+date}{%
\printlist{publisher}%
\newunit
\printlist{location}%
\setunit{\addspace}%
\printtext[parens]{\usebibmacro{date}}%
\newunit
}
平均能量损失
\documentclass[12pt,fleqn,a4paper]{article}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[sorting=none,style=phys,natbib=true,backend=bibtex, abbreviate=false]{biblatex}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{TRA,
author = {Wilson, T. L. and Rohlfs, K. and H\"{u}ttemeister, S.},
title = "{Tools of radio astronomy}",
publisher = {Springer},
location = {Heidelberg},
edition = 6,
year = 2013,
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\makeatletter
\DefineBibliographyExtras{english}{%
\protected\def\mkbibordinal#1{%
\begingroup
\@tempcnta0#1\relax\number\@tempcnta
\@whilenum\@tempcnta>100\do{\advance\@tempcnta-100\relax}%
\ifnum\@tempcnta>20
\@whilenum\@tempcnta>9\do{\advance\@tempcnta-10\relax}%
\fi
\textsuperscript{\ifcase\@tempcnta th\or st\or nd\or rd\else th\fi}%
\endgroup}%
}
\makeatother
\renewbibmacro*{institution+location+date}{%
\printlist{institution}%
\newunit
\printlist{location}%
\setunit{\addspace}%
\printtext[parens]{\usebibmacro{date}}%
}
\newbibmacro*{organization+date}{%
\printlist{organization}%
\setunit{\addspace}%
\printtext[parens]{\usebibmacro{date}}%
\newunit
}
\renewbibmacro*{publisher+location+date}{%
\printlist{publisher}%
\newunit
\printlist{location}%
\setunit{\addspace}%
\printtext[parens]{\usebibmacro{date}}%
\newunit
}
\begin{document}
We cite a book \citep{TRA}.
\printbibliography
\end{document}
给出
1 TL Wilson、K. Rohlfs 和 S. Hüttemeister,射电天文学工具,第6版,Springer,海德堡(2013 年)。