2

I want to align the fig footer text in figure caption to left in double column image. Use of following code giving center alignment.

cta_author latex file is available at:CTA

\documentclass{cta-author}

\newtheorem{theorem}{Theorem}{}
\newtheorem{corollary}{Corollary}{}
\newtheorem{remark}{Remark}{}
\begin{document}
\begin{figure*}[!t]

    \centering{\includegraphics{sample_1.eps}}

    \caption{Sample graph with blue (dotted), green (solid) and red (dashed) lines
    \figfooter{a}{Subfigure 1}
    \figfooter{b}{Subfigure 2}\label{fig1}}

    \end{figure*}
\end{document}

Code output and required output

Werner
  • 603,163
  • 1
    Welcome to TeX.SE! Please provide us with a complete minimal working example, i.e. a document that starts with \documentclass and ends with \end{document}, can be compiled and illustrates the problem. BTW, your questions seems to have already been asked here. –  Nov 18 '18 at 01:30
  • Thanks marmot, but I am asking figfooter alignment, main caption alignment (not width) is still same – Vijay Kumar Nov 18 '18 at 01:50

1 Answers1

1

Below I've played around with boxes, setting the entire \caption inside a [t]op-aligned tabular with a single left-aligned column. The subfigure footnotes are set in the same format as \figfoot (using \selectfont{7}{9} and a italics font) and moved into position using the same width as the Fig. X: caption label:

enter image description here

\documentclass{cta-author}

\newlength{\figcaplab}

\begin{document}

\begin{figure}
  \centering
  \includegraphics[width=.5\linewidth]{example-image}

  \caption
    [Sample graph]
    {\settowidth{\figcaplab}{{\bfseries\sffamily \figurename.~\thefigure}:~}% Capture width of figure label
      \begin{tabular}[t]{@{} l @{}}
        Sample graph with blue (dotted), green (solid) and red (dashed) lines \\
        {\hspace*{-\figcaplab}\fontsize{7}{9}\selectfont a}\ Subfigure 1 \\
        {\hspace*{-\figcaplab}\fontsize{7}{9}\selectfont b}\ Subfigure 2
      \end{tabular}
    }

\end{figure}

\end{document}

Since the caption is set in a different-than-usual or complicated way, an optional argument is used to clear any issues that may result from have a LoF.

Werner
  • 603,163