Basic figure support.
This commit is contained in:
parent
410ab9515a
commit
b803d9a8aa
|
@ -17,6 +17,7 @@
|
|||
Document-Type Support Framework for Isabelle.]
|
||||
|
||||
\RequirePackage{keycommand}
|
||||
\RequirePackage{fp}
|
||||
|
||||
\newkeycommand\isaDofChapter[label=,type=][1]{%
|
||||
\isamarkupchapter{#1}\label{\commandkey{label}}%
|
||||
|
@ -36,3 +37,18 @@
|
|||
\newkeycommand\isaDofSubParagraph[label=,type=][1]{%
|
||||
\isamarkupsubparagraph{#1}\label{\commandkey{label}}%
|
||||
}
|
||||
|
||||
\newkeycommand\isaDofTextFigure
|
||||
[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}
|
||||
}
|
||||
|
|
|
@ -34,20 +34,14 @@ doc_class technical = text_section +
|
|||
formal_results :: "thm list"
|
||||
|
||||
text{* A very rough formatting style could be modeled as follows:*}
|
||||
|
||||
datatype mesure = points "int"
|
||||
| cm "int" (* divised by 100 *)
|
||||
| inch "int" (* divised by 100 *)
|
||||
| textwidth "int" (* given in percent *)
|
||||
|
||||
datatype alignment = left | center | right
|
||||
|
||||
|
||||
datatype placement = h | t | b | ht | hb
|
||||
doc_class figure = text_section +
|
||||
width :: "mesure option" <= "Some(textwidth 100)"
|
||||
height :: "mesure option" <= "Some(textwidth 100)"
|
||||
scale :: "int option" (* given in per cent *)
|
||||
"file" :: "file"
|
||||
plmt :: alignment <= center
|
||||
relative_width :: "string" (* percent of textwidth *)
|
||||
src :: "string"
|
||||
placement :: placement
|
||||
spawn_columns :: bool <= True
|
||||
|
||||
(* something similar on tables ? Idea: rough abstraction of table attributes in LaTeX *)
|
||||
|
||||
|
|
Loading…
Reference in New Issue