2019-07-27 08:39:40 +00:00
|
|
|
%% Copyright (C) 2019 University of Exeter
|
|
|
|
%% 2018 University of Paris-Sud
|
|
|
|
%% 2018 The University of Sheffield
|
2018-05-20 09:27:04 +00:00
|
|
|
%%
|
|
|
|
%% License:
|
|
|
|
%% This program can be redistributed and/or modified under the terms
|
|
|
|
%% of the LaTeX Project Public License Distributed from CTAN
|
|
|
|
%% archives in directory macros/latex/base/lppl.txt; either
|
|
|
|
%% version 1 of the License, or any later version.
|
|
|
|
%% OR
|
|
|
|
%% The 2-clause BSD-style license.
|
|
|
|
%%
|
|
|
|
%% SPDX-License-Identifier: LPPL-1.0+ OR BSD-2-Clause
|
|
|
|
|
|
|
|
\NeedsTeXFormat{LaTeX2e}\relax
|
2019-02-05 09:42:12 +00:00
|
|
|
\ProvidesPackage{DOF-cenelec_50128}
|
2018-05-20 09:27:04 +00:00
|
|
|
[0000/00/00 Unreleased v0.0.0+%
|
2019-02-05 09:42:12 +00:00
|
|
|
Document-Type Support Framework for Isabelle (CENELEC 50128).]
|
2018-05-20 09:27:04 +00:00
|
|
|
|
2019-03-30 23:40:01 +00:00
|
|
|
\RequirePackage{DOF-COL}
|
2019-07-27 14:14:32 +00:00
|
|
|
\usepackage{etex}
|
|
|
|
\reserveinserts{28}
|
|
|
|
\usepackage[many]{tcolorbox}
|
2019-07-27 08:39:40 +00:00
|
|
|
\usepackage{marginnote}
|
2019-07-27 14:14:32 +00:00
|
|
|
|
|
|
|
% Index setup
|
2019-07-27 08:39:40 +00:00
|
|
|
\usepackage{index}
|
|
|
|
\makeindex
|
2019-07-27 14:14:32 +00:00
|
|
|
\AtEndDocument{\printindex}
|
2019-07-27 08:39:40 +00:00
|
|
|
|
|
|
|
\newcommand{\DOFindex}[2]{%
|
2019-07-27 18:05:10 +00:00
|
|
|
\marginnote{\normalfont\textbf{#1}: #2}%
|
2019-07-27 14:14:32 +00:00
|
|
|
\expandafter\index\expandafter{\expanded{#2 (#1)}}%
|
2019-07-27 08:39:40 +00:00
|
|
|
}%
|
|
|
|
|
|
|
|
|
2019-07-27 14:14:32 +00:00
|
|
|
%% SRAC
|
|
|
|
\providecolor{SRAC}{named}{green}
|
|
|
|
\DeclareNewTOC[%
|
|
|
|
owner=\jobname,
|
|
|
|
type=SRAC,%
|
|
|
|
types=SRACs,%
|
|
|
|
listname={List of SRACs}%
|
|
|
|
]{tos}
|
|
|
|
\setuptoc{tos}{chapteratlist}
|
|
|
|
\AtEndEnvironment{frontmatter}{\listofSRACs}
|
|
|
|
|
2019-07-27 08:39:40 +00:00
|
|
|
\newtheorem{SRAC}{SRAC}
|
2019-07-27 14:14:32 +00:00
|
|
|
\tcolorboxenvironment{SRAC}{
|
2019-07-27 18:05:10 +00:00
|
|
|
boxrule=0pt
|
|
|
|
,boxsep=0pt
|
|
|
|
,colback={white!90!SRAC}
|
|
|
|
,enhanced jigsaw
|
|
|
|
,borderline west={2pt}{0pt}{SRAC}
|
|
|
|
,sharp corners
|
|
|
|
,before skip=10pt
|
|
|
|
,after skip=10pt
|
|
|
|
,breakable
|
2019-07-27 14:14:32 +00:00
|
|
|
}
|
|
|
|
|
2019-07-27 08:39:40 +00:00
|
|
|
\newcommand{\SRACautorefname}{SRAC}
|
|
|
|
\newisadof{text.CENELEC_50128.SRAC}%
|
|
|
|
[label=,type=%
|
|
|
|
,Isa_COL.text_element.level=%
|
|
|
|
,Isa_COL.text_element.referentiable=%
|
|
|
|
,Isa_COL.text_element.variants=%
|
|
|
|
,CENELEC_50128.requirement.is_concerned=%
|
2019-07-27 18:05:10 +00:00
|
|
|
,CENELEC_50128.requirement.long_name=%
|
2019-07-27 08:39:40 +00:00
|
|
|
,CENELEC_50128.SRAC.formal_repr=%
|
|
|
|
,CENELEC_50128.SRAC.assumption_kind=%
|
|
|
|
,CENELEC_50128.EC.assumption_kind=%
|
|
|
|
][1]{%
|
|
|
|
\begin{isamarkuptext}%
|
2019-07-27 18:05:10 +00:00
|
|
|
\ifthenelse{\equal{\commandkey{CENELEC_50128.requirement.long_name}}{}}{%
|
|
|
|
\begin{SRAC}%
|
|
|
|
\addxcontentsline{tos}{chapter}[]{\autoref{\commandkey{label}}}%
|
|
|
|
}{%
|
|
|
|
\begin{SRAC}[\commandkey{CENELEC_50128.requirement.long_name}]%
|
|
|
|
\addxcontentsline{tos}{chapter}[]{\autoref{\commandkey{label}}: \commandkey{CENELEC_50128.requirement.long_name}}%
|
|
|
|
\DOFindex{SRAC}{\commandkey{CENELEC_50128.requirement.long_name}}%
|
|
|
|
}\label{\commandkey{label}}%
|
2019-07-27 08:39:40 +00:00
|
|
|
#1%
|
|
|
|
\end{SRAC}
|
|
|
|
\end{isamarkuptext}%
|
|
|
|
}
|
|
|
|
|
2019-07-27 14:14:32 +00:00
|
|
|
% EC
|
|
|
|
\providecolor{EC}{named}{blue}
|
|
|
|
\DeclareNewTOC[%
|
|
|
|
owner=\jobname,
|
|
|
|
type=EC,%
|
|
|
|
types=ECs,%
|
|
|
|
listname={List of ECs}%
|
|
|
|
]{toe}
|
|
|
|
\setuptoc{toe}{chapteratlist}
|
|
|
|
\AtEndEnvironment{frontmatter}{\listofECs}
|
|
|
|
|
2019-07-27 08:39:40 +00:00
|
|
|
\newtheorem{EC}{EC}
|
2019-07-27 14:14:32 +00:00
|
|
|
\tcolorboxenvironment{EC}{
|
2019-07-27 18:05:10 +00:00
|
|
|
boxrule=0pt
|
|
|
|
,boxsep=0pt
|
|
|
|
,colback={white!90!EC}
|
|
|
|
,enhanced jigsaw
|
|
|
|
,borderline west={2pt}{0pt}{EC}
|
|
|
|
,sharp corners
|
|
|
|
,before skip=10pt
|
|
|
|
,after skip=10pt
|
|
|
|
,breakable
|
2019-07-27 14:14:32 +00:00
|
|
|
}
|
|
|
|
|
2019-07-27 08:39:40 +00:00
|
|
|
\newcommand{\ECautorefname}{EC}
|
|
|
|
\newisadof{text.CENELEC_50128.EC}%
|
|
|
|
[label=,type=%
|
|
|
|
,Isa_COL.text_element.level=%
|
|
|
|
,Isa_COL.text_element.referentiable=%
|
|
|
|
,Isa_COL.text_element.variants=%
|
|
|
|
,CENELEC_50128.requirement.is_concerned=%
|
2019-07-27 18:05:10 +00:00
|
|
|
,CENELEC_50128.requirement.long_name=%
|
2019-07-27 08:39:40 +00:00
|
|
|
,CENELEC_50128.SRAC.formal_repr=%
|
|
|
|
,CENELEC_50128.SRAC.assumption_kind=%
|
|
|
|
,CENELEC_50128.EC.assumption_kind=%
|
|
|
|
][1]{%
|
|
|
|
\begin{isamarkuptext}%
|
2019-07-27 18:05:10 +00:00
|
|
|
\ifthenelse{\equal{\commandkey{CENELEC_50128.requirement.long_name}}{}}{%
|
|
|
|
\begin{EC}%
|
|
|
|
\addxcontentsline{tos}{chapter}[]{\autoref{\commandkey{label}}}%
|
|
|
|
}{%
|
|
|
|
\begin{EC}[\commandkey{CENELEC_50128.requirement.long_name}]%
|
|
|
|
\addxcontentsline{toe}{chapter}[]{\autoref{\commandkey{label}}: \commandkey{CENELEC_50128.requirement.long_name}}%
|
|
|
|
\DOFindex{EC}{\commandkey{CENELEC_50128.requirement.long_name}}%
|
|
|
|
}\label{\commandkey{label}}%
|
2019-07-27 08:39:40 +00:00
|
|
|
#1%
|
|
|
|
\end{EC}
|
|
|
|
\end{isamarkuptext}%
|
|
|
|
}
|
|
|
|
|
2019-07-27 18:05:10 +00:00
|
|
|
% assumptions
|
|
|
|
\providecolor{assumption}{named}{orange}
|
|
|
|
\newtheorem{assumption}{assumption}
|
|
|
|
\tcolorboxenvironment{assumption}{
|
|
|
|
boxrule=0pt
|
|
|
|
,boxsep=0pt
|
|
|
|
,colback={white!90!assumption}
|
|
|
|
,enhanced jigsaw
|
|
|
|
,borderline west={2pt}{0pt}{assumption}
|
|
|
|
,sharp corners
|
|
|
|
,before skip=10pt
|
|
|
|
,after skip=10pt
|
|
|
|
,breakable
|
|
|
|
}
|
|
|
|
|
|
|
|
\newcommand{\assumptionautorefname}{assumption}
|
|
|
|
\newisadof{text.CENELEC_50128.assumption}%
|
|
|
|
[label=,type=%
|
|
|
|
,Isa_COL.text_element.level=%
|
|
|
|
,Isa_COL.text_element.referentiable=%
|
|
|
|
,Isa_COL.text_element.variants=%
|
|
|
|
,CENELEC_50128.requirement.is_concerned=%
|
|
|
|
,CENELEC_50128.requirement.long_name=%
|
|
|
|
,CENELEC_50128.SRAC.formal_repr=%
|
|
|
|
,CENELEC_50128.SRAC.assumption_kind=%
|
|
|
|
,CENELEC_50128.assumption.assumption_kind=%
|
|
|
|
][1]{%
|
|
|
|
\begin{isamarkuptext}%
|
|
|
|
\ifthenelse{\equal{\commandkey{CENELEC_50128.requirement.long_name}}{}}{%
|
|
|
|
\begin{assumption}%
|
|
|
|
}{%
|
|
|
|
\begin{assumption}[\commandkey{CENELEC_50128.requirement.long_name}]%
|
|
|
|
\DOFindex{assumption}{\commandkey{CENELEC_50128.requirement.long_name}}%
|
|
|
|
}\label{\commandkey{label}}%
|
|
|
|
#1%
|
|
|
|
\end{assumption}
|
|
|
|
\end{isamarkuptext}%
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
% hypotheses
|
|
|
|
\providecolor{hypothesis}{named}{teal}
|
|
|
|
\newtheorem{hypothesis}{hypothesis}
|
|
|
|
\tcolorboxenvironment{hypothesis}{
|
|
|
|
,boxrule=0pt
|
|
|
|
,boxsep=0pt
|
|
|
|
,colback={white!90!hypothesis}
|
|
|
|
,enhanced jigsaw
|
|
|
|
,borderline west={2pt}{0pt}{hypothesis}
|
|
|
|
,sharp corners
|
|
|
|
,before skip=10pt
|
|
|
|
,after skip=10pt
|
|
|
|
,breakable
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
\newcommand{\hypothesisautorefname}{hypothesis}
|
|
|
|
\newisadof{text.CENELEC_50128.hypothesis}%
|
|
|
|
[label=,type=%
|
|
|
|
,Isa_COL.text_element.level=%
|
|
|
|
,Isa_COL.text_element.referentiable=%
|
|
|
|
,Isa_COL.text_element.variants=%
|
|
|
|
,CENELEC_50128.requirement.is_concerned=%
|
|
|
|
,CENELEC_50128.requirement.long_name=%
|
|
|
|
,CENELEC_50128.SRAC.formal_repr=%
|
|
|
|
,CENELEC_50128.SRAC.hypothesis_kind=%
|
|
|
|
,CENELEC_50128.hypothesis.hyp_type=%
|
|
|
|
][1]{%
|
|
|
|
\begin{isamarkuptext}%
|
|
|
|
\ifthenelse{\equal{\commandkey{CENELEC_50128.requirement.long_name}}{}}{%
|
|
|
|
\begin{hypothesis}%
|
|
|
|
}{%
|
|
|
|
\begin{hypothesis}[\commandkey{CENELEC_50128.requirement.long_name}]%
|
|
|
|
\DOFindex{hypothesis}{\commandkey{CENELEC_50128.requirement.long_name}}%
|
|
|
|
}\label{\commandkey{label}}%
|
|
|
|
#1%
|
|
|
|
\end{hypothesis}
|
|
|
|
\end{isamarkuptext}%
|
|
|
|
}
|