texlive[65085] Master/texmf-dist: unimath-plain-xetex (22nov22)

commits+karl at tug.org commits+karl at tug.org
Tue Nov 22 22:44:39 CET 2022


Revision: 65085
          http://tug.org/svn/texlive?view=revision&revision=65085
Author:   karl
Date:     2022-11-22 22:44:39 +0100 (Tue, 22 Nov 2022)
Log Message:
-----------
unimath-plain-xetex (22nov22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/xetex/unimath-plain-xetex/unimath-plain-xetex-doc.pdf
    trunk/Master/texmf-dist/doc/xetex/unimath-plain-xetex/unimath-plain-xetex-doc.tex
    trunk/Master/texmf-dist/tex/xetex/unimath-plain-xetex/unimath-plain-xetex.tex

Modified: trunk/Master/texmf-dist/doc/xetex/unimath-plain-xetex/unimath-plain-xetex-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/xetex/unimath-plain-xetex/unimath-plain-xetex-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xetex/unimath-plain-xetex/unimath-plain-xetex-doc.tex	2022-11-22 21:44:23 UTC (rev 65084)
+++ trunk/Master/texmf-dist/doc/xetex/unimath-plain-xetex/unimath-plain-xetex-doc.tex	2022-11-22 21:44:39 UTC (rev 65085)
@@ -11,6 +11,8 @@
 \def\monofontname{Source Code Pro}
 \def\mathfontname{Erewhon Math}
 \input unimath-plain-xetex
+\unicodeprimesoff
+\betweenprimeskip=-1mu\relax
 
 \def\xetex{X\kern-.125em\lower.5ex\hbox{\char"018E}\kern-.1667em%
   T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX}
@@ -23,6 +25,7 @@
 \def\pkg#1{{\tensf #1}}
 %\catcode`\@=11 \@sizeat{40pt}\the\sf at size \catcode`\@=12
 \font\hugesans="\sansfontname" at 35pt
+\font\sevenlmmath="Latin Modern Math:script=math,+ssty=0" at 7pt
 \makefontcmdcompatible{ten}
 
 \def\ttverbatim{\begingroup
@@ -34,6 +37,7 @@
 {\catcode`\|=0 |catcode`|\=12 % | is temporary escape character
   |obeylines % end of line is active
   |gdef|ttfinish#1^^M#2\endtt{#1|vbox{#2}|endgroup$$}}
+\def\charhex{\char"}
 \catcode`\"=\active
 {\obeylines \gdef"{\ttverbatim \spaceskip.5em \let^^M=\  \let"=\endgroup}}
 \def\<#1>{$\langle${\it#1\/}$\rangle$}
@@ -85,7 +89,7 @@
 \centerline{Zhang Tingxuan}
 \medskip
 
-\centerline{2022/11/06\quad Version 0.0β}
+\centerline{2022/11/23\quad Version 0.0γ}
 \biggskip
 
 \centerline{\bf Abstract}
@@ -199,4 +203,46 @@
 For example, "$∫_a^b y\,dx$" yields $∫_a^b y\,dx$ and "$$∫_a^b y\,dx.$$" yields 
 $$∫_a^b y\,dx.$$
 
+
+
+\section{Primes ($'$)}
+The package changed ``"'"'' command in math mode, which yields prime(s) 
+in superscript. After loading this package, the primes produced by ``"'"'' 
+will be turned into Unicode primes:
+$$\vbox{\openup2pt\halign{#\hfil\quad&\quad#\hfil\quad&\quad#\hfil\cr
+{\it Input} & {yields} & {\it Unicode slot}\cr
+"'"     & $^{\hbox{\sevenlmmath\charhex2032}}$ & U+2032 \cr
+"''"    & $^{\hbox{\sevenlmmath\charhex2033}}$ & U+2033 \cr
+"'''"   & $^{\hbox{\sevenlmmath\charhex2034}}$ & U+2034 \cr
+"''''"  & $^{\hbox{\sevenlmmath\charhex2057}}$ & U+2057 \cr
+"'''''" & $^{\hbox{\sevenlmmath\charhex2032
+  \hskip-.15em\charhex2032
+  \hskip-.15em\charhex2032
+  \hskip-.15em\charhex2032
+  \hskip-.15em\charhex2032}}$
+  & $(\hbox{U+2032})\times5$\cr
+$\vdots$ & $\vdots$ & $\vdots$ \cr
+$(\hbox{"'"})\times N$ & $(^{\hbox{\sevenlmmath\charhex2032}})\times N$ &
+$(\hbox{U+2032})\times N$\hbox to 20pt{\quad$(N>4)$\hss} \cr
+}}$$
+However, some OpenType math fonts don't contain some of the characters above. 
+For example, there is no U+2032, U+2033 or U+2034 in Erewhon Math. 
+When using such fonts, you can ``turn off'' the Unicode primes easily 
+by inputing the following line {\it after} loading the package:
+\begintt
+\unicodeprimesoff
+\endtt
+Then when you input ``"'"'' $n$ times you will get $n$ primes, 
+and each prime's Unicode character slot is U+2032, even when $n\leq 4$.
+
+If the primes contain more than one single prime encoded U+2032, 
+a negative math skip will inserted between every two single primes. 
+This math skip is defined as "\betweenprimeskip" and its default value 
+is "-2.7mu", which is proper for Latin Modern Math. To change the value 
+of "\betweenprimeskip" is just like change any math skip, for example,
+\begintt
+\betweenprimeskip=-1mu
+\endtt
+This line should also written {\it after} loading the package.
+
 \bye
\ No newline at end of file

Modified: trunk/Master/texmf-dist/tex/xetex/unimath-plain-xetex/unimath-plain-xetex.tex
===================================================================
--- trunk/Master/texmf-dist/tex/xetex/unimath-plain-xetex/unimath-plain-xetex.tex	2022-11-22 21:44:23 UTC (rev 65084)
+++ trunk/Master/texmf-dist/tex/xetex/unimath-plain-xetex/unimath-plain-xetex.tex	2022-11-22 21:44:39 UTC (rev 65085)
@@ -14,7 +14,6 @@
 \newdimen\@tempdimd
 
 % text font
-%\gdef\mainfontname{Latin Modern Roman}
 \ifdefined\mainfontname\else
   \gdef\mainfontname{Latin Modern Roman}
 \fi
@@ -32,7 +31,7 @@
     \def\textfontopt{mapping=tex-text}
   \fi
 \else
-  \errmessage{umath-plain-xetex Error: Needs XeTeX!}
+  \errmessage{unimath-plain-xetex Error: Needs XeTeX!}
 \fi
 
 \font\tenrm     =  "\mainfontname/R:\textfontopt" at 10pt
@@ -52,7 +51,7 @@
 \gdef\tt at innerratio{\numexpr\dimexpr256\@tempdima/\@tempdimc\relax}
 \let\tensf at test\relax \let\tentt at test\relax
 
-\def\@sizeat#1{\@tempdimd#1\relax%
+\def\@sizeat#1{\@tempdimd#1\relax
   \sf at size=\dimexpr\sf at innerratio\@tempdimd/256\relax
   \tt at size=\dimexpr\tt at innerratio\@tempdimd/256\relax
 }
@@ -130,6 +129,9 @@
 \def\mathbotaccent{bA}
 \def\mathbotaccentwide{bAw}
 
+\def\sqrt{sqrt} \def\cuberoot{cuberoot}
+\def\fourthroot{fourthroot} \def\longdivision{longdivision}
+
 \begingroup%
   \catcode`\^^@=13
   \protected\gdef\@activedef#1#2{\begingroup% #1: char code; #2: definition
@@ -141,6 +143,7 @@
   \ifx#3\mathord
     \Umathchardef #2 = 0 \unimathfam #1 
     \Umathcode    #1 = 0 \unimathfam #1 
+  % In the future, this module will use another \fam.
   %\else\ifx#3\mathalpha
   %  \Umathchardef #2 = 0 \unimathfam #1 
   %  \Umathcode    #1 = 0 \unimathfam #1 % a \fi in the end
@@ -168,13 +171,13 @@
     \Umathcode    #1 = 4 \unimathfam #1 
     \Udelcode     #1 =   \unimathfam #1 
     \gdef#2{\Udelimiter 4 \unimathfam #1 }
-    \ifx#2\sqrt
+    \ifx#2\sqrt%="221A%
       \gdef#2{\Uradical \unimathfam #1 }
-    \fi\ifx#2\cuberoot
+    \fi\ifx#2\cuberoot%="221B
       \gdef#2{\Uradical \unimathfam #1 }
-    \fi\ifx#2\fourthroot
+    \fi\ifx#2\fourthroot%="221C
       \gdef#2{\Uradical \unimathfam #1 }
-    \fi\ifx#2\longdivision
+    \fi\ifx#2\longdivision%="27CC
       \gdef#2{\Uradical \unimathfam #1 }
     \fi
   \else\ifx#3\mathclose
@@ -406,7 +409,7 @@
 \chardef\AE="00C6
 \chardef\OE="0152
 \chardef\O="00D8
-\chardef\i="0131 \chardef\j="237 % dotless letters
+\chardef\i="0131 \chardef\j="0237 % dotless letters
 \chardef\aa="00E5
 \chardef\l="0142
 \chardef\L="0141
@@ -417,6 +420,23 @@
 \chardef\P"00B6
 \chardef\copyright="00A9
 
+% Primes. Patch on plain.tex, line 735--739
+\newcount\c at primes% \c at primes=0
+% If the quantity of primes were more than 4, use \nonUprim at s instead.
+\newmuskip\betweenprimeskip
+\betweenprimeskip=-2.7mu\relax
+\def\after at prim@s{\ifcase\c at primes\or\prime\or\dprime\or\trprime\or\qprime%
+  \else\nonUprim at s\fi}
+\def\nonUprim at s{\prime\loop\ifnum\c at primes>1 \advance\c at primes by -1%
+  \mskip\betweenprimeskip\prime\repeat}
+\def\prim at s{\advance\c at primes by 1\futurelet\next\pr at m@s}
+\def\pr at m@s{\ifx'\next\let\nxt\pr@@@s \else\ifx^\next\let\nxt\pr@@@t
+  \else\let\nxt\pr@@@f\fi\fi \nxt}
+\def\pr@@@t#1#2{\after at prim@s#2\egroup}
+\def\pr@@@f{\after at prim@s\egroup}
+% The following command aims to avoid to use \dprime, \trprime, etc.
+\def\unicodeprimesoff{\def\after at prim@s{\nonUprim at s}}
+
 \catcode`\@=12
 \tenrm
 \endinput
\ No newline at end of file



More information about the tex-live-commits mailing list.