Skip to content

Commit a9f621e

Browse files
committed
Remove need to redefine \definition.
1 parent 4cdb5b8 commit a9f621e

File tree

5 files changed

+13
-15
lines changed

5 files changed

+13
-15
lines changed

source/intro.tex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@
106106
are defined where they are used and italicized where they are
107107
defined.
108108

109-
\def\definition{\definitionx{\section}}%
110-
111109
\indexdefn{access}%
112110
\definition{access}{defns.access}
113111
\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
@@ -10010,8 +10010,6 @@
1001010010

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

10013-
\def\definition{\definitionx{\subsubsection}}%
10014-
1001510013
\definition{absolute path}{fs.def.absolute.path}
1001610014
A path that unambiguously
1001710015
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: 13 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
@@ -519,11 +519,17 @@
519519
%%--------------------------------------------------
520520
%% Definitions section for "Terms and definitions"
521521
\newcommand{\nocontentsline}[3]{}
522-
\newcommand{\definitionx}[3]{%
523-
\addxref{#3}%
522+
\newcommand{\definition}[2]{%
523+
\addxref{#2}%
524524
\let\oldcontentsline\addcontentsline%
525525
\let\addcontentsline\nocontentsline%
526-
#1[#2]{\hfill[#3]}\vspace{-.3\onelineskip}\label{#3} \textbf{#2}\\*%
526+
\ifcase\value{SectionDepth}\let\s=\section
527+
\or\let\s=\subsection
528+
\or\let\s=\subsubsection
529+
\or\let\s=\paragraph
530+
\or\let\s=\subparagraph
531+
\fi%
532+
\s[#1]{\hfill[#2]}\vspace{-.3\onelineskip}\label{#2} \textbf{#1}\\*%
527533
\let\addcontentsline\oldcontentsline%
528534
}
529535
\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)