From a982429c5ab250219ae8c68645db5bc1f70db211 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 19 Aug 2009 21:57:56 +0000 Subject: update mh for xfrac git-svn-id: svn://tug.org/texlive/trunk@14765 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/mh/xfrac.pdf | Bin 419423 -> 464641 bytes Master/texmf-dist/source/latex/mh/xfrac.dtx | 61 ++++++++++++++-------------- Master/texmf-dist/tex/latex/mh/xfrac.sty | 48 +++++++++++----------- 3 files changed, 55 insertions(+), 54 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/mh/xfrac.pdf b/Master/texmf-dist/doc/latex/mh/xfrac.pdf index 9530f72bf86..38ef47be1c7 100644 Binary files a/Master/texmf-dist/doc/latex/mh/xfrac.pdf and b/Master/texmf-dist/doc/latex/mh/xfrac.pdf differ diff --git a/Master/texmf-dist/source/latex/mh/xfrac.dtx b/Master/texmf-dist/source/latex/mh/xfrac.dtx index a2e9c9c50fa..0a4b2e3ad59 100644 --- a/Master/texmf-dist/source/latex/mh/xfrac.dtx +++ b/Master/texmf-dist/source/latex/mh/xfrac.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2004, 2008 by Morten Hoegholm +% Copyright (C) 2004, 2008, 2009 by Morten Hoegholm % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -66,7 +66,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: xfrac 2008/08/03 v0.2 textstyle fractions (MH)} +\Msg{* Package: xfrac 2009/08/10 v0.2a textstyle fractions (MH)} \Msg{************************************************************************} \keepsilent @@ -76,7 +76,7 @@ This is a generated file. -Copyright (C) 2004, 2008 by Morten Hoegholm +Copyright (C) 2004, 2008, 2009 by Morten Hoegholm This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either @@ -126,7 +126,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{xfrac.drv}% - [2008/08/04 v0.2 textstyle fractions (MH)] + [2009/08/10 v0.2a textstyle fractions (MH)] \RequirePackage{fix-cm} \documentclass{ltxdoc} @@ -185,6 +185,8 @@ and the derived files % \GetFileInfo{xfrac.drv} % \CheckSum{249} % +% \changes{v0.2a}{2009/08/10}{Update for new version of expl3} +% % \changes{v0.2}{2008/08/04}{Require expl3 and get rid of .ins file} % \changes{v0.2}{2008/08/04}{Move to macros/latex/contrib/mh on CTAN} % @@ -697,22 +699,20 @@ and the derived files % experimental code, more precisely from the `xbase' bundle. The % other packages are well-known. % \begin{macrocode} -\RequirePackage{l3names}[2007/09/01] -\ProvidesExplPackage{xfrac}{2008/08/04}{0.2}{Text fractions} +\RequirePackage{expl3}[2009/08/05] +\ProvidesExplPackage{xfrac}{2009/08/10}{0.2a}{Text fractions} % \end{macrocode} % % \begin{macrocode} \RequirePackage{textcomp,graphicx,amstext} -\RequirePackage{template}[2008/08/03] % force upgrade!! -\RequirePackage{xparse}[2008/08/03] % force upgrade!! +\RequirePackage{template}[2008/08/03] +\RequirePackage{xparse}[2008/08/03] % \end{macrocode} % With v0.10b the new internal syntax using |_| and |:| was % introduced. Starting from v0.2 the expl3 code base is used and, % hence, also its programming setup. White space is ignored as well, % so any |@|-signs in the code are remnants of old \LaTeX{} coding % conventions. -% \begin{macrocode} -% \end{macrocode} % % An option: % \begin{macrocode} @@ -738,7 +738,8 @@ and the derived files % \end{macro} % % \subsection{The Templates} -% Then we declare the template. % \begin{macrocode} +% Then we declare the template. +% \begin{macrocode} \DeclareTemplateType{xfrac}{3} % \end{macrocode} % The template type `text'. Make two separate templates: text and @@ -758,13 +759,13 @@ and the derived files v-scale = n [1] \xfrac_vscale:, scale-factor = n [.83333] \xfrac_scalefactor:, scale-relative = s [true] - { \def:Npn \xfrac_relscale: {\box_ht:N\l_xfrac_slash_box}} - { \def:Npn \xfrac_relscale: { + { \cs_set:Npn \xfrac_relscale: {\box_ht:N\l_xfrac_slash_box}} + { \cs_set:Npn \xfrac_relscale: { \dim_eval:n { \box_ht:N\l_xfrac_temp_box + \box_dp:N\l_xfrac_temp_box }} }, scaling = s [true] - {\def:Npn\xfrac_fontscale: { + {\cs_set:Npn\xfrac_fontscale: { \fontsize{\xfrac_scalefactor: \xfrac_relscale:}{\c_zero_dim}\selectfont}} - { \let:NN \xfrac_fontscale: \use_noop: }, + { \cs_set_eq:NN \xfrac_fontscale: \prg_do_nothing: }, % \end{macrocode} % Here comes some fake lengths. I've decided to call them with the % suffix |_fdim|, so that I will remember to use them right. @@ -780,23 +781,23 @@ and the derived files % \begin{macrocode} slash-right-mkern = n [-2mu] \l_xfrac_slashrightmsep_fmu, slash-left-mkern = n [-1mu] \l_xfrac_slashleftmsep_fmu, - math-mode = s [false] { \let:NN\xfrac_math: \ensuremath } - { \let:NN \xfrac_math: \use_arg_i:n }, + math-mode = s [false] { \cs_set_eq:NN \xfrac_math: \ensuremath } + { \cs_set_eq:NN \xfrac_math: \use:n }, phantom = n [8] \xfrac_phantom:, }{ \DoParameterAssignments \mode_if_math:TF{ - \let:NN \xfrac_textormath: \text - \def:Npx \xfrac_slashfontchange: {\tex_fam:D \xfrac_slashsymbolfont: } - \def:Npx \xfrac_numeratorfontchange: {\tex_fam:D \xfrac_numeratorfont: } - \def:Npx \xfrac_denominatorfontchange: {\tex_fam:D \xfrac_denominatorfont: } + \cs_set_eq:NN \xfrac_textormath: \text + \cs_set:Npx \xfrac_slashfontchange: {\tex_fam:D \xfrac_slashsymbolfont: } + \cs_set:Npx \xfrac_numeratorfontchange: {\tex_fam:D \xfrac_numeratorfont: } + \cs_set:Npx \xfrac_denominatorfontchange: {\tex_fam:D \xfrac_denominatorfont: } }{ - \let:NN \xfrac_textormath: \mbox - \def:Npn\xfrac_slashfontchange: { + \cs_set_eq:NN \xfrac_textormath: \mbox + \cs_set:Npn\xfrac_slashfontchange: { \fontfamily{\xfrac_slashsymbolfont: }\selectfont} - \def:Npn\xfrac_numeratorfontchange: { + \cs_set:Npn\xfrac_numeratorfontchange: { \fontfamily{\xfrac_numeratorfont: }\selectfont} - \def:Npn\xfrac_denominatorfontchange: { + \cs_set:Npn\xfrac_denominatorfontchange: { \fontfamily{\xfrac_denominatorfont: }\selectfont} } \xfrac_textormath: { @@ -822,13 +823,13 @@ and the derived files % \end{macrocode} % Both unspecified. % \begin{macrocode} - \def:Npn\xfrac_next: {\raisebox{\box_ht:N\l_xfrac_slash_box + \cs_set:Npn\xfrac_next: {\raisebox{\box_ht:N\l_xfrac_slash_box -\box_dp:N\l_xfrac_slash_box-\height}} }{ % \end{macrocode} % Use only bottom specification. % \begin{macrocode} - \def:Npn\xfrac_next: {\raisebox{\l_xfrac_numeratorbotsep_fdim }} + \cs_set:Npn\xfrac_next: {\raisebox{\l_xfrac_numeratorbotsep_fdim }} } } { @@ -837,7 +838,7 @@ and the derived files % \begin{macrocode} \dim_compare:nNnTF \l_xfrac_numeratorbotsep_fdim = \c_max_dim { - \def:Npn\xfrac_next: { + \cs_set:Npn\xfrac_next: { \raisebox{ \box_ht:N\l_xfrac_slash_box - \l_xfrac_numeratortopsep_fdim - \height @@ -852,7 +853,7 @@ and the derived files {You~ have~ specified~ both~ numerator-top-sep~ and~ numerator-bot-sep} {I~ will~ pretend~ you~ didn't~ specify~ any~ of ~them} - \def:Npn\xfrac_next: {\raisebox{\box_ht:N\l_xfrac_slash_box + \cs_set:Npn\xfrac_next: {\raisebox{\box_ht:N\l_xfrac_slash_box -\box_dp:N\l_xfrac_slash_box-\height}} } } @@ -1015,7 +1016,7 @@ and the derived files \DeclareDocumentCommand \sfrac {o mom}{ \mode_if_math:TF { - \def:Npx \xfrac_next: {mathfam\number\fam} + \cs_set:Npx \xfrac_next: {mathfam\number\fam} \IfExistsInstanceTF{xfrac}{\xfrac_next: } {\UseInstance{xfrac}{\xfrac_next: }} {\UseInstance{xfrac}{mathdefault}} diff --git a/Master/texmf-dist/tex/latex/mh/xfrac.sty b/Master/texmf-dist/tex/latex/mh/xfrac.sty index 52926379ca9..f5d92e5b979 100644 --- a/Master/texmf-dist/tex/latex/mh/xfrac.sty +++ b/Master/texmf-dist/tex/latex/mh/xfrac.sty @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 2004, 2008 by Morten Hoegholm +%% Copyright (C) 2004, 2008, 2009 by Morten Hoegholm %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -26,11 +26,11 @@ %% and the derived files %% xfrac.sty, xfrac.pdf, xfrac.ins, xfrac.drv. %% -\RequirePackage{l3names}[2007/09/01] -\ProvidesExplPackage{xfrac}{2008/08/04}{0.2}{Text fractions} +\RequirePackage{expl3}[2009/08/05] +\ProvidesExplPackage{xfrac}{2009/08/10}{0.2a}{Text fractions} \RequirePackage{textcomp,graphicx,amstext} -\RequirePackage{template}[2008/08/03] % force upgrade!! -\RequirePackage{xparse}[2008/08/03] % force upgrade!! +\RequirePackage{template}[2008/08/03] +\RequirePackage{xparse}[2008/08/03] \bool_new:N \g_cm_recommended_bool \DeclareOption{cm-recommended} { \bool_gset_true:N \g_cm_recommended_bool } @@ -54,13 +54,13 @@ v-scale = n [1] \xfrac_vscale:, scale-factor = n [.83333] \xfrac_scalefactor:, scale-relative = s [true] - { \def:Npn \xfrac_relscale: {\box_ht:N\l_xfrac_slash_box}} - { \def:Npn \xfrac_relscale: { + { \cs_set:Npn \xfrac_relscale: {\box_ht:N\l_xfrac_slash_box}} + { \cs_set:Npn \xfrac_relscale: { \dim_eval:n { \box_ht:N\l_xfrac_temp_box + \box_dp:N\l_xfrac_temp_box }} }, scaling = s [true] - {\def:Npn\xfrac_fontscale: { + {\cs_set:Npn\xfrac_fontscale: { \fontsize{\xfrac_scalefactor: \xfrac_relscale:}{\c_zero_dim}\selectfont}} - { \let:NN \xfrac_fontscale: \use_noop: }, + { \cs_set_eq:NN \xfrac_fontscale: \prg_do_nothing: }, numerator-top-sep = L [\c_max_dim] \l_xfrac_numeratortopsep_fdim, numerator-bot-sep = L [\c_max_dim] \l_xfrac_numeratorbotsep_fdim, denominator-bot-sep = L [\c_max_dim] \l_xfrac_denominatorbotsep_fdim, @@ -68,23 +68,23 @@ slash-left-kern = L [0pt] \l_xfrac_slashleftsep_fdim, slash-right-mkern = n [-2mu] \l_xfrac_slashrightmsep_fmu, slash-left-mkern = n [-1mu] \l_xfrac_slashleftmsep_fmu, - math-mode = s [false] { \let:NN\xfrac_math: \ensuremath } - { \let:NN \xfrac_math: \use_arg_i:n }, + math-mode = s [false] { \cs_set_eq:NN \xfrac_math: \ensuremath } + { \cs_set_eq:NN \xfrac_math: \use:n }, phantom = n [8] \xfrac_phantom:, }{ \DoParameterAssignments \mode_if_math:TF{ - \let:NN \xfrac_textormath: \text - \def:Npx \xfrac_slashfontchange: {\tex_fam:D \xfrac_slashsymbolfont: } - \def:Npx \xfrac_numeratorfontchange: {\tex_fam:D \xfrac_numeratorfont: } - \def:Npx \xfrac_denominatorfontchange: {\tex_fam:D \xfrac_denominatorfont: } + \cs_set_eq:NN \xfrac_textormath: \text + \cs_set:Npx \xfrac_slashfontchange: {\tex_fam:D \xfrac_slashsymbolfont: } + \cs_set:Npx \xfrac_numeratorfontchange: {\tex_fam:D \xfrac_numeratorfont: } + \cs_set:Npx \xfrac_denominatorfontchange: {\tex_fam:D \xfrac_denominatorfont: } }{ - \let:NN \xfrac_textormath: \mbox - \def:Npn\xfrac_slashfontchange: { + \cs_set_eq:NN \xfrac_textormath: \mbox + \cs_set:Npn\xfrac_slashfontchange: { \fontfamily{\xfrac_slashsymbolfont: }\selectfont} - \def:Npn\xfrac_numeratorfontchange: { + \cs_set:Npn\xfrac_numeratorfontchange: { \fontfamily{\xfrac_numeratorfont: }\selectfont} - \def:Npn\xfrac_denominatorfontchange: { + \cs_set:Npn\xfrac_denominatorfontchange: { \fontfamily{\xfrac_denominatorfont: }\selectfont} } \xfrac_textormath: { @@ -104,16 +104,16 @@ { \dim_compare:nNnTF \l_xfrac_numeratorbotsep_fdim = \c_max_dim { - \def:Npn\xfrac_next: {\raisebox{\box_ht:N\l_xfrac_slash_box + \cs_set:Npn\xfrac_next: {\raisebox{\box_ht:N\l_xfrac_slash_box -\box_dp:N\l_xfrac_slash_box-\height}} }{ - \def:Npn\xfrac_next: {\raisebox{\l_xfrac_numeratorbotsep_fdim }} + \cs_set:Npn\xfrac_next: {\raisebox{\l_xfrac_numeratorbotsep_fdim }} } } { \dim_compare:nNnTF \l_xfrac_numeratorbotsep_fdim = \c_max_dim { - \def:Npn\xfrac_next: { + \cs_set:Npn\xfrac_next: { \raisebox{ \box_ht:N\l_xfrac_slash_box - \l_xfrac_numeratortopsep_fdim - \height @@ -125,7 +125,7 @@ {You~ have~ specified~ both~ numerator-top-sep~ and~ numerator-bot-sep} {I~ will~ pretend~ you~ didn't~ specify~ any~ of ~them} - \def:Npn\xfrac_next: {\raisebox{\box_ht:N\l_xfrac_slash_box + \cs_set:Npn\xfrac_next: {\raisebox{\box_ht:N\l_xfrac_slash_box -\box_dp:N\l_xfrac_slash_box-\height}} } } @@ -220,7 +220,7 @@ \DeclareDocumentCommand \sfrac {o mom}{ \mode_if_math:TF { - \def:Npx \xfrac_next: {mathfam\number\fam} + \cs_set:Npx \xfrac_next: {mathfam\number\fam} \IfExistsInstanceTF{xfrac}{\xfrac_next: } {\UseInstance{xfrac}{\xfrac_next: }} {\UseInstance{xfrac}{mathdefault}} -- cgit v1.2.3