diff --git a/source/intro.tex b/source/intro.tex index 57a2c3726b..88f931b14e 100644 --- a/source/intro.tex +++ b/source/intro.tex @@ -106,8 +106,6 @@ are defined where they are used and italicized where they are defined. -\def\definition{\definitionx{\section}}% - \indexdefn{access}% \definition{access}{defns.access} \defncontext{execution-time action} to read or modify the value of an object diff --git a/source/iostreams.tex b/source/iostreams.tex index 4a57c3c3b9..4500d7cb43 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -10010,8 +10010,6 @@ \rSec2[fs.definitions]{Terms and definitions} -\def\definition{\definitionx{\subsubsection}}% - \definition{absolute path}{fs.def.absolute.path} A path that unambiguously identifies the location of a file without reference to an additional starting diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 038bb34360..8d80dc9a46 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -132,8 +132,6 @@ Clause \ref{intro.defs} defines additional terms used elsewhere in this International Standard. \end{note} -\def\definition{\definitionx{\subsection}}% - \definition{arbitrary-positional stream}{defns.arbitrary.stream} \indexdefn{stream!arbitrary-positional}% a stream (described in Clause~\ref{input.output}) that can seek to any integral position within diff --git a/source/macros.tex b/source/macros.tex index ef5883c92d..a519d1bb71 100644 --- a/source/macros.tex +++ b/source/macros.tex @@ -91,12 +91,12 @@ % is equivalent to % \Sec2[temp.arg.type]{Template type arguments} \newcounter{SectionDepthBase} -\newcounter{scratch} +\newcounter{SectionDepth} \def\rSec#1[#2]#3{% -\setcounter{scratch}{#1} -\addtocounter{scratch}{\value{SectionDepthBase}} -\Sec{\arabic{scratch}}[#2]{#3}} +\setcounter{SectionDepth}{#1} +\addtocounter{SectionDepth}{\value{SectionDepthBase}} +\Sec{\arabic{SectionDepth}}[#2]{#3}} %%-------------------------------------------------- % Indexing @@ -519,11 +519,18 @@ %%-------------------------------------------------- %% Definitions section for "Terms and definitions" \newcommand{\nocontentsline}[3]{} -\newcommand{\definitionx}[3]{% -\addxref{#3}% +\newcommand{\definition}[2]{% +\addxref{#2}% \let\oldcontentsline\addcontentsline% \let\addcontentsline\nocontentsline% -#1[#2]{\hfill[#3]}\vspace{-.3\onelineskip}\label{#3} \textbf{#2}\\*% +\ifcase\value{SectionDepth} + \let\s=\section + \or\let\s=\subsection + \or\let\s=\subsubsection + \or\let\s=\paragraph + \or\let\s=\subparagraph + \fi% +\s[#1]{\hfill[#2]}\vspace{-.3\onelineskip}\label{#2} \textbf{#1}\\*% \let\addcontentsline\oldcontentsline% } \newcommand{\defncontext}[1]{\textlangle#1\textrangle} diff --git a/source/regex.tex b/source/regex.tex index dac6c613fc..3e7b386f84 100644 --- a/source/regex.tex +++ b/source/regex.tex @@ -37,8 +37,6 @@ \rSec1[re.def]{Definitions} -\def\definition{\definitionx{\subsection}}% - \pnum The following definitions shall apply to this Clause: