24.10 Miscellaneous Commands

  24.10.1 Sequential Environments
  24.10.2 The ToDo environment
  24.10.3 The Convention environment
236misc 236  (192)  237
\newcommand{\eg}{e.\,g.}
\newcommand{\ie}{i.\,e.}
\newcommand{\cf}{cf.}

24.10.1 Sequential Environments

In order to define the ToDo and Convention environments below, and in order to provide an easy way for similar user-defined environments, we provide the command defSequentialEnvironment. See the sections about the ToDo and Convention in order to find examples how to use defSequentialEnvironment and the environment that is defined by that command.

The TEX commands are similar to the ones in the definition of list as defined in the file latex.ltx of LATEX2ɛ, but they allow nesting of such environments to an arbitrary depth.

237misc 236+   (192)  236  238
\newcounter{seqEnvCounter}
\setcounter{seqEnvCounter}{0}
\newcommand{\defSequentialEnvironment}[1]{%
  \newcounter{@#1}%
  \newenvironment{#1}%
  {\begin{ColoredBackground}{#1}\refstepcounter{@#1}%
    \setlength{\leftmargin}{\ifnum0<\value{seqEnvCounter}2ex\else0pt\fi}%
    \addtocounter{seqEnvCounter}{1}%
    \parindent0pt\parskip\smallskipamount
    \advance\linewidth -\leftmargin
    \advance\@totalleftmargin \leftmargin
    \parshape \@ne \@totalleftmargin \linewidth
    {\bfseries\useterm{#1}}
    \addtocounter{@#1}{-1}\hyperlink{#1\roman{@#1}}{$\triangleleft$}
    \addtocounter{@#1}{1}{\bfseries\arabic{@#1}}\hypertarget{#1\roman{@#1}}{}
    \addtocounter{@#1}{1}\hyperlink{#1\roman{@#1}}{$\triangleright$}%
    \addtocounter{@#1}{-1}%
  }%
  {\addtocounter{seqEnvCounter}{-1}\end{ColoredBackground}}%
}

Defines:
defSequentialEnvironment, used in chunks 238 and 239.

Uses ColoredBackground 202.

24.10.2 The ToDo environment

The environment ToDo should be used inside the documentation to mark unfinished ideas.

One can find out about all possible ToDo’s by looking at the index or simply by clicking on the left and right triangles.

ToDo 8 This is an example of a ToDo environment.

The background color of a ToDo environment can be configured via the commands backgroundColor{ToDo}{...} at a local customization (see Section 24.12).

238misc 236+   (192)  237  239
\defSequentialEnvironment{ToDo}

Uses defSequentialEnvironment 237.

24.10.3 The Convention environment

The environment Convention should be used inside the documentation to mark conventions in any form. Code conventions or any assumptions that is necessary to make the code run properly should be documented inside such an environment.

One can find out about all possible conventions by looking at the index or simply by clicking on the left and right triangles.

Convention 14 This is an example of a Convention environment.

The background color of a Convention environment can be configured via the commands backgroundColor{Convention}{...} at a local customization (see Section 24.12).

239misc 236+   (192)  238
\defSequentialEnvironment{Convention}

Uses defSequentialEnvironment 237.