orcidlink-LaTeX-command icon indicating copy to clipboard operation
orcidlink-LaTeX-command copied to clipboard

Add orcidlinks, orcidlinkm, orcidlinkl

Open jonas-schulze opened this issue 3 years ago • 8 comments

  • small: current/old size
  • medium: matches looks of stackoverflow post
  • large: should match large variant from ORCID guidelines (preview.png)

jonas-schulze avatar Dec 14 '22 16:12 jonas-schulze

Where should I document these new variants?

Shall I refactor the variable names in favor of e.g. \ORCID@TargetHeight, \ORCID@TargetDepth, etc.?

I just noted that I created the commit on my master. If you prefer a PR from a different/feature branch, I'm happy to open a new PR (unless it is possible to change the base branch of a PR).

jonas-schulze avatar Dec 14 '22 16:12 jonas-schulze

Hi @jonas-schulze, this looks like it could be useful! But for backwards compatibility, the previous command \orcidlink{ORCID} should not change the number of arguments that it takes.

duetosymmetry avatar Dec 14 '22 18:12 duetosymmetry

I haven't used \DeclareRobustCommand before, but doesn't \orcidlink take the same number of arguments as \orcidlinks, which is one, as before?

jonas-schulze avatar Dec 14 '22 18:12 jonas-schulze

Sorry that I wasn't paying close enough attention before, I missed that you created a new internal command \@orcidlink, not redefined the external command. I'll have to take a closer look and see what's going on (though I'm on vacation right now!).

Can you comment on why both \fontcharht and \fontchardp are needed? Is this something that I should have been doing before, which is distinct from allowing multiple sizes?

Also, do you have any thoughts on how to minimize the code duplication between \@orcidlink and \orcidlinkl?

duetosymmetry avatar Dec 14 '22 20:12 duetosymmetry

No rush, we can talk about this after your vacation, or next year even. (A brief heads-up would be nice, though.) 🙂

Can you comment on why both \fontcharht and \fontchardp are needed? Is this something that I should have been doing before, which is distinct from allowing multiple sizes?

\fontcharht only measures the "size" above the baseline, \fontcharht only the one below. So, the total "size" of a glyph is the sum of its height and depth. The t-shirt sizes S and M scale the logo to match size and positioning of a capital X and a bar |, respectively. The X has zero depth, so \fontchardp wasn't needed before. However, it does no harm either when reusing the logic for size M.

Also, do you have any thoughts on how to minimize the code duplication between @orcidlink and \orcidlinkl?

I have already thought about that, and came to no ideal solution. The size L scales the logo such that the size (=height) of the text within the logo matches the size and positioning of a lowercase x. The internal \@orcidlink could be refactored to take the scaling factor as well, \@OrigHeightRecip for S/M or \@OrigInnerHeightRecip for L, but I haven't been able to achieve the desired baseline in a technique similar to S/M. Therefore, \@orcidlink would have to take an argument for the TikZ baseline as well, while S/M have a superfluous \coordinate defined. Overall, I would consider this to be over-engineered for this simple of a task.

jonas-schulze avatar Dec 15 '22 10:12 jonas-schulze

Hi @duetosymmetry, happy new year! I hope you've had a nice vacation. I've just returned from vacation myself. :skier: Have you had time to have a closer look at this PR?

jonas-schulze avatar Jan 10 '23 10:01 jonas-schulze

bump :slightly_smiling_face:

jonas-schulze avatar Feb 13 '23 11:02 jonas-schulze

bump :slightly_smiling_face:

jonas-schulze avatar Sep 19 '23 14:09 jonas-schulze