summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-07-23 17:15:15 +0000
committerKarl Berry <karl@freefriends.org>2012-07-23 17:15:15 +0000
commitdadf86ec2d90ed4529037604a8dcea9f660045b8 (patch)
tree819b3708bda1e2a087ebd5fb0f0f55ebe0b4d157 /Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty
parent134349701bddf7cbbacf6030c6b9f9838aff96fa (diff)
l3packages 3990 (17jul12)
git-svn-id: svn://tug.org/texlive/trunk@27109 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty')
-rw-r--r--Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty258
1 files changed, 129 insertions, 129 deletions
diff --git a/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty b/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty
index b9bee5a0762..989c77fde0a 100644
--- a/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty
+++ b/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty
@@ -14,7 +14,7 @@
%% Do not distribute a modified version of this file.
%%
%% File: xfrac.dtx Copyright (C) 2004, 2008-2010 Morten Hoegholm
-%% (C) 2011 The LaTeX3 Project
+%% (C) 2011,2012 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -48,7 +48,7 @@
%% -----------------------------------------------------------------------
%%
\RequirePackage{amstext,graphicx,l3keys2e,textcomp,xparse,xtemplate}
-\GetIdInfo$Id: xfrac.dtx 3465 2012-02-26 15:31:13Z bruno $
+\GetIdInfo$Id: xfrac.dtx 3875 2012-06-30 12:38:05Z joseph $
{L3 Experimental split-level fractions}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -57,42 +57,42 @@
cm-recommended .choice:,
cm-recommended /
false .code:n =
- { \bool_set_true:N \l_xfrac_cm_std_bool },
+ { \bool_set_true:N \l__xfrac_cm_std_bool },
cm-recommended /
true .code:n =
- { \bool_set_false:N \l_xfrac_cm_std_bool },
+ { \bool_set_false:N \l__xfrac_cm_std_bool },
cm-recommended .default:n = { true },
- cm-standard .bool_set:N = \l_xfrac_cm_std_bool
+ cm-standard .bool_set:N = \l__xfrac_cm_std_bool
}
\ProcessKeysOptions { xfrac }
-\box_new:N \l_xfrac_slash_box
-\box_new:N \l_xfrac_tmp_box
-\cs_new:Npn \xfrac_tmp:w { }
-\dim_new:N \l_xfrac_denominator_bot_sep_dim
-\dim_new:N \l_xfrac_numerator_bot_sep_dim
-\dim_new:N \l_xfrac_numerator_top_sep_dim
-\dim_new:N \l_xfrac_slash_left_sep_dim
-\dim_new:N \l_xfrac_slash_right_sep_dim
-\muskip_new:N \l_xfrac_slash_left_muskip
-\muskip_new:N \l_xfrac_slash_right_muskip
-\fp_new:N \l_xfrac_hscale_fp
-\fp_new:N \l_xfrac_scale_factor_fp
-\fp_new:N \l_xfrac_vscale_fp
-\tl_new:N \l_xfrac_denominator_font_tl
-\tl_new:N \l_xfrac_numerator_font_tl
-\tl_new:N \l_xfrac_phantom_tl
-\tl_new:N \l_xfrac_slash_symbol_tl
-\tl_new:N \l_xfrac_slash_symbol_font_tl
-\cs_new_nopar:Npn \xfrac_fontscale:
-\cs_new:Npn \xfrac_math:n #1 { }
-\cs_new_nopar:Npn \xfrac_denominator_font_change: { }
-\cs_new:Npn \xfrac_denominator_format:n #1 { }
-\cs_new_nopar:Npn \xfrac_numerator_font_change: { }
-\cs_new:Npn \xfrac_numerator_format:n #1 { }
-\cs_new_nopar:Npn \xfrac_relscale: { }
-\cs_new_nopar:Npn \xfrac_slash_symbol_font_change: { }
-\cs_new:Npn \xfrac_slash_symbol_format:n #1 { }
-\cs_new:Npn \xfrac_text_or_math:n #1 { }
+\box_new:N \l__xfrac_slash_box
+\box_new:N \l__xfrac_tmp_box
+\cs_new:Npn \__xfrac_tmp:w { }
+\dim_new:N \l__xfrac_denominator_bot_sep_dim
+\dim_new:N \l__xfrac_numerator_bot_sep_dim
+\dim_new:N \l__xfrac_numerator_top_sep_dim
+\dim_new:N \l__xfrac_slash_left_sep_dim
+\dim_new:N \l__xfrac_slash_right_sep_dim
+\muskip_new:N \l__xfrac_slash_left_muskip
+\muskip_new:N \l__xfrac_slash_right_muskip
+\fp_new:N \l__xfrac_hscale_fp
+\fp_new:N \l__xfrac_scale_factor_fp
+\fp_new:N \l__xfrac_vscale_fp
+\tl_new:N \l__xfrac_denominator_font_tl
+\tl_new:N \l__xfrac_numerator_font_tl
+\tl_new:N \l__xfrac_phantom_tl
+\tl_new:N \l__xfrac_slash_symbol_tl
+\tl_new:N \l__xfrac_slash_symbol_font_tl
+\cs_new_nopar:Npn \__xfrac_fontscale:
+\cs_new:Npn \__xfrac_math:n #1 { }
+\cs_new_nopar:Npn \__xfrac_denominator_font_change: { }
+\cs_new:Npn \__xfrac_denominator_format:n #1 { }
+\cs_new_nopar:Npn \__xfrac_numerator_font_change: { }
+\cs_new:Npn \__xfrac_numerator_format:n #1 { }
+\cs_new_nopar:Npn \__xfrac_relscale: { }
+\cs_new_nopar:Npn \__xfrac_slash_symbol_font_change: { }
+\cs_new:Npn \__xfrac_slash_symbol_format:n #1 { }
+\cs_new:Npn \__xfrac_text_or_math:n #1 { }
\DeclareObjectType { xfrac } { 3 }
\DeclareTemplateInterface { xfrac } { text } { 3 }
{
@@ -123,142 +123,142 @@
}
\DeclareTemplateCode { xfrac } { text } { 3 }
{
- denominator-bot-sep = \l_xfrac_denominator_bot_sep_dim ,
- denominator-font = \l_xfrac_denominator_font_tl ,
- denominator-format = \xfrac_denominator_format:n ,
- h-scale = \l_xfrac_hscale_fp ,
+ denominator-bot-sep = \l__xfrac_denominator_bot_sep_dim ,
+ denominator-font = \l__xfrac_denominator_font_tl ,
+ denominator-format = \__xfrac_denominator_format:n ,
+ h-scale = \l__xfrac_hscale_fp ,
math-mode =
{
- false = \cs_set_eq:NN \xfrac_math:n \use:n,
- true = \cs_set_eq:NN \xfrac_math:n \ensuremath
+ false = \cs_set_eq:NN \__xfrac_math:n \use:n,
+ true = \cs_set_eq:NN \__xfrac_math:n \ensuremath
},
- numerator-font = \l_xfrac_numerator_font_tl ,
- numerator-format = \xfrac_numerator_format:n ,
- numerator-bot-sep = \l_xfrac_numerator_bot_sep_dim ,
- numerator-top-sep = \l_xfrac_numerator_top_sep_dim ,
- phantom = \l_xfrac_phantom_tl ,
- scale-factor = \l_xfrac_scale_factor_fp ,
+ numerator-font = \l__xfrac_numerator_font_tl ,
+ numerator-format = \__xfrac_numerator_format:n ,
+ numerator-bot-sep = \l__xfrac_numerator_bot_sep_dim ,
+ numerator-top-sep = \l__xfrac_numerator_top_sep_dim ,
+ phantom = \l__xfrac_phantom_tl ,
+ scale-factor = \l__xfrac_scale_factor_fp ,
scale-relative =
{
false =
- \cs_set_nopar:Npn \xfrac_relscale:
+ \cs_set_nopar:Npn \__xfrac_relscale:
{
- \dim_eval:w
- \box_ht:N \l_xfrac_tmp_box + \box_dp:N \l_xfrac_tmp_box
- \dim_eval_end:
+ \__dim_eval:w
+ \box_ht:N \l__xfrac_tmp_box + \box_dp:N \l__xfrac_tmp_box
+ \__dim_eval_end:
},
true =
- \cs_set_nopar:Npn \xfrac_relscale:
- { \box_ht:N \l_xfrac_slash_box }
+ \cs_set_nopar:Npn \__xfrac_relscale:
+ { \box_ht:N \l__xfrac_slash_box }
},
scaling =
{
- false = \cs_set_eq:NN \xfrac_fontscale: \prg_do_nothing:,
+ false = \cs_set_eq:NN \__xfrac_fontscale: \prg_do_nothing:,
true =
- \cs_set_nopar:Npn \xfrac_fontscale:
+ \cs_set_nopar:Npn \__xfrac_fontscale:
{
\fontsize
- { \fp_use:N \l_xfrac_scale_factor_fp \xfrac_relscale: }
+ { \fp_use:N \l__xfrac_scale_factor_fp \__xfrac_relscale: }
{ \c_zero_dim }
\selectfont
}
},
- slash-left-kern = \l_xfrac_slash_left_sep_dim ,
- slash-left-mkern = \l_xfrac_slash_left_muskip ,
- slash-right-kern = \l_xfrac_slash_right_sep_dim ,
- slash-right-mkern = \l_xfrac_slash_right_muskip ,
- slash-symbol = \l_xfrac_slash_symbol_tl ,
- slash-symbol-font = \l_xfrac_slash_symbol_font_tl ,
- slash-symbol-format = \xfrac_slash_symbol_format:n ,
- v-scale = \l_xfrac_vscale_fp
+ slash-left-kern = \l__xfrac_slash_left_sep_dim ,
+ slash-left-mkern = \l__xfrac_slash_left_muskip ,
+ slash-right-kern = \l__xfrac_slash_right_sep_dim ,
+ slash-right-mkern = \l__xfrac_slash_right_muskip ,
+ slash-symbol = \l__xfrac_slash_symbol_tl ,
+ slash-symbol-font = \l__xfrac_slash_symbol_font_tl ,
+ slash-symbol-format = \__xfrac_slash_symbol_format:n ,
+ v-scale = \l__xfrac_vscale_fp
}
{
\AssignTemplateKeys
\mode_if_math:TF
{
- \cs_set_eq:NN \xfrac_text_or_math:n \text
- \cs_set_nopar:Npx \xfrac_denominator_font_change:
- { \tex_fam:D \l_xfrac_denominator_font_tl }
- \cs_set_nopar:Npx \xfrac_numerator_font_change:
- { \tex_fam:D \l_xfrac_numerator_font_tl }
- \cs_set_nopar:Npx \xfrac_slash_symbol_font_change:
- { \tex_fam:D \l_xfrac_slash_symbol_font_tl }
+ \cs_set_eq:NN \__xfrac_text_or_math:n \text
+ \cs_set_nopar:Npx \__xfrac_denominator_font_change:
+ { \tex_fam:D \l__xfrac_denominator_font_tl }
+ \cs_set_nopar:Npx \__xfrac_numerator_font_change:
+ { \tex_fam:D \l__xfrac_numerator_font_tl }
+ \cs_set_nopar:Npx \__xfrac_slash_symbol_font_change:
+ { \tex_fam:D \l__xfrac_slash_symbol_font_tl }
}
{
- \cs_set_eq:NN \xfrac_text_or_math:n \mbox
- \cs_set_nopar:Npn \xfrac_denominator_font_change:
+ \cs_set_eq:NN \__xfrac_text_or_math:n \mbox
+ \cs_set_nopar:Npn \__xfrac_denominator_font_change:
{
- \fontfamily { \l_xfrac_denominator_font_tl }
+ \fontfamily { \l__xfrac_denominator_font_tl }
\selectfont
}
- \cs_set_nopar:Npn \xfrac_numerator_font_change:
+ \cs_set_nopar:Npn \__xfrac_numerator_font_change:
{
- \fontfamily { \l_xfrac_numerator_font_tl }
+ \fontfamily { \l__xfrac_numerator_font_tl }
\selectfont
}
- \cs_set_nopar:Npn \xfrac_slash_symbol_font_change:
+ \cs_set_nopar:Npn \__xfrac_slash_symbol_font_change:
{
- \fontfamily { \l_xfrac_slash_symbol_font_tl }
+ \fontfamily { \l__xfrac_slash_symbol_font_tl }
\selectfont
}
}
- \xfrac_text_or_math:n
+ \__xfrac_text_or_math:n
{
\m@th
- \hbox_set:Nn \l_xfrac_tmp_box
- { \xfrac_math:n { \vphantom { ( ) } } }
- \hbox_set:Nn \l_xfrac_slash_box
+ \hbox_set:Nn \l__xfrac_tmp_box
+ { \__xfrac_math:n { \vphantom { ( ) } } }
+ \hbox_set:Nn \l__xfrac_slash_box
{
- \xfrac_math:n
+ \__xfrac_math:n
{
- \xfrac_slash_symbol_format:n
+ \__xfrac_slash_symbol_format:n
{
- \xfrac_math:n
+ \__xfrac_math:n
{
- \xfrac_slash_symbol_font_change:
+ \__xfrac_slash_symbol_font_change:
\IfNoValueTF {#2}
- { \l_xfrac_slash_symbol_tl } {#2}
+ { \l__xfrac_slash_symbol_tl } {#2}
}
}
}
}
- \cs_set_nopar:Npn \xfrac_tmp:w
+ \cs_set_nopar:Npn \__xfrac_tmp:w
{
\raisebox
{
- \dim_eval:w
- \box_ht:N \l_xfrac_slash_box
- - \box_dp:N \l_xfrac_slash_box
+ \__dim_eval:w
+ \box_ht:N \l__xfrac_slash_box
+ - \box_dp:N \l__xfrac_slash_box
- \height
- \dim_eval_end:
+ \__dim_eval_end:
}
}
\dim_compare:nNnTF
- { \l_xfrac_numerator_top_sep_dim } = { \c_max_dim }
+ { \l__xfrac_numerator_top_sep_dim } = { \c_max_dim }
{
\dim_compare:nNnF
- { \l_xfrac_numerator_bot_sep_dim } = { \c_max_dim }
+ { \l__xfrac_numerator_bot_sep_dim } = { \c_max_dim }
{
- \cs_set_nopar:Npn \xfrac_tmp:w
+ \cs_set_nopar:Npn \__xfrac_tmp:w
{
\raisebox
- { \dim_use:N \l_xfrac_numerator_bot_sep_dim }
+ { \dim_use:N \l__xfrac_numerator_bot_sep_dim }
}
}
}
{
\dim_compare:nNnTF
- { \l_xfrac_numerator_bot_sep_dim } = { \c_max_dim }
+ { \l__xfrac_numerator_bot_sep_dim } = { \c_max_dim }
{
- \cs_set_nopar:Npn \xfrac_tmp:w
+ \cs_set_nopar:Npn \__xfrac_tmp:w
{
\raisebox
{
- \dim_eval:w
- \box_ht:N \l_xfrac_slash_box
- - \dim_use:N \l_xfrac_numerator_top_sep_dim
+ \__dim_eval:w
+ \box_ht:N \l__xfrac_slash_box
+ - \dim_use:N \l__xfrac_numerator_top_sep_dim
- \height
- \dim_eval_end:
+ \__dim_eval_end:
}
}
}
@@ -267,67 +267,67 @@
{ over-specified-numerator-sep }
}
}
- \xfrac_tmp:w
+ \__xfrac_tmp:w
{
- \xfrac_fontscale:
- \xfrac_numerator_format:n
+ \__xfrac_fontscale:
+ \__xfrac_numerator_format:n
{
\scalebox
- { \fp_use:N \l_xfrac_hscale_fp }
- [ \fp_use:N \l_xfrac_vscale_fp ]
+ { \fp_use:N \l__xfrac_hscale_fp }
+ [ \fp_use:N \l__xfrac_vscale_fp ]
{
- \xfrac_math:n
+ \__xfrac_math:n
{
- \xfrac_numerator_font_change:
+ \__xfrac_numerator_font_change:
{
- \vphantom { \l_xfrac_phantom_tl }
+ \vphantom { \l__xfrac_phantom_tl }
#1
}
}
}
}
}
- \xfrac_math:n
+ \__xfrac_math:n
{ % THIS IS JUST WRONG!
\scan_align_safe_stop:
\mode_if_math:TF
- { \tex_mskip:D \l_xfrac_slash_right_muskip }
- { \tex_hskip:D \l_xfrac_slash_right_sep_dim }
+ { \tex_mskip:D \l__xfrac_slash_right_muskip }
+ { \tex_hskip:D \l__xfrac_slash_right_sep_dim }
}
- \box_use:N \l_xfrac_slash_box
- \xfrac_math:n
+ \box_use:N \l__xfrac_slash_box
+ \__xfrac_math:n
{
\mode_if_math:TF
- { \tex_mskip:D \l_xfrac_slash_left_muskip }
- { \tex_hskip:D \l_xfrac_slash_left_sep_dim }
+ { \tex_mskip:D \l__xfrac_slash_left_muskip }
+ { \tex_hskip:D \l__xfrac_slash_left_sep_dim }
}
\dim_compare:nNnTF
- { \l_xfrac_denominator_bot_sep_dim } = { \c_max_dim }
+ { \l__xfrac_denominator_bot_sep_dim } = { \c_max_dim }
{
- \cs_set_nopar:Npn \xfrac_tmp:w
- { \raisebox { - \box_dp:N \l_xfrac_slash_box } }
+ \cs_set_nopar:Npn \__xfrac_tmp:w
+ { \raisebox { - \box_dp:N \l__xfrac_slash_box } }
}
{
- \cs_set_nopar:Npn \xfrac_tmp:w
+ \cs_set_nopar:Npn \__xfrac_tmp:w
{
\raisebox
- { \dim_use:N \l_xfrac_denominator_bot_sep_dim }
+ { \dim_use:N \l__xfrac_denominator_bot_sep_dim }
}
}
- \xfrac_tmp:w
+ \__xfrac_tmp:w
{
- \xfrac_fontscale:
- \xfrac_denominator_format:n
+ \__xfrac_fontscale:
+ \__xfrac_denominator_format:n
{
\scalebox
- { \fp_use:N \l_xfrac_hscale_fp }
- [ \fp_use:N \l_xfrac_vscale_fp ]
+ { \fp_use:N \l__xfrac_hscale_fp }
+ [ \fp_use:N \l__xfrac_vscale_fp ]
{
- \xfrac_math:n
+ \__xfrac_math:n
{
- \xfrac_denominator_font_change:
+ \__xfrac_denominator_font_change:
{
- \vphantom { \l_xfrac_phantom_tl }
+ \vphantom { \l__xfrac_phantom_tl }
#3
}
}
@@ -384,7 +384,7 @@
slash-left-kern = -0.1 em ,
slash-right-kern = -0.1 em
}
-\bool_if:NF \l_xfrac_cm_std_bool
+\bool_if:NF \l__xfrac_cm_std_bool
{
\DeclareInstance { xfrac } { cmr } { text }
{ slash-symbol-font = ptm }