summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/gmutils
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-11-24 00:45:38 +0000
committerKarl Berry <karl@freefriends.org>2008-11-24 00:45:38 +0000
commit308fdc2ae7818991e83fa1db83cdadf1f0deab39 (patch)
tree589bb01c2cef9d23bcd2cb339b5f570872a4e3d4 /Master/texmf-dist/tex/latex/gmutils
parent1b86395d25c6ad99bc92165710429eadbe19d473 (diff)
gmutils update (23nov08)
git-svn-id: svn://tug.org/texlive/trunk@11399 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/gmutils')
-rw-r--r--Master/texmf-dist/tex/latex/gmutils/gmutils.sty581
1 files changed, 452 insertions, 129 deletions
diff --git a/Master/texmf-dist/tex/latex/gmutils/gmutils.sty b/Master/texmf-dist/tex/latex/gmutils/gmutils.sty
index 01defbad243..721b87c4bdf 100644
--- a/Master/texmf-dist/tex/latex/gmutils/gmutils.sty
+++ b/Master/texmf-dist/tex/latex/gmutils/gmutils.sty
@@ -11,7 +11,7 @@
%%Written by Grzegorz Murzynowski,
%% natror at o2 dot pl
%%
-%% \copyright\,2005, 2006, 2007, 2008 by Grzegorz Murzynowski.
+%% \copyright\,2005–2008 by Grzegorz Murzynowski.
%%
%% This program is subject to the \LaTeX\ Project Public License.
%% See ^^A
@@ -55,7 +55,11 @@
% \chschange{v0.93}{2008/8/30}{4501}
% \chschange{v0.94}{2008/10/4}{4880}
% \chschange{v0.95}{2008/10/8}{4908}
-%
+% \chschange{v0.96}{2008/11/21}{5363}
+% \toCTAN{v0.96}{2008/11/21}
+% \chschange{v0.97}{2008/11/22}{5375}
+% \toCTAN{v0.97}{2008/11/22}
+%
%
% \skiplines we skip the driver
\ifnum\catcode`\@=12
@@ -83,7 +87,7 @@ pagella, fontspec=quiet]{gmdocc}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{gmutils}
- [2008/10/04 v0.95 some rather TeXnical macros, some of them tricky (GM)]
+ [2008/11/22 v0.97 some rather TeXnical macros, some of them tricky (GM)]
%
% \tableofcontents
@@ -450,12 +454,12 @@ pagella, fontspec=quiet]{gmdocc}
\def\do##1{\catcode`\@nx##1=\the\catcode`##1\relax}%
\edef\gmu@restorespecials{\dospecials\do\^^M#1}}
-\newcommand*\gmu@septify[1][]{% restoring the standard catcodes of specials. The
+\pdef\gmu@septify{% restoring the standard catcodes of specials. The
% name is the opposite of `sanitize' ^^A(
% :-)\,. It restores also the original catcode of \inverb|^^M|
\def\do{\relax\catcode`}%
\do\ 10\do\\0\do\{1\do\}2\do\$3\do\&4%
- \do\#6\do\^7\do\_8\do\%14\do\~13\do\^^M5#1\relax}
+ \do\#6\do\^7\do\_8\do\%14\do\~13\do\^^M5\relax}
%\division{From the ancient \pk{xparse} of \TeX Live 2007}
@@ -605,7 +609,7 @@ pagella, fontspec=quiet]{gmdocc}
\long\def\@ddc@c#1\toks@{%
\@ifnextchar(%^^A)
{\@ddc@c@#1}%
- {\PackageError{xparse}{Missing~coordinate~argument}%
+ {\PackageError{gmutils/xparse}{Missing~coordinate~argument}%
{A~value~of~(0,0)~is~assumed}%
\addto@hook\toks@{{00}}#1\toks@}%
}
@@ -994,7 +998,9 @@ pagella, fontspec=quiet]{gmdocc}
%^^A % \[|\if..\afterfi{\bgroup\@makeother\^^M\egroup}\fi|\,.\]
%
-\long\def\afterfi#1#2\fi{\fi#1}
+\def\longafterfi{%
+ \long\def\afterfi##1##2\fi{\fi##1}}
+\longafterfi
% And two more of that family:
\long\def\afterfifi#1#2\fi#3\fi{\fi\fi#1}
% \changes{v0.94}{2008/09/09}{\cs{if} removed from parameters' string}
@@ -1239,6 +1245,9 @@ pagella, fontspec=quiet]{gmdocc}
\foone{\@makeother\ }%
{\def\xiispace{ }}
+\foone{\@makeother\#}%
+{\def\xiihash{#}}
+
% We introduce \cs{visiblespace} from Will Robertson's \pk{xltxtra} if
% available. It's not sufficient |\@ifpackageloaded{xltxtra}| since
% \cs{xxt@visiblespace} is defined only unless |no-verb| option is
@@ -1363,9 +1372,11 @@ pagella, fontspec=quiet]{gmdocc}
% it allows the spaces in the filenames (and prints
% them as \vs).
-% The below macro I~use to format the packages' names.
-% \Define\pk
-\pdef\pk#1{\textsf{\textup{#1}}}
+% The macro defined below I~use to format the packages' names.
+\pdef\pk#1{\textsf{#1}}
+% \changes{v0.96}{2008/11/13}{\cs{textup} removed to allow slanting
+% the name in titles (that are usually typeset in Italic font)}
+
% Some (if not all) of the below macros are copied from \pk{doc}
% and/or \pk{ltxdoc}.
@@ -2305,7 +2316,8 @@ pagella, fontspec=quiet]{gmdocc}
\@nx\DeclareTextCommand\@nx#2{PD1}{\gmu@reserveda}}
\gmu@reserveda
\DeclareTextCommandDefault#2{#3}%
- \pdef#2{#3}}% added for \XeTeX
+ \pdef#2{#3}% added for \XeTeX.
+}
% \DeclareDefining\DeclareLogo
\DeclareLogo\LaTeX{%
@@ -2393,12 +2405,17 @@ pagella, fontspec=quiet]{gmdocc}
\let\TB\TeXbook% \textit{TUG Boat} uses this.
\DeclareLogo[e-TeX]\eTeX{%
- \ensuremath{\varepsilon}-\kern-.125em\TeX}% definition sent by Karl
+ \iffontchar\font"03B5{\itshape ε}\else
+ \ensuremath{\varepsilon}\fi-\kern-.125em\TeX}% definition sent by Karl
% Berry from \textit{TUG Boat} itself.
+\StoreMacro\eTeX
+
\DeclareLogo[pdfe-TeX]\pdfeTeX{pdf\eTeX}
\DeclareLogo\pdfTeX{pdf\TeX}
+\DeclareLogo\pdfLaTeX{pdf\LaTeX}
+% \changes{v0.97}{2008/11/22}{added}
\gm@ifundefined{XeTeX}{%
\DeclareLogo\XeTeX{X\kern-.125em\relax
@@ -2420,6 +2437,8 @@ pagella, fontspec=quiet]{gmdocc}
% \pk{gmutils} |\XeTeXthree| declaration) and then the reversed |E|
% you get as the Unicode Latin Letter Reversed E.
+\DeclareLogo[LuaTeX]\LuaTeX{\textsc{Lua}\TeX}
+% \changes{v0.96}{2008/10/10}{added}
% \division{Expandable turning stuff all into `other'}
@@ -2467,9 +2486,12 @@ pagella, fontspec=quiet]{gmdocc}
\else\afterfi{#2}\fi}
-\def\XeTeXthree{% \changes{v0.90}{2008/8/4}{adjusted to the redefinition of
- % \cs{verb} in \pk{xlxtra} 2008/07/29}
+\DeclareDocumentCommand\XeTeXthree{o}{% \
+ % \changes{v0.90}{2008/8/4}{adjusted
+ % to the redefinition of
+ % \cs{verb} in \pk{xlxtra} 2008/07/29}
\@ifXeTeX{%
+ \IfValueT{#1}{\PassOptionsToPackage{#1}{fontspec}}%
\@ifpackageloaded{gmverb}{\StoreMacro\verb}{}%
\RequirePackage{xltxtra}% since v 0.4 (2008/07/29) this package
% redefines |\verb| and \env{verbatim*},
@@ -2480,9 +2502,10 @@ pagella, fontspec=quiet]{gmdocc}
% which I~fancy.
\@ifpackageloaded{gmverb}{\RestoreMacro\verb}{}%
\AtBeginDocument{%
- \RestoreMacro\LaTeX\RestoreMacro*{LaTeX }}% my version of the
+ \RestoreMacro\LaTeX\RestoreMacro*{LaTeX }% my version of the
% \LaTeX\ logo has been stored just
% after defining, in line \ref{SMLaTeX}. \ilrr
+ \RestoreMacro\eTeX}%
}{}}
% \indent The |\udigits| declaration causes the digits to be typeset
@@ -2617,37 +2640,331 @@ pagella, fontspec=quiet]{gmdocc}
% \TextUsage\garamath\ declaration redefines the quantifiers and is
% more Garamond Premier Pro-specific.
-\pdef\gmath{% \HideDef
- \everymath{% \changes{v0.94}{2008/10/4}{removed definition of
- % \cs{}\<letter>s and \cs{}\<digit>s}
- \relaxen\do
- \newcommand*\do[4][\mathit]{\def##2{##3{##1{\char"##4}}}}%
- \do\alpha{}{03B1}%
- \do[\mathrm]\Delta{}{0394}%
- \do\varepsilon{}{03B5}%
- \do\vartheta{}{03D1}%
- \do\nu{}{03BD}%
- \do\pi{}{03C0}%
- \do\phi{}{03D5}%
- \do[\mathrm]\Phi{}{0424}%
- \do\sigma{}{03C3}%
- \do\varsigma{}{03DA}%
- \do\psi{}{03C8}%
- \do\omega{}{03C9}%
- \do\infty{}{221E}%
- \do[\mathrm]\neg{\mathbin}{00AC}%
- \do[\mathrm]\neq{\mathrel}{2260}%
- \do\partial{}{2202}%
- \do[\mathrm]\pm{}{00B1}%
- \do[\mathrm]\pm{\mathbin}{00B1}%
- \do[\mathrm]\sim{\mathrel}{007E}%
+
+\def\gmu@getfontstring{%
+ \xdef\gmu@fontstring{%
+ \gmu@fontstring@}}
+
+\def\gmu@fontstring@{%
+ \@xa\@xa\@xa\gmu@quotedstring\@xa\meaning\the\font\@@nil}
+
+\def\gmu@quotedstring#1"#2"#3\@@nil{"#2"}
+
+\def\gmu@getfontscale#1Scale#2=#3,{%
+ \ifx\gmu@getfontscale#3\else
+ \gdef\gmu@fontscale{[#3] }%
+ \afterfi\gmu@getfontscale\fi
+}
+
+
+\def\gmu@getfontdata#1{%
+ \global\emptify\gmu@fontscale
+ \begingroup
+ #1%
+ \@xa\@xa\@xa\gmu@getfontscale
+ \csname zf@family@options\f@family\endcsname
+ ,Scale=\gmu@getfontscale,%
+ \gmu@getfontstring
+ \xdef\gmu@theskewchar{\the\skewchar\font}%
+ \endgroup}
+
+
+\def\gmu@stripchar#1"{"}
+
+\def\gmath@getfamnum{%
+ \edef\gmath@famnum{\@xa\gmu@stripchar\meaning\gmath@fam}%
+ % ^^A \edef\gmath@famnum{\ifnum\gmath@famnum<"10 0\fi\gmath@famnum}
+}
+
+%\incs{XeTeXmathcode}\<char slot> \arg[=] \<type> \<family> \<char slot>
+
+\pdef\gmathbase{%
+ \gmu@getfontdata{\rmfamily\itshape}%
+ %
+ \edef\gmu@tempa{%
+ \@nx\DeclareSymbolFont{letters}{\encodingdefault}{gmathit}{m}{it}%
+ \@nx\DeclareFontFamily{\encodingdefault}{gmathit}{%
+ \skewchar\font\gmu@theskewchar\space}%
+ \@nx\DeclareFontShape{\encodingdefault}{gmathit}{m}{it}{%
+ <-> \gmu@fontscale \gmu@fontstring}{}%
+ }\gmu@tempa\typeout{@@@ gmathit (letters): \meaning\gmu@tempa}%
+ %
+ \gmu@getfontdata{\rmfamily\upshape}%
+ \edef\gmu@tempa{%
+ \@nx\DeclareSymbolFont{gmathroman}{\encodingdefault}{gmathrm}{m}{n}%
+ \@nx\DeclareFontFamily{\encodingdefault}{gmathrm}{%
+ \skewchar\font\gmu@theskewchar\space}%
+ \@nx\DeclareFontShape{\encodingdefault}{gmathrm}{m}{n}{%
+ <-> \gmu@fontscale \gmu@fontstring}{}%
+ }\gmu@tempa\typeout{@@@ gmathrm (upright symbols):
+ \meaning\gmu@tempa}%
+ \font\gmath@font=\gmu@fontstring\relax
+ %
+ \DeclareDocumentCommand\gmath@do{mom}{%\
+ % \begin{enumargs*}
+ % \mand the character or \CS\ to be declared,
+ % \opt the Unicode to be assigned,
+ % \mand math type (\CS like \cs{mathord} etc.)
+ % \end{enumargs*}
+ %
+ \gmath@getfamnum
+ \IfValueTF{##2}{%
+ \edef\gmu@tempa{%
+ = \mathchar@type##3\space
+ \gmath@famnum\space
+ % ^^A\the\XeTeXcharglyph
+ "##2\relax}%
+ \if\relax\@nx##1%
+ \edef\gmu@tempa{%
+ \XeTeXmathchardef \@nx##1\gmu@tempa}%
+ \else
+ \edef\gmu@tempa{%
+ \XeTeXmathcode `##1 \gmu@tempa}
+ \fi%
+ }%
+ {%
+ \edef\gmu@tempa{%
+ \XeTeXmathcode `##1 =
+ \mathchar@type##3\space
+ \gmath@famnum\space
+ %^^A \the\XeTeXcharglyph
+ `##1\relax}%
+ }%
+ \gmu@tempa
+ \typeout{@@@@ \@nx##1}%
+ \typeout{@@@@ \meaning\gmu@tempa}%
+ }% of \incs{gmath@do}
%
- \def\do##1##2##3{\def##1{%
- \mathop{\mathchoice{\hbox{%
- \rm
- \edef\gma@tempa{\the\fontdimen8\font}%
- \larger[3]%
- \lower\dimexpr(\fontdimen8\font-\gma@tempa)/2 %
+ \DeclareDocumentCommand\gmath@doif{mmmoo}{%\
+ % \begin{enumargs*}
+ % \mand the Unicode of char enquired,
+ % \item the char or \CS\ to be declared,
+ % \item math type \CS (\cs{mathord} etc.),
+ % \opt second-choice Unicode (taken if first-choice is absent),
+ % \opt third-choice Unicode (as above if second-choice is absent
+ % from font).
+ % \end{enumargs*}
+ %
+ \iffontchar\gmath@font"##1 \gmath@do##2[##1]##3%
+ \else\IfValueT{##4}{%
+ \iffontchar\gmath@font"##4 \gmath@do##2[##4]##3%
+ \else\IfValueT{##5}{%
+ \iffontchar\gmath@font"##5 \gmath@do##2[##5]##3%
+ \fi}%
+ \fi}%
+ \fi}%
+ %
+\iffalse % doesn't work in a~non-math font.
+ \DeclareDocumentCommand\gmath@delc{mo}{%\
+ % \begin{enumargs*}
+ % \mand the char or \CS\ to be declared,
+ % \opt the Unicode (if not the same as the char).
+ % \end{enumargs*}
+ %
+ \gmath@getfamnum
+ \IfValueTF{##2}{%
+ \edef\gmu@tempa{%
+ = \gmath@famnum\space "##2\relax}%
+ \edef\gmu@tempa{%
+ \XeTeXdelcode `##1 \gmu@tempa}
+ }%
+ {%
+ \edef\gmu@tempa{%
+ \XeTeXdelcode `##1 =
+ \gmath@famnum\space
+ % ^^A \the\XeTeXcharglyph
+ `##1\relax}%
+ }%
+ \gmu@tempa
+ \typeout{@@@@ \@nx##1}%
+ \typeout{@@@@ \meaning\gmu@tempa}%
+ }% of \incs{gmath@delc}
+ %
+ \def\gmath@delcif##1##2{%\
+ % \begin{enumargs*}
+ % \mand the Unicode enquired,
+ % \item the char to be delcode-declared
+ % \end{enumargs*}
+ %
+ \iffontchar\gmath@font"##1 \gmath@delc##2[##1]\fi}
+\fi% of iffalse
+ %
+ \def\gmath@delimif##1##2##3{%\
+ % \begin{enumargs*}
+ % \item the Unicode enquired,
+ % \item the \CS\ defined as \cs{XeTeXdelimiter},
+ % \item the math type \CS\ (probably \incs{mathopen} or
+ % \incs{mathclose}).
+ % \end{enumargs*}
+ \iffontchar\gmath@font"##1
+ \gmath@getfamnum
+ \protected\edef##2{\@nx\ensuremath{%
+ \XeTeXdelimiter \mathchar@type##3\space
+ \gmath@famnum\space "##1\relax}}%
+ \fi}% of \cs{gmath@delimif}.
+ %
+ \pdef\gmu@dogmathbase{%
+ %
+ \let\gmath@fam\symgmathroman
+ %
+ \typeout{@@@ gmutils.sty: taking some math chars from the font^^J \gmu@fontstring@}%
+ \gmath@do+\mathbin
+ \gmath@doif{2212}-\mathbin[2013]% minus sign if present or else en dash
+ \gmath@do=\mathrel
+ \gmath@do0\mathord
+ \gmath@do1\mathord
+ \gmath@do2\mathord
+ \gmath@do3\mathord
+ \gmath@do4\mathord
+ \gmath@do5\mathord
+ \gmath@do6\mathord
+ \gmath@do7\mathord
+ \gmath@do8\mathord
+ \gmath@do9\mathord
+ %%
+ \gmath@doif{2A7D}\xleq\mathrel
+ \gmath@doif{2A7E}\xgeq\mathrel
+ \@ifpackageloaded{polski}{%
+ \ifdefined\xleq
+ \let\leq=\xleq
+ \let\le=\leq
+ \fi
+ \ifdefined\xgeq
+ \let\geq=\xgeq
+ \let\ge=\geq
+ \fi}{}%
+ %
+ \gmath@do.\mathpunct
+ \gmath@do,\mathpunct
+ \gmath@do;\mathpunct
+ \gmath@do…\mathpunct
+ \gmath@do(\mathopen
+%^^A \gmath@delc(% doeasn't work with a~non-math font (I~dunno if
+%^^A~it works with a~math font).
+ \gmath@do)\mathclose
+%^^A \gmath@delc)%
+ \gmath@do[\mathopen
+%^^A \gmath@delc[%
+ \gmath@do]\mathclose
+%^^A \gmath@delc]%
+ %
+ \gmath@doif{00D7}×\mathbin
+ \gmath@do:\mathrel
+ \gmath@doif{00B7}·\mathbin
+ \gmath@doif{22C6}*\mathbin
+ \gmath@doif{2300}\varnothing\mathord
+ \gmath@doif{221E}\infty\mathord
+ \gmath@doif{2248}\approx\mathrel
+ \gmath@doif{2260}\neq\mathrel
+ \let\ne\neq
+ \gmath@doif{00AC}\neg\mathbin
+ \gmath@do/\mathop
+ \gmath@do<\mathrel
+%^^A \gmath@delcif{2329}<%
+ \gmath@do>\mathrel
+%^^A \gmath@delcif{232A}>%
+ \gmath@doif{2329}\langle\mathopen
+ \gmath@doif{232A}\rangle\mathclose
+ \gmath@doif{2202}\partial\mathord
+ \gmath@doif{00B1}\pm\mathbin
+ \gmath@doif{007E}\sim\mathrel
+ \gmath@doif{2190}\leftarrow\mathrel
+ \gmath@doif{2192}\rightarrow\mathrel
+ \gmath@doif{2194}\leftrightarrow\mathrel% if not present,
+ % \incs{gmathfurther} will take care
+ % of it if left and right arrows are present.
+ \gmath@doif{2191}\uparrow\mathrel% it should be a~delimiter
+ % (declared with \incs{gmath@delimif}) % but in a~non-math
+ % font the delimiters don't work (2008/11/19) and I~don't think
+ % I'll ever need up- and down- arrows as delimiters.
+ \gmath@doif{2193}\downarrow\mathrel
+ %
+ \gmath@doif{2208}\in\mathrel[03F5][0454]%
+ % As a~fan of modal logics I~allow redefinition of \incs{lozenge}
+ % and \incs{square} iff both are in the font. I~don't accept
+ % the ‘ballot box’ U+2610.
+ \if\iffontchar\gmath@font"25CA 0\else 1\fi
+ \iffontchar\gmath@font"25FB 0\else\iffontchar\gmath@font"25A1 0\else 2\fi\fi
+ \gmath@do\lozenge[25CA]\mathord
+ \gmath@doif{25FB}\square\mathord[25A1]% ‘medium white square (modal
+ % operator)’ of just ‘white square’.
+ \fi
+ \gmath@doif{EB08}\bigcircle\mathbin
+ \gmath@doif{2227}\wedge\mathbin
+ \gmath@doif{2228}\vee\mathbin
+ %
+ \gmath@doif{0393}\Gamma\mathalpha
+ \gmath@doif{0394}\Delta\mathalpha
+ \gmath@doif{0398}\Theta\mathalpha
+ \gmath@doif{039B}\Lambda\mathalpha
+ \gmath@doif{039E}\Xi\mathalpha
+ \gmath@doif{03A3}\Sigma\mathalpha
+ \gmath@doif{03A5}\Upsilon\mathalpha
+ \gmath@doif{03А6}\Phi\mathalpha
+ \gmath@doif{03A8}\Psi\mathalpha
+ \gmath@doif{03A9}\Omega\mathalpha
+ %
+ \let\gmath@fam\symletters
+ %
+ \gmath@doif{03B1}\alpha\mathalpha
+ \gmath@doif{03B2}\beta\mathalpha
+ \gmath@doif{03B3}\gamma\mathalpha
+ \gmath@doif{03B4}\delta\mathalpha
+ \gmath@doif{03F5}\epsilon\mathalpha
+ \gmath@doif{03B5}\varepsilon\mathalpha
+ \gmath@doif{03B6}\zeta\mathalpha
+ \gmath@doif{03B7}\eta\mathalpha
+ \gmath@doif{03B8}\theta\mathalpha
+ \gmath@doif{03D1}\vartheta\mathalpha
+ \gmath@doif{03B9}\iota\mathalpha
+ \gmath@doif{03BA}\kappa\mathalpha
+ \gmath@doif{03BB}\lambda\mathalpha
+ \gmath@doif{03BC}\mu\mathalpha
+ \gmath@doif{03BD}\nu\mathalpha
+ \gmath@doif{03BE}\xi\mathalpha
+ \gmath@doif{03C0}\pi\mathalpha
+ \gmath@doif{03A0}\Pi\mathalpha
+ \gmath@doif{03C1}\rho\mathalpha
+ \gmath@doif{03C3}\sigma\mathalpha
+ \gmath@doif{03DA}\varsigma\mathalpha% 03C2?
+ \gmath@doif{03C4}\tau\mathalpha
+ \gmath@doif{03C5}\upsilon\mathalpha
+ \gmath@doif{03D5}\phi\mathalpha
+ \gmath@doif{03C8}\psi\mathalpha
+ \gmath@doif{03C9}\omega\mathalpha
+ %
+ \if 1 1%
+ \iffontchar\gmath@font"221A
+ \fontdimen61\gmath@font=1pt
+ \edef\sqrtsign{%
+ \XeTeXradical \@xa\gmu@stripchar\meaning\symgmathroman\space "221A\relax}%
+ \fi
+ \fi% of if 1 1.
+ }%
+ \AtBeginDocument{\gmu@dogmathbase\let\gmathbase\gmu@dogmathbase}%
+ \not@onlypreamble\gmathbase
+}% of \cs{gmathbase}
+
+\@onlypreamble\gmathbase
+% \nostanza It's a~bit tricky: if \cs{gmathbase} occurs first time in
+% a~document inside \env{document} then an error error is raised. But
+% if \cs{gmathbase} occurs first time in the preamble, then it removes
+% itself from the only-preamble list and redefines itself to be only
+% the inner macro of the former itself.
+
+\pdef\gmathfurther{% \HideDef
+ % \changes{v0.94}{2008/10/4}{removed definition of
+ % \cs{}\<letter>s and \cs{}\<digit>s}
+ % \changes{v0.96}{2008/11/7}{Greek letters completed. Wrapped with
+ % \cs{addtotoks} to allow using in any order with \cs{garamath}
+ % and others}
+ %
+ \def\do##1##2##3{\def##1{%
+ \mathop{\mathchoice{\hbox{%
+ \rm
+ \edef\gma@tempa{\the\fontdimen8\font}%
+ \larger[3]%
+ \lower\dimexpr(\fontdimen8\font-\gma@tempa)/2 %
\hbox{##2}}}{\hbox{%
\rm
\edef\gma@tempa{\the\fontdimen8\font}%
@@ -2655,56 +2972,32 @@ pagella, fontspec=quiet]{gmdocc}
\lower\dimexpr(\fontdimen8\font-\gma@tempa)/2 %
\hbox{##2}}}%
{\mathrm{##2}}{\mathrm{##2}}}##3}}%
- \do\sum{\char"2211}{}%
+ \iffontchar\gmath@font"2211 \do\sum{\char"2211}{}\fi%
\do\forall{\gma@quantifierhook \rotatebox[origin=c]{180}{A}%
- \setbox0=\hbox{A}\setbox2=\hbox{\scriptsize x}%
- \kern\dimexpr\ht2/3*2 -\wd0/2\relax}{\nolimits}%
+ \gmu@forallkerning
+ }{\nolimits}%
+ \def\gmu@forallkerning{\setbox0=\hbox{A}\setbox2=\hbox{\scriptsize x}%
+ \kern\dimexpr\ht2/3*2 -\wd0/2\relax}% to be able to redefine it
+ % when the big quantifier is Bauhaus-like.
\do\exists{\rotatebox[origin=c]{180}{\gma@quantifierhook E}}\nolimits%
%
\def\do##1##2##3{\def##1{##3{%
\mathchoice{\hbox{\rm##2}}{\hbox{\rm##2}}%
{\hbox{\rm\scriptsize##2}}{\hbox{\rm\tiny##2}}}}}%
- \do\vee{\rotatebox[origin=c]{90}{<}}\mathbin
- \do\wedge{\rotatebox[origin=c]{-90}{<}}\mathbin
- \do\leftarrow{\char"2190}\mathrel
- \do\rightarrow{\char"2192}\mathrel
- \do\leftrightarrow{\char"2190\kern-0,1em \char"2192}\mathrel
- %
- \gmu@storespecials[\do\`\do\"\do\=]% \label{@storespecials}
- \gmu@septify[\do\`12\do\"12\do\=12]%
- \def\do##1##2##3{%
- \catcode`##1=12\relax % to ensure |##2| be `other' in the
- % definition body.
- \scantokens{\mathcode`##1="8000\relax
- \foone{\catcode`##1=\active}{\def##1}{##3{%
- \mathchoice{\hbox{\rm##2}}{\hbox{\rm##2}}%
- {\hbox{\rm\scriptsize##2}}{\hbox{\rm\tiny##2}}}}%
- \ignorespaces}}% to eat the lineend (scantokens acts as |\read|
- % icluding line end).
- \do..\mathpunct \do,,\mathpunct \do……\mathpunct
- \do((\mathopen%^^A))
- \gm@ifundefined{resetMathstrut@}{}{% an error occured `bad mathchar
- % etc.'\ because \pk{amsmath.sty} doesn't take account of
- % a~possibility of `|(|' %^^A)
- % being math-active.
- \def\resetMathstrut@{%
- \setbox\z@\hbox{% \label{gmu:leading space} \nostanza \gmdnoindent
- % |%% \mathchardef\@tempa\mathcode`\(\relax|\\
- % |%% \def\@tempb##1"##2##3{\the\textfont"##3\char"}%|\\
- % |%% \expandafter\@tempb\meaning\@tempa \relax|\nostanza
- (%^^A)
- }%
- \ht\Mathstrutbox@\ht\z@ \dp\Mathstrutbox@\dp\z@
- }}%^^A((
- \do))\mathclose
- \do[[\mathopen\do]]\mathclose
- \do-{\char"2212}\mathbin \do++\mathbin \do==\mathrel \do××\mathbin
- \do::\mathbin \do··\mathbin \do//\mathbin \do<<\mathrel
- \do>>\mathrel
- \do00\mathord \do11\mathord \do22\mathord \do33\mathord
- \do44\mathord \do55\mathord \do66\mathord \do77\mathord
- \do88\mathord \do99\mathord
- \gmu@restorespecials
+ %
+ \unless\iffontchar\gmath@font"2227
+ \do\vee{\rotatebox[origin=c]{90}{<}}\mathbin%
+ \fi
+ \unless\iffontchar\gmath@font"2228
+ \do\wedge{\rotatebox[origin=c]{-90}{<}}\mathbin
+ \fi
+ %
+ \unless\iffontchar\gmath@font"2194
+ \if\iffontchar\gmath@font"2190 0\else1\fi
+ \iffontchar\gmath@font"2192 0\else2\fi
+ \do\leftrightarrow{\char"2190\kern-0,1em \char"2192}\mathrel
+ %^^A\typeout{@@@ I fake \string\leftrightarrow}%
+ \fi\fi
%
\def\do##1##2##3{\def##1####1{##2{\hbox{%
\rm
@@ -2718,41 +3011,56 @@ pagella, fontspec=quiet]{gmdocc}
\do\bigl\mathopen\larger
\do\bigr\mathclose\larger
\do\Bigl\mathopen\largerr
- \do\Bigr\mathclose\largerr
- \do\biggl\mathopen{\larger[3]}%
- \do\biggr\mathclose{\larger[3]}%
- \do\Biggl\mathopen{\larger[4]}%
- \do\Biggr\mathclose{\larger[4]}%
- %
- \def\do##1##2{\def##1{\ifmmode##2{\mathchoice
- {\hbox{\rm\char`##1}}{\hbox{\rm\char`##1}}%
- {\hbox{\rm\scriptsize\char`##1}}{\hbox{\rm\tiny\char`##1}}}%
- \else\char`##1\fi}}%
- %^^A \StoreMacros{\{\}}%
- \do\{\mathopen
- \do\}\mathclose
- %
- \def\={\mathbin{=}}%
- \def\neqb{\mathbin{\neq}}%
- \def\do##1{\edef\gma@tempa{%
- \def\@xa\@nx\csname \@xa\gobble\string##1r\endcsname{%
- \@nx\mathrel{\@nx##1}}}%
- \gma@tempa}%
- \do\vee \do\wedge \do\neg
- \def\fakern{\mkern-3mu}%
- \thickmuskip=8mu plus 4mu\relax
- %
- \gma@gmathhook
- }% of |\everymath|.
- \everydisplay\everymath
- \ifdefined\Url
- \ampulexdef\Url{\let\do}\@makeother
- {\everymath{}\let\do\@makeother}% I~don't know why but the
- % \pk{url} package's \incs{url} typesets the argument inside
- % a~math which caused digits not to be typewriter but Roman and
- % lowercase.
- \fi
- }% of |\def\gmath|. \ResumeDef
+ \do\Bigr\mathclose\largerr
+ \do\biggl\mathopen{\larger[3]}%
+ \do\biggr\mathclose{\larger[3]}%
+ \do\Biggl\mathopen{\larger[4]}%
+ \do\Biggr\mathclose{\larger[4]}%
+ %
+ %
+ \addtotoks\everymath{% \changes{v0.96}{2008/11/20}{the
+ % \cs{everymath}'s left brace moved here:
+ % earlier all the stuff was put into \cs{everymath}}
+ \def\do##1##2{\def##1{\ifmmode##2{\mathchoice
+ {\hbox{\rm\char`##1}}{\hbox{\rm\char`##1}}%
+ {\hbox{\rm\scriptsize\char`##1}}{\hbox{\rm\tiny\char`##1}}}%
+ \else\char`##1\fi}}%
+ % ^^A \StoreMacros{\{\}}%
+ \do\{\mathopen
+ \do\}\mathclose
+ %
+ \def\={\mathbin{=}}%
+ \def\neqb{\mathbin{\neq}}%
+ \let\neb\neqb
+ \def\do##1{\edef\gma@tempa{%
+ \def\@xa\@nx\csname \@xa\gobble\string##1r\endcsname{%
+ \@nx\mathrel{\@nx##1}}}%
+ \gma@tempa}%
+ \do\vee \do\wedge \do\neg
+ \def\fakern{\mkern-3mu}%
+ \thickmuskip=8mu plus 4mu\relax
+ %
+ \gma@gmathhook
+ }% of |\everymath|.
+ \everydisplay\everymath
+ \ifdefined\Url
+ \ampulexdef\Url{\let\do}\@makeother
+ {\everymath{}\let\do\@makeother}% I~don't know why but the
+ % \pk{url} package's \incs{url} typesets the argument inside
+ % a~math which caused digits not to be typewriter but Roman and
+ % lowercase.
+ \fi% of ifdefined Url.
+}% of |\def\gmathfurther|. \ResumeDef
+
+\def\gmath{\gmathbase\gmathfurther}
+
+\pdef\gmathscripts{% \changes{v0.96}{2008/11/11}{added}
+ \addtotoks\everymath{\catcode`\^=7\relax \catcode`\_=8\relax }%
+ \everydisplay\everymath}
+
+\pdef\gmathcats{%
+ \addtotoks\everymath{\gmu@septify}%
+ \everydisplay\everymath}
\emptify\gma@quantifierhook
\def\quantifierhook#1{%
@@ -2801,6 +3109,7 @@ pagella, fontspec=quiet]{gmdocc}
+
% \subdivision{Minion and Garamond Premier kerning and ligature fixes}
%»Ws« shall not make long »s« because long »s« looks ugly next to »W«.
@@ -2883,6 +3192,8 @@ pagella, fontspec=quiet]{gmdocc}
%
\long\def\@firstofmany#1#2\@@nil{#1}
% \changes{v0.63}{06/9/9}{added}
+\long\def\@secondofmany#1#2\@@nil{#2}
+
% A~mark for the \TODO{}s:
\newcommand*{\TODO}[1][]{{%
@@ -3002,7 +3313,7 @@ pagella, fontspec=quiet]{gmdocc}
% \Define\liturgiques
% \changes{v0.76}{07/3/30}{added, or rather moved from \file{Akatyst.tex}}
\newcommand*\liturgiques[1][red]{% Requires the \pk{color} package.
- \gmu@RPfor{color}\color%
+ \gmu@RPfor{xcolor}\color%
\newcommand*\czerwo{\small\color{#1}}% environment
\newcommand{\czer}[1]{\leavevmode{\czerwo##1}}% we leave
% vmode because if we don't, then \env{verse}'s |\everypar| would be
@@ -3016,7 +3327,7 @@ pagella, fontspec=quiet]{gmdocc}
% loaded with options |#1| if the \CS |#3| is undefined.
\newcommand*\gmu@RPfor[3][]{% \changes{v0.93}{2008/08/30}{renamed from
% \cs{gmu@RPif} and \#3 changed from a~csname to \CS}
- \ifx\relax#1\relax
+ \ifx\relax#1\relax\emptify\gmu@resa
\else \def\gmu@resa{[#1]}%
\fi
\@xa\RequirePackage\gmu@resa{#2}}
@@ -3441,7 +3752,10 @@ pagella, fontspec=quiet]{gmdocc}
\AtBeginDocument{\def\adashes{%
\catcode`—\active \let—\—%
\catcode`–\active \let–\–%
-% ^^A \catcode`-\active \let-\gmu@dywiz
+ % ^^A \catcode`-\active \let-\gmu@dywiz
+ \addtomacro\dospecials{\do\–\do\—}%
+ \addtomacro\@sanitize{\@makeother\–\@makeother\—}%
+ \addtomacro\gmu@septify{\do\–13\do\—13\relax}%
}}}
\else
\relaxen\adashes
@@ -3473,7 +3787,13 @@ pagella, fontspec=quiet]{gmdocc}
\pdef\textbullet{% \changes{v0.94}{2008/10/3}{the \XeTeX\
% version enriched with \cs{iffontchar} due to lack of bullets
% with the default settings reported by Morten H\o{}gholm and Edd Barrett}
- \iffontchar\font"2022 \char"2022 \else\ensuremath{\bullet}\fi}}
+ \iffontchar\font"2022 \char"2022 \else\ensuremath{\bullet}\fi}%
+ %
+ \pprovide\glyphname#1{% \changes{v0.96}{2008/11/12}{moved here from
+ % my private document class}
+ \XeTeXglyph \numexpr\XeTeXglyphindex "#1"\relax\relax}% since
+ % \XeTeX\ … \incs{numexpr} is redundant.
+}
{\def\textbullet{\ensuremath{\bullet}}}
\newenvironment*{tytulowa}{\newpage}{\par\thispagestyle{empty}\newpage}
@@ -3794,7 +4114,7 @@ pagella, fontspec=quiet]{gmdocc}
% margin. Note this has any effect only if there is a~\incs{par} in
% the scope.
\edef\gmu@tempa{%
- \@nx\addfontfeature{RawFeature={slant=\strip@pt\@tempdima}}}%^^B
+ \@nx\addfontfeature{FakeSlant=\strip@pt\@tempdima}}%^^B
% \ilrr when not \incs{edef}ed, it caused an error, which is
% perfectly understandable.
\gmu@tempa}%
@@ -3985,6 +4305,9 @@ pagella, fontspec=quiet]{gmdocc}
% \cs{unex@nameuse}, probably never really used since they were
% incomplete: \cs{edef@other} undefined}
%
+% \toCTAN{v0.96}{2008/11/21}
+%
+%
% \PrintChanges\PrintIndex
%\NoEOF