|
92 | 92 | \or\let\s=\subparagraph\let\l=\label |
93 | 93 | \fi% |
94 | 94 | \s[#3]{#3\hfill[#2]}\l{#2}\addxref{#2}% |
95 | | -\setcounter{note}{0}\setcounter{example}{0}} |
| 95 | +} |
96 | 96 |
|
97 | 97 | % A convenience feature (mostly for the convenience of the Project |
98 | 98 | % Editor, to make it easy to move around large blocks of text): |
|
267 | 267 | \newcommand{\leftshift}[1]{\ensuremath{\mathbin{\mathsf{lshift}_{#1}}}} |
268 | 268 |
|
269 | 269 | %% Notes and examples |
270 | | -\newcounter{note} |
271 | | -\newcounter{example} |
272 | 270 | \newcommand{\noteintro}[1]{[\textit{#1}:\space} |
273 | | -\newcommand{\noteoutro}[1]{\textit{\,---\,end #1}\kern.5pt]} |
274 | | -\newenvironment{note}[1][Note] |
275 | | -{\par\small\addtocounter{note}{1}\noteintro{#1 \thenote}} |
276 | | -{\noteoutro{note}\par} |
277 | | -\newenvironment{example}[1][Example] |
278 | | -{\par\small\addtocounter{example}{1}\noteintro{#1 \theexample}} |
279 | | -{\noteoutro{example}\par} |
| 271 | +\newcommand{\noteoutro}[1]{\textit{\,---\,#1}\kern.5pt]} |
| 272 | + |
| 273 | +% \newnoteenvironment{ENVIRON}{BEGIN TEXT}{END TEXT} |
| 274 | +% Creates a note-like environment beginning with BEGIN TEXT and |
| 275 | +% ending with END TEXT. A counter with name ENVIRON indicates the |
| 276 | +% number of this kind of note / example that has occurred in this |
| 277 | +% subclause. |
| 278 | +\newcommand{\newnoteenvironment}[3]{ |
| 279 | +\newsubclausecounter{#1} |
| 280 | +\newenvironment{#1} |
| 281 | +{\def\noteend{#3}\par\small\stepcounter{#1}\noteintro{#2}} |
| 282 | +{\noteoutro{\noteend}\par} |
| 283 | +} |
| 284 | + |
| 285 | +\newnoteenvironment{note}{Note \arabic{note}}{end note} |
| 286 | +\newnoteenvironment{example}{Example \arabic{example}}{end example} |
280 | 287 |
|
281 | 288 | %% Library function descriptions |
282 | 289 | \newcommand{\Fundescx}[1]{\textit{#1}} |
|
624 | 631 |
|
625 | 632 | %%-------------------------------------------------- |
626 | 633 | %% Definitions section for "Terms and definitions" |
627 | | -\newcounter{termnote} |
628 | 634 | \newcommand{\nocontentsline}[3]{} |
629 | 635 | \newcommand{\definition}[2]{% |
630 | 636 | \addxref{#2}% |
631 | | -\setcounter{termnote}{0}% |
632 | 637 | \let\oldcontentsline\addcontentsline% |
633 | 638 | \let\addcontentsline\nocontentsline% |
634 | 639 | \ifcase\value{SectionDepth} |
|
642 | 647 | \let\addcontentsline\oldcontentsline% |
643 | 648 | } |
644 | 649 | \newcommand{\defncontext}[1]{\textlangle#1\textrangle} |
645 | | -\newenvironment{defnote} |
646 | | -{\small\addtocounter{termnote}{1}\noteintro{Note \thetermnote{} to entry}} |
647 | | -{\noteoutro{note}\space} |
| 650 | +\newnoteenvironment{defnote}{Note \arabic{defnote} to entry}{end note} |
0 commit comments