![使用 babelbib 在參考書目中反白顯示特定作者姓名](https://rvso.com/image/305918/%E4%BD%BF%E7%94%A8%20babelbib%20%E5%9C%A8%E5%8F%83%E8%80%83%E6%9B%B8%E7%9B%AE%E4%B8%AD%E5%8F%8D%E7%99%BD%E9%A1%AF%E7%A4%BA%E7%89%B9%E5%AE%9A%E4%BD%9C%E8%80%85%E5%A7%93%E5%90%8D.png)
我想使用 突出顯示(更準確地說是粗體)參考書目中的特定作者姓名bibtex
。這個問題有幾個答案,例如
這,這,這,這或者這個。但是,我正在使用該babelbib
包,並且以前的解決方案採用了簡單的風格。我認為更接近我嘗試做的解決方案是這個,但是我不熟悉用於編寫bst檔案的語言,以便正確修改它。
由於其他原因,我修補了babunsrt-lf
樣式以僅顯示作者姓名首字母,並且我想要突出顯示的作者姓名具有以下形式Lastname, {\relax Th}eo
的補丁版本FUNCTION {format.names}
取自這裡。
編輯:在 @uT5r 詢問後添加 MWE
\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@CONFERENCE{CB:EPS36,
author = {\textbf{Lastname, {\relax Th}eo} and Coauthor, John},
title = {Some poster},
booktitle = {36 Conference},
address = {City},
year = {2009},
pages = {1015-1018},
}
\end{filecontents}
\documentclass{article}
\usepackage{filecontents}
\usepackage[francais,greek,english]{babel}
\usepackage{babelbib}
\selectbiblanguage{english}
\setbtxfallbacklanguage{english}
\begin{document}
bla
\bibliographystyle{bababbrv-lf}
\bibliography{\jobname}
\nocite{*}
\end{document}
答案1
這是相當手動且簡單的解決方案,但是否可以簡單地手動開啟 .bib 檔案並執行尋找和替換?
假設您想讓「Bleeker, Marjo」加粗。您只需打開您的 .bib 文件,搜索Bleeker, Marjo
,將其替換為\textbf{Bleeker, Marjo}
,然後編譯您的 .tex 。
\begin{filecontents}{\jobname.bib}
@article{janssen1996evaluation,
title={Evaluation of the DNA fingerprinting method AFLP as a new tool in bacterial taxonomy},
author={Janssen, Paul and Coopman, Renata and Huys, Geert and Swings, Jean and \textbf{Bleeker, Marjo} and Vos, Pieter and Zabeau, Marc and Kersters, Karel},
journal={Microbiology},
volume={142},
number={7},
pages={1881--1893},
year={1996},
publisher={Soc General Microbiol}
}
@article{vos1995aflp,
title={AFLP: a new technique for DNA fingerprinting},
author={Vos, Pieter and Hogers, Rene and \textbf{Bleeker, Marjo} and Reijans, Martin and Van de Lee, Theo and Hornes, Miranda and Friters, Adrie and Pot, Jerina and Paleman, Johan and Kuiper, Martin and others},
journal={Nucleic acids research},
volume={23},
number={21},
pages={4407--4414},
year={1995},
publisher={Oxford Univ Press}
}
\end{filecontents}
\documentclass{article}
\usepackage[style=authoryear, maxcitenames=2, maxbibnames=100, natbib=true, backend=bibtex]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
\noindent
\citet[1229]{vos1995aflp} has argued that $y$. Second, \citep[1229]{janssen1996evaluation} also show $m$ and $x$ \citet{vos1995aflp,janssen1996evaluation}.
\printbibliography
\end{document}
答案2
因為您可以在 *.bib 原始檔中使用突出顯示命令。但是,我可以透過將 \hl{} 命令新增至引文資訊的每一行來突出顯示引文的特定部分:
@article{StephenPark,
title={\hl{Integration of biological kinetics and computational fluid dynamics to model the growth of Nannochloropsis salina in an open channel raceway}},
author={\hl{Park, Stephen and Li, Yebo}},
journal={\hl{Biotechnology and bioengineering}},
volume={\hl{112}},
number={\hl{5}},
pages={\hl{923--933}},
year={\hl{2015}},
publisher={\hl{Wiley Online Library}}
}
您可以\hl{}
從任何引用部分刪除該命令。
答案3
我經常嘗試做同樣的事情,而我剛剛想到的是,由於我有一個單獨的.bib
文件用於我的出版物和一個用於一般參考的文件,我可以定義一個像\authoremph
這樣的命令來突出顯示任何權力-想要,例如,使用\textbf
或\underline
,並確保每次出現我的名字時,都將其保留\authoremph{me}
在我的.bib
文件中。
如果\authoremph
未定義,則\newcommand\authoremph[1]{#1}
在文件序言中使用,或者\newcommand\authoremph[1]{\textbf{#1}}
如果我正在撰寫贈款...
測試一下 - 效果非常好! (好吧,我知道,我現在必須在所有內容的序言中多加一行,但我使用 Sublime Text 3,我可以將其放入我的「紙質」模板中。