2
\documentclass[a4paper,11pt,oneside,openany,fleqn]{scrbook}
\usepackage[ngerman,english]{babel} % language listed last is default setting

\usepackage[labelfont=bf]{caption}

\usepackage[demo]{graphicx}

\begin{document}

\begin{figure}[!htb] \centering
\begin{minipage}{0.35\textwidth} \centering \resizebox{1.00\textwidth}{!}{%
\includegraphics[scale=0.50]{Figures/p-i-n_structure_schematic.pdf}}
\vspace{-6mm}
\captionof{figure}[Schematic sketch of the p-i-n sample structure for two opposing contacts]{\small Schematic sketch of the p-i-n sample structure for two opposing contacts.}
\label{p-i-n_structure_schematic.pdf}
\end{minipage} \hfill
\begin{minipage}{0.60\textwidth} \centering \resizebox{1.00\textwidth}{!}{%
\includegraphics[scale=0.50]{Figures/p-i-n_structure_CCD(edited).png}}
\vspace{-6mm}
\captionof{figure}[CCD image of the p-i-n sample as seen on the CRT monitor]{\small CCD image of the p-i-n sample as seen on the CRT monitor.}
\label{p-i-n_structure_CCD(edited).png}
\end{minipage} 
\end{figure}

\end{document}

I would like for the second/third/etc. line of the caption text of the left image to start right under the letter F of the label "Figure 0.1", but not for the image on the right. How can this be achieved?

  • Try \usepackage[labelfont=bf,format=plain]{caption}. – Arash Esbati Oct 8 '15 at 19:04
  • This changes the caption placement globally. I want it changed only locally, i.e. only for the image on the left, not for the one on the right or any other image in the document – Sebastian_92 Oct 8 '15 at 20:24
1

You can set the caption specific to any figure by adding appropriate \captionsetup options before using \caption:

enter image description here

\documentclass{scrbook}

\usepackage[labelfont=bf,font=small]{caption}
\usepackage{graphicx}

\begin{document}

\begin{figure}[htb]
  \captionsetup{format=plain}
  \begin{minipage}{0.35\textwidth}
    \centering
    \includegraphics[width=\linewidth]{example-image-a}
    \captionof{figure}{Schematic sketch of the p-i-n sample structure for two opposing contacts.}
  \end{minipage} \hfill
  \captionsetup{format=hang}%
  \begin{minipage}{0.60\textwidth}
    \centering
    \includegraphics[width=\linewidth]{example-image-b}
    \captionof{figure}{CCD image of the p-i-n sample as seen on the CRT monitor.}
  \end{minipage} 
\end{figure}

\end{document}
| improve this answer | |
  • If you put the \captionsetup{format=plain} into the minipage there is no need for the following \captionsetup{format=hang} anymore. – user2574 Oct 9 '15 at 8:03
3

With KOMA-Script you can use \setcapindent{1em} to order an indent of 1 em for the second and following heading lines of tables or figures. In your case use 0em.

KOMA-Script has an own mechanismn for captions, if you call package caption some of that functionality can not work.

To have bold caption label use with KOMA-Script for example \setkomafont{captionlabel}{\sffamily\bfseries} to get bold (\bfseries) sans serif (\sffamily) label. In your given example you didn't change the font for the label. Leave \sffamily out if you do not want it.

MWE (see <======= for my changes):

\documentclass[a4paper,11pt,oneside,openany,fleqn]{scrbook}
\usepackage[ngerman,english]{babel} % language listed last is default setting

%\usepackage[labelfont=bf]{caption}
\setcapindent{0em}%<====================================================
\setkomafont{captionlabel}{\sffamily\bfseries}% <=======================

\usepackage[demo]{graphicx}

\begin{document}

\begin{figure}[!htb] \centering
\begin{minipage}{0.35\textwidth} \centering \resizebox{1.00\textwidth}{!}{%
\includegraphics[scale=0.50]{Figures/p-i-n_structure_schematic.pdf}}
\vspace{-6mm}
\captionof{figure}[Schematic sketch of the p-i-n sample structure for two opposing contacts]{\small Schematic sketch of the p-i-n sample structure for two opposing contacts.}
\label{p-i-n_structure_schematic.pdf}
\end{minipage} \hfill
\begin{minipage}{0.60\textwidth} \centering \resizebox{1.00\textwidth}{!}{%
\includegraphics[scale=0.50]{Figures/p-i-n_structure_CCD(edited).png}}
\vspace{-6mm}
\captionof{figure}[CCD image of the p-i-n sample as seen on the CRT monitor]{\small CCD image of the p-i-n sample as seen on the CRT monitor.}
\label{p-i-n_structure_CCD(edited).png}
\end{minipage} 
\end{figure}

\end{document}

Result:

enter image description here

With a little change of the first MWE you can indent the first figur with 0 em, the second hangs as usual.

changed MWE (see <============== for changes):

\documentclass[a4paper,11pt,oneside,openany,fleqn]{scrbook}
\usepackage[ngerman,english]{babel} % language listed last is default setting

%\usepackage[labelfont=bf]{caption}
%\setcapindent{0em}%<====================================================
\setkomafont{captionlabel}{\sffamily\bfseries}% <=======================

\usepackage[demo]{graphicx}

\begin{document}

\begin{figure}[!htb] \centering
{\setcapindent{0em}% <====================================================
\begin{minipage}{0.35\textwidth} \centering \resizebox{1.00\textwidth}{!}{%
\includegraphics[scale=0.50]{Figures/p-i-n_structure_schematic.pdf}}
\vspace{-6mm}
\captionof{figure}[Schematic sketch of the p-i-n sample structure for two opposing contacts]{\small Schematic sketch of the p-i-n sample structure for two opposing contacts.}
\label{p-i-n_structure_schematic.pdf}
\end{minipage}%
} \hfill% <====================================================
\begin{minipage}{0.60\textwidth} \centering \resizebox{1.00\textwidth}{!}{%
\includegraphics[scale=0.50]{Figures/p-i-n_structure_CCD(edited).png}}
\vspace{-6mm}
\captionof{figure}[CCD image of the p-i-n sample as seen on the CRT monitor]{\small CCD image of the p-i-n sample as seen on the CRT monitor.}
\label{p-i-n_structure_CCD(edited).png}
\end{minipage} 
\end{figure}

\end{document}

and the result:

enter image description here

| improve this answer | |
  • This changes the caption placement globally. I want it changed only locally, i.e. only for the image on the left, not for the one on the right or any other image in the document. – Sebastian_92 Oct 8 '15 at 20:25
  • Works fine now. – Sebastian_92 Oct 8 '15 at 21:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.