Skip to content

Commit

Permalink
Replace subfig by subcaption
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor committed Jan 16, 2018
1 parent dd0bdb2 commit ef4797c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Added an explanation (`docs/overleaf.md`) with screenshots of how to start at overleaf.

### Changed
- Switched from [subfig](https://ctan.org/pkg/subfig) to [subcaption](https://ctan.org/pkg/subcaption) package
- Enabled line breaks in long urls (which are not separated by spaces or slashes) in the bibliography.
- Option `hyphens` added to package `url`: URLs can now also be hyphenated at hyphens, even though that might be confusing: Is the "-" part of the address or just a hyphen?.
- Switch from `uni-stuttgart-cs-cover.sty` to [scientific-thesis-cover](https://ctan.org/pkg/scientific-thesis-cover).
Expand Down
11 changes: 3 additions & 8 deletions config.tex
Original file line number Diff line number Diff line change
Expand Up @@ -361,14 +361,9 @@


%%%
% Fuer Abbildungen innerhalb von Abbildungen
% Ersetzt das Paket subfigure
%
% Due to bug #24 in the caption package we need to update caption3.sty at the moment manualy to use subfig.
% Bug #24: http://sourceforge.net/p/latex-caption/tickets/24/
% corrected caption3.sty: http://sourceforge.net/p/latex-caption/code/HEAD/tree/branches/3.3/tex/caption3.sty
%
\usepackage[caption=false, lofdepth=1, lotdepth, margin=5pt]{subfig}
% DE: Fuer Abbildungen innerhalb von Abbildungen
% Ersetzt die Pakete subfigure und subfig - siehe https://tex.stackexchange.com/a/13778/9075
\usepackage[hypcap=true]{subcaption}
%
%%%

Expand Down
30 changes: 23 additions & 7 deletions latexhints-german.tex
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,31 @@ \section{Abbildungen}


\begin{figure}
\centering
\subfloat[]{\includegraphics[width=0.3\textwidth]{choreography.pdf} \label{fig:subfigA}}
\subfloat[]{\includegraphics[width=0.3\textwidth]{choreography.pdf} \label{fig:subfigB}}
\subfloat[Subcaption if needed]{\includegraphics[width=0.3\textwidth]{choreography.pdf} \label{fig:subfigC}}
\caption{Beispiel um 3 Abbildung nebeneinader zu stellen nur jedes einzeln referenzieren zu können. Abbildung~\ref{fig:subfigB}
ist die mittlere Abbildung.}
\label{fig:subfig_example}
\hfill
\begin{subfigure}{.3\textwidth}
\includegraphics[width=\textwidth]{choreography.pdf}
\caption{Choreografie 1}
\label{fig:subfigA}
\end{subfigure}
\hfill
\begin{subfigure}{.3\textwidth}
\includegraphics[width=\textwidth]{choreography.pdf}
\caption{Choreografie 2}
\label{fig:subfigB}
\end{subfigure}
\hfill
\begin{subfigure}{.3\textwidth}
\includegraphics[width=.9\textwidth]{choreography.pdf}
\caption{Choreografie 3}
\label{fig:subfigC}
\end{subfigure}
\caption{Beispiel um 3 Abbildung nebeneinader zu stellen nur jedes einzeln referenzieren zu können.}
\label{fig:subfig_example}
\end{figure}

\Cref{fig:subfig_example} zeigt die Verwendung des subcaption-Pakets.
Es ist auch möglich, auf Unterabbildungen zu verweisen: \Cref{fig:subfigA}.

Es ist möglich, SVGs direkt beim Kompilieren in PDF umzuwandeln.
Dies ist im Quellcode zu latex-tipps.tex beschrieben, allerdings auskommentiert.

Expand Down

0 comments on commit ef4797c

Please sign in to comment.