From 060dcbbabc37c4f145c70b5abe0e4ead74511f23 Mon Sep 17 00:00:00 2001 From: "Achim D. Brucker" Date: Sat, 30 Mar 2019 16:36:25 +0000 Subject: [PATCH] Introduced \isadof* command family. --- .../latex/DOF-CENELEC_50128.sty | 10 +++--- document-generator/latex/DOF-core.sty | 19 ++++++++--- .../latex/DOF-scholarly_paper.sty | 32 +++++++++---------- .../latex/DOF-technical_report.sty | 21 +++++++++--- 4 files changed, 52 insertions(+), 30 deletions(-) diff --git a/document-generator/latex/DOF-CENELEC_50128.sty b/document-generator/latex/DOF-CENELEC_50128.sty index a2a00c4..48ea3db 100644 --- a/document-generator/latex/DOF-CENELEC_50128.sty +++ b/document-generator/latex/DOF-CENELEC_50128.sty @@ -44,33 +44,33 @@ \end{isamarkuptext}% } -\expandafter\newkeycommand\csname isaDof.text.CENELEC_50128.assumption\endcsname% +\newisadof{text.CENELEC_50128.assumption}% [label=,type=,assumption=][1]{% \begin{isamarkuptext}% #1 \end{isamarkuptext}% } -\expandafter\newkeycommand\csname isaDof.text.CENELEC_50128.hypothesis\endcsname% +\newisadof{text.CENELEC_50128.hypothesis}% [label=,type=,assumption=][1]{% \begin{isamarkuptext}% #1 \end{isamarkuptext}% } -\expandafter\newkeycommand\csname isaDof.text.CENELEC_50128.srac\endcsname% +\newisadof{text.CENELEC_50128.srac}% [label=,type=,assumption=][1]{% \begin{isamarkuptext}% #1 \end{isamarkuptext}% } -\expandafter\newkeycommand\csname isaDof.text.CENELEC_50128.ec\endcsname% +\newisadof{text.CENELEC_50128.ec}% [label=,type=,assumption=][1]{% \begin{isamarkuptext}% #1 \end{isamarkuptext}% } -\expandafter\newkeycommand\csname isaDof.text.CENELEC_50128.test_result\endcsname% +\newisadof{text.CENELEC_50128.test_result}% [label=,type=,assumption=][1]{% \begin{isamarkuptext}% #1 diff --git a/document-generator/latex/DOF-core.sty b/document-generator/latex/DOF-core.sty index dc1557b..e40812f 100644 --- a/document-generator/latex/DOF-core.sty +++ b/document-generator/latex/DOF-core.sty @@ -24,14 +24,25 @@ \newcommand{\isadof}{Isabelle/DOF\xspace} -% Generic dispatcher +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% begin: newcommand wrapper +\newcommand\newisadof[1]{\expandafter\newkeycommand\csname isaDof.#1\endcsname}% +\newcommand\renewisadof[1]{\expandafter\renewkeycommand\csname isaDof.#1\endcsname}% +\newcommand\provideisadof[1]{\expandafter\providekeycommand\csname isaDof.#1\endcsname}% +% end: newcommand wrapper +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% begin: generic dispatcher \newkeycommand+[\|]\isaDof[env={UNKNOWN},label=,type={dummyT},args={}][1]{% \csname isaDof.\commandkey{env}.\commandkey{type}\endcsname[label=\commandkey{label},\commandkey{args}]{#1}% } +% end: generic dispatcher +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % begin: text.text -\expandafter\newkeycommand\csname isaDof.text.text\endcsname% +\newisadof{text.text}% [label=,type=% ][1]{% \begin{isamarkuptext}% @@ -44,7 +55,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % begin: figure* \NewEnviron{isamarkupfigure*}[1][]{\isaDof[env={figure},#1]{\BODY}} -\expandafter\newkeycommand\csname isaDof.figure.Isa_COL.figure\endcsname% +\newisadof{figure.Isa_COL.figure}% [label=,type=% ,Isa_COL.figure.relative_width=% ,Isa_COL.figure.placement=% @@ -74,7 +85,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % begin: side_by_side_figure* \NewEnviron{isamarkupside_by_side_figure*}[1][]{\isaDof[env={side_by_side_figure},#1]{\BODY}} -\expandafter\newkeycommand\csname isaDof.side_by_side_figure.Isa_COL.side_by_side_figure\endcsname% +\newisadof{side_by_side_figure.Isa_COL.side_by_side_figure}% [label=,type=% ,Isa_COL.figure.relative_width=% ,Isa_COL.figure.src=% diff --git a/document-generator/latex/DOF-scholarly_paper.sty b/document-generator/latex/DOF-scholarly_paper.sty index 146a677..59fc16f 100644 --- a/document-generator/latex/DOF-scholarly_paper.sty +++ b/document-generator/latex/DOF-scholarly_paper.sty @@ -52,7 +52,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % begin: title* \NewEnviron{isamarkuptitle*}[1][]{\isaDof[env={title},#1]{\BODY}} -\expandafter\newkeycommand\csname isaDof.title.scholarly_paper.title\endcsname% +\newisadof{title.scholarly_paper.title}% [label=,type=% ,keywordlist=% ][1]{% @@ -64,7 +64,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % begin: subtitle* \NewEnviron{isamarkupsubtitle*}[1][]{\isaDof[env={subtitle},#1]{\BODY}} -\expandafter\newkeycommand\csname isaDof.subtitle.scholarly_paper.subtitle\endcsname% +\newisadof{subtitle.scholarly_paper.subtitle}% [label=,type=% ,keywordlist=% ][1]{% @@ -106,7 +106,7 @@ } } -\expandafter\providekeycommand\csname isaDof.text.scholarly_paper.author\endcsname% +\provideisadof{text.scholarly_paper.author}% [label=,type=% ,scholarly_paper.author.email=% ,scholarly_paper.author.affiliation=% @@ -127,7 +127,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % begin: scholarly_paper.abstract \providecommand{\keywords}[1]{\mbox{}\\\medskip\noindent{\textbf{Keywords:}} #1} -\expandafter\newkeycommand\csname isaDof.text.scholarly_paper.abstract\endcsname% +\newisadof{text.scholarly_paper.abstract}% [label=,type=% ,scholarly_paper.abstract.keywordlist=% ][1]{% @@ -145,21 +145,21 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % begin: scholarly_paper.introduction -\expandafter\newkeycommand\csname isaDof.section.scholarly_paper.introduction\endcsname% +\newisadof{section.scholarly_paper.introduction}% [label=,type=% ,scholarly_paper.introduction.main_author=% ,scholarly_paper.introduction.fixme_list=% ][1]{% \isamarkupfalse\isamarkupsection{#1}\label{\commandkey{label}}\isamarkuptrue% } -\expandafter\newkeycommand\csname isaDof.subsection.scholarly_paper.introduction\endcsname% +\newisadof{subsection.scholarly_paper.introduction}% [label=,type=% ,scholarly_paper.introduction.main_author=% ,scholarly_paper.introduction.fixme_list=% ][1]{% \isamarkupfalse\isamarkupsubsection{#1}\label{\commandkey{label}}\isamarkuptrue% } -\expandafter\newkeycommand\csname isaDof.text.scholarly_paper.introduction_elem\endcsname% +\newisadof{text.scholarly_paper.introduction_elem}% [label=,type=% ,scholarly_paper.introduction.main_author=% ,scholarly_paper.introduction.fixme_list=% @@ -168,7 +168,7 @@ #1 \end{isamarkuptext}% } -\expandafter\newkeycommand\csname isaDof.text.scholarly_paper.introduction\endcsname% +\newisadof{text.scholarly_paper.introduction}% [label=,type=% ,scholarly_paper.introduction.main_author=% ,scholarly_paper.introduction.fixme_list=% @@ -182,7 +182,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % begin: scholarly_paper.introduction -\expandafter\newkeycommand\csname isaDof.section.scholarly_paper.text_section\endcsname% +\newisadof{section.scholarly_paper.text_section}% [label=,type=% ,scholarly_paper.text_section.main_author=% ,scholarly_paper.text_section.fixme_list=% @@ -194,14 +194,14 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % begin: scholarly_paper.technical -\expandafter\newkeycommand\csname isaDof.section.scholarly_paper.technical\endcsname% +\newisadof{section.scholarly_paper.technical}% [label=,type=% ,scholarly_paper.text_section.main_author=% ,scholarly_paper.text_section.fixme_list=% ][1]{% \isamarkupfalse\isamarkupsection{#1}\label{\commandkey{label}}\isamarkuptrue% } -\expandafter\newkeycommand\csname isaDof.subsection.scholarly_paper.technical\endcsname% +\newisadof{subsection.scholarly_paper.technical}% [label=,type=% ,scholarly_paper.text_section.main_author=% ,scholarly_paper.text_section.fixme_list=% @@ -213,14 +213,14 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % begin: scholarly_paper.example -\expandafter\newkeycommand\csname isaDof.section.scholarly_paper.example\endcsname% +\newisadof{section.scholarly_paper.example}% [label=,type=% ,scholarly_paper.text_section.main_author=% ,scholarly_paper.text_section.fixme_list=% ][1]{% \isamarkupfalse\isamarkupsection{#1}\label{\commandkey{label}}\isamarkuptrue% } -\expandafter\newkeycommand\csname isaDof.subsection.scholarly_paper.example\endcsname% +\newisadof{subsection.scholarly_paper.example}% [label=,type=% ,scholarly_paper.text_section.main_author=% ,scholarly_paper.text_section.fixme_list=% @@ -232,7 +232,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % begin: scholarly_paper.conclusion -\expandafter\newkeycommand\csname isaDof.section.scholarly_paper.conclusion\endcsname% +\newisadof{section.scholarly_paper.conclusion}% [label=,type=% ,scholarly_paper.text_section.main_author=% ,scholarly_paper.text_section.fixme_list=% @@ -244,7 +244,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % begin: scholarly_paper.conclusion -\expandafter\newkeycommand\csname isaDof.subsection.scholarly_paper.conclusion\endcsname% +\newisadof{subsection.scholarly_paper.conclusion}% [label=,type=% ,scholarly_paper.text_section.main_author=% ,scholarly_paper.text_section.fixme_list=% @@ -255,7 +255,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % begin: scholarly_paper.bibliography -\expandafter\newkeycommand\csname isaDof.section.scholarly_paper.bibliography\endcsname% +\newisadof{section.scholarly_paper.bibliography}% [label=,type=% ,scholarly_paper.text_section.main_author=% ,scholarly_paper.text_section.fixme_list=% diff --git a/document-generator/latex/DOF-technical_report.sty b/document-generator/latex/DOF-technical_report.sty index e89e701..ca5928e 100644 --- a/document-generator/latex/DOF-technical_report.sty +++ b/document-generator/latex/DOF-technical_report.sty @@ -32,7 +32,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % begin: scholarly_paper.introduction -\expandafter\newkeycommand\csname isaDof.chapter.scholarly_paper.introduction\endcsname% +\newisadof{chapter.scholarly_paper.introduction}% [label=,type=% ,scholarly_paper.introduction.main_author=% ,scholarly_paper.introduction.fixme_list=% @@ -44,7 +44,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % begin: scholarly_paper.introduction -\expandafter\newkeycommand\csname isaDof.chapter.scholarly_paper.text_section\endcsname% +\newisadof{chapter.scholarly_paper.text_section}% [label=,type=% ,scholarly_paper.text_section.main_author=% ,scholarly_paper.text_section.fixme_list=% @@ -56,7 +56,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % begin: scholarly_paper.technical -\expandafter\newkeycommand\csname isaDof.chapter.scholarly_paper.technical\endcsname% +\newisadof{chapter.scholarly_paper.technical}% [label=,type=% ,scholarly_paper.text_section.main_author=% ,scholarly_paper.text_section.fixme_list=% @@ -68,7 +68,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % begin: scholarly_paper.example -\expandafter\newkeycommand\csname isaDof.chapter.scholarly_paper.example\endcsname% +\newisadof{chapter.scholarly_paper.example}% [label=,type=% ,scholarly_paper.text_section.main_author=% ,scholarly_paper.text_section.fixme_list=% @@ -80,7 +80,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % begin: scholarly_paper.conclusion -\expandafter\newkeycommand\csname isaDof.chapter.scholarly_paper.conclusion\endcsname% +\newisadof{chapter.scholarly_paper.conclusion}% [label=,type=% ,scholarly_paper.text_section.main_author=% ,scholarly_paper.text_section.fixme_list=% @@ -90,3 +90,14 @@ % end: scholarly_paper.conclusion %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\newisadof{text.technical_report.front_matter}% +[label=,type=% +,scholarly_paper.introduction.main_author=% +,scholarly_paper.introduction.fixme_list=% +][1]{% + \begin{isamarkuptext}% + #1 + \end{isamarkuptext}% +} +% end: scholarly_paper.introduction