Added side_by_side_figure.

This commit is contained in:
Achim D. Brucker 2018-06-10 11:34:14 +01:00
parent f4bcad5ac9
commit d18bc51245
2 changed files with 38 additions and 2 deletions

View File

@ -39,7 +39,7 @@
}
\newkeycommand\isaDofTextFigure
[label=,type=,relative_width=,placement,src=,spawn_columns=enum False True][1]{%
[label=,type=,relative_width=,placement=,src=,spawn_columns=enum False True][1]{%
\begin{figure}[]
\centering
\ifcommandkey{relative_width}
@ -53,6 +53,36 @@
\end{figure}
}
\newkeycommand\isaDofTextSidebysidefigure
[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

View File

@ -43,7 +43,13 @@ doc_class figure = text_section +
placement :: placement
spawn_columns :: bool <= True
(* something similar on tables ? Idea: rough abstraction of table attributes in LaTeX *)
doc_class side_by_side_figure = figure +
anchor :: "string"
caption :: "string"
relative_width2 :: "string" (* percent of textwidth *)
src2 :: "string"
anchor2 :: "string"
caption2 :: "string"
doc_class example = text_section +
comment :: "string"