[latex3-commits] [git/LaTeX3-latex3-latex2e] issue-124: use \Ucharcat for \symbol under XeTeX (63915993)

Will Robertson wspr81 at gmail.com
Thu Feb 6 14:26:25 CET 2020


Repository : https://github.com/latex3/latex2e
On branch  : issue-124
Link       : https://github.com/latex3/latex2e/commit/63915993ecfbd0e231876822f46081df4e2c615e

>---------------------------------------------------------------

commit 63915993ecfbd0e231876822f46081df4e2c615e
Author: Will Robertson <wspr81 at gmail.com>
Date:   Thu Feb 6 23:56:25 2020 +1030

    use \Ucharcat for \symbol under XeTeX
    
    closes #124


>---------------------------------------------------------------

63915993ecfbd0e231876822f46081df4e2c615e
 base/ltfssini.dtx                                              |  8 +++++++-
 base/testfiles/{github-0202.tlg => github-0124.luatex.tlg}     |  5 ++---
 .../tlb-amsmath-load.lvt => base/testfiles/github-0124.lvt     | 10 +++++-----
 base/testfiles/github-0124.tlg                                 | 10 ++++++++++
 base/testfiles/{github-0202.tlg => github-0124.xetex.tlg}      |  5 ++---
 5 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/base/ltfssini.dtx b/base/ltfssini.dtx
index 320c5a18..2d938e46 100644
--- a/base/ltfssini.dtx
+++ b/base/ltfssini.dtx
@@ -1154,7 +1154,13 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\DeclareRobustCommand\symbol[1]{\char #1\relax}
+\DeclareRobustCommand\symbol[1]{%
+  \ifdefined\XeTeXversion
+    \Ucharcat#1 12\relax
+  \else
+    \char#1\relax
+  \fi
+}
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
diff --git a/base/testfiles/github-0202.tlg b/base/testfiles/github-0124.luatex.tlg
similarity index 55%
copy from base/testfiles/github-0202.tlg
copy to base/testfiles/github-0124.luatex.tlg
index 39d216cf..f54a3c27 100644
--- a/base/testfiles/github-0202.tlg
+++ b/base/testfiles/github-0124.luatex.tlg
@@ -1,6 +1,5 @@
 This is a generated file for the LaTeX2e validation system.
 Don't change this file in any respect.
-(github-0202.toc)
-\tf at toc=\write...
 [1
-] (github-0202.aux)
+Missing character: There is no 𝐀 (U+1D400) in font cmr10!
+] (github-0124.aux)
diff --git a/required/amsmath/testfiles/tlb-amsmath-load.lvt b/base/testfiles/github-0124.lvt
similarity index 67%
copy from required/amsmath/testfiles/tlb-amsmath-load.lvt
copy to base/testfiles/github-0124.lvt
index fe720de4..be32ece1 100644
--- a/required/amsmath/testfiles/tlb-amsmath-load.lvt
+++ b/base/testfiles/github-0124.lvt
@@ -1,11 +1,11 @@
 \documentclass{article}
-\input{test2e}
-
-\START
 
-\usepackage{amsmath}
+\input{test2e}
 
 \begin{document}
 
-\END
+\START
+
+  \symbol{"1D400}
 
+\end{document}
diff --git a/base/testfiles/github-0124.tlg b/base/testfiles/github-0124.tlg
new file mode 100644
index 00000000..ce3f91f7
--- /dev/null
+++ b/base/testfiles/github-0124.tlg
@@ -0,0 +1,10 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+! Bad character code (119808).
+<to be read again> 
+                   \relax 
+l. ...  \symbol{"1D400}
+A character number must be between 0 and 255.
+I changed this one to zero.
+[1
+] (github-0124.aux)
diff --git a/base/testfiles/github-0202.tlg b/base/testfiles/github-0124.xetex.tlg
similarity index 58%
copy from base/testfiles/github-0202.tlg
copy to base/testfiles/github-0124.xetex.tlg
index 39d216cf..1344cffe 100644
--- a/base/testfiles/github-0202.tlg
+++ b/base/testfiles/github-0124.xetex.tlg
@@ -1,6 +1,5 @@
 This is a generated file for the LaTeX2e validation system.
 Don't change this file in any respect.
-(github-0202.toc)
-\tf at toc=\write...
+Missing character: There is no 𝐀 in font cmr10!
 [1
-] (github-0202.aux)
+] (github-0124.aux)





More information about the latex3-commits mailing list.