summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-10-12 00:07:04 +0000
committerKarl Berry <karl@freefriends.org>2010-10-12 00:07:04 +0000
commita8c915878e3e9b15a28df3a92b0c1ac925d6e28e (patch)
treedd35661fdc51376d4d11645e7920a32a0fa1a041
parentf260c3c6b4661850cc6f51f22729f2092d7ebf61 (diff)
xpackages 2072 (10oct10)
git-svn-id: svn://tug.org/texlive/trunk@20058 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/xpackages/xbase/ldcsetup.pdfbin339713 -> 339717 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xpackages/xbase/template-test.tex (renamed from Master/texmf-dist/source/latex/xpackages/xbase/template-test.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/xpackages/xbase/template-test2.tex (renamed from Master/texmf-dist/source/latex/xpackages/xbase/template-test2.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/xpackages/xbase/template.pdfbin498449 -> 498349 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xpackages/xbase/tprestrict-test.tex (renamed from Master/texmf-dist/source/latex/xpackages/xbase/tprestrict-test.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/xpackages/xbase/xparse.pdfbin567604 -> 508436 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xpackages/xbase/xtemplate.pdfbin632798 -> 528320 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xpackages/xhead/xhead-test.tex245
-rw-r--r--Master/texmf-dist/doc/latex/xpackages/xhead/xhead.pdfbin0 -> 464704 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xpackages/xtras/l3keys2e-demo.tex (renamed from Master/texmf-dist/source/latex/xpackages/xtras/l3keys2e-demo.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/xpackages/xtras/l3keys2e.pdfbin390002 -> 327725 bytes
-rw-r--r--Master/texmf-dist/source/latex/xpackages/xbase/template.dtx6
-rw-r--r--Master/texmf-dist/source/latex/xpackages/xbase/xparse.dtx22
-rw-r--r--Master/texmf-dist/source/latex/xpackages/xbase/xtemplate.dtx8
-rw-r--r--Master/texmf-dist/source/latex/xpackages/xhead/xhead.dtx986
-rw-r--r--Master/texmf-dist/source/latex/xpackages/xhead/xhead.ins73
-rw-r--r--Master/texmf-dist/source/latex/xpackages/xtras/l3keys2e.dtx205
-rw-r--r--Master/texmf-dist/tex/latex/xpackages/xbase/template.sty6
-rw-r--r--Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty22
-rw-r--r--Master/texmf-dist/tex/latex/xpackages/xbase/xtemplate.sty8
-rw-r--r--Master/texmf-dist/tex/latex/xpackages/xhead/xhead.sty376
-rw-r--r--Master/texmf-dist/tex/latex/xpackages/xtras/l3keys2e.sty101
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds1
23 files changed, 1858 insertions, 201 deletions
diff --git a/Master/texmf-dist/doc/latex/xpackages/xbase/ldcsetup.pdf b/Master/texmf-dist/doc/latex/xpackages/xbase/ldcsetup.pdf
index 9a0e7bb6588..1f11818baf7 100644
--- a/Master/texmf-dist/doc/latex/xpackages/xbase/ldcsetup.pdf
+++ b/Master/texmf-dist/doc/latex/xpackages/xbase/ldcsetup.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/xpackages/xbase/template-test.tex b/Master/texmf-dist/doc/latex/xpackages/xbase/template-test.tex
index 5684ce7a90f..5684ce7a90f 100644
--- a/Master/texmf-dist/source/latex/xpackages/xbase/template-test.tex
+++ b/Master/texmf-dist/doc/latex/xpackages/xbase/template-test.tex
diff --git a/Master/texmf-dist/source/latex/xpackages/xbase/template-test2.tex b/Master/texmf-dist/doc/latex/xpackages/xbase/template-test2.tex
index 489e9f2304a..489e9f2304a 100644
--- a/Master/texmf-dist/source/latex/xpackages/xbase/template-test2.tex
+++ b/Master/texmf-dist/doc/latex/xpackages/xbase/template-test2.tex
diff --git a/Master/texmf-dist/doc/latex/xpackages/xbase/template.pdf b/Master/texmf-dist/doc/latex/xpackages/xbase/template.pdf
index 3dc2ec63c46..e4f0ad220cc 100644
--- a/Master/texmf-dist/doc/latex/xpackages/xbase/template.pdf
+++ b/Master/texmf-dist/doc/latex/xpackages/xbase/template.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/xpackages/xbase/tprestrict-test.tex b/Master/texmf-dist/doc/latex/xpackages/xbase/tprestrict-test.tex
index d981888d450..d981888d450 100644
--- a/Master/texmf-dist/source/latex/xpackages/xbase/tprestrict-test.tex
+++ b/Master/texmf-dist/doc/latex/xpackages/xbase/tprestrict-test.tex
diff --git a/Master/texmf-dist/doc/latex/xpackages/xbase/xparse.pdf b/Master/texmf-dist/doc/latex/xpackages/xbase/xparse.pdf
index 0666e2e57a9..82f2dedaa3a 100644
--- a/Master/texmf-dist/doc/latex/xpackages/xbase/xparse.pdf
+++ b/Master/texmf-dist/doc/latex/xpackages/xbase/xparse.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/xpackages/xbase/xtemplate.pdf b/Master/texmf-dist/doc/latex/xpackages/xbase/xtemplate.pdf
index ad9cd8b7171..4eafd523e2f 100644
--- a/Master/texmf-dist/doc/latex/xpackages/xbase/xtemplate.pdf
+++ b/Master/texmf-dist/doc/latex/xpackages/xbase/xtemplate.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/xpackages/xhead/xhead-test.tex b/Master/texmf-dist/doc/latex/xpackages/xhead/xhead-test.tex
new file mode 100644
index 00000000000..f845a1f077a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/xpackages/xhead/xhead-test.tex
@@ -0,0 +1,245 @@
+\documentclass[twoside,check-declarations]{article}
+
+\pagestyle{headings}
+\usepackage{xparse,xtemplate}
+
+
+\usepackage{xgalley}
+
+\ExplSyntaxOn
+
+\DeclareTemplateInterface { parshape } { rectangle } { 0 } {
+ forbid-page-break : boolean = false ,
+}
+
+\DeclareTemplateCode { parshape } { rectangle } { 0 }
+ {
+ forbid-page-break = \l_xgalley_parshape_no_break_bool ,
+ }
+ {
+ \AssignTemplateKeys
+ \xgalley_measure_adjust_parshape:
+ }
+
+\DeclareInstance { parshape } { plain } { rectangle } {
+ forbid-page-break = false
+}
+
+\DeclareInstance {measure} {fullwidth} {absolute} {
+ left-margin = 0pt ,
+ right-margin = 0pt
+}
+
+\ExplSyntaxOff
+
+
+\usepackage{xhead}
+
+
+\DeclareDocumentCommand \sectionII {som}
+ { \UseInstance{heading}{sectionII} {#1}{#2}\BooleanFalse\NoValue\BooleanFalse{#3}{} }
+
+\DeclareDocumentCommand \subsectionII {som}
+ { \UseInstance{heading}{subsectionII} {#1}{#2}\BooleanFalse\NoValue\BooleanFalse{#3}{} }
+
+\DeclareDocumentCommand \subsubsectionII {som}
+ { \UseInstance{heading}{subsubsectionII} {#1}{#2}\BooleanFalse\NoValue\BooleanFalse{#3}{} }
+
+
+
+\DeclareInstance {heading} {sectionII} {2e-vertical}
+ {
+ name = section,
+ level = 1,
+ indent = 0pt,
+ above-skip = 3.5ex plus 1ex minus 0.2ex,
+ below-skip = 2.3ex plus 0.2ex,
+ title-decl = \normalfont\Large\bfseries,
+ indent-after = false,
+ }
+\DeclareInstance {heading} {subsectionII} {2e-vertical}
+ {
+ name = subsection,
+ level = 2,
+ indent = 0pt,
+ above-skip = 3.25ex plus 1ex minus 0.2ex,
+ below-skip = 1.5ex plus 0.2ex,
+ title-decl = \normalfont\large\bfseries,
+ indent-after = false,
+ }
+
+\DeclareInstance {heading} {subsubsectionII} {2e-vertical}
+ {
+ name = subsubsection,
+ level = 3,
+ indent = 0pt,
+ above-skip = 3.25ex plus 1ex minus 0.2ex,
+ below-skip = 1.5ex plus 0.2ex,
+ title-decl = \normalfont\normalsize\bfseries,
+ indent-after = false,
+ }
+
+
+\DeclareDocumentCommand \section {D<>{} sososm}
+ { \UseInstance{heading}{section} {#2}{#3}{#4}{#5}{#6}{#7}{#1} }
+
+\DeclareDocumentCommand \subsection {D<>{} sososm}
+ { \UseInstance{heading}{subsection} {#2}{#3}{#4}{#5}{#6}{#7}{#1} }
+
+\DeclareDocumentCommand \subsubsection {D<>{} sososm}
+ { \UseInstance{heading}{subsubsection} {#2}{#3}{#4}{#5}{#6}{#7}{#1} }
+
+
+\DeclareInstance {heading} {section} {3a-vertical}
+ {
+ name = section,
+ level = 1,
+ indent = 0pt,
+ above-skip = 3.5ex plus 1ex minus 0.2ex,
+ below-skip = 2.3ex plus 0.2ex,
+ font = \normalfont\Large\bfseries,
+ indent-after = false,
+ }
+\DeclareInstance {heading} {subsection} {3a-vertical}
+ {
+ name = subsection,
+ level = 2,
+ indent = 0pt,
+ above-skip = 3.25ex plus 1ex minus 0.2ex,
+ below-skip = 1.5ex plus 0.2ex,
+ font = \normalfont\large\bfseries,
+ indent-after = false,
+ }
+
+\DeclareInstance {heading} {subsubsection} {3a-vertical}
+ {
+ name = subsubsection,
+ level = 3,
+ indent = 0pt,
+ above-skip = 3.25ex plus 1ex minus 0.2ex,
+ below-skip = 1.5ex plus 0.2ex,
+ font = \normalfont\normalsize\bfseries,
+ indent-after = false,
+ }
+
+\DeclareInstance {heading} {section} {3b-vertical}
+ {
+ name = section,
+ level = 1,
+ indent = 0pt,
+ above-skip = 3.25ex plus 1ex minus 0.2ex,
+ below-skip = 1.5ex plus 0.2ex,
+ indent-after = false,
+ title-format = \UseTemplate{textblock-2}{hangfrom}
+ {
+ font-1 = \normalfont\Huge\sffamily ,
+ font-2 = \normalfont\Large\bfseries,
+ parshape = plain ,
+ justification = flush-left ,
+ }
+ }
+
+
+\setcounter{secnumdepth}{2}
+
+\begin{document}
+
+
+\tableofcontents
+
+
+\sectionII{2e section test}
+Some text
+
+\subsectionII*{2e subsection test - star}
+Some text
+
+\subsectionII{2e subsection test}
+Some text
+
+\subsectionII{2e subsection test - very long very long very long very long
+ very long very long very long very long very long very long very with some
+ variance in text long very long very long very long very long very long }
+Some text
+
+\subsubsectionII{2e subsubsection test}
+Some text
+
+\subsectionII[2e subsection short]{2e subsection test - optional arg}
+Some text
+
+\newpage
+
+\subsubsectionII*{2e subsubsection test - star}
+Some text
+
+\subsubsectionII[2e subsubsection short]{2e subsubsection test - optional arg}
+Some text
+
+
+\sectionII[2e section short]{2e section test - optional arg}
+Some text
+
+\sectionII*{2e section test - star}
+Some text
+
+\newpage
+
+
+\section{3a section test}
+Some text
+
+\subsection*{3a subsection test - star}
+Some text
+
+\subsection*[subsection star - forced]*{3a subsection test - star - forced}
+Some text
+
+\subsection{3a subsection test}
+Some text
+
+\subsection{3a subsection test - very long very long very long very long
+ very long very long very long very long very long very long very with some
+ variance in text long very long very long very long very long very long }
+Some text
+
+\subsubsection{3a subsubsection test}
+Some text
+
+\subsection[3a subsection short]{3a subsection test - optional arg}
+Some text
+
+\newpage
+
+\subsubsection*{3a subsubsection test - star}
+Some text
+
+\subsubsection*[subsubsection star - forced]*{3a subsubsection test - star - forced}
+Some text
+
+\subsubsection[3a subsubsection short]{3a subsubsection test - optional arg}
+Some text
+
+\section[3a section short]{3a section test - optional arg}
+Some text
+
+\section*{3a section test - star}
+Some text
+
+\section***{3a section test - 3 stars}
+Some text
+
+\section*[][]*{3a section test - 2 stars}
+Some text
+
+\section[3a section short2][3a section run]{3a section test - 2 optional args}
+Some text
+
+\newpage
+
+Some more text
+
+\section<test>{3a section test - angles}
+Some text
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/xpackages/xhead/xhead.pdf b/Master/texmf-dist/doc/latex/xpackages/xhead/xhead.pdf
new file mode 100644
index 00000000000..cb6a3542c77
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/xpackages/xhead/xhead.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/xpackages/xtras/l3keys2e-demo.tex b/Master/texmf-dist/doc/latex/xpackages/xtras/l3keys2e-demo.tex
index a00531e0741..a00531e0741 100644
--- a/Master/texmf-dist/source/latex/xpackages/xtras/l3keys2e-demo.tex
+++ b/Master/texmf-dist/doc/latex/xpackages/xtras/l3keys2e-demo.tex
diff --git a/Master/texmf-dist/doc/latex/xpackages/xtras/l3keys2e.pdf b/Master/texmf-dist/doc/latex/xpackages/xtras/l3keys2e.pdf
index 073d92a3318..f9465cb755e 100644
--- a/Master/texmf-dist/doc/latex/xpackages/xtras/l3keys2e.pdf
+++ b/Master/texmf-dist/doc/latex/xpackages/xtras/l3keys2e.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/xpackages/xbase/template.dtx b/Master/texmf-dist/source/latex/xpackages/xbase/template.dtx
index 376b4929933..c5006a5e3fb 100644
--- a/Master/texmf-dist/source/latex/xpackages/xbase/template.dtx
+++ b/Master/texmf-dist/source/latex/xpackages/xbase/template.dtx
@@ -37,7 +37,7 @@
\RequirePackage{expl3}
%</driver|package>
%\fi
-\GetIdInfo$Id: template.dtx 1670 2009-11-01 22:34:54Z will $
+\GetIdInfo$Id: template.dtx 2063 2010-10-03 08:26:49Z mittelba $
{template}
%\iffalse
%<*driver>
@@ -1290,7 +1290,7 @@
\cs_if_free:cTF{TP@<#1>}
{\undefinedtype\DeclareTemplateType{#1}#3}
{
- \intexpr_compare:nNnF{#3}={\TP_get_arg_count:n{#1}}
+ \int_compare:nNnF{#3}={\TP_get_arg_count:n{#1}}
{ \BadArgCount }
}
% \end{macrocode}
@@ -1308,7 +1308,7 @@
% At this point there should be a test for which catcode regime we are
% in. We just test if spaces are ignored.
% \begin{macrocode}
- %\intexpr_compare:nNnTF{\char_value_catcode:n{`\ }}=\c_nine
+ %\int_compare:nNnTF{\char_value_catcode:n{`\ }}=\c_nine
%\KV_parse_picky_no_space_removal_no_sanitize:n
%\KV_parse_picky_space_removal_no_sanitize:n
\KV@parse{#4}
diff --git a/Master/texmf-dist/source/latex/xpackages/xbase/xparse.dtx b/Master/texmf-dist/source/latex/xpackages/xbase/xparse.dtx
index 564907d4acb..d9cb5bbeb32 100644
--- a/Master/texmf-dist/source/latex/xpackages/xbase/xparse.dtx
+++ b/Master/texmf-dist/source/latex/xpackages/xbase/xparse.dtx
@@ -41,7 +41,7 @@
\RequirePackage{l3names}
%</driver|package>
%\fi
-\GetIdInfo$Id: xparse.dtx 2037 2010-09-20 21:22:45Z joseph $
+\GetIdInfo$Id: xparse.dtx 2063 2010-10-03 08:26:49Z mittelba $
{Generic document command parser}
%\iffalse
%<*driver>
@@ -1099,7 +1099,7 @@
\exp_not:c {
xparse_grab_ #1
\bool_if:NT \l_xparse_long_bool { _long }
- \intexpr_compare:nF {
+ \int_compare:nF {
\l_xparse_mandatory_args_int > \c_zero
} { _trailing }
:w
@@ -1656,7 +1656,7 @@
% input argument.
% \begin{macrocode}
\cs_new:Npn \xparse_add_arg:n #1 {
- \intexpr_compare:nTF { \l_xparse_processor_int = \c_zero } {
+ \int_compare:nTF { \l_xparse_processor_int = \c_zero } {
\tl_put_right:Nn \l_xparse_args_tl { {#1} }
}{
\xparse_if_no_value:nTF {#1} {
@@ -1673,7 +1673,7 @@
\use:c { xparse_processor_ \int_use:N \l_xparse_processor_int :n }
{#1}
\int_decr:N \l_xparse_processor_int
- \intexpr_compare:nTF { \l_xparse_processor_int = \c_zero } {
+ \int_compare:nTF { \l_xparse_processor_int = \c_zero } {
\tl_put_right:Nx \l_xparse_args_tl {
{ \exp_not:V \ProcessedArgument }
}
@@ -2251,7 +2251,7 @@
\xparse_exp_set:cpx { \l_xparse_tmp_tl aux} ##1 \q_xparse ##2 #2 {
\exp_not:c {
\exp_after:wN \token_to_str:N \l_xparse_function_tl
- \intexpr_eval:n { \l_xparse_total_args_int + 1 }
+ \int_eval:n { \l_xparse_total_args_int + 1 }
} ##1 {##2} \exp_not:N \q_xparse
}
\xparse_exp_prepare_function:N
@@ -2273,7 +2273,7 @@
} ##1 \q_xparse ##2## {
\exp_not:c {
\exp_after:wN \token_to_str:N \l_xparse_function_tl
- \intexpr_eval:n { \l_xparse_total_args_int + 1 }
+ \int_eval:n { \l_xparse_total_args_int + 1 }
}
##1 {##2} \exp_not:N \q_xparse
}
@@ -2287,7 +2287,7 @@
} ##1 \q_xparse ##2 {
\exp_not:c {
\exp_after:wN \token_to_str:N \l_xparse_function_tl
- \intexpr_eval:n { \l_xparse_total_args_int + 1 }
+ \int_eval:n { \l_xparse_total_args_int + 1 }
}
##1 {##2} \exp_not:N \q_xparse
}
@@ -2307,7 +2307,7 @@
\cs_new:Npn \xparse_exp_add_type_t:w #1 {
\tl_set:Nx \l_xparse_tmp_tl {
\exp_after:wN \token_to_str:N \l_xparse_function_tl
- \intexpr_eval:n { \l_xparse_total_args_int + 1 }
+ \int_eval:n { \l_xparse_total_args_int + 1 }
}
\xparse_exp_set:cpx {
\exp_after:wN \token_to_str:N \l_xparse_function_tl
@@ -2339,7 +2339,7 @@
} ##1 \q_xparse ##2 #1 {
\exp_not:c {
\exp_after:wN \token_to_str:N \l_xparse_function_tl
- \intexpr_eval:n { \l_xparse_total_args_int + 1 }
+ \int_eval:n { \l_xparse_total_args_int + 1 }
}
##1 {##2} \exp_not:N \q_xparse
}
@@ -2391,7 +2391,7 @@
}
\tl_set:Nn \l_xparse_function_tl {#1}
\xparse_exp_prepare_function:n {#2}
- \intexpr_compare:nTF {
+ \int_compare:nTF {
\l_xparse_total_args_int = \l_xparse_m_args_int
} {
\xparse_exp_declare_cmd_all_m:Nn #1 {#3}
@@ -2420,7 +2420,7 @@
\exp_not:c { \token_to_str:N #1 1 } x \exp_not:N \q_xparse
}
\cs_set_nopar:cpx {
- \token_to_str:N #1 \intexpr_eval:n { \l_xparse_total_args_int + 1 }
+ \token_to_str:N #1 \int_eval:n { \l_xparse_total_args_int + 1 }
} x ##1 \q_xparse {
\exp_not:c { \token_to_str:N #1 } ##1
}
diff --git a/Master/texmf-dist/source/latex/xpackages/xbase/xtemplate.dtx b/Master/texmf-dist/source/latex/xpackages/xbase/xtemplate.dtx
index 297291a3d7f..592e779916e 100644
--- a/Master/texmf-dist/source/latex/xpackages/xbase/xtemplate.dtx
+++ b/Master/texmf-dist/source/latex/xpackages/xbase/xtemplate.dtx
@@ -38,7 +38,7 @@
\RequirePackage{l3names}
%</driver|package>
%\fi
-\GetIdInfo$Id: xtemplate.dtx 2037 2010-09-20 21:22:45Z joseph $
+\GetIdInfo$Id: xtemplate.dtx 2063 2010-10-03 08:26:49Z mittelba $
{Prototype document functions}
%\iffalse
%<*driver>
@@ -1504,7 +1504,7 @@
% \begin{macrocode}
\cs_new:Npn \xtemplate_execute_if_arg_agree:nnT #1#2#3 {
\prop_get:NnN \g_xtemplate_object_type_prop {#1} \l_xtemplate_tmp_tl
- \intexpr_compare:nTF { #2 = \l_xtemplate_tmp_tl }
+ \int_compare:nTF { #2 = \l_xtemplate_tmp_tl }
{#3}
{
\msg_kernel_error:nnxxx { xtemplate }
@@ -1746,8 +1746,8 @@
\cs_new:Npn \xtemplate_declare_object_type:nn #1#2 {
\int_set:Nn \l_xtemplate_tmp_int {#2}
\bool_if:nTF {
- \intexpr_compare_p:n { #2 > \c_nine } ||
- \intexpr_compare_p:n { #2 < \c_zero }
+ \int_compare_p:n { #2 > \c_nine } ||
+ \int_compare_p:n { #2 < \c_zero }
} {
\msg_kernel_error:nnxx { xtemplate } { bad-number-of-arguments }
{#1} { \exp_not:V \l_xtemplate_tmp_int }
diff --git a/Master/texmf-dist/source/latex/xpackages/xhead/xhead.dtx b/Master/texmf-dist/source/latex/xpackages/xhead/xhead.dtx
new file mode 100644
index 00000000000..11f23376a6e
--- /dev/null
+++ b/Master/texmf-dist/source/latex/xpackages/xhead/xhead.dtx
@@ -0,0 +1,986 @@
+% \iffalse
+%% File xhead.dtx (C) Copyright 2010 Frank Mittelbach, 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
+%% license or (at your option) any later version. The latest version
+%% of this license is in the file
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% This file is part of the ``xhead bundle'' (The Work in LPPL)
+%% and all files in that bundle must be distributed together.
+%%
+%% The released version of this bundle is available from CTAN.
+%%
+%% -----------------------------------------------------------------------
+%%
+%% The development version of the bundle can be found at
+%%
+%% http://www.latex-project.org/svnroot/experimental/trunk/
+%%
+%% for those people who are interested.
+%%
+%%%%%%%%%%%
+%% NOTE: %%
+%%%%%%%%%%%
+%%
+%% Snapshots taken from the repository represent work in progress and may
+%% not work or may contain conflicting material! We therefore ask
+%% people _not_ to put them into distributions, archives, etc. without
+%% prior consultation with the LaTeX Project Team.
+%%
+%% -----------------------------------------------------------------------
+%%
+%<*driver|package>
+\RequirePackage{expl3}
+\GetIdInfo$Id: xhead.dtx 1914 2010-05-21 16:18:46Z schoepf $
+ {Templates heading commands}
+%</driver|package>
+%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
+\documentclass{l3doc}
+
+
+% next three definitions are big hacks to run the file
+% without the above packages
+%
+\makeatother
+
+\newcommand\key[1]{\textbf{#1}}
+
+ \begin{document}
+ \DocInput{xhead.dtx}
+ \end{document}
+%</driver>
+% \fi
+%
+% ^^A\CheckSum{343}
+%
+%
+% \title{The \textsf{xhead} package\thanks{This file
+% has version number \fileversion, last
+% revised \filedate.}}
+% \author{FMi}
+% \date{\filedate}
+% \maketitle
+%
+% \tableofcontents
+%
+% \bigskip
+%
+% \begin{abstract}
+% This module contains basic templates generating typical headings for
+% various levels. This is very much work in progress and none of its content
+% should be considered stable. Concepts and implementation are still under
+% development.
+% \end{abstract}
+%
+%
+% \newcommand\NOVALUE{\texttt{\string\NoValue}}
+% \newcommand\EMPTY{\textit{<empty>}}
+% \newcommand\STRING{\textit{<string>}}
+% \newcommand\TRUE{\texttt{true}}
+% \newcommand\FALSE{\texttt{false}}
+% \newcommand\KEYVALS{\textit{<key/value list>}}
+% \newcommand\HASH[1]{\texttt{\##1}}
+%
+% \makeatletter
+% \renewenvironment{TemplateInterfaceDescription}[1]
+% {\subsection{The~object~type~`#1'}%
+% \begingroup
+% \@beginparpenalty\@M
+% \description
+% \def\TemplateArgument##1##2{\item[Arg:~##1 (##2)]}^^A
+% \def\TemplateSemantics{\enddescription\endgroup
+% \subsubsection*{Semantics:}}^^A
+% }
+% {\par\bigskip}
+% \makeatother
+%
+% \section{Introduction}
+%
+%
+% \section{Interfaces}
+%
+% \begin{TemplateInterfaceDescription}{heading}
+%
+%
+% \TemplateArgument{1}{boolean}
+% If \TRUE{} generate an unnumbered heading, otherwise a number is
+% generated up to a certain heading level. If \TRUE{} TOC entries and
+% running headers are suppressed unless explicitly forced by other
+% arguments below.
+%
+% \TemplateArgument{2}
+% {\STRING/\NOVALUE/\EMPTY}
+% Specifies an alternate heading text for the TOC if one is produced. If
+% \NOVALUE{} or \EMPTY{} the TOC receives the the main title text.
+%
+% \TemplateArgument{3}
+% {boolean}
+% If \TRUE{} a TOC entry is forced (i.e., generated even if normally supressed).
+%
+% \TemplateArgument{4}
+% {\STRING/\NOVALUE/\EMPTY}
+% Specifies an alternate heading text for the running header if one is
+% produced. If \NOVALUE{} or \EMPTY{} the running header receives the the
+% main title text.
+%
+% \TemplateArgument{5}
+% {boolean}
+% If \TRUE{} a running header is forced (i.e., generated even if normally
+% supressed).
+%
+% \TemplateArgument{6}
+% {\STRING}
+% The title of the heading in the document. Also used for the TOC entry and
+% running header (if produced) unless overwritten by other arguments.
+%
+% \TemplateArgument{7}
+% {\KEYVALS}
+% Extension argument to receive less use key value pairs to manipulate the
+% heading. Exact syntax and semantics still need to be defined.
+%
+% \TemplateSemantics
+% This template type defines the basic interface for headings both display
+% headings as well as run-in headings.
+%
+% A TOC entry is generated if \HASH{1} is \FALSE{} or \HASH{3} being
+% \TRUE{}. The heading title for the TOC entry is \HASH{6} unless
+% overwritten by a non-empty HASH{2}. Whether or not this TOC entry
+% actually appears in the TOC depends on settings for the TOC
+% generation. (However, if not generated if will obviously not appear.)
+%
+% A running header is generated if \HASH{1} is \FALSE{} or \HASH{5} or
+% \TRUE{}. The heading title for the determined as follows: if \HASH{4} is
+% non-empty it will be used, otherwise if \HASH{2} is non-empty it will be
+% used, otherwise HASH{6} will be used.
+%
+% \HASH{7} will hold additional key/value pairs that define more specific
+% semantics. This isn't implemented yet.
+%
+% The above describes my current thinking about how those arguments should
+% interact. In simpler templates (based on 2e semantics) the arguments
+% \HASH{3} to \HASH{5} and \HASH{7} will get ignored.
+%
+%
+% \end{TemplateInterfaceDescription}
+%
+%
+% \begin{TemplateDescription}{heading}{2e-vertical}
+%
+%
+% \TemplateKey{name}{tokenlist}
+% {Name of the heading. Used to refer to parts of its data structure,
+% e.g., the counter associated with the heading will have this name. Must
+% be set to a suitable string like ``section''}
+% {none}
+%
+% \TemplateKey{level}{integer}
+% {The level of the heading in the hierarchy. Required.}
+% {none}
+%
+% \TemplateKey{break-penalty}{penalty}
+% {Penlty to break in front of the heading unless it is immediately
+% preceeded a higher-level heading in which case breaking is prohibited.}
+% {-300}
+%
+% \TemplateKey{indent}{length}
+% {Indentation of the heading from the left margin.}
+% {0pt}
+%
+% \TemplateKey{above-skip}{skip}
+% {Vertical space above the heading.}
+% {0pt}
+%
+% \TemplateKey{below-skip}{skip}
+% {Vertical space below the heading.}
+% {0pt}
+%
+% \TemplateKey{title-decl}{function 0}
+% {Declarations to format the heading, e.g., font changes.}
+% {\EMPTY}
+%
+% \TemplateKey{number-format}{function 1}
+% {Formatting instruction for the heading number (if present), receiving
+% the heading counter representation as an argument.}
+% {\cs{xhead_default_number_format:n}}
+%
+% \TemplateKey{indent-after}{boolean}
+% {Should the first paragraph after the heading be indented?}
+% {\FALSE}
+%
+% \TemplateSemantics
+%
+% This is, or should be, a reimplementation of the 2e |\@startsection|
+% command for generating vertical headings. |\@startsection| is also able
+% to produce run-in headings, but this is not covered by the current
+% template.
+%
+% \end{TemplateDescription}
+%
+%
+%
+%
+%
+% \StopEventually{}
+%
+% \section{Implementation}
+%
+% \begin{macrocode}
+%<*package>
+\RequirePackage{expl3,xtemplate}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\GetIdInfo$Id: xhead.dtx 1914 2010-05-21 16:18:46Z schoepf $
+ {heading module}
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
+% \end{macrocode}
+%
+%
+% \subsection{The heading object type}
+%
+% Arguments:
+%\begin{verbatim}
+% #1 (boolean) : produce no number
+% #2 (string/\NoValue/empty) : toc-title if different from title
+% #3 (boolean) : force toc entry
+% #4 (string/\NoValue/empty) : mark-title if different from toc-title
+% #5 (Boolean) : force mark entry
+% #6 (string) : title
+% #7 (extra key vals)
+%\end{verbatim}
+%
+% \begin{macrocode}
+\DeclareObjectType {heading} {7}
+% \end{macrocode}
+%
+%
+% \subsection{Interfaces to other components}
+%
+% This section holds code that is (or should be) common between different
+% heading templates, for example, code for passing a title to the TOC system
+% will always use the same TOC interface so it is encapsulated
+% here. Effectively this means that this section should be the only part that
+% needs modification if we update these other components and intorduce new
+% interfaces for them.
+%
+% At the moment everything is set up to use the old 2e interfaces, but this
+% will change over time.
+%
+%
+%
+% \subsubsection{Generating TOC and mark entries}
+%
+%
+% \begin{macro}{\xhead_generate_toc:NNNNN}
+% \begin{macro}{\xhead_generate_toc:NNNNo}
+% This command provides the interface to the TOC system (currently the 2e
+% one). It uses its first two arguments to decide if a TOC entry should be produced
+% and if so generates the entry from the remaining arguments.
+%
+% Arguments:
+%\begin{verbatim}
+% #1 (boolean) : produce no number
+% #2 (boolean) : force toc entry
+% #3 (string) : heading name (\l_xhead_name_tl)
+% #4 (string) : heading number if any (\l_xhead_number_tl)
+% #5 (string) : toc-title (\l_xhead_toc_title_tl)
+%\end{verbatim}
+%
+% \begin{macrocode}
+\cs_new:Npn \xhead_generate_toc:NNNNN #1#2#3#4#5 {
+%<*trace>
+ \typeout{xhead_generate_toc:NNNNN=#1:#2:#3:#4:#5}
+%</trace>
+% \end{macrocode}
+% A TOC entry is produced if the heading number was not suppressed (|!#1|)
+% or it is forced (|#2|).
+% \begin{macrocode}
+ \bool_if:nT
+ { #2 || ! #1 }
+ {
+ \group_begin:
+% \end{macrocode}
+% Guard against use of mark commands in the heading title (from old sources).
+% \begin{macrocode}
+ \cs_set_eq:NN \@mkboth \use_none:nn
+ \cs_set_eq:NN \markboth \use_none:nn
+ \cs_set_eq:NN \markright \use_none:n
+% \end{macrocode}
+% Use the old 2e |\addcontentsline| interface:
+% \begin{macrocode}
+ \addcontentsline{toc}{#3}
+ {
+ \tl_if_empty:NF #4
+ { \protect\numberline{ #4 } }
+ #5
+ }
+ \group_end:
+ }
+}
+% \end{macrocode}
+% In the templates we really want to make sure that the title in the last
+% argument is passed and not a tokenlist in which it is saved. After all,
+% this text will get passed around over long distances. We therefore
+% provide the following variant for use in templates:
+% \begin{macrocode}
+\cs_generate_variant:Nn \xhead_generate_toc:NNNNN {NNNNo}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\xhead_generate_mark:NNNNN}
+% \begin{macro}{\xhead_generate_mark:NNNNo}
+% This command provides the interface to the mark system for running
+% headers(currently the 2e one). It uses its first two arguments to decide
+% if a mark entry should be produced and if so generates the entry from the
+% remaining arguments.
+%
+% Arguments:
+%\begin{verbatim}
+% #1 (boolean) : produce no number
+% #2 (boolean) : force running header entry
+% #3 (string) : heading name (\l_xhead_name_tl)
+% #4 (string) : heading number if any (\l_xhead_number_tl)
+% #5 (string) : mark-title (\l_xhead_mark_title_tl)
+%\end{verbatim}
+%
+% \begin{macrocode}
+\cs_new:Npn \xhead_generate_mark:NNNNN #1#2#3#4#5 {
+%<*trace>
+ \typeout{xhead_generate_mark:NNNNN=#1:#2:#3:#4:#5}
+%</trace>
+% \end{macrocode}
+% A running header entry is produced if the heading number was not
+% suppressed (|!#1|) or it is forced (|#2|).
+% \begin{macrocode}
+ \bool_if:nT
+ { #2 || ! #1 }
+ {
+ \group_begin:
+% \end{macrocode}
+% Guard against use of mark command in heading titles (from old
+% sources)\footnote{This is wrong here, needs thought.}
+% \begin{macrocode}
+ \cs_set_eq:NN \@mkboth \use_none:nn
+% \end{macrocode}
+% Again we use the original 2e interface. |\markright|, etc.\ currently adds
+% the section number so we do not add it here---for now.
+% \begin{macrocode}
+ \use:c {#3 mark} {#5}
+ \group_end:
+ }
+}
+% \end{macrocode}
+% In the templates we really want to make sure that the title in the last
+% argument is passed and not a tokenlist in which it is saved. After all,
+% this text will get passed around over long distances. We therefore
+% provide the following variant for use in templates:
+% \begin{macrocode}
+\cs_generate_variant:Nn \xhead_generate_mark:NNNNN {NNNNo}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\xhead_generate_toc_and_mark:NNNNNNN}
+%
+% This is just putting it all together, may not be worth having.
+%
+% Arguments:
+%\begin{verbatim}
+% #1 (boolean) : produce no number
+% #2 (boolean) : force toc entry
+% #3 (boolean) : force running header entry
+% #4 (string) : heading name (\l_xhead_name_tl)
+% #5 (string) : heading number or empty (\l_xhead_number_tl)
+% #6 (string) : toc-title (\l_xhead_toc_title_tl)
+% #7 (string) : mark-title (\l_xhead_mark_title_tl)
+%\end{verbatim}
+%
+% \begin{macrocode}
+\cs_new:Npn \xhead_generate_toc_and_mark:NNNNNNN #1#2#3#4#5#6#7 {
+ \xhead_generate_toc:NNNNo
+ #1 #2 #4 #5 #6
+ \xhead_generate_mark:NNNNo
+ #1 #3 #4 #5 #7
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \subsubsection{Prepare heading number}
+%
+%
+%
+% \begin{macro}{\xhead_update_prepare_number:N}
+%
+% This command checks if a number should be produced and if so increments
+% the corresponding counter and stores the number in
+% |\l_xhead_number_tl|. Otherwise |\l_xhead_number_tl| will be set to empty
+% to indicate that no number should be displayed.
+%
+% Arguments:
+%\begin{verbatim}
+% #1 (boolean) : produce no number
+%\end{verbatim}
+
+% Assumptions:
+%\begin{verbatim}
+% \l_xhead_name_tl : holds heading name
+% \l_xhead_level_int : holds heading level
+%\end{verbatim}
+%
+% Outputs:
+%\begin{verbatim}
+% \l_xhead_number_tl : holds heading number or returns empty
+%\end{verbatim}
+%
+% \begin{macrocode}
+\cs_new:Npn \xhead_update_prepare_number:N #1 {
+ \bool_if:nTF
+ { #1 || \intexpr_compare_p:n { \l_xhead_level_int > \c@secnumdepth } }
+ { \tl_clear:N \l_xhead_number_tl }
+ {
+ \refstepcounter \l_xhead_name_tl
+ \tl_set:Nx \l_xhead_number_tl { \use:c {the \l_xhead_name_tl} }
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \subsubsection{Prepare indentation after heading}
+%
+% To set the paragraph indentation after a heading we need to interact with
+% the galley mechanism, which at one point will be \texttt{xgalley}. Right
+% now we use the 2e interface.
+%
+% \begin{macro}{\xhead_set_after_indention:N}
+% Here we set the 2e flag depending
+% \begin{macrocode}
+\cs_new:Npn \xhead_set_after_indention:N #1 {
+ \bool_if:NTF #1 \@afterindenttrue \@afterindentfalse
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+%
+% \subsubsection{Evaluating the title arguments}
+%
+% According to the heading object type spec the title text for the toc and
+% running header may differ from the main title in dependence of the
+% arguments passed to the template.
+% The code below implements the documented logic.
+%
+% \begin{macro}{\xhead_set_titles:nnn}
+%
+% Arguments:
+%\begin{verbatim}
+% #1 (string/\NoValue/empty) : toc-title if different from title
+% #2 (string/\NoValue/empty) : mark-title if different from toc-title
+% #3 (string) : title
+%\end{verbatim}
+%
+% \begin{macrocode}
+\cs_new:Npn \xhead_set_titles:nnn #1#2#3 {
+% \end{macrocode}
+% Determine title for toc:
+% If \HASH{1} is \NOVALUE{} or \EMPTY{} use \HASH{3} for the toc-title.
+% Otherwise use \HASH{1}.
+% \begin{macrocode}
+ \IfNoValueTF{#1}
+ { \tl_set:Nn \l_xhead_toc_title_tl {#3} }
+ { \tl_if_empty:nTF {#1}
+ { \tl_set:Nn \l_xhead_toc_title_tl {#3} }
+ { \tl_set:Nn \l_xhead_toc_title_tl {#1} }
+ }
+% \end{macrocode}
+% Determine title for mark: If \HASH{2} is \NOVALUE{} then use whatever was
+% determined for the toc-title as value (i.e., if a special toc-title was
+% used this will be also used for the running header, if not the main title
+% is used). Otherwise, if \HASH{2} is \EMPTY{} use \HASH{3}. Otherwise use
+% \HASH{2} (i.e., a special title was passed for the running header).
+% \begin{macrocode}
+ \IfNoValueTF{#2}
+ { \tl_set_eq:NN \l_xhead_mark_title_tl \l_xhead_toc_title_tl }
+ { \tl_if_empty:nTF {#2}
+ { \tl_set:Nn \l_xhead_mark_title_tl {#3} }
+ { \tl_set:Nn \l_xhead_mark_title_tl {#2} }
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \subsection{Support variables for template code}
+%
+%
+% \begin{macrocode}
+\dim_new:N \l_xhead_indent_dim
+% \end{macrocode}
+%
+%
+%
+% \begin{macrocode}
+\skip_new:N \l_xhead_above_skip
+\skip_new:N \l_xhead_below_skip
+% \end{macrocode}
+%
+%
+%
+% \begin{macrocode}
+\int_new:N \l_xhead_level_int
+\int_new:N \l_xhead_break_penalty_int
+% \end{macrocode}
+%
+% \begin{macrocode}
+\tl_new:N \l_xhead_name_tl
+\tl_new:N \l_xhead_number_tl
+\tl_new:N \l_xhead_toc_title_tl
+\tl_new:N \l_xhead_mark_title_tl
+% \end{macrocode}
+%
+% \begin{macrocode}
+\bool_new:N \l_xhead_indent_after_bool
+
+\cs_new:Npn \xhead_title_decl: {}
+
+\cs_new:Npn \xhead_number_format:n #1 {}
+
+\cs_new:Npn \xhead_default_number_format:n #1 { #1 \quad}
+% \end{macrocode}
+%
+%
+%
+%
+% \subsection{The template \texttt{2e-vertical}}
+%
+% \begin{macrocode}
+\DeclareTemplateInterface {heading} {2e-vertical} {7}
+ {
+ name : tokenlist = ??? ,
+ level : integer = 0 ,
+ break-penalty: integer = -300 ,
+ indent : length = 0pt ,
+ above-skip : skip = 0pt ,
+ below-skip : skip = 0pt ,
+ title-decl : function {0} = ,
+ number-format: function {1} = \xhead_default_number_format:n {#1} ,
+ indent-after : boolean = false ,
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareTemplateCode {heading} {2e-vertical} {7}
+ {
+ name = \l_xhead_name_tl ,
+ level = \l_xhead_level_int ,
+ break-penalty = \l_xhead_break_penalty_int ,
+ indent = \l_xhead_indent_dim ,
+ above-skip = \l_xhead_above_skip ,
+ below-skip = \l_xhead_below_skip ,
+ title-decl = \xhead_title_decl: ,
+ number-format = \xhead_number_format:n ,
+ indent-after = \l_xhead_indent_after_bool ,
+ }
+ {
+ \AssignTemplateKeys
+% \end{macrocode}
+% Determine title for toc and mark using the 2e logic: Do not generate
+% them if the star-form of the heading is used and always use the same text
+% for TOC and mark:
+% \begin{macrocode}
+ \bool_if:NF #1
+ {
+ \IfNoValueTF{#2}
+ { \tl_set:Nn \l_xhead_toc_title_tl {#6} }
+ { \tl_set:Nn \l_xhead_toc_title_tl {#2} }
+ \tl_set_eq:NN \l_xhead_mark_title_tl \l_xhead_toc_title_tl
+ }
+% \end{macrocode}
+% If heading number increment counter and set |\l_xhead_number_tl|
+% \begin{macrocode}
+ \xhead_update_prepare_number:N #1
+% \end{macrocode}
+% Indent after heading if requested (use old mechanism):
+% \begin{macrocode}
+ \xhead_set_after_indention:N \l_xhead_indent_after_bool
+% \end{macrocode}
+% Produce the space above the heading (using old 2e methods):
+% \begin{macrocode}
+ \if@noskipsec \leavevmode \fi
+ \par
+ \if@nobreak
+ \everypar{}
+ \else:
+ \addpenalty \l_xhead_break_penalty_int
+ \addvspace \l_xhead_above_skip
+ \fi:
+% \end{macrocode}
+% Produce the title of the heading (using old 2e methods)
+% \begin{macrocode}
+ \group_begin:
+ \xhead_title_decl:
+ {
+ \@hangfrom{\hskip \l_xhead_indent_dim \scan_stop:
+ \tl_if_empty:NF \l_xhead_number_tl
+ { \xhead_number_format:n \l_xhead_number_tl }
+ }
+ \interlinepenalty \@M #6\@@par
+ }
+ \group_end:
+% \end{macrocode}
+% Generate toc entry and mark if required:
+% \begin{macrocode}
+ \xhead_generate_toc_and_mark:NNNNNNN
+ #1 \BooleanFalse \BooleanFalse % no forcing in 2e
+ \l_xhead_name_tl
+ \l_xhead_number_tl
+ \l_xhead_toc_title_tl
+ \l_xhead_mark_title_tl
+% \end{macrocode}
+% Produce the space below the heading and the handling of following
+% paragraph (using old 2e methods):
+% \begin{macrocode}
+ \par \nobreak
+ \vspace \l_xhead_below_skip
+ \@afterheading
+ \ignorespaces
+ }
+% \end{macrocode}
+%
+%
+%
+%
+% \subsection{The template \texttt{3a-vertical}}
+%
+% Right now this template is more or less equal to \texttt{2e-vertical}
+% except that it supports the extended heading arguments with the exception
+% of \HASH{7}.
+%
+% \begin{macrocode}
+\DeclareTemplateInterface {heading} {3a-vertical} {7}
+ {
+ name : tokenlist = ??? ,
+ level : integer = 0 ,
+ break-penalty : integer = -300 ,
+ indent : length = 0pt ,
+ above-skip : skip = 0pt ,
+ below-skip : skip = 0pt ,
+ format : tokenlist = indent-by-number ,
+ parshape : instance {parshape} = plain ,
+ justification : instance {justification} = flush-left ,
+ font : tokenlist = ,
+ number-format : function {1} = \xhead_default_number_format:n {#1} ,
+ indent-after : boolean = false ,
+ }
+% \end{macrocode}
+%
+
+% \begin{macro}{\l_xhead_title_format_tl}
+%
+% \begin{macrocode}
+\tl_new:N \l_xhead_title_format_tl
+\tl_new:N \l_xhead_title_font_tl
+
+\cs_new:Npn \xhead_title_parshape: {}
+\cs_new:Npn \xhead_title_justification: {}
+
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macrocode}
+\DeclareTemplateCode {heading} {3a-vertical} {7}
+ {
+ name = \l_xhead_name_tl ,
+ level = \l_xhead_level_int ,
+ break-penalty = \l_xhead_break_penalty_int ,
+ indent = \l_xhead_indent_dim ,
+ above-skip = \l_xhead_above_skip ,
+ below-skip = \l_xhead_below_skip ,
+ format = \l_xhead_title_format_tl ,
+ parshape = \xhead_title_parshape: ,
+ justification = \xhead_title_justification: ,
+ font = \l_xhead_title_font_tl ,
+ number-format = \xhead_number_format:n ,
+ indent-after = \l_xhead_indent_after_bool ,
+ }
+ {
+ \AssignTemplateKeys
+% \end{macrocode}
+% Set title text for TOC and mark entry:
+% \begin{macrocode}
+ \xhead_set_titles:nnn {#2} {#4} {#6}
+% \end{macrocode}
+% If heading gets a number, increment counter and set
+% |\l_xhead_number_tl|.
+% \begin{macrocode}
+ \xhead_update_prepare_number:N #1
+% \end{macrocode}
+% Indent after heading if requested (use old mechanism)
+% \begin{macrocode}
+ \xhead_set_after_indention:N \l_xhead_indent_after_bool
+% \end{macrocode}
+%
+% Produce the space above the heading (using old 2e methods)
+%
+% \begin{macrocode}
+ \if@noskipsec \leavevmode \fi
+ \par
+ \if@nobreak
+ \everypar{}
+ \else:
+ \addpenalty \l_xhead_break_penalty_int
+ \addvspace \l_xhead_above_skip
+ \fi:
+% \end{macrocode}
+%
+% Produce the title of the heading
+%
+% \begin{macrocode}
+ \xhead_use_title_format:nn \l_xhead_title_format_tl {#6}
+
+% \end{macrocode}
+% Generate toc entry and mark:
+% \begin{macrocode}
+ \xhead_generate_toc_and_mark:NNNNNNN
+ #1 #3 #5
+ \l_xhead_name_tl
+ \l_xhead_number_tl
+ \l_xhead_toc_title_tl
+ \l_xhead_mark_title_tl
+% \end{macrocode}
+% Produce the space below the heading and the handling of following
+% paragraph (using old 2e methods)
+% \begin{macrocode}
+ \par \nobreak
+ \vspace \l_xhead_below_skip
+ \@afterheading
+ \ignorespaces
+ }
+% \end{macrocode}
+%
+%
+%
+% \begin{macro}{\xhead_use_title_format:nn}
+% Select a formatting command (based on first arg string) and use it to
+% format the title (second arg).
+%
+% The formatting command makes a bunch of
+% assumptions with respect to the variable names used by the templates (it
+% might ignore some of them):
+%\begin{verbatim}
+% \l_xhead_title_font_tl : font declarations for title text
+% \l_xhead_indent_dim : indentation from the left of title
+% \xhead_title_parshape: : parshape instance to use for title
+% \xhead_title_justification: : justification instance to use for title
+% \l_xhead_number_tl : raw title number or empty
+% \xhead_number_format:n : formatting command for title number
+%\end{verbatim}
+% In addition it takes a single mandatory argument holding the title text.
+%
+% \begin{macrocode}
+\cs_new:Npn \xhead_use_title_format:nn #1 {
+ \cs_if_exist:cTF {xhead_format_ #1:n}
+ { \use:c{xhead_format_ #1:n} }
+ { \ERROR xhead format not defined }
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\xhead_format_indent-by-number:n}
+% Implementing vertical version of |\@startsection| \ldots
+% \begin{macrocode}
+\cs_new:cpn {xhead_format_indent-by-number:n} #1 {
+ \group_begin:
+ \l_xhead_title_font_tl
+ \hbox_set:Nn \l_tmpa_box
+ {
+ \tl_if_empty:NF \l_xhead_number_tl
+ { \xhead_number_format:n \l_xhead_number_tl }
+ }
+
+ \UseInstance{measure}{fullwidth}
+ {\l_xhead_indent_dim + \box_wd:N \l_tmpa_box }
+
+ \xhead_title_parshape:
+ \xhead_title_justification:
+ \interlinepenalty \@M
+
+ \noindent \hbox_overlap_left:n { \box_use:N \l_tmpa_box }
+ #1\@@par
+ \group_end:
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\xhead_format_number-above-text:n}
+%
+% \begin{macrocode}
+\cs_new:cpn {xhead_format_number-above-text:n} #1 {
+ \group_begin:
+ \l_xhead_title_font_tl
+ \xhead_title_parshape:
+ \xhead_title_justification:
+ \interlinepenalty \@M
+
+ \tl_if_empty:NF \l_xhead_number_tl
+ {
+ \xhead_number_format:n \l_xhead_number_tl
+ }
+
+ #1\@@par
+ \group_end:
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macrocode}
+
+\input{xtextblock.sty}
+
+
+\DeclareTemplateInterface {heading} {3b-vertical} {7}
+ {
+ name : tokenlist = ??? ,
+ level : integer = 0 ,
+ break-penalty : integer = -300 ,
+ indent : length = 0pt ,
+ above-skip : skip = 0pt ,
+ below-skip : skip = 0pt ,
+ title-format : instance {textblock-2} = heading ,
+ number-format : function {1} = \xhead_default_number_format:n {#1} ,
+ indent-after : boolean = false ,
+ }
+
+\cs_new:Npn \xhead_title_format:nn #1#2 {}
+
+\DeclareTemplateCode {heading} {3b-vertical} {7}
+ {
+ name = \l_xhead_name_tl ,
+ level = \l_xhead_level_int ,
+ break-penalty = \l_xhead_break_penalty_int ,
+ indent = \l_xhead_indent_dim ,
+ above-skip = \l_xhead_above_skip ,
+ below-skip = \l_xhead_below_skip ,
+ title-format = \xhead_title_format:nn ,
+ number-format = \xhead_number_format:n ,
+ indent-after = \l_xhead_indent_after_bool ,
+ }
+ {
+ \AssignTemplateKeys
+
+ \xhead_set_titles:nnn {#2} {#4} {#6}
+
+ \xhead_update_prepare_number:N #1
+
+ \xhead_set_after_indention:N \l_xhead_indent_after_bool
+
+ \if@noskipsec \leavevmode \fi
+ \par
+ \if@nobreak
+ \everypar{}
+ \else:
+ \addpenalty \l_xhead_break_penalty_int
+ \addvspace \l_xhead_above_skip
+ \fi:
+
+ \xhead_title_format:nn \l_xhead_number_tl {#6}
+
+ \xhead_generate_toc_and_mark:NNNNNNN
+ #1 #3 #5
+ \l_xhead_name_tl
+ \l_xhead_number_tl
+ \l_xhead_toc_title_tl
+ \l_xhead_mark_title_tl
+
+ \par \nobreak
+ \vspace \l_xhead_below_skip
+ \@afterheading
+ \ignorespaces
+ }
+
+
+% \end{macrocode}
+%
+% \Finale
+%
+%
+% \begin{macrocode}
+\endinput
+%</package>
+% \end{macrocode}
+%
+% \endinput
+%
+%
+%
+%
+% \begin{TemplateInterfaceDescription}{}
+%
+% \TemplateArgument{1}
+% {}
+%
+% \TemplateSemantics
+%
+% \end{TemplateInterfaceDescription}
+%
+%
+
+
+ - motto/quote text to display alongside the heading title
+ - flag to number heading
+ -label name for cross-reference
+
+%
+% \begin{InstanceDescription}[\textbf{no-page-break-boolean}xx]
+% {pshape}{staggered}{cutout}
+%
+% \InstanceKey{no-page-break-boolean}{true}
+%
+% \InstanceKey{left-side-boolean}{true}
+%
+% \InstanceKey{normal-lines-int}{1}
+%
+% \InstanceKey{parshape-list}{20pt,40pt,60pt}
+%
+% \InstanceSemantics
+% This instance will indent each line by an additional 20pt (up to
+% the fourth line). A possible application would be a heading text
+% (with a maximum number of four lines).
+% This should then perhaps be combined with a special justification
+% instance which does ragged right except for the last line which is
+% set to full measure.
+%
+% \end{InstanceDescription}
+%
+%
+
diff --git a/Master/texmf-dist/source/latex/xpackages/xhead/xhead.ins b/Master/texmf-dist/source/latex/xpackages/xhead/xhead.ins
new file mode 100644
index 00000000000..7d4286021a7
--- /dev/null
+++ b/Master/texmf-dist/source/latex/xpackages/xhead/xhead.ins
@@ -0,0 +1,73 @@
+% \iffalse
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the dtx files in this package when run through
+%% LaTeX or TeX.
+%%
+%% (C) Copyright 2009-2010 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
+%% license or (at your option) any later version. The latest version
+%% of this license is in the file
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% This file is part of the ``xhead bundle'' (The Work in LPPL)
+%% and all files in that bundle must be distributed together.
+%%
+%% The released version of this bundle is available from CTAN.
+%%
+%% -----------------------------------------------------------------------
+%%
+%% The development version of the bundle can be found at
+%%
+%% http://www.latex-project.org/svnroot/experimental/trunk/
+%%
+%% for those people who are interested.
+%%
+%%%%%%%%%%%
+%% NOTE: %%
+%%%%%%%%%%%
+%%
+%% Snapshots taken from the repository represent work in progress and may
+%% not work or may contain conflicting material! We therefore ask
+%% people _not_ to put them into distributions, archives, etc. without
+%% prior consultation with the LaTeX Project Team.
+%%
+%% -----------------------------------------------------------------------
+%%
+%% $Id: xhead.ins 1628 2009-10-25 09:54:34Z mittelba $
+%%
+% \fi
+%
+
+\input docstrip
+\keepsilent
+\askforoverwritefalse
+
+\preamble
+
+(C) Copyright The LaTeX3 Project and any individual authors
+listed elsewhere in this file.
+
+This is a generated file.
+
+This file was generated from file(s) of the xhead bundle.
+-----------------------------------------------------------
+
+This file may only be distributed together with a copy of this bundle.
+You may however distribute the bundle without such generated files.
+
+======================================================================
+
+\endpreamble
+
+
+\generate{%
+ \file{xhead.sty}{\from{xhead.dtx}{package,trace}}
+% \file{xhead-sample.tex}{\from{xhead.dtx}{sample}}
+}
+
+\endbatchfile
+
diff --git a/Master/texmf-dist/source/latex/xpackages/xtras/l3keys2e.dtx b/Master/texmf-dist/source/latex/xpackages/xtras/l3keys2e.dtx
index 43eec9ceff8..576a0161c94 100644
--- a/Master/texmf-dist/source/latex/xpackages/xtras/l3keys2e.dtx
+++ b/Master/texmf-dist/source/latex/xpackages/xtras/l3keys2e.dtx
@@ -77,9 +77,8 @@
%
% As with any key--value input, using key--value pairs as package or
% class options has two parts. The first stage is to define one or
-% more keys. This should be done using the \LaTeX3 module \pkg{l3keys}.
-% For example, an option which simply stores a value would be created
-% using:
+% more keys, using the \cs{keys_define:nn} function. For example, an
+% option which simply stores a value would be created using:
%\begin{verbatim}
% \keys_define:nn { module } {
% option .set:N = \l_module_variable_tl
@@ -89,92 +88,31 @@
% class containing the definition. The second stage is therefore to
% process the current options, searching for applicable keys.
%
-%\begin{function}{\ProcessKeysOptions}
+%\begin{function}{ \ProcessKeysOptions }
% \begin{syntax}
-% "\ProcessKeysOptions" \Arg{module}
+% \cs{ProcessKeysOptions} \Arg{module}
% \end{syntax}
% The \cs{ProcessKeysOptions} function is used to check the current
-% option list against the keys defined for <module>. Global (class)
+% option list against the keys defined for \Arg{module}. Global (class)
% options and local (package) options are checked when this function
% is called in a package. Each option which does match a key name is
% then used to attempt to set the appropriate key using
% \cs{keys_set:nn}. For example, the option defined earlier would be
-% processed by the line
-% \begin{verbatim}
-% \ProcessKeysOptions { module }
-% \end{verbatim}
+% processed by the line
+% \begin{verbatim}
+% \ProcessKeysOptions { module }
+% \end{verbatim}
%\end{function}
%
-%\begin{function}{\ProcessKeysPackageOptions}
+%\begin{function}{ \ProcessKeysPackageOptions }
% \begin{syntax}
-% "\ProcessKeysPackageOptions" \Arg{module}
+% \cs{ProcessKeysPackageOptions} \Arg{module}
% \end{syntax}
% This function works in a similar manner to \cs{ProcessKeysOptions}.
-% When used in a LaTeX2e package, \cs{ProcessKeysPackageOptions}
+% When used in a \LaTeXe\ package, \cs{ProcessKeysPackageOptions}
% will not examine any class options available. In contrast,
% \cs{ProcessKeysOptions} does parse class options (in common with the
-% LaTeX2e kernel function \cs{ProcessOptions}).
-%\end{function}
-%
-%\subsection{Internal functions and variables}
-%
-%\begin{variable}{\keys_latexe_options_clist}
-% Local options and applicable global (class) options are collected up
-% here prior to processing using \cs{keys_set:nn}.
-%\end{variable}
-%
-%\begin{function}{\keys_latexe_options:n}
-% \begin{syntax}
-% "\keys_latexe_options:n" \Arg{module}
-% \end{syntax}
-% Examines current global and local options, comparing them to the
-% keys defined for <module>. Option names which match defined keys are
-% then executed by passing the appropriate data to \cs{keys_set:nn}.
-%\end{function}
-%
-%\begin{function}{\keys_latexe_options_global:n}
-% \begin{syntax}
-% "\keys_latexe_options_global:n" \Arg{module}
-% \end{syntax}
-% Makes appropriate checks on global (class) options, then searches for
-% key matches for <module>.
-%\end{function}
-%
-%\begin{function}{\keys_latexe_options_class:n}
-% \begin{syntax}
-% "\keys_latexe_options_class:n" \Arg{module}
-% \end{syntax}
-% Processes global options when the current file is itself a class,
-% checking the options against keys defined for <module>.
-%\end{function}
-%
-%\begin{function}{\keys_latexe_options_package:n}
-% \begin{syntax}
-% "\keys_latexe_options_package:n" \Arg{module}
-% \end{syntax}
-% Processes global options when the current file is a \LaTeXe\ package,
-% checking the options against keys defined for <module>.
-%\end{function}
-%
-%\begin{function}{\keys_latexe_options_local:}
-% \begin{syntax}
-% "\keys_latexe_options_local:"
-% \end{syntax}
-% Finds local (package) options and adds them to the list to be
-% parsed by \cs{keys_set:nn}.
-%\end{function}
-%
-%\begin{function}{
-% \keys_latexe_remove_equals:n / (EXP) |
-% \keys_latexe_remove_equals:w / (EXP)
-%}
-% \begin{syntax}
-% "\keys_latexe_remove_equals:n" \Arg{option}
-% "\keys_latexe_remove_equals:w" <key> = <value> "\q_stop"
-% \end{syntax}
-% Returns only the key part of a key--value option by removing
-% everything after the first equals sign. It is assumed that, as this
-% will apply in the preamble, equals signs have category code 12.
+% \LaTeXe\ kernel function \cs{ProcessOptions}).
%\end{function}
%
%\end{documentation}
@@ -183,17 +121,17 @@
%
%\subsection{Implementation}
%
-% The usual lead-off, using \pkg{xparse} at the interface level.
+% The usual lead-off.
% \begin{macrocode}
%<*package>
\ProvidesExplPackage
{\filename}{\filedate}{\fileversion}{\filedescription}
-\RequirePackage{xparse}
+\RequirePackage { xparse }
% \end{macrocode}
%
%\begin{macro}{\keys_latexe_options_clist}
-% The module collects all applicable global and local options into a
-% single list before processing them.
+% A single list is used for all options, into which they are collected
+% before processing.
% \begin{macrocode}
\clist_new:N \keys_latexe_options_clist
% \end{macrocode}
@@ -206,34 +144,33 @@
\bool_new:N \_l_keys_process_class_bool
% \end{macrocode}
%\end{macro}
-%
+%
%\begin{macro}{\keys_latexe_options:n}
% The main function calls functions to collect up the global and local
-% options into \cs{keys_latexe_options_clist} before calling the main
-% \pkg{l3keys} module to actually do the processing. So that a suitable
+% options into \cs{keys_latexe_options_clist} before calling the
+% underlying functions to actually do the processing. So that a suitable
% message is produced if the option is unknown, the special
% \texttt{unknown} key is set if it does not already exist for the
% current module.
% \begin{macrocode}
-\cs_new:Npn \keys_latexe_options:n #1 {
+\cs_new_protected:Npn \keys_latexe_options:n #1 {
\clist_clear:N \keys_latexe_options_clist
\keys_latexe_options_global:n {#1}
\keys_latexe_options_local:
- \keys_if_exist:nnF {#1} { unknown } {
- \keys_define:nn {#1} {
- unknown .code:n = {
- \msg_error:nnxx { Option~Processing } { unknown-option }
- { \l_keys_key_tl } { \@currname }
- }
+ \cs_if_exist:cTF { \c_keys_root_tl {#1} / unknown .cmd:n }
+ {
+ \keys_define:nn {#1}
+ {
+ unknown .code:n =
+ {
+ \msg_kernel_error:nnxx { keyvalue } { option-unknown }
+ { \l_keys_key_tl } { \@currname }
+ }
+ }
}
- }
\keys_set:nV {#1} \keys_latexe_options_clist
\AtEndOfPackage { \cs_set_eq:NN \@unprocessedoptions \scan_stop: }
}
-\msg_new:nnn { Option~Processing } { unknown-option } {%
- Unknown~option~`#1'\\%
- for~module~#2.%
-}
% \end{macrocode}
%\end{macro}
%
@@ -243,15 +180,16 @@
% file type. The initial test is needed as \LaTeXe\ allows variables to
% be equal to \cs{scan_stop:}, which is forbidden in \LaTeX3 code.
% \begin{macrocode}
-\cs_new:Npn \keys_latexe_options_global:n #1 {
- \cs_if_eq:NNF \@classoptionslist \scan_stop: {
- \cs_if_eq:NNTF \@currext \@clsextension {
- \keys_latexe_options_class:n {#1}
- }{
- \bool_if:NT \_l_keys_process_class_bool
- { \keys_latexe_options_package:n {#1} }
+\cs_new_protected:Npn \keys_latexe_options_global:n #1 {
+ \cs_if_eq:NNF \@classoptionslist \scan_stop:
+ {
+ \cs_if_eq:NNTF \@currext \@clsextension
+ { \keys_latexe_options_class:n {#1} }
+ {
+ \bool_if:NT \_l_keys_process_class_bool
+ { \keys_latexe_options_package:n {#1} }
+ }
}
- }
}
% \end{macrocode}
%\end{macro}
@@ -262,14 +200,17 @@
% the combined list for processing. On the other hand, unused options
% are stored up in \cs{@unusedoptionlist}.
% \begin{macrocode}
-\cs_new:Npn \keys_latexe_options_class:n #1 {
- \clist_map_inline:Nn \@classoptionslist {
- \keys_if_exist:nnTF {#1} { \keys_latexe_remove_equals:n {##1} } {
- \clist_put_right:Nn \keys_latexe_options_clist {##1}
- }{
- \clist_put_right:Nn \@unusedoptionlist {##1}
+\cs_new_protected:Npn \keys_latexe_options_class:n #1 {
+ \clist_map_inline:Nn \@classoptionslist
+ {
+ \cs_if_exist:cTF
+ {
+ \c_keys_root_tl #1 /
+ \keys_latexe_remove_equals:n {##1} .cmd:n
+ }
+ { \clist_put_right:Nn \keys_latexe_options_clist {##1} }
+ { \clist_put_right:Nn \@unusedoptionlist {##1} }
}
- }
}
% \end{macrocode}
%\end{macro}
@@ -280,13 +221,19 @@
% there is nothing to do if the option is not applicable. Each valid
% option also needs to be removed from \cs{@unusedoptionlist}.
% \begin{macrocode}
-\cs_new:Npn \keys_latexe_options_package:n #1 {
- \clist_map_inline:Nn \@classoptionslist {
- \keys_if_exist:nnT {#1} { \keys_latexe_remove_equals:n {##1} } {
- \clist_put_right:Nn \keys_latexe_options_clist {##1}
- \clist_remove_element:Nn \@unusedoptionlist {##1}
+\cs_new_protected:Npn \keys_latexe_options_package:n #1 {
+ \clist_map_inline:Nn \@classoptionslist
+ {
+ \cs_if_exist:cTF
+ {
+ \c_keys_root_tl #1 /
+ \keys_latexe_remove_equals:n {##1} .cmd:n
+ }
+ {
+ \clist_put_right:Nn \keys_latexe_options_clist {##1}
+ \clist_remove_element:Nn \@unusedoptionlist {##1}
+ }
}
- }
}
% \end{macrocode}
%\end{macro}
@@ -296,13 +243,15 @@
% \LaTeXe\ stores options for each file in a macro which may or may not
% exist, hence the need to use \cs{cs_if_exist:c}.
% \begin{macrocode}
-\cs_new_nopar:Npn \keys_latexe_options_local: {
- \cs_if_eq:NNF \@currext \@clsextension {
- \cs_if_exist:cT { opt@ \@currname . \@currext } {
- \exp_args:NNc \clist_put_right:NV \keys_latexe_options_clist
- { opt@ \@currname . \@currext }
+\cs_new_protected_nopar:Npn \keys_latexe_options_local: {
+ \cs_if_eq:NNF \@currext \@clsextension
+ {
+ \cs_if_exist:cT { opt@ \@currname . \@currext }
+ {
+ \exp_args:NNc \clist_put_right:NV \keys_latexe_options_clist
+ { opt@ \@currname . \@currext }
+ }
}
- }
}
% \end{macrocode}
%\end{macro}
@@ -327,11 +276,11 @@
% contrast to other similar packages, the module name is always required
% here.
% \begin{macrocode}
-\NewDocumentCommand \ProcessKeysOptions { m } {
+\cs_new_protected:Npn \ProcessKeysOptions #1 {
\bool_set_true:N \_l_keys_process_class_bool
\keys_latexe_options:n {#1}
}
-\NewDocumentCommand \ProcessKeysPackageOptions { m } {
+\cs_new_protected:Npn \ProcessKeysPackageOptions #1 {
\bool_set_false:N \_l_keys_process_class_bool
\keys_latexe_options:n {#1}
}
@@ -341,6 +290,16 @@
%\end{macro}
%\end{macro}
%
+% One message to give.
+% \begin{macrocode}
+\msg_kernel_new:nnnn { keyvalue } { option-unknown }
+ { Unknown~option~'#1'~for~package~#2. }
+ {
+ LaTeX~has~been~asked~to~set~an~option~called~'#1'\\
+ but~the~#2~package~has~not~created~an~option~with~this~name.
+ }
+% \end{macrocode}
+%
% \begin{macrocode}
%</package>
% \end{macrocode}
diff --git a/Master/texmf-dist/tex/latex/xpackages/xbase/template.sty b/Master/texmf-dist/tex/latex/xpackages/xbase/template.sty
index 0e900e2323a..c1c11a686a1 100644
--- a/Master/texmf-dist/tex/latex/xpackages/xbase/template.sty
+++ b/Master/texmf-dist/tex/latex/xpackages/xbase/template.sty
@@ -54,7 +54,7 @@
%% -----------------------------------------------------------------------
%%
\RequirePackage{expl3}
-\GetIdInfo$Id: template.dtx 1670 2009-11-01 22:34:54Z will $
+\GetIdInfo$Id: template.dtx 2063 2010-10-03 08:26:49Z mittelba $
{template}
\ProvidesExplPackage
{\filename}{\filedate}{\fileversion}{\filedescription}
@@ -117,7 +117,7 @@
\cs_if_free:cTF{TP@<#1>}
{\undefinedtype\DeclareTemplateType{#1}#3}
{
- \intexpr_compare:nNnF{#3}={\TP_get_arg_count:n{#1}}
+ \int_compare:nNnF{#3}={\TP_get_arg_count:n{#1}}
{ \BadArgCount }
}
\cs_set_eq:NN \KV_elt:nn \TP_templdecl_process_KV:nn
@@ -127,7 +127,7 @@
\cs_set_eq:NN\KV@default@elt\KV_default_elt:n
\tl_set:Nn \l_TP_curr_name_tl {#1/#2}
\toks_clear:N\l_TP_default_assignments_toks
- %\intexpr_compare:nNnTF{\char_value_catcode:n{`\ }}=\c_nine
+ %\int_compare:nNnTF{\char_value_catcode:n{`\ }}=\c_nine
%\KV_parse_picky_no_space_removal_no_sanitize:n
%\KV_parse_picky_space_removal_no_sanitize:n
\KV@parse{#4}
diff --git a/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty b/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty
index 5936b52059b..6af9c3f4570 100644
--- a/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty
+++ b/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty
@@ -57,7 +57,7 @@
%% -----------------------------------------------------------------------
%%
\RequirePackage{l3names}
-\GetIdInfo$Id: xparse.dtx 2037 2010-09-20 21:22:45Z joseph $
+\GetIdInfo$Id: xparse.dtx 2063 2010-10-03 08:26:49Z mittelba $
{Generic document command parser}
\ProvidesExplPackage
{\filename}{\filedate}{\fileversion}{\filedescription}
@@ -96,7 +96,7 @@
\exp_not:c {
xparse_grab_ #1
\bool_if:NT \l_xparse_long_bool { _long }
- \intexpr_compare:nF {
+ \int_compare:nF {
\l_xparse_mandatory_args_int > \c_zero
} { _trailing }
:w
@@ -391,7 +391,7 @@
{ #1 {##1} }
}
\cs_new:Npn \xparse_add_arg:n #1 {
- \intexpr_compare:nTF { \l_xparse_processor_int = \c_zero } {
+ \int_compare:nTF { \l_xparse_processor_int = \c_zero } {
\tl_put_right:Nn \l_xparse_args_tl { {#1} }
}{
\xparse_if_no_value:nTF {#1} {
@@ -408,7 +408,7 @@
\use:c { xparse_processor_ \int_use:N \l_xparse_processor_int :n }
{#1}
\int_decr:N \l_xparse_processor_int
- \intexpr_compare:nTF { \l_xparse_processor_int = \c_zero } {
+ \int_compare:nTF { \l_xparse_processor_int = \c_zero } {
\tl_put_right:Nx \l_xparse_args_tl {
{ \exp_not:V \ProcessedArgument }
}
@@ -757,7 +757,7 @@
\xparse_exp_set:cpx { \l_xparse_tmp_tl aux} ##1 \q_xparse ##2 #2 {
\exp_not:c {
\exp_after:wN \token_to_str:N \l_xparse_function_tl
- \intexpr_eval:n { \l_xparse_total_args_int + 1 }
+ \int_eval:n { \l_xparse_total_args_int + 1 }
} ##1 {##2} \exp_not:N \q_xparse
}
\xparse_exp_prepare_function:N
@@ -769,7 +769,7 @@
} ##1 \q_xparse ##2## {
\exp_not:c {
\exp_after:wN \token_to_str:N \l_xparse_function_tl
- \intexpr_eval:n { \l_xparse_total_args_int + 1 }
+ \int_eval:n { \l_xparse_total_args_int + 1 }
}
##1 {##2} \exp_not:N \q_xparse
}
@@ -783,7 +783,7 @@
} ##1 \q_xparse ##2 {
\exp_not:c {
\exp_after:wN \token_to_str:N \l_xparse_function_tl
- \intexpr_eval:n { \l_xparse_total_args_int + 1 }
+ \int_eval:n { \l_xparse_total_args_int + 1 }
}
##1 {##2} \exp_not:N \q_xparse
}
@@ -792,7 +792,7 @@
\cs_new:Npn \xparse_exp_add_type_t:w #1 {
\tl_set:Nx \l_xparse_tmp_tl {
\exp_after:wN \token_to_str:N \l_xparse_function_tl
- \intexpr_eval:n { \l_xparse_total_args_int + 1 }
+ \int_eval:n { \l_xparse_total_args_int + 1 }
}
\xparse_exp_set:cpx {
\exp_after:wN \token_to_str:N \l_xparse_function_tl
@@ -815,7 +815,7 @@
} ##1 \q_xparse ##2 #1 {
\exp_not:c {
\exp_after:wN \token_to_str:N \l_xparse_function_tl
- \intexpr_eval:n { \l_xparse_total_args_int + 1 }
+ \int_eval:n { \l_xparse_total_args_int + 1 }
}
##1 {##2} \exp_not:N \q_xparse
}
@@ -843,7 +843,7 @@
}
\tl_set:Nn \l_xparse_function_tl {#1}
\xparse_exp_prepare_function:n {#2}
- \intexpr_compare:nTF {
+ \int_compare:nTF {
\l_xparse_total_args_int = \l_xparse_m_args_int
} {
\xparse_exp_declare_cmd_all_m:Nn #1 {#3}
@@ -872,7 +872,7 @@
\exp_not:c { \token_to_str:N #1 1 } x \exp_not:N \q_xparse
}
\cs_set_nopar:cpx {
- \token_to_str:N #1 \intexpr_eval:n { \l_xparse_total_args_int + 1 }
+ \token_to_str:N #1 \int_eval:n { \l_xparse_total_args_int + 1 }
} x ##1 \q_xparse {
\exp_not:c { \token_to_str:N #1 } ##1
}
diff --git a/Master/texmf-dist/tex/latex/xpackages/xbase/xtemplate.sty b/Master/texmf-dist/tex/latex/xpackages/xbase/xtemplate.sty
index c94419b3351..7c6356a2605 100644
--- a/Master/texmf-dist/tex/latex/xpackages/xbase/xtemplate.sty
+++ b/Master/texmf-dist/tex/latex/xpackages/xbase/xtemplate.sty
@@ -54,7 +54,7 @@
%% -----------------------------------------------------------------------
%%
\RequirePackage{l3names}
-\GetIdInfo$Id: xtemplate.dtx 2037 2010-09-20 21:22:45Z joseph $
+\GetIdInfo$Id: xtemplate.dtx 2063 2010-10-03 08:26:49Z mittelba $
{Prototype document functions}
@@ -98,7 +98,7 @@
\tl_new:N \l_xtemplate_tmp_tl
\cs_new:Npn \xtemplate_execute_if_arg_agree:nnT #1#2#3 {
\prop_get:NnN \g_xtemplate_object_type_prop {#1} \l_xtemplate_tmp_tl
- \intexpr_compare:nTF { #2 = \l_xtemplate_tmp_tl }
+ \int_compare:nTF { #2 = \l_xtemplate_tmp_tl }
{#3}
{
\msg_kernel_error:nnxxx { xtemplate }
@@ -234,8 +234,8 @@
\cs_new:Npn \xtemplate_declare_object_type:nn #1#2 {
\int_set:Nn \l_xtemplate_tmp_int {#2}
\bool_if:nTF {
- \intexpr_compare_p:n { #2 > \c_nine } ||
- \intexpr_compare_p:n { #2 < \c_zero }
+ \int_compare_p:n { #2 > \c_nine } ||
+ \int_compare_p:n { #2 < \c_zero }
} {
\msg_kernel_error:nnxx { xtemplate } { bad-number-of-arguments }
{#1} { \exp_not:V \l_xtemplate_tmp_int }
diff --git a/Master/texmf-dist/tex/latex/xpackages/xhead/xhead.sty b/Master/texmf-dist/tex/latex/xpackages/xhead/xhead.sty
new file mode 100644
index 00000000000..76e375199d7
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/xpackages/xhead/xhead.sty
@@ -0,0 +1,376 @@
+%%
+%% This is file `xhead.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xhead.dtx (with options: `package,trace')
+%%
+%% (C) Copyright The LaTeX3 Project and any individual authors
+%% listed elsewhere in this file.
+%%
+%% This is a generated file.
+%%
+%% This file was generated from file(s) of the xhead bundle.
+%% -----------------------------------------------------------
+%%
+%% This file may only be distributed together with a copy of this bundle.
+%% You may however distribute the bundle without such generated files.
+%%
+%% ======================================================================
+%%
+%% File xhead.dtx (C) Copyright 2010 Frank Mittelbach, 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
+%% license or (at your option) any later version. The latest version
+%% of this license is in the file
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% This file is part of the ``xhead bundle'' (The Work in LPPL)
+%% and all files in that bundle must be distributed together.
+%%
+%% The released version of this bundle is available from CTAN.
+%%
+%% -----------------------------------------------------------------------
+%%
+%% The development version of the bundle can be found at
+%%
+%% http://www.latex-project.org/svnroot/experimental/trunk/
+%%
+%% for those people who are interested.
+%%
+%%%%%%%%%%%
+%% NOTE: %%
+%%%%%%%%%%%
+%%
+%% Snapshots taken from the repository represent work in progress and may
+%% not work or may contain conflicting material! We therefore ask
+%% people _not_ to put them into distributions, archives, etc. without
+%% prior consultation with the LaTeX Project Team.
+%%
+%% -----------------------------------------------------------------------
+%%
+\RequirePackage{expl3}
+\GetIdInfo$Id: xhead.dtx 1914 2010-05-21 16:18:46Z schoepf $
+ {Templates heading commands}
+\RequirePackage{expl3,xtemplate}
+\GetIdInfo$Id: xhead.dtx 1914 2010-05-21 16:18:46Z schoepf $
+ {heading module}
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
+\DeclareObjectType {heading} {7}
+\cs_new:Npn \xhead_generate_toc:NNNNN #1#2#3#4#5 {
+ \typeout{xhead_generate_toc:NNNNN=#1:#2:#3:#4:#5}
+ \bool_if:nT
+ { #2 || ! #1 }
+ {
+ \group_begin:
+ \cs_set_eq:NN \@mkboth \use_none:nn
+ \cs_set_eq:NN \markboth \use_none:nn
+ \cs_set_eq:NN \markright \use_none:n
+ \addcontentsline{toc}{#3}
+ {
+ \tl_if_empty:NF #4
+ { \protect\numberline{ #4 } }
+ #5
+ }
+ \group_end:
+ }
+}
+\cs_generate_variant:Nn \xhead_generate_toc:NNNNN {NNNNo}
+\cs_new:Npn \xhead_generate_mark:NNNNN #1#2#3#4#5 {
+ \typeout{xhead_generate_mark:NNNNN=#1:#2:#3:#4:#5}
+ \bool_if:nT
+ { #2 || ! #1 }
+ {
+ \group_begin:
+ \cs_set_eq:NN \@mkboth \use_none:nn
+ \use:c {#3 mark} {#5}
+ \group_end:
+ }
+}
+\cs_generate_variant:Nn \xhead_generate_mark:NNNNN {NNNNo}
+\cs_new:Npn \xhead_generate_toc_and_mark:NNNNNNN #1#2#3#4#5#6#7 {
+ \xhead_generate_toc:NNNNo
+ #1 #2 #4 #5 #6
+ \xhead_generate_mark:NNNNo
+ #1 #3 #4 #5 #7
+}
+
+\cs_new:Npn \xhead_update_prepare_number:N #1 {
+ \bool_if:nTF
+ { #1 || \intexpr_compare_p:n { \l_xhead_level_int > \c@secnumdepth } }
+ { \tl_clear:N \l_xhead_number_tl }
+ {
+ \refstepcounter \l_xhead_name_tl
+ \tl_set:Nx \l_xhead_number_tl { \use:c {the \l_xhead_name_tl} }
+ }
+}
+\cs_new:Npn \xhead_set_after_indention:N #1 {
+ \bool_if:NTF #1 \@afterindenttrue \@afterindentfalse
+}
+\cs_new:Npn \xhead_set_titles:nnn #1#2#3 {
+ \IfNoValueTF{#1}
+ { \tl_set:Nn \l_xhead_toc_title_tl {#3} }
+ { \tl_if_empty:nTF {#1}
+ { \tl_set:Nn \l_xhead_toc_title_tl {#3} }
+ { \tl_set:Nn \l_xhead_toc_title_tl {#1} }
+ }
+ \IfNoValueTF{#2}
+ { \tl_set_eq:NN \l_xhead_mark_title_tl \l_xhead_toc_title_tl }
+ { \tl_if_empty:nTF {#2}
+ { \tl_set:Nn \l_xhead_mark_title_tl {#3} }
+ { \tl_set:Nn \l_xhead_mark_title_tl {#2} }
+ }
+}
+\dim_new:N \l_xhead_indent_dim
+\skip_new:N \l_xhead_above_skip
+\skip_new:N \l_xhead_below_skip
+\int_new:N \l_xhead_level_int
+\int_new:N \l_xhead_break_penalty_int
+\tl_new:N \l_xhead_name_tl
+\tl_new:N \l_xhead_number_tl
+\tl_new:N \l_xhead_toc_title_tl
+\tl_new:N \l_xhead_mark_title_tl
+\bool_new:N \l_xhead_indent_after_bool
+
+\cs_new:Npn \xhead_title_decl: {}
+
+\cs_new:Npn \xhead_number_format:n #1 {}
+
+\cs_new:Npn \xhead_default_number_format:n #1 { #1 \quad}
+\DeclareTemplateInterface {heading} {2e-vertical} {7}
+ {
+ name : tokenlist = ??? ,
+ level : integer = 0 ,
+ break-penalty: integer = -300 ,
+ indent : length = 0pt ,
+ above-skip : skip = 0pt ,
+ below-skip : skip = 0pt ,
+ title-decl : function {0} = ,
+ number-format: function {1} = \xhead_default_number_format:n {#1} ,
+ indent-after : boolean = false ,
+ }
+\DeclareTemplateCode {heading} {2e-vertical} {7}
+ {
+ name = \l_xhead_name_tl ,
+ level = \l_xhead_level_int ,
+ break-penalty = \l_xhead_break_penalty_int ,
+ indent = \l_xhead_indent_dim ,
+ above-skip = \l_xhead_above_skip ,
+ below-skip = \l_xhead_below_skip ,
+ title-decl = \xhead_title_decl: ,
+ number-format = \xhead_number_format:n ,
+ indent-after = \l_xhead_indent_after_bool ,
+ }
+ {
+ \AssignTemplateKeys
+ \bool_if:NF #1
+ {
+ \IfNoValueTF{#2}
+ { \tl_set:Nn \l_xhead_toc_title_tl {#6} }
+ { \tl_set:Nn \l_xhead_toc_title_tl {#2} }
+ \tl_set_eq:NN \l_xhead_mark_title_tl \l_xhead_toc_title_tl
+ }
+ \xhead_update_prepare_number:N #1
+ \xhead_set_after_indention:N \l_xhead_indent_after_bool
+ \if@noskipsec \leavevmode \fi
+ \par
+ \if@nobreak
+ \everypar{}
+ \else:
+ \addpenalty \l_xhead_break_penalty_int
+ \addvspace \l_xhead_above_skip
+ \fi:
+ \group_begin:
+ \xhead_title_decl:
+ {
+ \@hangfrom{\hskip \l_xhead_indent_dim \scan_stop:
+ \tl_if_empty:NF \l_xhead_number_tl
+ { \xhead_number_format:n \l_xhead_number_tl }
+ }
+ \interlinepenalty \@M #6\@@par
+ }
+ \group_end:
+ \xhead_generate_toc_and_mark:NNNNNNN
+ #1 \BooleanFalse \BooleanFalse % no forcing in 2e
+ \l_xhead_name_tl
+ \l_xhead_number_tl
+ \l_xhead_toc_title_tl
+ \l_xhead_mark_title_tl
+ \par \nobreak
+ \vspace \l_xhead_below_skip
+ \@afterheading
+ \ignorespaces
+ }
+\DeclareTemplateInterface {heading} {3a-vertical} {7}
+ {
+ name : tokenlist = ??? ,
+ level : integer = 0 ,
+ break-penalty : integer = -300 ,
+ indent : length = 0pt ,
+ above-skip : skip = 0pt ,
+ below-skip : skip = 0pt ,
+ format : tokenlist = indent-by-number ,
+ parshape : instance {parshape} = plain ,
+ justification : instance {justification} = flush-left ,
+ font : tokenlist = ,
+ number-format : function {1} = \xhead_default_number_format:n {#1} ,
+ indent-after : boolean = false ,
+ }
+
+\tl_new:N \l_xhead_title_format_tl
+\tl_new:N \l_xhead_title_font_tl
+
+\cs_new:Npn \xhead_title_parshape: {}
+\cs_new:Npn \xhead_title_justification: {}
+
+\DeclareTemplateCode {heading} {3a-vertical} {7}
+ {
+ name = \l_xhead_name_tl ,
+ level = \l_xhead_level_int ,
+ break-penalty = \l_xhead_break_penalty_int ,
+ indent = \l_xhead_indent_dim ,
+ above-skip = \l_xhead_above_skip ,
+ below-skip = \l_xhead_below_skip ,
+ format = \l_xhead_title_format_tl ,
+ parshape = \xhead_title_parshape: ,
+ justification = \xhead_title_justification: ,
+ font = \l_xhead_title_font_tl ,
+ number-format = \xhead_number_format:n ,
+ indent-after = \l_xhead_indent_after_bool ,
+ }
+ {
+ \AssignTemplateKeys
+ \xhead_set_titles:nnn {#2} {#4} {#6}
+ \xhead_update_prepare_number:N #1
+ \xhead_set_after_indention:N \l_xhead_indent_after_bool
+ \if@noskipsec \leavevmode \fi
+ \par
+ \if@nobreak
+ \everypar{}
+ \else:
+ \addpenalty \l_xhead_break_penalty_int
+ \addvspace \l_xhead_above_skip
+ \fi:
+ \xhead_use_title_format:nn \l_xhead_title_format_tl {#6}
+
+ \xhead_generate_toc_and_mark:NNNNNNN
+ #1 #3 #5
+ \l_xhead_name_tl
+ \l_xhead_number_tl
+ \l_xhead_toc_title_tl
+ \l_xhead_mark_title_tl
+ \par \nobreak
+ \vspace \l_xhead_below_skip
+ \@afterheading
+ \ignorespaces
+ }
+\cs_new:Npn \xhead_use_title_format:nn #1 {
+ \cs_if_exist:cTF {xhead_format_ #1:n}
+ { \use:c{xhead_format_ #1:n} }
+ { \ERROR xhead format not defined }
+}
+\cs_new:cpn {xhead_format_indent-by-number:n} #1 {
+ \group_begin:
+ \l_xhead_title_font_tl
+ \hbox_set:Nn \l_tmpa_box
+ {
+ \tl_if_empty:NF \l_xhead_number_tl
+ { \xhead_number_format:n \l_xhead_number_tl }
+ }
+
+ \UseInstance{measure}{fullwidth}
+ {\l_xhead_indent_dim + \box_wd:N \l_tmpa_box }
+
+ \xhead_title_parshape:
+ \xhead_title_justification:
+ \interlinepenalty \@M
+
+ \noindent \hbox_overlap_left:n { \box_use:N \l_tmpa_box }
+ #1\@@par
+ \group_end:
+}
+\cs_new:cpn {xhead_format_number-above-text:n} #1 {
+ \group_begin:
+ \l_xhead_title_font_tl
+ \xhead_title_parshape:
+ \xhead_title_justification:
+ \interlinepenalty \@M
+
+ \tl_if_empty:NF \l_xhead_number_tl
+ {
+ \xhead_number_format:n \l_xhead_number_tl
+ }
+
+ #1\@@par
+ \group_end:
+}
+
+\input{xtextblock.sty}
+
+\DeclareTemplateInterface {heading} {3b-vertical} {7}
+ {
+ name : tokenlist = ??? ,
+ level : integer = 0 ,
+ break-penalty : integer = -300 ,
+ indent : length = 0pt ,
+ above-skip : skip = 0pt ,
+ below-skip : skip = 0pt ,
+ title-format : instance {textblock-2} = heading ,
+ number-format : function {1} = \xhead_default_number_format:n {#1} ,
+ indent-after : boolean = false ,
+ }
+
+\cs_new:Npn \xhead_title_format:nn #1#2 {}
+
+\DeclareTemplateCode {heading} {3b-vertical} {7}
+ {
+ name = \l_xhead_name_tl ,
+ level = \l_xhead_level_int ,
+ break-penalty = \l_xhead_break_penalty_int ,
+ indent = \l_xhead_indent_dim ,
+ above-skip = \l_xhead_above_skip ,
+ below-skip = \l_xhead_below_skip ,
+ title-format = \xhead_title_format:nn ,
+ number-format = \xhead_number_format:n ,
+ indent-after = \l_xhead_indent_after_bool ,
+ }
+ {
+ \AssignTemplateKeys
+
+ \xhead_set_titles:nnn {#2} {#4} {#6}
+
+ \xhead_update_prepare_number:N #1
+
+ \xhead_set_after_indention:N \l_xhead_indent_after_bool
+
+ \if@noskipsec \leavevmode \fi
+ \par
+ \if@nobreak
+ \everypar{}
+ \else:
+ \addpenalty \l_xhead_break_penalty_int
+ \addvspace \l_xhead_above_skip
+ \fi:
+
+ \xhead_title_format:nn \l_xhead_number_tl {#6}
+
+ \xhead_generate_toc_and_mark:NNNNNNN
+ #1 #3 #5
+ \l_xhead_name_tl
+ \l_xhead_number_tl
+ \l_xhead_toc_title_tl
+ \l_xhead_mark_title_tl
+
+ \par \nobreak
+ \vspace \l_xhead_below_skip
+ \@afterheading
+ \ignorespaces
+ }
+
+\endinput
+%%
+%% End of file `xhead.sty'.
diff --git a/Master/texmf-dist/tex/latex/xpackages/xtras/l3keys2e.sty b/Master/texmf-dist/tex/latex/xpackages/xtras/l3keys2e.sty
index bae23bd05fd..d5009a13cba 100644
--- a/Master/texmf-dist/tex/latex/xpackages/xtras/l3keys2e.sty
+++ b/Master/texmf-dist/tex/latex/xpackages/xtras/l3keys2e.sty
@@ -49,77 +49,94 @@
{Parsing LaTeX3 keyvals as LaTeX2e package options}
\ProvidesExplPackage
{\filename}{\filedate}{\fileversion}{\filedescription}
-\RequirePackage{xparse}
+\RequirePackage { xparse }
\clist_new:N \keys_latexe_options_clist
\bool_new:N \_l_keys_process_class_bool
-\cs_new:Npn \keys_latexe_options:n #1 {
+\cs_new_protected:Npn \keys_latexe_options:n #1 {
\clist_clear:N \keys_latexe_options_clist
\keys_latexe_options_global:n {#1}
\keys_latexe_options_local:
- \keys_if_exist:nnF {#1} { unknown } {
- \keys_define:nn {#1} {
- unknown .code:n = {
- \msg_error:nnxx { Option~Processing } { unknown-option }
- { \l_keys_key_tl } { \@currname }
- }
+ \cs_if_exist:cTF { \c_keys_root_tl {#1} / unknown .cmd:n }
+ {
+ \keys_define:nn {#1}
+ {
+ unknown .code:n =
+ {
+ \msg_kernel_error:nnxx { keyvalue } { option-unknown }
+ { \l_keys_key_tl } { \@currname }
+ }
+ }
}
- }
\keys_set:nV {#1} \keys_latexe_options_clist
\AtEndOfPackage { \cs_set_eq:NN \@unprocessedoptions \scan_stop: }
}
-\msg_new:nnn { Option~Processing } { unknown-option } {%
- Unknown~option~`#1'\\%
- for~module~#2.%
-}
-\cs_new:Npn \keys_latexe_options_global:n #1 {
- \cs_if_eq:NNF \@classoptionslist \scan_stop: {
- \cs_if_eq:NNTF \@currext \@clsextension {
- \keys_latexe_options_class:n {#1}
- }{
- \bool_if:NT \_l_keys_process_class_bool
- { \keys_latexe_options_package:n {#1} }
+\cs_new_protected:Npn \keys_latexe_options_global:n #1 {
+ \cs_if_eq:NNF \@classoptionslist \scan_stop:
+ {
+ \cs_if_eq:NNTF \@currext \@clsextension
+ { \keys_latexe_options_class:n {#1} }
+ {
+ \bool_if:NT \_l_keys_process_class_bool
+ { \keys_latexe_options_package:n {#1} }
+ }
}
- }
}
-\cs_new:Npn \keys_latexe_options_class:n #1 {
- \clist_map_inline:Nn \@classoptionslist {
- \keys_if_exist:nnTF {#1} { \keys_latexe_remove_equals:n {##1} } {
- \clist_put_right:Nn \keys_latexe_options_clist {##1}
- }{
- \clist_put_right:Nn \@unusedoptionlist {##1}
+\cs_new_protected:Npn \keys_latexe_options_class:n #1 {
+ \clist_map_inline:Nn \@classoptionslist
+ {
+ \cs_if_exist:cTF
+ {
+ \c_keys_root_tl #1 /
+ \keys_latexe_remove_equals:n {##1} .cmd:n
+ }
+ { \clist_put_right:Nn \keys_latexe_options_clist {##1} }
+ { \clist_put_right:Nn \@unusedoptionlist {##1} }
}
- }
}
-\cs_new:Npn \keys_latexe_options_package:n #1 {
- \clist_map_inline:Nn \@classoptionslist {
- \keys_if_exist:nnT {#1} { \keys_latexe_remove_equals:n {##1} } {
- \clist_put_right:Nn \keys_latexe_options_clist {##1}
- \clist_remove_element:Nn \@unusedoptionlist {##1}
+\cs_new_protected:Npn \keys_latexe_options_package:n #1 {
+ \clist_map_inline:Nn \@classoptionslist
+ {
+ \cs_if_exist:cTF
+ {
+ \c_keys_root_tl #1 /
+ \keys_latexe_remove_equals:n {##1} .cmd:n
+ }
+ {
+ \clist_put_right:Nn \keys_latexe_options_clist {##1}
+ \clist_remove_element:Nn \@unusedoptionlist {##1}
+ }
}
- }
}
-\cs_new_nopar:Npn \keys_latexe_options_local: {
- \cs_if_eq:NNF \@currext \@clsextension {
- \cs_if_exist:cT { opt@ \@currname . \@currext } {
- \exp_args:NNc \clist_put_right:NV \keys_latexe_options_clist
- { opt@ \@currname . \@currext }
+\cs_new_protected_nopar:Npn \keys_latexe_options_local: {
+ \cs_if_eq:NNF \@currext \@clsextension
+ {
+ \cs_if_exist:cT { opt@ \@currname . \@currext }
+ {
+ \exp_args:NNc \clist_put_right:NV \keys_latexe_options_clist
+ { opt@ \@currname . \@currext }
+ }
}
- }
}
\cs_new:Npn \keys_latexe_remove_equals:n #1 {
\keys_latexe_remove_equals:w #1 = \q_stop
}
\cs_new:Npn \keys_latexe_remove_equals:w #1 = #2 \q_stop {#1}
-\NewDocumentCommand \ProcessKeysOptions { m } {
+\cs_new_protected:Npn \ProcessKeysOptions #1 {
\bool_set_true:N \_l_keys_process_class_bool
\keys_latexe_options:n {#1}
}
-\NewDocumentCommand \ProcessKeysPackageOptions { m } {
+\cs_new_protected:Npn \ProcessKeysPackageOptions #1 {
\bool_set_false:N \_l_keys_process_class_bool
\keys_latexe_options:n {#1}
}
\@onlypreamble \ProcessKeysOptions
\@onlypreamble \ProcessKeysPackageOptions
+\msg_kernel_new:nnnn { keyvalue } { option-unknown }
+ { Unknown~option~'#1'~for~package~#2. }
+ {
+ LaTeX~has~been~asked~to~set~an~option~called~'#1'\\
+ but~the~#2~package~has~not~created~an~option~with~this~name.
+ }
\endinput
%%
%% End of file `l3keys2e.sty'.
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index 352aacfd1a3..480a04e972a 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -731,6 +731,7 @@ $Master = "$mydir/../..";
'xypic', "&MAKExypic",
'yi4latex', "die 'skipping, nosell license'",
'yplan', "&MAKEnosymlinks",
+ 'yt4pdf', "die 'skipping, per author (dps) request'",
'zefonts', "&MAKEflatten",
'zhmetrics', "&MAKEcopy",
'zwgetfdate', "&MAKEcopy",