![참고문헌의 특정 참고문헌 색칠하기](https://rvso.com/image/370302/%EC%B0%B8%EA%B3%A0%EB%AC%B8%ED%97%8C%EC%9D%98%20%ED%8A%B9%EC%A0%95%20%EC%B0%B8%EA%B3%A0%EB%AC%B8%ED%97%8C%20%EC%83%89%EC%B9%A0%ED%95%98%EA%B8%B0.png)
원고의 개정판에서는 일반적으로 새로운 변경 사항을 컬러 텍스트로 표시합니다. 이 질문은 파일의 특정 참조에 대해 이를 수행할 수 있는 다양한 방법에 관한 것입니다 .bib
. 이에 대한 이전 솔루션이 있지만 만족스럽지 않습니다.이 하나하나의 참조에 대한 작업을 수행하십시오.여기여러 중첩을 사용하여 여러 참조에 대한 이전 확장입니다 ifstreqal
. 그러나 컬러 참조 수가 증가하면 이는 실제로 쓸모가 없게 될 수 있습니다.
내가 염두에 두고 있는 것은 사용자가 중첩된 구조를 만드는 데 관여하지 않고도 색상 참조의 모든 레이블을 가져오는 코드를 갖는 것입니다.
다른 새로운 솔루션도 환영합니다.
다음은 MWE로 시작하는 것입니다.
\documentclass{article}
\usepackage{filecontents}
\usepackage{color}
\usepackage{etoolbox}
\begin{filecontents}{jobname.bib}
@article{greenwade93,
author = "George D. Greenwade",
title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
year = "1993",
journal = "TUGBoat",
volume = "14",
number = "3",
pages = "342--351"
}
@book{goossens93,
author = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
title = "The LaTeX Companion",
year = "1993",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}
@article{fuente,
author = "D. de la Fuente and J.G. Castaño and M. Morcillo",
title = "Long-term atmospheric corrosion of zinc",
journal = "Corrosion Science",
volume = "49",
year = "2007",
pages = "1420–1436",
}
@article{nature,
author = "Rosa Rademakers and Manuela Neumann and Ian R. Mackenzie",
title = "Advances in understanding the molecular basis of frontotemporal dementia - elongated title",
journal = "Nature Reviews Neurology",
volume = "8",
year = "2012",
pages = "423-434",
doi = "10.1038/nrneurol.2012.117",
}
}
\end{filecontents}
\let\mybibitem\bibitem
\renewcommand{\bibitem}[1]{%
\ifstrequal{#1}{greenwade93}
{\color{blue}\mybibitem{#1}}
{\color{black}\mybibitem{#1}}%
}
\begin{document}
This is my document \cite{fuente} and we have another \cite{nature}. We can speak also about \LaTeX! So two more reference are \cite{greenwade93} and \cite{goossens93}
\bibliographystyle{ieeetr}
\bibliography{jobname}
\end{document}
답변1
biblatex/biber를 사용하면 참조를 표시하는 것이 다소 쉽습니다.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage[style=ieee]{biblatex}
\addbibresource{biblatex-examples.bib}
\DeclareBibliographyCategory{changed}
\addtocategory{changed}{doody,angenendt}
\AtEveryBibitem{\ifcategory{changed}{\color{red}}{}}
\DeclareFieldFormat{labelnumberwidth}{\ifcategory{changed}{\textcolor{green}{\mkbibbrackets{#1}}}{\mkbibbrackets{#1}}}
\begin{document}
\cite{doody,herrmann,angenendt}
\printbibliography
\end{document}