von esdd » Mo 6. Jun 2016, 12:07
windpower hat geschrieben:
Es ist eine Teilabbildung mit a und b. Darnter erfolgt gemeinsame Beschriftung für die Gesamtgrafik.
Dafür bietet sich das subcaption Paket an. Im folgenden Beispiel gehe ich davon aus, dass es sich um Abbildungen und nicht um Tabellen handelt. Falls ich da falsch liege, einfach überall figure durch table bzw. subfigure durch subtable ersetzen.
Code:
\documentclass{scrbook}
\usepackage{tikz}
\usepackage{subcaption}
\begin{document}
\begin{figure}
\begin{subfigure}[b]{.5\linewidth}
\centering
\begin{tikzpicture}[scale=0.73]
\def \h {7};
\def \f {.7};
\foreach \y in {0,1,2,3} {
\draw ({\y*\f-\h*\f},\y) -- ({\h*\f-\y*\f},\y);
}
\draw (-\h*\f,0) -- (0,\h);
\draw (\h*\f,0) -- (0,\h);
\node at (0,0) [above] {Informaion};
\node at (0,1) [above] {Consultation};
\node at (0,2) [above] {Cooperation};
\node [align=center] at (0,3) [above] {Autonomous\\ acting};
\end{tikzpicture}
\caption{Pyramide 1}\label{fig:Pyr1}
\end{subfigure}%
%
\begin{subfigure}[b]{.5\linewidth}
\centering
\begin{tikzpicture}[scale=0.73]
\def \h {7};
\def \f {.7};
\foreach \y in {0,1,2,3} {
\draw ({\y*\f-\h*\f},\y) -- ({\h*\f-\y*\f},\y);
}
\draw (-\h*\f,0) -- (0,\h);
\draw (\h*\f,0) -- (0,\h);
\node at (0,0) [above] {Informaion};
\node at (0,1) [above] {Consultation};
\node at (0,2) [above] {Cooperation};
\node [align=center] at (0,3) [above] {Autonomous\\ acting};
\end{tikzpicture}
\caption{Pyramide 2}\label{fig:Pyr2}
\end{subfigure}%
\caption{Participation pyramide}
\label{fig:participation}
\end{figure}
Ein Verweis auf Abbildung \ref{fig:Pyr2}
\end{document}
Damit kann man dann auch auf die Teilabbildungen verweisen.
Falls die Abbildung nicht gleiten soll, kann man eine minipage verwenden und in dieser mit \setcaptionsetup{type=figure} angeben, dass es sich um eine Abbildung handelt:
\documentclass{scrbook}
\usepackage{tikz}
\usepackage{subcaption}
\begin{document}
\begin{center}
\begin{minipage}{\linewidth}
\captionsetup{type=figure}
\begin{subfigure}[b]{.5\linewidth}
\centering
\begin{tikzpicture}[scale=0.73]
\def \h {7};
\def \f {.7};
\foreach \y in {0,1,2,3} {
\draw ({\y*\f-\h*\f},\y) -- ({\h*\f-\y*\f},\y);
}
\draw (-\h*\f,0) -- (0,\h);
\draw (\h*\f,0) -- (0,\h);
\node at (0,0) [above] {Informaion};
\node at (0,1) [above] {Consultation};
\node at (0,2) [above] {Cooperation};
\node [align=center] at (0,3) [above] {Autonomous\\ acting};
\end{tikzpicture}
\caption{Pyramide 1}\label{fig:Pyr1}
\end{subfigure}%
%
\begin{subfigure}[b]{.5\linewidth}
\centering
\begin{tikzpicture}[scale=0.73]
\def \h {7};
\def \f {.7};
\foreach \y in {0,1,2,3} {
\draw ({\y*\f-\h*\f},\y) -- ({\h*\f-\y*\f},\y);
}
\draw (-\h*\f,0) -- (0,\h);
\draw (\h*\f,0) -- (0,\h);
\node at (0,0) [above] {Informaion};
\node at (0,1) [above] {Consultation};
\node at (0,2) [above] {Cooperation};
\node [align=center] at (0,3) [above] {Autonomous\\ acting};
\end{tikzpicture}
\caption{Pyramide 2}\label{fig:Pyr2}
\end{subfigure}%
\caption{Participation pyramide}
\label{fig:participation}
\end{minipage}
\end{center}
Siehe Abbildung \ref{fig:Pyr2}
\end{document}
[quote="windpower"]
Es ist eine Teilabbildung mit a und b. Darnter erfolgt gemeinsame Beschriftung für die Gesamtgrafik.
[/quote]
Dafür bietet sich das [tt]subcaption[/tt] Paket an. Im folgenden Beispiel gehe ich davon aus, dass es sich um Abbildungen und nicht um Tabellen handelt. Falls ich da falsch liege, einfach überall [tt]figure[/tt] durch [tt]table[/tt] bzw. subfigure durch [tt]subtable[/tt] ersetzen.
Code:
[code]\documentclass{scrbook}
\usepackage{tikz}
\usepackage{subcaption}
\begin{document}
\begin{figure}
\begin{subfigure}[b]{.5\linewidth}
\centering
\begin{tikzpicture}[scale=0.73]
\def \h {7};
\def \f {.7};
\foreach \y in {0,1,2,3} {
\draw ({\y*\f-\h*\f},\y) -- ({\h*\f-\y*\f},\y);
}
\draw (-\h*\f,0) -- (0,\h);
\draw (\h*\f,0) -- (0,\h);
\node at (0,0) [above] {Informaion};
\node at (0,1) [above] {Consultation};
\node at (0,2) [above] {Cooperation};
\node [align=center] at (0,3) [above] {Autonomous\\ acting};
\end{tikzpicture}
\caption{Pyramide 1}\label{fig:Pyr1}
\end{subfigure}%
%
\begin{subfigure}[b]{.5\linewidth}
\centering
\begin{tikzpicture}[scale=0.73]
\def \h {7};
\def \f {.7};
\foreach \y in {0,1,2,3} {
\draw ({\y*\f-\h*\f},\y) -- ({\h*\f-\y*\f},\y);
}
\draw (-\h*\f,0) -- (0,\h);
\draw (\h*\f,0) -- (0,\h);
\node at (0,0) [above] {Informaion};
\node at (0,1) [above] {Consultation};
\node at (0,2) [above] {Cooperation};
\node [align=center] at (0,3) [above] {Autonomous\\ acting};
\end{tikzpicture}
\caption{Pyramide 2}\label{fig:Pyr2}
\end{subfigure}%
\caption{Participation pyramide}
\label{fig:participation}
\end{figure}
Ein Verweis auf Abbildung \ref{fig:Pyr2}
\end{document}[/code]
Damit kann man dann auch auf die Teilabbildungen verweisen.
Falls die Abbildung nicht gleiten soll, kann man eine [tt]minipage[/tt] verwenden und in dieser mit [tt]\setcaptionsetup{type=figure}[/tt] angeben, dass es sich um eine Abbildung handelt:
[code]\documentclass{scrbook}
\usepackage{tikz}
\usepackage{subcaption}
\begin{document}
\begin{center}
\begin{minipage}{\linewidth}
\captionsetup{type=figure}
\begin{subfigure}[b]{.5\linewidth}
\centering
\begin{tikzpicture}[scale=0.73]
\def \h {7};
\def \f {.7};
\foreach \y in {0,1,2,3} {
\draw ({\y*\f-\h*\f},\y) -- ({\h*\f-\y*\f},\y);
}
\draw (-\h*\f,0) -- (0,\h);
\draw (\h*\f,0) -- (0,\h);
\node at (0,0) [above] {Informaion};
\node at (0,1) [above] {Consultation};
\node at (0,2) [above] {Cooperation};
\node [align=center] at (0,3) [above] {Autonomous\\ acting};
\end{tikzpicture}
\caption{Pyramide 1}\label{fig:Pyr1}
\end{subfigure}%
%
\begin{subfigure}[b]{.5\linewidth}
\centering
\begin{tikzpicture}[scale=0.73]
\def \h {7};
\def \f {.7};
\foreach \y in {0,1,2,3} {
\draw ({\y*\f-\h*\f},\y) -- ({\h*\f-\y*\f},\y);
}
\draw (-\h*\f,0) -- (0,\h);
\draw (\h*\f,0) -- (0,\h);
\node at (0,0) [above] {Informaion};
\node at (0,1) [above] {Consultation};
\node at (0,2) [above] {Cooperation};
\node [align=center] at (0,3) [above] {Autonomous\\ acting};
\end{tikzpicture}
\caption{Pyramide 2}\label{fig:Pyr2}
\end{subfigure}%
\caption{Participation pyramide}
\label{fig:participation}
\end{minipage}
\end{center}
Siehe Abbildung \ref{fig:Pyr2}
\end{document} [/code]