我被要求将参考文献加粗,以便从注释中脱颖而出。在本文档我看到很多标点符号命令我都可以使用 来更改\renewcommand
。我得到的最接近的命令是以下内容,基于此问答:
% main.tex
\documentclass[12pt]{article}
\usepackage{apacite}
\renewcommand{\APACrefauthstyle}{\bfseries}
\title{Annotated Bibliography}
\begin{document}
\nocite{*}
\bibliographystyle{apacann}
\bibliography{main}
\end{document}
% main.bib
@string{ NIPS = {Advances in Neural Information Processing Systems}}
@article{attn_all_you_need,
author = {Ashish Vaswani and
Noam Shazeer and
Niki Parmar and
Jakob Uszkoreit and
Llion Jones and
Aidan N. Gomez and
Lukasz Kaiser and
Illia Polosukhin},
title = {Attention Is All You Need},
journal = NIPS,
volume = {30},
year = {2017},
url = {https://papers.nips.cc/paper/7181-attention-is-all-you-need},
urldate = {Nov 19, 2019},
annotate = {This is a test.}
}
再次强调,我需要的是将除“这是一个测试”之外的所有引用都加粗。如果有人能指出正确的续订命令,我就会继续前进!
答案1
这看起来非常糟糕,我不推荐这样做,但如果你被迫这样做,以下方法可以解决问题:
\documentclass[12pt]{article}
\begin{filecontents}{\jobname.bib}
@string{ NIPS = {Advances in Neural Information Processing Systems}}
@article{attn_all_you_need,
author = {Ashish Vaswani and
Noam Shazeer and
Niki Parmar and
Jakob Uszkoreit and
Llion Jones and
Aidan N. Gomez and
Lukasz Kaiser and
Illia Polosukhin},
title = {Attention Is All You Need},
journal = NIPS,
volume = {30},
year = {2017},
url = {https://papers.nips.cc/paper/7181-attention-is-all-you-need},
urldate = {Nov 19, 2019},
annotate = {This is a test.}
}
\end{filecontents}
\usepackage{apacite}
\usepackage{etoolbox}
\pretocmd{\bibitem}{\bfseries}{}{}
\pretocmd{\APACrefannotation}{\normalfont}{}{}
\title{Annotated Bibliography}
\begin{document}
\nocite{*}
\bibliographystyle{apacann}
\bibliography{\jobname}
\end{document}