Skip to content

Commit 59ca44a

Browse files
Eeliszygoloid
authored andcommitted
Remove need to redefine \definition.
1 parent a2a172f commit 59ca44a

File tree

5 files changed

+14
-15
lines changed

5 files changed

+14
-15
lines changed

source/intro.tex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@
9999
are defined where they are used and italicized where they are
100100
defined.
101101

102-
\def\definition{\definitionx{\section}}%
103-
104102
\indexdefn{access}%
105103
\definition{access}{defns.access}
106104
\defncontext{execution-time action} to read or modify the value of an object

source/iostreams.tex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10009,8 +10009,6 @@
1000910009

1001010010
\rSec2[fs.definitions]{Terms and definitions}
1001110011

10012-
\def\definition{\definitionx{\subsubsection}}%
10013-
1001410012
\definition{absolute path}{fs.def.absolute.path}
1001510013
A path that unambiguously
1001610014
identifies the location of a file without reference to an additional starting

source/lib-intro.tex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,6 @@
132132
Clause \ref{intro.defs} defines additional terms used elsewhere in this International Standard.
133133
\end{note}
134134

135-
\def\definition{\definitionx{\subsection}}%
136-
137135
\definition{arbitrary-positional stream}{defns.arbitrary.stream}
138136
\indexdefn{stream!arbitrary-positional}%
139137
a stream (described in Clause~\ref{input.output}) that can seek to any integral position within

source/macros.tex

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@
9191
% is equivalent to
9292
% \Sec2[temp.arg.type]{Template type arguments}
9393
\newcounter{SectionDepthBase}
94-
\newcounter{scratch}
94+
\newcounter{SectionDepth}
9595

9696
\def\rSec#1[#2]#3{%
97-
\setcounter{scratch}{#1}
98-
\addtocounter{scratch}{\value{SectionDepthBase}}
99-
\Sec{\arabic{scratch}}[#2]{#3}}
97+
\setcounter{SectionDepth}{#1}
98+
\addtocounter{SectionDepth}{\value{SectionDepthBase}}
99+
\Sec{\arabic{SectionDepth}}[#2]{#3}}
100100

101101
%%--------------------------------------------------
102102
% Indexing
@@ -520,11 +520,18 @@
520520
%%--------------------------------------------------
521521
%% Definitions section for "Terms and definitions"
522522
\newcommand{\nocontentsline}[3]{}
523-
\newcommand{\definitionx}[3]{%
524-
\addxref{#3}%
523+
\newcommand{\definition}[2]{%
524+
\addxref{#2}%
525525
\let\oldcontentsline\addcontentsline%
526526
\let\addcontentsline\nocontentsline%
527-
#1[#2]{\hfill[#3]}\vspace{-.3\onelineskip}\label{#3} \textbf{#2}\\*%
527+
\ifcase\value{SectionDepth}
528+
\let\s=\section
529+
\or\let\s=\subsection
530+
\or\let\s=\subsubsection
531+
\or\let\s=\paragraph
532+
\or\let\s=\subparagraph
533+
\fi%
534+
\s[#1]{\hfill[#2]}\vspace{-.3\onelineskip}\label{#2} \textbf{#1}\\*%
528535
\let\addcontentsline\oldcontentsline%
529536
}
530537
\newcommand{\defncontext}[1]{\textlangle#1\textrangle}

source/regex.tex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@
3737

3838
\rSec1[re.def]{Definitions}
3939

40-
\def\definition{\definitionx{\subsection}}%
41-
4240
\pnum
4341
The following definitions shall apply to this Clause:
4442

0 commit comments

Comments
 (0)