summaryrefslogtreecommitdiff
path: root/info/examples/KOMA-Script-4/Anhang-C
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /info/examples/KOMA-Script-4/Anhang-C
Initial commit
Diffstat (limited to 'info/examples/KOMA-Script-4/Anhang-C')
-rw-r--r--info/examples/KOMA-Script-4/Anhang-C/result/floattrick.pdfbin0 -> 50094 bytes
-rw-r--r--info/examples/KOMA-Script-4/Anhang-C/source/floattrick.tex55
2 files changed, 55 insertions, 0 deletions
diff --git a/info/examples/KOMA-Script-4/Anhang-C/result/floattrick.pdf b/info/examples/KOMA-Script-4/Anhang-C/result/floattrick.pdf
new file mode 100644
index 0000000000..87362de739
--- /dev/null
+++ b/info/examples/KOMA-Script-4/Anhang-C/result/floattrick.pdf
Binary files differ
diff --git a/info/examples/KOMA-Script-4/Anhang-C/source/floattrick.tex b/info/examples/KOMA-Script-4/Anhang-C/source/floattrick.tex
new file mode 100644
index 0000000000..0f97f35ea2
--- /dev/null
+++ b/info/examples/KOMA-Script-4/Anhang-C/source/floattrick.tex
@@ -0,0 +1,55 @@
+% floattrick.tex
+% Copyright 2008 Markus Kohm
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Markus Kohm.
+%
+% This work consists of this file only.
+%-----------------------------------------------------------------------
+\documentclass{scrartcl}
+\usepackage[ngerman]{babel}
+\usepackage{lipsum}
+
+\newlength{\Abbildungsbreite}
+\newcommand{\Abbildung}[1]{%
+ \settowidth{\Abbildungsbreite}{#1}%
+ \setcapwidth[c]{\Abbildungsbreite}%
+ #1%
+}
+\newsavebox{\Abbildungsbox}
+\newenvironment{AbbildungSetztCaptionBreite}{%
+ \begin{lrbox}{\Abbildungsbox}%
+}{%
+ \end{lrbox}%
+ \global\setbox\Abbildungsbox=\box\Abbildungsbox%
+ \aftergroup\SetzeAbbildungsbox%
+}
+\newcommand{\SetzeAbbildungsbox}{%
+ \Abbildung{\usebox{\Abbildungsbox}}}
+
+\begin{document}
+\title{floattrick-Beispiel}
+\author{Markus Kohm}
+\date{2008-09-28}
+\maketitle
+\lipsum[1]
+\begin{figure}
+ \centering%
+ \begin{AbbildungSetztCaptionBreite}
+ % Die Abbildung wurde aut optischen Gruenden etwas breiter gewaehlt
+ \fbox{\hspace{5em}\KOMAScript\hspace{5em}}%
+ \end{AbbildungSetztCaptionBreite}
+ \caption{Beispiel einer unter der Abbildung
+ zentrierten Bildunterschrift}
+\end{figure}
+\lipsum[2]
+\end{document} \ No newline at end of file