1

Used package subcaption to insert 2 photos. How to align each subfigure's caption to the right? The example code:

\documentclass[a4paper,12pt]{article}
\usepackage[demo]{graphicx}
\usepackage{lipsum}
\usepackage[list=true]{subcaption}

\begin{document}

\section{TEST}
\lipsum[1]
\begin{figure}
\centering
\captionsetup[subfigure]{labelformat=empty}
\begin{subfigure}[t]{1.0\linewidth}
    \includegraphics[width=1.0\linewidth]{example-image-a}
    \caption{This is figure A.}
\end{subfigure}%

\vspace{15pt}
\lipsum[1]  
\vspace{15pt}   

\begin{subfigure}[b]{1.0\linewidth}
    \caption{This is Figure B.}
    \includegraphics[width=1.0\linewidth]{example-image-b}
\end{subfigure}
\end{figure}

\end{document}
3

Try

\captionsetup[sub]{labelformat=empty,justification=raggedleft,singlelinecheck=false}
\begin{subfigure}[t]{1.0\linewidth}
    \includegraphics[width=1.0\linewidth]{example-image-a}
    \caption{This is figure A.}
\end{subfigure}%

enter image description here

| improve this answer | |

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.