math-optim/report/pics.tmpl
surtur 44cc400474
All checks were successful
continuous-integration/drone/push Build is passing
go(plot): streamline caption generation
* make sure to latex-escape captions (for correct line breaks)
* enable showing captions
* enable listing subfigure captions
* make sure latex lof (list of figures) picks up on subfigure captions
* clarify we need the subcaption package for subfigures, not subcaptions
2022-07-19 19:23:39 +02:00

34 lines
1.1 KiB
Go HTML Template

% Code generated by math-optim; DO NOT EDIT.
%
% This file was generated by robots at
% {{ .Timestamp }}
% source: git.dotya.ml/wanderer/math-optim/report/pics.tmpl
% This file is a part of the math-optim project.
% project homepage: https://git.dotya.ml/wanderer/math-optim/
\subsubsection{ {{- printf "%s - %s" .Algo .Bench -}} }
\begin{figure}[h!]
\centering
{{- range $i, $v := .Pics }}
\begin{subfigure}{0.30\textwidth}
% note: this accomodates 3 plots a row comfortably..should the requirements
% change, this would have to be reworked.
{\includesvg[scale=0.45]{ {{- printf "%s" $v.FilePath -}} }}
\caption{ {{- printf "\\scriptsize{%s}" $v.Caption -}} }
\end{subfigure}
\hfill
{{- end -}}
{{ range $k, $w := .PicsMean }}
\begin{subfigure}{0.30\textwidth}
\vspace{2em}
{\includesvg[scale=0.45]{ {{- printf "%s" $w.FilePath -}} }}
\caption{ {{- printf "\\scriptsize{%s}" $w.Caption -}} }
\end{subfigure}
\hfill
{{- end }}
\caption{ {{- printf "%s - %s" .Algo .Bench -}} }
\end{figure}
% vim: ft=gotexttmpl.tex ts=2 sts=2 sw=2 bs=2 expandtab