I have two figures next to one another and I want to centre my Figure caption, but completely, i.e. to include Figure x.x: in centering.
This is the code I'm using:
\begin{figure}[!tbph]
\centering
\begin{minipage}[b]{0.4\textwidth}
\includegraphics[scale=0.2]{images/pie_chart_mobile.png}
\caption{Frequency of playing mobile video games}
\label{fig:pie_chart_mobile}
\end{minipage}
\hfill
\begin{minipage}[b]{0.4\textwidth}
\includegraphics[scale=0.2]{images/pie_chart_multiplayer.png}
\caption{Preference regarding multiplayer games}
\label{fig:pie_chart_multiplayer}
\end{minipage}
\end{figure}
And this is what I get:
What I actually want to have is this:
I tried the justification=centering
on the caption
package, didn't help. Any ideas?
EDIT: MWE:
\RequirePackage[l2tabu,orthodox]{nag}
\documentclass[headsepline,footsepline,footinclude=false,oneside,fontsize=11pt,paper=a4,listof=totoc,bibliography=totoc]{scrbook} % one-sided
\PassOptionsToPackage{table,svgnames,dvipsnames}{xcolor}
\usepackage[%
backend=biber,
url=false,
style=alphabetic,
maxnames=4,
minnames=3,
maxbibnames=99,
firstinits,
uniquename=init]{biblatex} % TODO: adapt bibliography style
\usepackage[demo]{graphicx}
\usepackage{caption}
\captionsetup{justification=centering}
\begin{document}
\begin{figure}[!tbph]
\centering
\begin{minipage}[b]{0.4\textwidth}
\includegraphics[scale=0.2]{images/pie_chart_mobile.png}
\caption{Frequency of playing mobile video games}
\end{minipage}
\hfill
\begin{minipage}[b]{0.4\textwidth}
\includegraphics[scale=0.2]{images/pie_chart_multiplayer.png}
\caption{Preference regarding multiplayer games}
\end{minipage}
\end{figure}
\end{document}
Result:
format=hang
of thecaption
package, in addition to thejustification=centering
option. Remove theformat=hang
, and you should get the desired output.caption
package. As I already wrote, I triedjustification=centering
, but it did not help, which means I'm probably somehow overwriting it, but I do not know how. So any ideas on that?