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

Plain fonts #2411

Merged
merged 17 commits into from
Sep 18, 2024
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
bb30324
New Definition class FontDef for font selecting commands defined by \…
brucemiller Sep 3, 2024
71218a7
Rename parameter type FontToken to FontDef for cs explicitly defined …
brucemiller Sep 3, 2024
1badc03
Update \meaning to recognize new FontDef font commands
brucemiller Sep 3, 2024
35c2a2e
Update \the to recognize FontDef commands defined by \font and proces…
brucemiller Sep 3, 2024
6f7f868
Moved decodeMathChar to Package.pm, updating it to more correctly dec…
brucemiller Sep 3, 2024
b27e41a
Note that \mit doesn't REQUIRE math, but ony has effect in math (sets…
brucemiller Sep 3, 2024
91ef537
Consistent use of font decoding makes apparent misuse of T_OTHER when…
brucemiller Sep 3, 2024
73fe017
Fix mangled renesting of if/else
brucemiller Sep 3, 2024
e9bf750
\cal also does not require math and does nothing in text
brucemiller Sep 3, 2024
c764042
Add test case for plain style font manipulations
brucemiller Sep 3, 2024
f6afd64
Improve decoding of font filenames into family/series/shape and IMPOR…
brucemiller Sep 16, 2024
af96721
Update FontMap to provide options for alphanumerics to remain ASCII i…
brucemiller Sep 16, 2024
8d586d5
Make FontDecode in math keep alphanumerics in math as ASCII w/font ch…
brucemiller Sep 16, 2024
3f6ab14
Update all callers of FontDecode
brucemiller Sep 16, 2024
1a27ba6
Make \cal return a Box so that it can revert
brucemiller Sep 16, 2024
6317280
Enhance and correct plain fonts test cases
brucemiller Sep 16, 2024
2a0bd12
Code cleanup suggested by D.Ginev
brucemiller Sep 18, 2024
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
Prev Previous commit
Next Next commit
Update \meaning to recognize new FontDef font commands
  • Loading branch information
brucemiller committed Sep 3, 2024
commit 1badc03611a3aca881fb6f925bc2050854b6a83b
13 changes: 7 additions & 6 deletions lib/LaTeXML/Engine/TeX_Debugging.pool.ltxml
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,15 @@ DefMacro('\meaning Token', sub {
$type =~ s/^LaTeXML:://;
# Pre-step: We can't extract the bodies of definitions which are defined via Perl subroutines.
# So do the next best thing -- represent them as their tokens.
if ($type =~ /(primitive|conditional|constructor)$/i) {
$definition = $definition->getCSorAlias;
$type = ref $definition;
$type =~ s/^LaTeXML:://;
if (my $fontinfo = LookupValue('fontinfo_' . ToString($definition))) {
$meaning = 'select font ' . ($$fontinfo{fontname} || 'fontname');
if ($type =~ /(fontdef)$/i) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(fontdef) doesn't need the parens, I assume they're leftover

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

if (my $fontinfo = $definition->isFontDef) {
$meaning = 'select font ' . ($$fontinfo{name} || 'fontname');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this is a very healthy improvement for \meaning.

$meaning .= ' at ' . $$fontinfo{at} if $$fontinfo{at};
$type = 'font'; } }
elsif ($type =~ /(primitive|conditional|constructor)$/i) {
$definition = $definition->getCSorAlias;
$type = ref $definition;
$type =~ s/^LaTeXML:://; }
# The actual tests start here
if ($type =~ /token$/i) {
my $cc = $definition->getCatcode;
Expand Down