Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

orcidlink.sty binding #2395

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

xworld21
Copy link
Contributor

Fix #2386 partially. orcidlink.sty can be read raw (after adding \XeTeXLinkBox to hyperref), except that:

  • \fontcharht is not implemented (yet?), so I temporarily redefine it with a hardcoded value
  • the logo needs resizing in CSS to match the browser font size, so the binding attach a class

Furthermore, the ORCiD logo does not actually resize and is misaligned because the @viewBox attribute is missing, but that will be solved once #2376 is fixed.

@xworld21 xworld21 force-pushed the orcidlink branch 2 times, most recently from 56c77a0 to 97aebd5 Compare August 17, 2024 11:39
@dginev
Copy link
Collaborator

dginev commented Aug 17, 2024

Would you be willing to also add a small test? Maybe at t/graphics/orcidlink.tex or similar.

And it can depend on the sty file having been installed in t/65_graphics.t:

latexml_tests("t/graphics",
	      requires=>{colors=>'dvipsnam.def',
			 xcolors=>'dvipsnam.def',
                         orcidlink=>'orcidlink.sty'});

@xworld21
Copy link
Contributor Author

Would you be willing to also add a small test? Maybe at t/graphics/orcidlink.tex or similar.

The test would hardcode the specific SVG produced by the current version of orcidlink. Would that cause problems in the future, should orcidlink modify the logo (unlikely!)?

@dginev
Copy link
Collaborator

dginev commented Aug 17, 2024

Would you be willing to also add a small test? Maybe at t/graphics/orcidlink.tex or similar.

The test would hardcode the specific SVG produced by the current version of orcidlink. Would that cause problems in the future, should orcidlink modify the logo (unlikely!)?

We may need to update it if/when such transitions happen, which shouldn't be too painful. Probably a small price to pay, so that we also get notified if some future internal change breaks the expected sty load.

@xworld21
Copy link
Contributor Author

Ok, the test is not feasible because TL2021 and later have different implementations. I have updated the binding to make the TL2021 version work, but I have found a major issue with all versions: when \orcidlink is used inside \author{}, LaTeXML omits the SVG colours and you only get a black disc. Not sure why! Converting to draft until somebody can fix it.

@xworld21 xworld21 marked this pull request as draft August 17, 2024 17:44
@dginev
Copy link
Collaborator

dginev commented Aug 18, 2024

The testing harness already has a nice technique to specify a minimal texlive version. Checking this test only for the latest texlive should be fine. That is possible via:

requires=>{ #...
   orcidlink => {packages => 'orcidlink.sty', texlive_min => 2021}}

Figuring out what happens in the \author case is definitely worth a debugging deep dive, especially since one would expect this is where most of the use will come in practice.

In earlier latexml decades I would even be tempted to suggest hardcoding the expected SVG in the Perl binding as a DefConstructor, to guarantee robustness. That used to be common when we had no other easy path forward. But best to check if the raw interpretation can't be fixed first. I'll try to take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

orcid id
2 participants