![使用 academicons 包中的 \aiDoiSquare 图标替换参考书目中所有条目的“doi”关键字](https://linux22.com/image/390252/%E4%BD%BF%E7%94%A8%20academicons%20%E5%8C%85%E4%B8%AD%E7%9A%84%20%5CaiDoiSquare%20%E5%9B%BE%E6%A0%87%E6%9B%BF%E6%8D%A2%E5%8F%82%E8%80%83%E4%B9%A6%E7%9B%AE%E4%B8%AD%E6%89%80%E6%9C%89%E6%9D%A1%E7%9B%AE%E7%9A%84%E2%80%9Cdoi%E2%80%9D%E5%85%B3%E9%94%AE%E5%AD%97.png)
我目前正在制作我的简历并使用该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: