这amsrefs
软件包允许自定义参考书目样式(指南中的第 4 部分),但建议通过以下方式进行:“编写一个 LaTeX 包来加载amsrefs
用...加载该包”。我只想用粗体字体显示书名;编写新包听起来有点过头了。有没有直接的方法来实现这一点?
(我正在使用amsrefs
)bibtex
。
最小工作示例
\documentclass{article}
\usepackage[nobysame]{amsrefs}
\begin{filecontents}{mwebib.bib}
@article{A,
AUTHOR = {Euler, Leonhard},
TITLE = {Solutio problematis ad geometriam situs pertinentis},
}
@book{B,
AUTHOR = {Euler, Leonhard},
TITLE = {Elements of Algebra},
}
\end{filecontents}
\begin{document}
Article \cite{A} and book \cite{B}.
\bibliography{mwebib}
\end{document}
我想要名字代数元素以粗体显示,而不改变.bib
文件中的任何内容;只需改变风格就amsrefs
可以以不同的方式考虑书籍。
答案1
您必须修改\BibSpec
for book
。我只是从中复制amsrefs.sty
并更改了相关位。
\documentclass{article}
\usepackage[nobysame]{amsrefs}
\BibSpec{book}{%
+{} {\PrintPrimary} {transition}
+{,} { \textbf} {title} % was \textit
+{.} { } {part}
+{:} { \textit} {subtitle}
+{,} { \PrintEdition} {edition}
+{} { \PrintEditorsB} {editor}
+{,} { \PrintTranslatorsC} {translator}
+{,} { \PrintContributions} {contribution}
+{,} { } {series}
+{,} { \voltext} {volume}
+{,} { } {publisher}
+{,} { } {organization}
+{,} { } {address}
+{,} { \PrintDateB} {date}
+{,} { } {status}
+{} { \parenthesize} {language}
+{} { \PrintTranslation} {translation}
+{;} { \PrintReprint} {reprint}
+{.} { } {note}
+{.} {} {transition}
+{} {\SentenceSpace \PrintReviews} {review}
}
\begin{filecontents}{mwebib.bib}
@article{A,
AUTHOR = {Euler, Leonhard},
TITLE = {Solutio problematis ad geometriam situs pertinentis},
}
@book{B,
AUTHOR = {Euler, Leonhard},
TITLE = {Elements of Algebra},
}
\end{filecontents}
\begin{document}
Article \cite{A} and book \cite{B}.
\bibliography{mwebib}
\end{document}