46

This question led to a new package:
orcidlink

I would like to display the ORCID id in an author list in an IEEEtran pdf, like that: what it should look like

Is there a standard way to include it in an IEEEtran article with PdfLaTeX? I used two approaches from Is there a standard way to include ORCID in TeX / PDF?, but I failed.

One is to insert the ORCID icon in the author list. I used the blow code:

\author{Ali Al-Obaidi \href{https://orcid.org/0000-0000-0000-0000}{\includegraphics[scale=1]{figures/orcid_16x16.png}}}

where orchid_16x16.png is provided in the link https://orcid.org/trademark-and-id-display-guidelines. But the result is that the icon is not clear enough, even I replaced it with a different size.

The other approach is to use the academicons package, like that:

\usepackage{academicons}
\definecolor{orcidlogocol}{HTML}{A6CE39}
\author{AAA \href{https://orcid.org/0000-0000-0000-0000}{\textcolor{orcidlogocol}{\aiOrcid}}}

However, the result is like that:

faulty result

And I also got two errors: "Latex Error: Encoding scheme 'TU' unknown" and "Bad character code (59865)". In the latest academicons.sty (see ftp://ftp.dante.de/tex-archive/fonts/academicons/academicons.sty), academicons use the font TU. However, it seems that the compiler PdfLateX cannot support this font.

Thus, is there anyone that knows a standard way to include it in an IEEEtran article with PdfLaTeX? Please help me.

Stephen
  • 14,890
Ebo
  • 563
  • 8
    \usepackage{academicons} doesn't work with pdflatex – Milo Aug 11 '18 at 02:25
  • @Milo That's good to know. Are you aware of any alternatives that are compatible with pdflatex? – Amelio Vazquez-Reina May 13 '20 at 16:02
  • 1
    @Milo The package https://ctan.org/pkg/fontawesome5 has the symbol \faOrcid and it runs with pdflatex. It can also be made green by {\color{orcidgreen}\faOrcid{}} (you need to define the color first) or similar. An alternative is the new https://www.ctan.org/pkg/orcidlink. – CampanIgnis Nov 22 '20 at 15:33
  • 1
    @CampanIgnis For full clarity, the orcidlink package on CTAN explicitly notes that it is simply a packaging of the accepted answer on this thread. – E.P. Dec 06 '20 at 18:41

3 Answers3

61

This answer has been packaged into the orcidlink package on CTAN by @duetosymmetry


Here is a pdflatex solution which uses tikz and the original .svg of the orcid icon.

enter image description here

Here are the steps:

  1. Using the svg.path TikZ library you can faithfully replicate the icon.

  2. I've used the scalerel package to scale the icon to the size of | (a vertical bar). This means it scales nicely with the size of the font. No special reason for choosing | other than it makes the size and placement roughly match the guidelines on the orcid website, which illustrate the icon placement should look something like this:

enter image description here

  1. This has all been wrapped in a command called orcidicon which takes as an input the orcid code, e.g. \orcidicon{0000-0000-0000-0000}.

  2. \href takes care of making it hyperlinked.

Note to get a bit of additional spacing after the logo I've used \, to add some thinspace.

Inspired by Using TikZ to create a custom word which combines an svg image and text

CODE

\documentclass{IEEEtran}
\usepackage{scalerel}
\usepackage{tikz}
\usetikzlibrary{svg.path}

\definecolor{orcidlogocol}{HTML}{A6CE39} \tikzset{ orcidlogo/.pic={ \fill[orcidlogocol] svg{M256,128c0,70.7-57.3,128-128,128C57.3,256,0,198.7,0,128C0,57.3,57.3,0,128,0C198.7,0,256,57.3,256,128z}; \fill[white] svg{M86.3,186.2H70.9V79.1h15.4v48.4V186.2z} svg{M108.9,79.1h41.6c39.6,0,57,28.3,57,53.6c0,27.5-21.5,53.6-56.8,53.6h-41.8V79.1z M124.3,172.4h24.5c34.9,0,42.9-26.5,42.9-39.7c0-21.5-13.7-39.7-43.7-39.7h-23.7V172.4z} svg{M88.7,56.8c0,5.5-4.5,10.1-10.1,10.1c-5.6,0-10.1-4.6-10.1-10.1c0-5.6,4.5-10.1,10.1-10.1C84.2,46.7,88.7,51.3,88.7,56.8z}; } }

\newcommand\orcidicon[1]{\href{https://orcid.org/#1}{\mbox{\scalerel*{ \begin{tikzpicture}[yscale=-1,transform shape] \pic{orcidlogo}; \end{tikzpicture} }{|}}}}

\usepackage{hyperref} %<--- Load after everything else

\begin{document}

\title{Title goes here} \author{John Doe \orcidicon{0000-0000-0000-0000},, \IEEEmembership{Senior Member, IEEE}} \maketitle

\end{document}

Milo
  • 9,440
  • Is there a way to male this work with the authblk package? First the \orcidicon command needs a protect there and then it completely garbles how more than one author is typeset... – quazgar Oct 11 '18 at 15:24
  • Sorry, can't help with this. Perhaps you can ask a new question on the site with a MWE of your problem. – Milo Oct 11 '18 at 15:59
  • @pankajsingh If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review – Stefan Pinnow Apr 08 '19 at 10:23
  • Great, great, great. Anybody did something similar to the DOI icon? Or, any place where I can understand how to convert the DOI svg file into latex tikz commands? – Alberto Jun 17 '19 at 13:49
  • 6
    FYI @Milo, I packaged up your command into a .sty file to make it simple for users, with credit to this answer. The style file can be found here: https://github.com/duetosymmetry/orcidlink-LaTeX-command – duetosymmetry Dec 12 '19 at 21:51
  • @StefanPinnow What pankajsingh asks is exactly what's asked in the question, it would just be a duplicate question if he asked another! – Saravanabalagi Ramachandran May 11 '20 at 17:02
  • 1
    @Milo I have not forgotten your "glasses symbol"....:-) – Sebastiano Aug 27 '20 at 15:35
  • 2
    @duetosymmetry, could you publish the orcidlink.sty at CTAN? – FHZ Aug 27 '20 at 17:03
  • @FHZ I don't come around here often, so I only saw this message just now. What would I need to do to make it ready for inclusion on the CTAN? Does it need documentation? I've never done that before. – duetosymmetry Sep 16 '20 at 03:41
  • @duetosymmetry, I'm not such advanced user. I haven't published any of my own packages on CTAN yet, but I may give you some advice. First: Promote your code to a .sty style file https://tex.stackexchange.com/questions/34175/how-do-i-create-a-latex-package https://www.overleaf.com/learn/latex/Writing_your_own_package https://tex.stackexchange.com/questions/8750/make-your-own-sty-files Second: Revise to CTAN https://tex.stackexchange.com/questions/854/how-can-i-contribute-to-ctan https://tex.stackexchange.com/questions/25116/what-is-good-practice-when-preparing-a-package-for-ctan – FHZ Sep 16 '20 at 05:08
  • For people having issues to compile it with the llncs class, you just need to replace \newcommand with \newrobustcmd from \RequirePackage{etoolbox}. – tobiasBora Mar 15 '21 at 14:23
  • I include the package with usepackage{orcidlink} (sty file in the folder), and here is the error: <to be read again> \gdef l.33 \ifnum \c@pgfmath@counta=0 A number should have been here; I inserted0'. (If you can't figure out why I needed to see a number, look up `weird error' in the index to The TeXbook.)

    ! Extra \fi. l.35 \fi `

    – lenhhoxung Jun 25 '21 at 07:37
4

The package to be used here is orcidlink.

To use this package, in the preamble include \usepackage{orcidlink}.

Full command:

\documentclass[10pt,a4paper]{article}

\usepackage[pdfstartview=XYZ, bookmarks=true, colorlinks=true, linkcolor=blue, urlcolor=blue, citecolor=blue, pdftex, bookmarks=true, linktocpage=true, % makes the page number as hyperlink in table of content hyperindex=true ]{hyperref}

\usepackage{orcidlink}

\begin{document}

\title{Here is the title}

\author{Author 1,\orcidlink{0000-0002-0000-0000}
\and Author 2,\orcidlink{0000-0002-0000-0000}}

\maketitle

\end{document}

Mensch
  • 65,388
4

Here's a variant that uses pict2e, if you cannot use tikz for some reason:

\documentclass{IEEEtran}

\usepackage{xcolor} \usepackage{pict2e}

\newsavebox{\ORCIDlogo} \savebox{\ORCIDlogo}{% \setlength{\unitlength}{\dimexpr 1em/256\relax}% \begin{picture}(256,256)% \color[HTML]{A6CE39}\put(128,128){\circle{256}}% \color{white}% \put(78.6,199.2){\circle{20}}% \moveto(70.9,176,9)\lineto(86.3,176,9)\lineto(86.3,69.8)\lineto(70.9,69.8)% \closepath\fillpath% \moveto(108.9,176.9)\lineto(150.5,176.9)% \curveto(190.1,176.9)(207.5,148.6)(207.5 ,123.3)% \curveto(207.5,95,8)(186,69.7)(150.7,69.7)% \lineto(108.9,69.7)% \closepath\fillpath% \color[HTML]{A6CE39}% \moveto(124.3,83.6)\lineto(148.8,83.6)% \curveto(183.7,83.6)(191.7,110.1)(191.7,123.3)% \curveto(191.7,144.8)(178,163)(148,163)% \lineto(124.3,163)% \closepath\fillpath% \end{picture}% }

\newcommand\orcidicon[1]{\href{https://orcid.org/#1}{\usebox{\ORCIDlogo}}}

\usepackage{hyperref} %<--- Load after everything else

\begin{document}

\title{Title goes here} \author{John Doe \orcidicon{0000-0000-0000-0000},, \IEEEmembership{Senior Member, IEEE}} \maketitle

\end{document}

The coordinates are derived directly from the official ORCID Logo SVG.

Tobias
  • 549