Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
023a896
Rework inst_support's relocateInstitute to connect authors, institute…
brucemiller Jan 15, 2026
10700e0
Add extra wrapper around author contact info (class=ltx_author_notes_…
brucemiller Jan 15, 2026
6e7e754
Use role=affiliation consistently instead of institute
brucemiller Jan 15, 2026
4ced473
Gratutously add a few ignored style options for less noise
brucemiller Jan 15, 2026
8aa7e44
Update jheppub to work better with inst_support, and to handle the wa…
brucemiller Jan 15, 2026
9def06f
TEMPORARY HACK: This keeps \@add@to@frontmatter from being deferred w…
brucemiller Jan 15, 2026
16a9331
Begin new creator/contact infrastructure
brucemiller Feb 2, 2026
74a000a
Begin updating class bindings for new creator/contact tools
brucemiller Feb 2, 2026
6d2374c
Enhance Invocation() to treat the first arg as an 'anonymous macro' i…
brucemiller Feb 5, 2026
8be9cca
Improve the transform of ltx:contact into html by prefixing the \@nam…
brucemiller Feb 5, 2026
54d61a0
More evolution of frontmatter support
brucemiller Feb 5, 2026
8bdc98c
Continuing evolution and support of frontmatter in class files
brucemiller Feb 5, 2026
a684b3f
Wrap braces around reversion of KeyVals values in some cases (to prot…
brucemiller Mar 2, 2026
c6f9690
Major refactor; improved defering of digestinon till \maketitle; supp…
brucemiller Mar 3, 2026
ed68b5f
Updated most class bindings to use new API for managing frontmatter
brucemiller Mar 3, 2026
24ad58a
Updated tests for frontmatter tweaks
brucemiller Mar 3, 2026
587072a
Fixed typos
brucemiller Mar 4, 2026
2e81646
Handle \ref/\label (implied) frontmatter attachment
brucemiller Mar 4, 2026
41c04ea
Fixup contact names; author/institute splitting delimiters; address f…
brucemiller Mar 4, 2026
79e3427
update test for contact names
brucemiller Mar 4, 2026
fe27aec
Restore lost \label within longtables
brucemiller Mar 5, 2026
b9bb351
Fixup mangled formatting of structured affiliation data (\affiliation…
brucemiller Mar 5, 2026
c227100
Add missing \mdash definition
brucemiller Mar 5, 2026
3f74005
Improve timing of overriding marks; make \ref,\label connections betw…
brucemiller Mar 5, 2026
e8ca26d
Also rebrace empty values when reverting keyvals
brucemiller Mar 10, 2026
8784919
Various bits of code cleanup; Thanks dginev
brucemiller Mar 10, 2026
1caf722
Begin obsoleting old frontmatter API; generalize \lx@add@contact to a…
brucemiller Mar 11, 2026
35c9544
Deprecate \@personname,\@add@frontmatter,\@add@to@frontmatter,\@ADDCLASS
brucemiller Mar 12, 2026
b4e134a
Update deprecated macros; add a batch of shorthand frontmatter utilities
brucemiller Mar 12, 2026
7fd25c7
Remove deprecated; update frontmatter commands to new shorthands
brucemiller Mar 12, 2026
9ee1b92
updated test case
brucemiller Mar 12, 2026
e06aad6
Use only \lx@clear@frontmatter explicitly to remove duplicated frontm…
brucemiller Mar 18, 2026
7504202
Improved naming conventions
brucemiller Mar 26, 2026
a3233da
Apply improved naming to bindings
brucemiller Mar 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions lib/LaTeXML/Core/KeyVals.pm
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ sub setKeysExpansion {
T_CS('\def'), T_CS('\XKV@tfam'), T_BEGIN, T_END,
T_CS('\def'), T_CS('\XKV@header'), T_BEGIN, T_END,
T_CS('\def'), T_CS('\XKV@tkey'), T_BEGIN, T_END) if $setInternals;
} } }
} } }

# and assign the skipmissing macro with the other keys
push(@tokens, T_CS('\def'), $rmmacro, T_BEGIN, @rmtokens, T_END) if $rmmacro;
Expand Down Expand Up @@ -466,9 +466,31 @@ sub revertKeyVal {
push(@tokens, Explode($key));
# write the default (if applicable)
if (!$useDefault && $value) {
push(@tokens, T_OTHER('='), ($keytype ? $keytype->revert($value) : Revert($value))); }
push(@tokens, T_OTHER('='),
$self->rebrace(Tokens($keytype ? $keytype->revert($value) : Revert($value)))); }
return @tokens; }

# when reverting a KeyVals value, we may need to wrap in {}
# eg. if a "," appears outside of any bracing
# Other cases?
sub rebrace {
my ($self, $tokens) = @_;
my $level = 0;
my @tokens = $tokens->unlist;
my $needs_brace = (@tokens ? 0 : 1);
foreach my $t (@tokens) {
my $cc = $$t[1]; # INLINE
$level++ if $cc == CC_BEGIN;
if ($cc == CC_END) {
$level--;
# Note that '{ }} {' is still unbalanced
# even though the left and right braces match in count.
last if $level < 0; }
elsif (($level <= 0) && ($cc == CC_OTHER) && ($$t[0] eq ',')) { # Outer comma?
$needs_brace = 1;
last; } }
return ($needs_brace ? Tokens(T_BEGIN, $tokens, T_END) : $tokens); }

# TODO: ????
sub unlist {
my ($self) = @_;
Expand Down
29 changes: 13 additions & 16 deletions lib/LaTeXML/Engine/AmSTeX.pool.ltxml
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,12 @@ DefConstructor('\enddocument', "</ltx:document>",
#======================================================================
# Front Matter

DefMacro('\topmatter', '');
DefMacro('\endtopmatter', '');
DefMacro('\title Until:\endtitle', '\@add@frontmatter{ltx:title}{#1}');
DefConstructor('\@personname{}', "<ltx:personname>#1</ltx:personname>",
mode => 'restricted_horizontal');
DefMacro('\author Until:\endauthor', '\@add@frontmatter{ltx:creator}[role=author]{\@personname{#1}}');
DefConstructor('\@institute{}', "<ltx:contact role='institute'>#1</ltx:contact>", bounded => 1);
DefMacro('\thanks Until:\endthanks', '\@add@to@frontmatter{ltx:creator}{\@institute{#1}}');
DefMacro('\abstract Until:\endabstract', '\@add@frontmatter{ltx:abstract}{#1}');
DefMacro('\topmatter', '');
DefMacro('\endtopmatter', '');
DefMacro('\title Until:\endtitle', '\lx@add@title{#1}');
DefMacro('\author Until:\endauthor', '\lx@add@author{#1}');
DefMacro('\thanks Until:\endthanks', '\lx@add@affiliation{#1}');
DefMacro('\abstract Until:\endabstract', '\lx@add@abstract{#1}');

#======================================================================
# Document structure
Expand Down Expand Up @@ -239,7 +236,7 @@ DefMacro("\\format Until:\\\\", '');

DefConstructor('\text {}',
"<ltx:text _noautoclose='1'>#1</ltx:text>",
mode => 'restricted_horizontal',
mode => 'restricted_horizontal',
enterHorizontal => 1);

DefConstructor('\overset Until:\to {}',
Expand Down Expand Up @@ -268,18 +265,18 @@ DefConstructor('\frac InFractionStyle InFractionStyle',
properties => { mathstyle => sub { LookupValue('font')->getMathstyle; } });

DefConstructor('\Cal{}', '#1', bounded => 1, requireMath => 1,
font => { family => 'caligraphic', series => 'medium', shape => 'upright' },
font => { family => 'caligraphic', series => 'medium', shape => 'upright' },
enterHorizontal => 1);

# \bold in amsfonts
DefConstructor('\roman{}', '#1', bounded => 1, requireMath => 1,
font => { family => 'serif', series => 'medium', shape => 'upright' },
font => { family => 'serif', series => 'medium', shape => 'upright' },
enterHorizontal => 1);
DefConstructor('\italic{}', '#1', bounded => 1, requireMath => 1,
font => { shape => 'italic', series => 'medium', shape => 'upright' },
font => { shape => 'italic', series => 'medium', shape => 'upright' },
enterHorizontal => 1);
DefConstructor('\slanted{}', '#1', bounded => 1, requireMath => 1,
font => { shape => 'slanted', series => 'medium', shape => 'upright' },
font => { shape => 'slanted', series => 'medium', shape => 'upright' },
enterHorizontal => 1);
DefConstructor('\boldkey{}', '#1', bounded => 1, requireMath => 1,
font => { series => 'bold', family => 'typewriter', series => 'medium', shape => 'upright' },
Expand Down Expand Up @@ -354,8 +351,8 @@ DefMacro('\minCDarrowwidth Dimension', '');
DefMacro('\pretend Until:\haswidth {}', '#1');

DefMacro('\snug', '');
DefConstructor('\topsmash{}', "#1", enterHorizontal => 1);
DefConstructor('\botsmash{}', "#1", enterHorizontal => 1);
DefConstructor('\topsmash{}', "#1", enterHorizontal => 1);
DefConstructor('\botsmash{}', "#1", enterHorizontal => 1);

DefConstructor('\spreadmatrixlines Dimension', '');

Expand Down
10 changes: 10 additions & 0 deletions lib/LaTeXML/Engine/Base_Deprecated.pool.ltxml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,16 @@ DefMacro('\@@POSTSUPERSCRIPT',
DefMacro('\@ASSERT@MEANING',
'\lx@DEPRECATE{\@ASSERT@MEANING}{\lx@assert@meaning}\lx@assert@meaning');

DefMacro('\@personname',
'\lx@DEPRECATE{\@personname}{{\lx@personname}\lx@personname');
DefMacro('\@add@frontmatter',
'\lx@DEPRECATE{\@add@frontmatter}{\lx@add@frontmatter}\lx@add@frontmatter');
DefMacro('\@add@to@frontmatter {}[]{}',
'\lx@DEPRECATE{\@add@to@frontmatter}{\lx@annotate@frontmatter}'
. '\lx@annotate@frontmatter{#1}{preformatted}[#2]{#3}');
DefMacro('\@ADDCLASS',
'\lx@DEPRECATE{\@ADDCLASS}{{\lx@add@cssclass}\lx@add@cssclass');

#======================================================================
# Older deprecations
# (but there was no warning mechanism then)
Expand Down
Loading
Loading