A KOMAscript based template a few years old needs some updates because versions and compatibilities have changed (eg. filecontents not requiring an extra package anymore, etc.). In this process I tried to get rid of warnings and/or packages for which there is already functionality in KOMAscript. float and caption are the last packages to resist.
The requirements are
- wanting to get rid of float [H] (the only reason the
floatpackage is used) - have captions aligned to the left below tables / figures
- optionally there might be some remark about the table / figure origin including a
\citebetween table/figure and caption - links from ListOf should go to the table/figure no the caption itself to be useful
Here's the code for the caption/float based version:
\documentclass{scrartcl}
\setkomafont{captionlabel}{\bfseries}
\usepackage{lipsum}
\usepackage{float}
\usepackage[
singlelinecheck=false,
]{caption}
\usepackage[
backend=biber,
citestyle=authoryear,
]{biblatex}
\addbibresource{\jobname.bib}
\begin{filecontents}{\jobname.bib}
@Book{Mittal2013,
title = {Netcentric System of Systems Engineering with DEVS Unified Process},
author = {Mittal, Saurabh and Martín, José L. R.},
publisher = {CRC Press},
year = {2013},
series = {System of systems engineering},
isbn = {978-1-4398-2707-9},
}
\end{filecontents}
\usepackage[
hidelinks,
breaklinks=true
]{hyperref}
\hypersetup{
bookmarksopen=true,
bookmarksopenlevel=3,
bookmarksnumbered=true,
linktoc=all,
}
\begin{document}
\listoftables
\newpage
\lipsum[1-4]
\begin{table}[H]
\begin{center}
\begin{tabular}{|l|l|}
\hline
\textbf{Category} & \textbf{Diagram type} \
\hline
Structure diagrams & Class diagrams \ \cline{2-2}
& Component diagrams \ \cline{2-2}
& Object diagrams \ \cline{2-2}
& Composite structure diagrams \ \cline{2-2}
& Deployment diagrams \ \cline{2-2}
& Package diagrams \ \hline
Behavior diagrams & Activity diagrams \ \cline{2-2}
& Use case diagrams \ \cline{2-2}
& State diagrams \ \hline
Interaction diagrams & Sequence diagrams \ \cline{2-2}
& Collaboration diagrams \ \cline{2-2}
& Interaction overview diagrams \ \cline{2-2}
& Timing diagrams \ \hline
\end{tabular}
\captionbelow*{Based on \protect\cite[p.~11]{Mittal2013}}
\captionbelow[UML diagram types]{UML diagram types\ \lipsum[1-1]}
\end{center}
\end{table}
\lipsum[5-5]
\cleardoublepage
\newpage
\printbibliography
\end{document}
And here is the code trying to achieve the same but only by using KOMAscript:
\documentclass[
captions=nooneline,
]{scrartcl}
\usepackage{lipsum}
\usepackage[
backend=biber,
citestyle=authoryear,
]{biblatex}
\addbibresource{\jobname.bib}
\begin{filecontents}{\jobname.bib}
@Book{Mittal2013,
title = {Netcentric System of Systems Engineering with DEVS Unified Process},
author = {Mittal, Saurabh and Martín, José L. R.},
publisher = {CRC Press},
year = {2013},
series = {System of systems engineering},
isbn = {978-1-4398-2707-9},
}
\end{filecontents}
\usepackage[
hidelinks,
breaklinks=true
]{hyperref}
\hypersetup{
bookmarksopen=true,
bookmarksopenlevel=3,
bookmarksnumbered=true,
linktoc=all,
}
\begin{document}
\listoftables
\newpage
\lipsum[1-4]
\begin{minipage}{\textwidth}
\begin{center}
\begin{tabular}{|l|l|}
\hline
\textbf{Category} & \textbf{Diagram type} \
\hline
Structure diagrams & Class diagrams \ \cline{2-2}
& Component diagrams \ \cline{2-2}
& Object diagrams \ \cline{2-2}
& Composite structure diagrams \ \cline{2-2}
& Deployment diagrams \ \cline{2-2}
& Package diagrams \ \hline
Behavior diagrams & Activity diagrams \ \cline{2-2}
& Use case diagrams \ \cline{2-2}
& State diagrams \ \hline
Interaction diagrams & Sequence diagrams \ \cline{2-2}
& Collaboration diagrams \ \cline{2-2}
& Interaction overview diagrams \ \cline{2-2}
& Timing diagrams \ \hline
\end{tabular}
\end{center}
Based on \cite[p.~11]{Mittal2013}
\captionbelowof{table}[UML diagram types]{UML diagram types\ \lipsum[1-1]}
\end{minipage}
\lipsum[5-5]
\cleardoublepage
\newpage
\printbibliography
\end{document}
It mostly works but links are pointing to the caption instead of the table.
