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

Investigate aastex spacing issue

Open jsdillon opened this issue 2 years ago • 5 comments

Hi Leo!

Thanks for putting together this helpful package!

I ran into an issue using this package with AASTeX63. If I do \author{Joshua~S.~Dillon\,\orcidlink{0000-0003-3336-9958}} as suggested by the readme, I get:

image

This was fixed by adding some negative space with \!, i.e. \author{Joshua~S.~Dillon\,\orcidlink{0000-0003-3336-9958}\!\!}.

image

I'm not sure if this is just a request to clarify the documentation or if there's a way to make the package pay nicer with commas.

jsdillon avatar Jul 07 '22 19:07 jsdillon

Nice catch! I did not see this in my test because I only had one author in my test document, so no comma. Ideally we should figure out where the extra space is coming from. This is some interaction between either aastex and TikZ, or perhaps more likely, aastex has (improperly) redefined the \href command from hyperref. Notice that even within ordinary body text (which doesn't get the extra processing that \author gets), there is an extra space afterwards. Anyway, I tested the same thing in a different class (revtex), and did not get an extra space—so it's not something I can fix without digging into aastex to figure out the origin.

duetosymmetry avatar Jul 07 '22 21:07 duetosymmetry

I figured it was something silly with aastex. Maybe just make a note in the README and call it a day? Your call.

jsdillon avatar Jul 07 '22 22:07 jsdillon

I'm going to change this issue to be 'investigate aastex spacing issue', so that I later remember to figure out if it's due to aastex interacting strangely with TikZ or hyperref. Once I figure out why, I'll add a section on known interaction with other packages (which I think is recommended practice on the CTAN).

duetosymmetry avatar Jul 08 '22 08:07 duetosymmetry

Sounds reasonable. LMK if you have trouble replicating the issue.

jsdillon avatar Jul 08 '22 15:07 jsdillon

I've tracked down that the interaction is between aastex and TikZ, not aastex and hyperref. It does not have to do with which particular TikZ commands are inside the tikzpicture environment. You can get rid of almost everything and still see the same spacing issue in aastex, but not revtex:

\makeatletter
\newcommand{\orcidlinktest}[1]{%
\setlength{\@curXheight}{\fontcharht\font`X}%
\begin{tikzpicture}[yscale=-\@OrigHeightRecip*\@curXheight,%
xscale=\@OrigHeightRecip*\@curXheight,transform shape]%
\draw (0,0) circle [radius=10em];%
\end{tikzpicture}%
}
\makeatother

...

\begin{document}

...

Body\orcidlinktest{0000-0000-0000-0000}surfing

The two attached images are from respectively aastex and revtex. image image

I'm on vacation right now so I'm going to stop trying to figure this out...

duetosymmetry avatar Jul 10 '22 11:07 duetosymmetry