%EC%9D%84%20%EA%B5%B5%EC%9D%80%20%EA%B8%80%EC%94%A8%EB%A1%9C%20%EC%9D%B8%EC%87%84%ED%95%A9%EB%8B%88%EB%8B%A4..png)
\cite{}
내 문서에서 특정 저자를 모두 굵은 글씨로 인쇄하고 싶습니다 . 지금은 shorthand = {\textbf{Foo23}}
내 에서 그렇게 .bib
하지만 실제로는 실용적이지 않으며 동일한 약칭을 사용하여 제대로 중복되지 않은 항목을 처리하는 문제가 있을 뿐만 아니라 더 중요한 것은알파벳 순서가 깨졌네요:
\documentclass{article}
\usepackage[
style=alphabetic,% also
minalphanames=3,maxalphanames=4, % [Foo+99] -> [FBB+99].
maxnames=99, % Do not put "et al". Sets maxbibnames, maxcitenames and maxsortnames.
sortcites=true,
sortcites=false, % \cite{B,A,C}: [A,B,C] --> [B,A,C]
]{biblatex}
\usepackage{filecontents}
\begin{filecontents}[overwrite]{\jobname.bib}
@article{a1,
author={John Smith and Mary Stuart and Peter Pan},
year = 2020,
shorthand = {\textbf{SSP20}},
journal = {I should should have a Awesome Journal},
volume = 3
}
@article{a2,
author={John Smith and Mary Stuart and Peter Pan},
year = 2020,
journal = {Another Journal},
volume = 3
}
@article{a3,
author={Abc Abc and Def Ahi},
year = 2020,
journal = {I should appear first in the list as it is sorted alphabetically},
volume = 3
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\cite{a1,a2,a3}
\printbibliography
\end{document}
답변1
.bib
일반적으로 입력 시 명령 형식을 최대한 지정하지 않는 것이 가장 좋습니다 . 아시다시피 명령은 다소 일반 텍스트처럼 취급되며 정렬 및 고유성 계산을 망칠 수 있습니다.
대신 데이터에 의미 마커를 설정하고 그에 따라 조치를 취하는 것이 더 좋습니다 biblatex
. 한 가지 옵션은 키워드를 설정하는 것입니다.
biblatex
놀랍게도 전체 인용 레이블을 강조 표시할 수 있는 간단한 방법이 없으므로 이를 cite
bibmacro에 구축해야 합니다.
\documentclass{article}
\usepackage[
style=alphabetic,% also
minalphanames=3,maxalphanames=4, % [Foo+99] -> [FBB+99].
maxnames=99, % Do not put "et al". Sets maxbibnames, maxcitenames and maxsortnames.
sortcites=true,
sortcites=false, % \cite{B,A,C}: [A,B,C] --> [B,A,C]
]{biblatex}
\DeclareFieldFormat{citelabel}{%
\ifkeyword{importantauthor}
{\mkbibbold{#1}}
{#1}}
\DeclareFieldFormat{labelalphawidth}{%
\mkbibbrackets{%
\ifkeyword{importantauthor}
{\mkbibbold{#1}}
{#1}}}
\renewbibmacro*{cite}{%
\printtext[bibhyperref]{%
\printtext[citelabel]{%
\printfield{labelprefix}%
\printfield{labelalpha}%
\printfield{extraalpha}%
\ifbool{bbx:subentry}
{\printfield{entrysetcount}}
{}}}}
\begin{filecontents}{\jobname.bib}
@article{a1,
author = {John Smith and Mary Stuart and Peter Pan},
year = 2020,
journal = {I should should have a Awesome Journal},
volume = 3,
keywords = {importantauthor},
}
@article{a2,
author = {John Smith and Mary Stuart and Peter Pan},
year = 2020,
journal = {Another Journal},
volume = 3,
}
@article{a3,
author = {Abc Abc and Def Ahi},
year = 2020,
journal = {I should appear first in the list as it is sorted alphabetically},
volume = 3,
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\cite{a1,a2,a3}
\printbibliography
\end{document}