diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/xpackages/xhead/xhead-test.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/xpackages/xhead/xhead-test.tex | 245 |
1 files changed, 245 insertions, 0 deletions
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} |