2018-03-05 10:14:49 +00:00
|
|
|
%% Copyright (C) 2018 The University of Sheffield
|
|
|
|
%% 2018 The University of Paris-Sud
|
|
|
|
%%
|
|
|
|
%% 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
|
2018-06-08 11:54:45 +00:00
|
|
|
\ProvidesPackage{DOF-core}
|
2018-03-05 10:14:49 +00:00
|
|
|
[0000/00/00 Unreleased v0.0.0+%
|
|
|
|
Document-Type Support Framework for Isabelle.]
|
|
|
|
|
2018-05-20 08:23:13 +00:00
|
|
|
\RequirePackage{keycommand}
|
2018-09-18 13:29:54 +00:00
|
|
|
\RequirePackage{environ}
|
2018-06-27 07:16:37 +00:00
|
|
|
\RequirePackage{graphicx}
|
2018-06-05 00:05:41 +00:00
|
|
|
\RequirePackage{fp}
|
2018-03-05 10:14:49 +00:00
|
|
|
|
2018-09-18 13:29:54 +00:00
|
|
|
% Generic dispatcher
|
2018-10-01 23:36:55 +00:00
|
|
|
\newkeycommand+[\|]\isaDof[env={UNKNOWN},label=,type={dummyT},args={}][1]{%
|
|
|
|
\csname isaDof.\commandkey{env}.\commandkey{type}\endcsname[label=\commandkey{label},\commandkey{args}]{#1}%
|
2018-03-05 10:14:49 +00:00
|
|
|
}
|
2018-06-05 00:05:41 +00:00
|
|
|
|
2018-09-18 13:29:54 +00:00
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
% begin: figure*
|
2018-10-01 23:36:55 +00:00
|
|
|
\NewEnviron{isamarkupfigure*}[1][]{\isaDof[env={figure},#1]{\BODY}}
|
|
|
|
\expandafter\newkeycommand\csname isaDof.figure.Isa_DOF.figure\endcsname%
|
2018-09-18 13:29:54 +00:00
|
|
|
[label=,type=%
|
|
|
|
,Isa_DOF.figure.relative_width=%
|
|
|
|
,Isa_DOF.figure.placement=%
|
|
|
|
,Isa_DOF.figure.src=%
|
|
|
|
,Isa_DOF.figure.spawn_columns=enum False True%
|
|
|
|
][1]{%
|
2018-09-18 16:18:27 +00:00
|
|
|
\begin{figure}[]
|
|
|
|
\centering
|
|
|
|
\ifcommandkey{Isa_DOF.figure.relative_width}
|
|
|
|
{%
|
2018-10-01 23:36:55 +00:00
|
|
|
\gdef\dof@width{\commandkey{Isa_DOF.figure.relative_width}}
|
|
|
|
\gdef\dof@src{\commandkey{Isa_DOF.figure.src}}
|
|
|
|
\FPdiv\scale{\dof@width}{100}%
|
|
|
|
\includegraphics[width=\scale\textwidth]{\dof@src}%
|
2018-09-18 16:18:27 +00:00
|
|
|
}{%
|
2018-10-01 23:36:55 +00:00
|
|
|
\gdef\dof@src{\commandkey{Isa_DOF.figure.src}}
|
|
|
|
\includegraphics[]{\dof@src}%
|
2018-09-18 16:18:27 +00:00
|
|
|
}
|
|
|
|
\caption{#1}\label{\commandkey{label}}%
|
|
|
|
\end{figure}
|
2018-06-05 00:05:41 +00:00
|
|
|
}
|
2018-09-18 13:29:54 +00:00
|
|
|
% end: figure*
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
2018-06-06 11:30:46 +00:00
|
|
|
|
2018-06-10 10:34:14 +00:00
|
|
|
|
2018-09-18 13:29:54 +00:00
|
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
% begin: side_by_side_figure*
|
2018-10-01 23:36:55 +00:00
|
|
|
\NewEnviron{isamarkupside_by_side_figure*}[1][]{\isaDof[env={side_by_side_figure},#1]{\BODY}}
|
|
|
|
\expandafter\newkeycommand\csname isaDof.side_by_side_figure.Isa_DOF.side_by_side_figure\endcsname%
|
2018-09-18 13:29:54 +00:00
|
|
|
[label=,type=%
|
|
|
|
,Isa_DOF.figure.relative_width=%
|
|
|
|
,Isa_DOF.figure.src=%
|
|
|
|
,Isa_DOF.side_by_side_figure.anchor=%
|
|
|
|
,Isa_DOF.side_by_side_figure.caption=%
|
|
|
|
,Isa_DOF.side_by_side_figure.relative_width2=%
|
|
|
|
,Isa_DOF.side_by_side_figure.src2=%
|
|
|
|
,Isa_DOF.side_by_side_figure.anchor2=%
|
|
|
|
,Isa_DOF.side_by_side_figure.caption2=%
|
|
|
|
,Isa_DOF.side_by_side_figure.placement=%
|
|
|
|
,Isa_DOF.side_by_side_figure.spawn_columns=enum False True%
|
|
|
|
][1]{%
|
2018-06-10 10:34:14 +00:00
|
|
|
\begin{figure}[]
|
2018-10-01 23:36:55 +00:00
|
|
|
\subfloat[\label{\commandkey{Isa_DOF.side_by_side_figure.anchor}}\commandkey{Isa_DOF.side_by_side_figure.caption}]%
|
|
|
|
{\ifcommandkey{Isa_DOF.figure.relative_width}%
|
|
|
|
{%
|
|
|
|
\gdef\dof@width{\commandkey{Isa_DOF.figure.relative_width}}
|
|
|
|
\gdef\dof@src{\commandkey{Isa_DOF.figure.src}}
|
|
|
|
\FPdiv\scale{\dof@width}{100}%
|
|
|
|
\includegraphics[width=\scale\textwidth]{\dof@src}%
|
|
|
|
}{%
|
|
|
|
\gdef\dof@src{\commandkey{Isa_DOF.figure.src}}
|
|
|
|
\includegraphics[]{\dof@src}%
|
|
|
|
}%
|
|
|
|
}%
|
|
|
|
\hfill%
|
|
|
|
\subfloat[\label{\commandkey{Isa_DOF.side_by_side_figure.anchor2}}\commandkey{Isa_DOF.side_by_side_figure.caption2}]%
|
|
|
|
{\ifcommandkey{Isa_DOF.side_by_side_figure.relative_width2}%
|
|
|
|
{%
|
|
|
|
\gdef\dof@width{\commandkey{Isa_DOF.side_by_side_figure.relative_width2}}
|
|
|
|
\gdef\dof@src{\commandkey{Isa_DOF.side_by_side_figure.src2}}
|
|
|
|
\FPdiv\scale{\dof@width}{100}%
|
|
|
|
\includegraphics[width=\scale\textwidth]{\dof@src}%
|
|
|
|
}{%
|
|
|
|
\gdef\dof@src{\commandkey{Isa_DOF.side_by_side_figure.src2}}
|
|
|
|
\includegraphics[]{\dof@src}%
|
|
|
|
}%
|
|
|
|
}%
|
|
|
|
\caption{#1}\label{\commandkey{label}}%
|
2018-06-10 10:34:14 +00:00
|
|
|
\end{figure}
|
|
|
|
}
|
2018-09-18 13:29:54 +00:00
|
|
|
% end: side_by_side_figure*
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
2018-06-10 10:34:14 +00:00
|
|
|
|
2018-09-18 13:29:54 +00:00
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
% begin: Text*
|
2018-10-01 23:36:55 +00:00
|
|
|
\NewEnviron{isamarkupText*}[1][]{\isaDof[env={Text},#1]{\BODY}}
|
2018-09-18 13:29:54 +00:00
|
|
|
% end: Text*
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
2018-06-12 07:45:37 +00:00
|
|
|
|
2018-09-18 13:29:54 +00:00
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
% begin: text*
|
2018-10-01 23:36:55 +00:00
|
|
|
\NewEnviron{isamarkuptext*}[1][]{\isaDof[env={text},#1]{\BODY}}
|
2018-09-18 13:29:54 +00:00
|
|
|
% end: text*
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
2018-08-10 12:27:30 +00:00
|
|
|
|
2018-06-12 07:45:37 +00:00
|
|
|
\newkeycommand\isaDofOpenMonitor[label=,type=]{}
|
|
|
|
\newkeycommand\isaDofCloseMonitor[label=,type=]{}
|
2018-06-12 08:55:35 +00:00
|
|
|
|
|
|
|
\newkeycommand\isaDofDeclareReferenceTextSection[label=,type=]{}
|
2018-09-18 13:29:54 +00:00
|
|
|
\newkeycommand\isaDofDeclareReferenceFigure[label=,type=]{}
|
|
|
|
|
2018-10-01 23:36:55 +00:00
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
% begin: section*
|
|
|
|
\NewEnviron{isamarkupsection*}[1][]{\isaDof[env={section},#1]{\BODY}}
|
|
|
|
% end: section*
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
% begin: subsection*
|
|
|
|
\NewEnviron{isamarkupsubsection*}[1][]{\isaDof[env={subsection},#1]{\BODY}}
|
|
|
|
% end: subsection*
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|