Skip to content

Add requirements, properties blocks #19

@dbosk

Description

@dbosk

There are two good environments in dbosk's Protesting chapter which should be added as blocks for slides as well. For notes, the following code can be used:

\usepackage[inline]{enumitem}
\newlist{properties@}{enumerate}{5}
\setlist[properties@]{label*=P\arabic*.,ref=P\arabic*}
\newlist{requirements@}{enumerate}{5}
\setlist[requirements@]{label*=R\arabic*.,ref=R\arabic*}

\usepackage{xparse}
\DeclareDocumentEnvironment{properties}{o}{%
  \IfValueTF{#1}{%
    \begin{properties@}[label*=#1\arabic*.,ref=#1\arabic*]%
  }{%
    \begin{properties@}%
  }
}{%
  \end{properties@}%
}
\DeclareDocumentEnvironment{requirements}{o}{%
  \IfValueTF{#1}{%
    \begin{requirements@}[label*=#1\arabic*.,ref=#1\arabic*]%
  }{%
    \begin{requirements@}%
  }
}{%
  \end{requirements@}%
}

\usepackage[capitalize]{cleveref}
\crefname{properties@i}{property}{properties}
\Crefname{properties@i}{Property}{Properties}
\crefname{requirements@i}{requirement}{requirements}
\Crefname{requirements@i}{Requirement}{Requirements}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions