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

Initial support for Vietnamese #2228

Merged
merged 2 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,7 @@ lib/LaTeXML/Package/t1enc.sty.ltxml
lib/LaTeXML/Package/t2a.fontmap.ltxml
lib/LaTeXML/Package/t2b.fontmap.ltxml
lib/LaTeXML/Package/t2c.fontmap.ltxml
lib/LaTeXML/Package/t5enc.def.ltxml
lib/LaTeXML/Package/tablefootnote.sty.ltxml
lib/LaTeXML/Package/tabularx.sty.ltxml
lib/LaTeXML/Package/tabulary.sty.ltxml
Expand Down
1 change: 1 addition & 0 deletions lib/LaTeXML/Package.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2793,6 +2793,7 @@ sub LoadFontMap {
if ($map = LookupValue($encoding . '_fontmap')) { # Got map?
AssignValue($encoding . '_fontmap_failed_to_load' => 0); }
else {
Info('fontmap', $encoding, undef, "Couldn't find fontmap for '$encoding'");
AssignValue($encoding . '_fontmap_failed_to_load' => 1, 'global'); } }
return $map; }

Expand Down
41 changes: 41 additions & 0 deletions lib/LaTeXML/Package/t5enc.def.ltxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# -*- mode: Perl -*-
# /=====================================================================\ #
# | t5enc.def | #
# | 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 <[email protected]> #_# | #
# | http://dlmf.nist.gov/LaTeXML/ (o o) | #
# \=========================================================ooo==U==ooo=/ #
package LaTeXML::Package::Pool;
use strict;
use warnings;
use LaTeXML::Package;

#**********************************************************************
# vietnamese uses a lot of multiple-accents.
# We probably can get away w/o defininng the whole T5 font map,
# providing we have definintions for the following special cases.
DefAccent('\texthookabove', "\x{0309}", "'");
Let('\h', '\texthookabove');
DefPrimitiveI('\Acircumflex', undef, UTF(0xC2));
DefPrimitiveI('\Abreve', undef, "\x{0102}");
DefPrimitiveI('\Ecircumflex', undef, UTF(0xCA));
DefPrimitiveI('\Ocircumflex', undef, UTF(0xD4));
DefPrimitiveI('\Ohorn', undef, "\x{01A0}");
DefPrimitiveI('\Uhorn', undef, "\x{01AF}");
DefPrimitiveI('\acircumflex', undef, UTF(0xE2));
DefPrimitiveI('\abreve', undef, "\x{0103}");
DefPrimitiveI('\ecircumflex', undef, UTF(0xEA));
DefPrimitiveI('\ocircumflex', undef, UTF(0xF4));
DefPrimitiveI('\ohorn', undef, "\x{01A1}");
DefPrimitiveI('\uhorn', undef, "\x{01B0}");
DefAccent('\k', "\x{0328}", "\x{02DB}");
# Now read the rest from the REAL t5enc.
InputDefinitions('t5enc', type => 'def', noltxml => 1);
#**********************************************************************

1;
Loading