-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# -*- mode: Perl -*- | ||
# /=====================================================================\ # | ||
# | paralist | # | ||
# | Implementation for LaTeXML | # | ||
# |=====================================================================| # | ||
# | Part of LaTeXML: | # | ||
# | Public domain software, produced as part of work done by the | # | ||
# | United States Government & not subject to copyright in the US. | # | ||
# |---------------------------------------------------------------------| # | ||
# | Bruce Miller <bruce.miller@nist.gov> #_# | # | ||
# | http://dlmf.nist.gov/LaTeXML/ (o o) | # | ||
# \=========================================================ooo==U==ooo=/ # | ||
package LaTeXML::Package::Pool; | ||
use strict; | ||
use warnings; | ||
use LaTeXML::Package; | ||
use LaTeXML::Common::Error; | ||
|
||
InputDefinitions('orcidlink', type => 'sty', noltxml => 1); | ||
|
||
# add ltx_orcidlogo class to adjust logo height in CSS | ||
RequireResource('ltx-orcidlink.css'); | ||
DefConstructor('\lx@orcidlink@addclass{}', '#1', afterConstruct => sub { | ||
my ($document, $whatsit) = @_; | ||
my $context = $document->getElement; | ||
if (my $pic = $document->findnode('.//ltx:picture', $context)) { | ||
$document->addClass($pic, 'ltx_orcidlogo'); } }); | ||
|
||
# intercept core macro (\orcidlogo in newer versions) | ||
my $orcidmacro = LookupDefinition(T_CS('\orcidlogo')) ? '\orcidlogo' : '\orcidlink'; | ||
Let('\lx@orcidmacro', $orcidmacro); | ||
|
||
# if \fontcharht is still not implemented, fall back to hardcoded value | ||
if (LookupDefinition(T_CS('\fontcharht'))) { | ||
DefMacro("$orcidmacro\{}", '\lx@orcidlink@addclass{\lx@orcidmacro{#1}}'); } | ||
else { | ||
DefMacro("$orcidmacro\{}", '\let\lx@fontcharht@orig\fontcharht\def\fontcharht#2{12pt}' . | ||
'\lx@orcidlink@addclass{\lx@orcidmacro{#1}}' . | ||
'\let\fontchar\lx@fontcharht@orig'); } | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.ltx_orcidlogo { | ||
height: 1em; /* fallback for very old browsers */ | ||
height: 1cap; | ||
width: auto; } |