diff options
Diffstat (limited to 'Master/texmf-dist/doc/xetex')
3 files changed, 148 insertions, 36 deletions
diff --git a/Master/texmf-dist/doc/xetex/unimath-plain-xetex/source/unimath-plain-genalphabet.lua b/Master/texmf-dist/doc/xetex/unimath-plain-xetex/source/unimath-plain-genalphabet.lua new file mode 100644 index 00000000000..90619712305 --- /dev/null +++ b/Master/texmf-dist/doc/xetex/unimath-plain-xetex/source/unimath-plain-genalphabet.lua @@ -0,0 +1,99 @@ +-- Run this Lua script to generate "unimath-plain-xetex-alphabet.tex". +-- This script needs kpathsea library which is provided by LuaTeX. +-- You can "luatex" a file including +-- \directlua{dofile("unimath-plain-genalphabet.lua")} + +tex_info = [===[%% <FILE> unimath-plain-xetex-alphabet +%% ****************************************************** +%% * This work may be distributed and/or modified under * +%% * the conditions of the LaTeX Project Public License * +%% * http://www.latex-project.org/lppl.txt * +%% * either version 1.3c of this license or any later * +%% * version. * +%% ******************************************************]===] + +Latin = { {"A","A"}, {"B","B"}, {"C","C"}, {"D","D"}, {"E","E"}, {"F","F"}, {"G","G"}, + {"H","H"}, {"I","I"}, {"J","J"}, {"K","K"}, {"L","L"}, {"M","M"}, {"N","N"}, + {"O","O"}, {"P","P"}, {"Q","Q"}, {"R","R"}, {"S","S"}, {"T","T"}, + {"U","U"}, {"V","V"}, {"W","W"}, {"X","X"}, {"Y","Y"}, {"Z","Z"}, + {"a","a"}, {"b","b"}, {"c","c"}, {"d","d"}, {"e","e"}, {"f","f"}, {"g","g"}, + {"h","h"}, {"i","i"}, {"j","j"}, {"k","k"}, {"l","l"}, {"m","m"}, {"n","n"}, + {"o","o"}, {"p","p"}, {"q","q"}, {"r","r"}, {"s","s"}, {"t","t"}, + {"u","u"}, {"v","v"}, {"w","w"}, {"x","x"}, {"y","y"}, {"z","z"} } + +Greek = { {"Α","Alpha"}, {"Β","Beta"}, {"Γ","Gamma"}, {"Δ","Delta"}, + {"Ε","Epsilon"}, {"Ζ","Zeta"}, {"Η","Eta"}, {"Θ","Theta"}, + {"Ι","Iota"}, {"Κ","Kappa"}, {"Λ","Lambda"}, {"Μ","Mu"}, + {"Ν","Nu"}, {"Ξ","Xi"}, {"Ο","Omicron"}, {"Π","Pi"}, + {"Ρ","Rho"}, {"Σ","Sigma"}, {"Τ","Tau"}, {"Υ","Upsilon"}, + {"Φ","Phi"}, {"Χ","Chi"}, {"Ψ","Psi"}, {"Ω","Omega"}, + {"α","alpha"}, {"β","beta"}, {"γ","gamma"}, {"δ","delta"}, + {"ε","varepsilon"}, {"ζ","zeta"}, {"η","eta"}, {"θ","theta"}, + {"ι","iota"}, {"κ","kappa"}, {"λ","lambda"}, {"μ","mu"}, + {"ν","nu"}, {"ξ","xi"}, {"ο","omicron"}, {"π","pi"}, + {"ρ","rho"}, {"ς","varsigma"}, {"σ","sigma"}, {"τ","tau"}, + {"υ","upsilon"}, {"φ","varphi"}, {"χ","chi"}, {"ψ","psi"}, + {"ω","omega"}, {"ϑ","vartheta"}, {"ϕ","phi"}, {"ϖ","varpi"}, + {"ϰ","varkappa"}, {"ϱ","varrho"}, {"ϴ","varTheta"}, {"ϵ","epsilon"} } + +Digit = { {"0","zero"}, {"1","one"}, {"2","two"}, {"3","three"}, + {"4","four"}, {"5","five"}, {"6","six"}, {"7","seven"}, + {"8","eight"}, {"9","nine"} } + +Partial = { {"∂","partial"}, {"∇","nabla"} } + +um_table = assert(kpse.find_file('unicode-math-table', tex)) +tmp_alpha_table = "unimath-plain-alphabet.temp" +alpha_table = "unimath-plain-alphabet.tex" + +tmp_out = io.open(tmp_alpha_table, "w") +out = io.open(alpha_table, "w+") +out:write(tex_info.."\n") + +for templine in io.lines(um_table) do + if string.match(templine, "\\[mB][bfitsu].*\\mathalpha") then + tmp_out:write(templine.."\n") + else if string.match(templine, "\\m[bfitsu].*\\mathord") then + tmp_out:write(templine.."\n") + end end +end +tmp_out:close() + +function gen_symbol(file, font, alphabet) + for line in io.lines(file) do + for _, letter_pair in ipairs(alphabet) do + if string.match(line, font..letter_pair[2].."[^%a]") then + -- Format: \UnicodeMathSymbol{<slot>}{<cs>}{<alpha|ord>}{<description>}% + local char_slot = string.match(line, "{(.-)}") + out:write(" \\Umathcode `\\"..letter_pair[1].." = 0 \\normalfam "..char_slot.." \n") + end + end + end +end + +cs_head = { {"\\rm","\\mup","\\tenrm"}, {"\\it","\\mit","\\tenit"}, + {"\\bf","\\mbf","\\tenbf"}, {"\\sf","\\msans","\\tensf"}, + {"\\tt","\\mtt","\\tentt"}, {"\\bfit","\\mbfit","\\tenbfit"}, + {"\\sfit","\\mitsans","\\tensfit"}, + {"\\sfbf","\\mbfsans","\\tensfbf"}, + {"\\sfbfit","\\mbfitsans","\\tensfbfit"}, + -- The tables below do not contain a text command as the 3rd item: + {"\\scr","\\mscr"}, {"\\bb","\\Bbb"}, {"\\frak","\\mfrak"}, + {"\\scrbf","\\mbfscr"}, {"\\frakbf","\\mbffrak"}, {"\\bbit","\\mitBbb"} } + +for _, cs_pair in ipairs(cs_head) do + out:write("\\protected\\def"..cs_pair[1].."{%\n") + gen_symbol(tmp_alpha_table, cs_pair[2], Digit) + gen_symbol(tmp_alpha_table, cs_pair[2], Latin) + gen_symbol(tmp_alpha_table, cs_pair[2], Greek) + gen_symbol(tmp_alpha_table, cs_pair[2], Partial) + if cs_pair[3] then + out:write(cs_pair[3]) + end + out:write("}%\n") +end + +out:write("\\endinput") +out:close() + +os.remove(tmp_alpha_table)
\ No newline at end of file diff --git a/Master/texmf-dist/doc/xetex/unimath-plain-xetex/unimath-plain-xetex-doc.pdf b/Master/texmf-dist/doc/xetex/unimath-plain-xetex/unimath-plain-xetex-doc.pdf Binary files differindex ec95b6a930c..14543752641 100644 --- a/Master/texmf-dist/doc/xetex/unimath-plain-xetex/unimath-plain-xetex-doc.pdf +++ b/Master/texmf-dist/doc/xetex/unimath-plain-xetex/unimath-plain-xetex-doc.pdf diff --git a/Master/texmf-dist/doc/xetex/unimath-plain-xetex/unimath-plain-xetex-doc.tex b/Master/texmf-dist/doc/xetex/unimath-plain-xetex/unimath-plain-xetex-doc.tex index b75d69c651f..1a2f7871775 100644 --- a/Master/texmf-dist/doc/xetex/unimath-plain-xetex/unimath-plain-xetex-doc.tex +++ b/Master/texmf-dist/doc/xetex/unimath-plain-xetex/unimath-plain-xetex-doc.tex @@ -10,6 +10,7 @@ \def\sansfontname{Fira Sans Book} \def\monofontname{Source Code Pro} \def\mathfontname{Erewhon Math} +\def\textfontopt{mapping=tex-text,} \input unimath-plain-xetex \unicodeprimesoff \betweenprimeskip=-1mu\relax @@ -24,13 +25,14 @@ \def\biggskip{\vskip24pt plus 8pt minus 4pt} \def\pkg#1{{\tensf #1}} \font\hugesans="\sansfontname" at 35pt +\font\Hugesansbf="\sansfontname/B" at 72pt \font\sevenlmmath="Latin Modern Math:script=math,+ssty=0" at 7pt \makefontcmdcompatible{ten} \def\ttverbatim{\begingroup \catcode`\\=12 \catcode`\{=12 \catcode`\}=12 \catcode`\$=12 \catcode`\&=12 \catcode`\#=12 \catcode`\%=12 \catcode`\~=12 - \catcode`\_=12 \catcode`\^=12 \obeyspaces \obeylines \tt} + \catcode`\_=12 \catcode`\^=12 \catcode`\ =12 \obeylines \tentt} \outer\def\begintt{$$\let\par=\endgraf \ttverbatim \parskip=0pt \catcode`\|=0 \rightskip-2pc \ttfinish} {\catcode`\|=0 |catcode`|\=12 % | is temporary escape character @@ -54,6 +56,9 @@ \dp1#2\dp0 \hbox to#1\wd0{\box1\kern#1\wd0\hss}% } +\long\def\colorspec#1#2#3#4{\special{pdf:code q #1 #2 #3 rg}#4% + \special{pdf:code Q}} +\def\green{\colorspec{0.08}{0.52}{0.08}} \newdimen\paperwd \newdimen\paperht @@ -68,6 +73,9 @@ \paperwd=\dimexpr2\hmarginwd+\hsize\relax \paperht=\dimexpr2\vmarginht+\vsize\relax \special{papersize=\the\paperwd,\the\paperht} +\headline={\ifnum\pageno=1\hss\else\hss\vbox to 0pt{\vss\hbox to 0pt{\kern28pt% + \colorspec{0.72}{0.88}{0.72}{\Hugesansbf\folio}\hss}\kern4pt}\fi} +\footline={\hss} \long\def\protectedwrite#1#2{\edef\wrt{\write#1{#2}}\wrt} \newcount\secno @@ -79,42 +87,45 @@ \openin\tocin=\tocname \long\outer\def\section#1{\par\bigskip\penalty-1000% \noindent \advance\secno by 1\relax - {\twelvebf\hbox to 0pt{\hss\twentybf\the\secno\kern12pt}#1}% + {\green{% + \twelvebf\hbox to 0pt{\hss\twentybf\the\secno\kern12pt}#1% + }}% \protectedwrite\tocout{\the\secno\quad #1\hskip.5em\leaders\hbox to 1.2em{.\hss}\hfill}% \write\tocout{\hbox to .5em{\hss\the\pageno}\par}% \par\medskip\penalty1000\relax} -\parindent2pc +\parindent=2pc +\parskip=3pt plus 2pt minus 1pt\relax % title -\centerline{\twentyrm The - \scalehbox{0.5}{0.5}{% - \special{pdf:code q 1 Tr}% - {\hugesans\umpx}% - \special{pdf:code Q}} - package} +\centerline{\twentyrm The + \scalehbox{0.5}{0.5}{\special{pdf:code q 1 Tr}% + {\hugesans\umpx}% + \special{pdf:code Q}} package} \biggskip \centerline{Zhang Tingxuan} \medskip -\centerline{2022/11/26\quad Version 0.1} +\centerline{2022/12/23\quad Version 0.1a} \biggskip +\begingroup\parskip0pt \centerline{\bf Abstract} -\medskip -{\leftskip=4pc\rightskip=4pc\parindent=1.5pc +\smallskip +\leftskip=4pc\rightskip=4pc\parindent=1.5pc\relax {\sf\umpx} package provides OpenType math font support in {\it plain \tex\/} -format. The {\sf\umpx} package needs \xetex.\par} +format. The {\sf\umpx} package needs \xetex.\par % TOC \bigskip \centerline{\bf Contents} -\medskip -\begingroup\leftskip=4pc\rightskip=4pc\parindent=0pc +\smallskip +\parindent=0pt\relax \ifeof\tocin\else\closein\tocin\input\tocname\fi \endgroup\bigskip + \section{How to use this package?} Please notice again that you're using {\it plain\/} format but not \latex\ format. If you are using \latex\ format, please use @@ -152,23 +163,20 @@ font commands in size of 5\,pt, 7\,pt, 9\,pt, 10\,pt, 12\,pt and 20\,pt, such as "\fiverm", "\sevensf", "\twelvett", etc. Take ten point as an example, -$$\vbox{\openup10pt% - \halign{ \hfil#\hfil \cr - {\twelverm Serif} \cr - \vbox{\openup-8pt\halign{#&\quad#&\quad#\cr - & Upright & {\tenit Italic} \cr - Medium & "\tenrm" & "\tenit" \cr - {\tenbf Bold} & "\tenbf" & "\tenbfit" \cr}} \cr - {\twelvesf Sans} \cr - \vbox{\openup-8pt\halign{#&\quad#&\quad#\cr - & {\tensf Upright} & {\tensfit Italic} \cr - {\tensf Medium} & "\tensf" & "\tensfit" \cr - {\tensfbf Bold} & "\tensfbf" & "\tensfbfit" \cr}} \cr - {\twelvett Typewritter} \cr - \vbox{\openup-8pt\halign{#&\quad#&\quad#\cr - & {\tentt Upright} & {\tenttit Italic} \cr - {\tentt Medium} & "\tentt" & "\tenttit" \cr - {\tenttbf Bold} & "\tenttbf" & "\tenttbfit" \cr}} \cr}}$$ +$$\begingroup\let\tentt\seventt% + \vbox{\openup-1pt\halign{#\hfil&\ \ #\hfil&\ \ #\hfil\cr + \green{\sevenrm(Serif)} & {\sevenrm Upright} & {\sevenit Italic} \cr + {\sevenrm Medium}& "\tenrm" & "\tenit" \cr + {\sevenbf Bold} & "\tenbf" & "\tenbfit" \cr}}\ \vrule\ \ + \vbox{\openup-1pt\halign{#\hfil&\ \ #\hfil&\ \ #\hfil\cr + \green{\sevensf(Sans)} & {\sevensf Upright} & {\sevensfit Italic} \cr + {\sevensf Medium} & "\tensf" & "\tensfit" \cr + {\sevensfbf Bold} & "\tensfbf" & "\tensfbfit" \cr}}\ \vrule\ \ + \vbox{\openup-1pt\halign{#\hfil&\ \ #\hfil&\ \ #\hfil\cr + \green{\seventt(Mono)} & {\seventt Upright} & {\seventtit Italic} \cr + {\seventt Medium} & "\tentt" & "\tenttit" \cr + {\seventtbf Bold} & "\tenttbf" & "\tenttbfit" \cr}} +\endgroup$$ The font commands can be used as those provided in "plain.tex", for example, "{\tenbfit ABC}" yields {\tenbfit ABC}. @@ -203,7 +211,7 @@ You can input math formulae just like using traditional plain \tex. But OpenType math font is loaded. For example, "$a{\bf0}={\bf0}$" yields $a{\bf0}={\bf0}$. Available math font commands are listed below: \begintt -\rm, \bf, \it, \bfit,\sf, \sfbf, \sfit, \sfbfit, +\rm, \bf, \it, \bfit, \sf, \sfbf, \sfit, \sfbfit, \tt, \cal, \calbf, \bb, \bbit, \frak, \frakbf \endtt The \<family>-\<series>-\<shape> order of these commands allows being random; @@ -218,8 +226,13 @@ texdoc unimath-symbols in Terminal. You can also input Unicode math characters in your document's source file. -For example, "$∫_a^b y\,dx$" yields $∫_a^b y\,dx$ and "$$∫_a^b y\,dx.$$" yields -$$∫_a^b y\,dx.$$ +For example, +$$\vbox{\openup3pt\halign{#\hfil&\qquad#\hfil\cr +{\tenit Input}&{\tenit yields}\cr +"$ ∑_{i=0}^∞ ∫_a^b ρ_i \, {\rm d} τ' $" & + $∑_{i=0}^∞ ∫_a^b ρ_i\,{\rm d}τ'$\cr +"$$∑_{i=0}^∞ ∫_a^b ρ_i \, {\rm d} τ'$$" & + $\displaystyle ∑_{i=0}^∞ ∫_a^b ρ_i\,{\rm d}τ'$\cr}}$$ @@ -228,7 +241,7 @@ 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 +{\tenit Input} & {\tenit yields} & {\tenit Unicode slot}\cr "$'$" & $^{\hbox{\sevenlmmath\charhex2032}}$ & U+2032 \cr "$''$" & $^{\hbox{\sevenlmmath\charhex2033}}$ & U+2033 \cr "$'''$" & $^{\hbox{\sevenlmmath\charhex2034}}$ & U+2034 \cr |