「 LaTex 」写论文,Springer杂志插入ORCID

本文详细介绍了如何在LaTeX文档中为作者插入ORCID图标,包括必要的包、图标定义、作者ORCID调用库的创建及实例代码。通过遵循这些步骤,你可以轻松地在学术论文中展示作者的ORCID身份。

一、前言:

        小白正在投Springer文章,遇“在作者右上角插入ORCID图标”问题,经挣扎后得此经验。成功后如下图:

 二、技术实现

        1. 插入库,代码如下:

\usepackage{tikz,xcolor,hyperref}

        2. 插入图标,代码如下:

\definecolor{lime}{HTML}{A6CE39}
\DeclareRobustCommand{\orcidicon}{
	\begin{tikzpicture}
	\draw[lime, fill=lime] (0,0) 
	circle [radius=0.16] 
	node[white] {{\fontfamily{qag}\selectfont \tiny ID}};
	\draw[white, fill=white] (-0.0625,0.095) 
	circle [radius=0.007];
	\end{tikzpicture}
	\hspace{-2mm}
}

*官网给的参数设定,可以按需修改。

        3. 定义编号,代码如下:

\foreach \x in {A, ..., Z}{\expandafter\xdef\csname orcid\x\endcsname{\noexpand\href{https://orcid.org/\csname orcidauthor\x\endcsname
			{\noexpand\orcidicon}}
}

*可能用不上这么多,但不建议改动。

        4. 建立ORCID调用库,代码如下:

\newcommand{\orcidauthorA}{0000-0002-1707-7122} % For author A
\newcommand{\orcidauthorB}{0000-0001-7246-8612} % For author B
\newcommand{\orcidauthorC}{0000-0002-6416-6320} % For author C

*各位研友可以关注第一个人。

        5. 作者调用,代码如下:

\author[Author One]{Robot_Starscream\orcidA{}}

三、实例

\documentclass{amsart}

\usepackage{lipsum} % To generate some text for the article via \lipsum

%------------------------------------------------------------------------------
% Code for ORCID iD
%------------------------------------------------------------------------------
\usepackage{tikz,xcolor,hyperref}

% Make Orcid icon
\definecolor{lime}{HTML}{A6CE39}
\DeclareRobustCommand{\orcidicon}{%
	\begin{tikzpicture}
	\draw[lime, fill=lime] (0,0) 
	circle [radius=0.16] 
	node[white] {{\fontfamily{qag}\selectfont \tiny ID}};
	\draw[white, fill=white] (-0.0625,0.095) 
	circle [radius=0.007];
	\end{tikzpicture}
	\hspace{-2mm}
}

\foreach \x in {A, ..., Z}{%
	\expandafter\xdef\csname orcid\x\endcsname{\noexpand\href{https://orcid.org/\csname orcidauthor\x\endcsname}{\noexpand\orcidicon}}
}

% Define the ORCID iD command for each author separately. Here done for two authors.
\newcommand{\orcidauthorA}{0000-0001-5316-8964}
\newcommand{\orcidauthorB}{0000-0002-6963-295X}

\begin{document}

\title{Lorem ipsum dolor sit amet}

% First author
\author[Author One]{Author One\orcidA{}}
% IMPORTANT: specify explicitly the running author name via the option [ ],
% otherwise the ORCID logo will be generated at every occurence of the author name in the pdf file
% at the top of the page. Clearly not what one would like to see.

% Second author
\author[Author Two]{Author Two\orcidB{}}

\maketitle

\begin{abstract}
\lipsum[1] % Generate some random text
\end{abstract}

\section{Lorem ipsum dolor sit amet}

\lipsum % Generate some random text

\end{document}

*亲测有效

### 使用 `orcidlink.sty` 插入 ORCID 链接 如果希望在 LaTeX 文档中插入 ORCID 链接,并且希望链接包含图标和可点击的超链接,可以使用 `orcidlink.sty` 样式文件。该文件提供了简洁的命令用于插入 ORCID 链接,并且可以自定义其外观。 要使用 `orcidlink.sty`,首先需要下载该文件,并将其放置在 LaTeX 项目的根目录下。然后在文档的导言区加载该包: ```latex \usepackage{orcidlink} ``` 在文档正文中,使用 `\orcidlink` 命令插入 ORCID 链接。例如,在作者名字后面插入 ORCID 链接: ```latex \author{Author Name\orcidlink{0000-0000-0000-0000}} ``` 上述代码会在作者名字后面插入一个带有颜色的 ORCID 链接,并且可以直接点击跳转到 ORCID 网站[^2]。 ### 自定义 ORCID 链接样式 如果希望进一步自定义 ORCID 链接的样式,可以修改 `orcidlink.sty` 文件中的颜色定义或图标设计。例如,可以使用 `tikz` 宏包绘制自定义的 ORCID 图标,并为其添加超链接: ```latex \usepackage{tikz,xcolor,hyperref} \definecolor{lime}{HTML}{A6CE39} \DeclareRobustCommand{\orcidicon}{ \begin{tikzpicture} \draw[lime, fill=lime] (0,0) circle[radius=0.16] node[white]{{\fontfamily{qag}\selectfont \tiny \.{I}D}}; \end{tikzpicture} \hspace{-2mm} } ``` 然后在文档中使用 `\orcidicon` 命令插入自定义的 ORCID 图标: ```latex \author{Author Name\href{https://orcid.org/0000-0000-0000-0000}{\orcidicon}} ``` 上述代码会在作者名字旁边插入一个自定义的 ORCID 图标,并且可以直接点击跳转到 ORCID 网站[^4]。 ### 确保兼容性和正确加载 在使用 `orcidlink.sty` 时,需要确保其与其他 LaTeX 包兼容。通常情况下,`orcidlink.sty` 依赖于 `xcolor` 和 `hyperref` 包,因此在加载 `orcidlink` 之前应确保这些包已经被正确加载。如果遇到兼容性问题,可以尝试调整包的加载顺序,或者在文档的导言区添加以下代码: ```latex \usepackage{tikz} \NewSpotColorSpace{PANTONE} \AddSpotColor{PANTONE} {PANTONE3015C} {PANTONE\SpotSpace 3015\SpotSpace C} {1 0.3 0 0.2} \SetPageColorSpace{PANTONE} ``` 上述代码可以帮助解决某些模板中标题消失的问题。 ### 不使用 `orcidlink.sty` 的替代方法 如果不使用 `orcidlink.sty`,也可以直接使用 `hyperref` 包插入 ORCID 链接。例如: ```latex \usepackage{hyperref} \newcommand{\orcid}[1]{\href{https://orcid.org/#1}{ORCID: #1}} ``` 然后在文档中使用 `\orcid` 命令插入 ORCID 链接: ```latex The author's ORCID is \orcid{0000-0002-1234-5678}. ``` 上述代码会在文档中生成一个指向 ORCID 网站的超链接,并显示为“ORCID: 0000-0002-1234-5678”[^3]。 ###
评论 15
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Robot_Starscream

祝好!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值