我目前正在制作我的简历并使用该biblatex/biber
组合进行参考书目管理。
为了增加视觉效果,我希望用包中的doi
图标替换生成的参考书目中每个条目的关键字。如何实现?\aiDoiSquare
academicons
这是一个 MWE(article
目前使用该类)
\documentclass[a4paper]{article}
\usepackage[backend=biber, style=numeric-comp, sorting=none,
maxbibnames=50, eprint=false]{biblatex}
\usepackage{csquotes}
\usepackage{academicons}
\addbibresource{biblatex-examples.bib}
\begin{document}
Let us cite \cite{sigfridsson} for this doi question.
% Somehow replace the keyword 'doi' in all entries of the generated bibliography
% with the '\aiDoiSquare' icon from the 'academicons' package.
\printbibliography
\end{document}
答案1
使用格式指令怎么样doi
?
\documentclass[a4paper]{article}
\usepackage{academicons}
\usepackage{graphicx} % required for scalebox
\usepackage[backend=biber, style=numeric-comp, sorting=none,
maxbibnames=50, eprint=false]{biblatex}
\usepackage{csquotes}
\addbibresource{biblatex-examples.bib}
\DeclareFieldFormat{doi}{%
\raisebox{-1.5pt}{\scalebox{1.4}{\aiDoiSquare}}\addcolon\space
\ifhyperref
{\href{https://doi.org/#1}{\nolinkurl{#1}}}
{\nolinkurl{#1}}}
\begin{document}
\nocite{kastenholz,sigfridsson}
% Somehow replace the keyword 'doi' in all entries of the generated bibliography
% with the '\aiDoiSquare' icon from the 'academicons' package.
\printbibliography
\end{document}
% Local Variables:
% TeX-engine: xetex
% End: