Skip to content

Remove need to redefine \definition. #1606

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions source/intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions source/iostreams.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions source/lib-intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 14 additions & 7 deletions source/macros.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}
2 changes: 0 additions & 2 deletions source/regex.tex
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@

\rSec1[re.def]{Definitions}

\def\definition{\definitionx{\subsection}}%

\pnum
The following definitions shall apply to this Clause:

Expand Down