Isabelle_DOF/document-generator/latex/DOF-core.sty

97 lines
2.9 KiB
TeX

%% 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
\ProvidesPackage{DOF-core}
[0000/00/00 Unreleased v0.0.0+%
Document-Type Support Framework for Isabelle.]
\RequirePackage{keycommand}
\RequirePackage{fp}
\newkeycommand\isaDofChapter[label=,type=][1]{%
\isamarkupchapter{#1}\label{\commandkey{label}}%
}
\newkeycommand\isaDofSection[label=,type=][1]{%
\isamarkupsection{#1}\label{\commandkey{label}}%
}
\newkeycommand\isaDofSubSection[label=,type=][1]{%
\isamarkupsubsection{#1}\label{\commandkey{label}}%
}
\newkeycommand\isaDofSubSubSection[label=,type=][1]{%
\isamarkupsubsubsection{#1}\label{\commandkey{label}}%
}
\newkeycommand\isaDofParagraph[label=,type=][1]{%
\isamarkupparagraph{#1}\label{\commandkey{label}}%
}
\newkeycommand\isaDofSubParagraph[label=,type=][1]{%
\isamarkupsubparagraph{#1}\label{\commandkey{label}}%
}
\newkeycommand\isaDofFigure
[label=,type=,relative_width=,placement=,src=,spawn_columns=enum False True][1]{%
\begin{figure}[]
\centering
\ifcommandkey{relative_width}
{%
\FPdiv\scale{\commandkey{relative_width}}{100}
\includegraphics[width=\scale\textwidth]{\commandkey{src}}
}{%
\includegraphics[]{\commandkey{src}}
}
\caption{#1}\label{\commandkey{label}}%
\end{figure}
}
\newkeycommand\isaDofDeclareReferenceFigure[label=,type=]{}
\newkeycommand\isaDofSideBySideFigure
[label=,type=
,relative_width=,src=,anchor=,caption=,
,relative_width2=,src2=,anchor2=,caption2=,
,placement=,spawn_columns=enum False True][1]{%
\begin{figure}[]
\subfloat[\label{\commandkey{anchor}}\commandkey{caption}]%
{\ifcommandkey{relative_width}%
{%
\FPdiv\scale{\commandkey{relative_width}}{100}%
\includegraphics[width=\scale\textwidth]{\commandkey{src}}%
}{%
\includegraphics[]{\commandkey{src}}%
}%
}%
\hfill%
\subfloat[\label{\commandkey{anchor2}}\commandkey{caption2}]%
{\ifcommandkey{relative_width2}%
{%
\FPdiv\scale{\commandkey{relative_width2}}{100}%
\includegraphics[width=\scale\textwidth]{\commandkey{src2}}%
}{%
\includegraphics[]{\commandkey{src2}}%
}%
}%
\caption{#1}\label{\commandkey{label}}%
\end{figure}
}
\newkeycommand\isaDofText[label=][1]{%
\begin{isamarkuptext}%
#1
\end{isamarkuptext}%
}
\newkeycommand\isaDofOpenMonitor[label=,type=]{}
\newkeycommand\isaDofCloseMonitor[label=,type=]{}
\newkeycommand\isaDofDeclareReferenceTextSection[label=,type=]{}