[Tex/LaTex] caption without figure envirorment

captions

I'm making a report with a latex editor. I have a caption made up by two pictures in a column. The picture below is larger than that of above, and I use center envirorment without 'figure' in order to obtain the pictures aligned. I only use \includegraphics. Does anybody know how can I put the pictures a 'subcaption' like (a),(b) withou the figure envirorment?? because if I use it the picture below appears not aligned. Thanks

Best Answer

Here two different packages are used subcaption and subfig for demonstration. Without figure environment, one could use minipage environment with columnwidth setting and seek helps from

\makeatletter
\def\@captype{figure}
\makeatother

If List of Figures is desired then use \caption{...}, \listofigures commands and compile twice to get the proper rendering.

enter image description here

Code

\documentclass[]{report}
\usepackage[showframe,margin=2cm]{geometry}
   \usepackage[utf8]{inputenc}
   \usepackage[T1]{fontenc}
   \usepackage{multicol}
   \columnsep=10pt 
   \columnseprule=3pt 
%   \usepackage{subfig}       % for subfloat
   \usepackage{subcaption}    % for subcaptionbox
   \usepackage{graphicx} 
   %\usepackage{amsfonts, amsmath, amsthm, amssymb} 
   \usepackage{lipsum}


\begin{document}
\listoffigures

\begin{multicols}{2} 

\lipsum[1-3]
\vfill
\columnbreak

% to run this session, please disable `sufig` package and enable `subcaption` package

\subsection*{Subcaptionbox section}
\noindent
\begin{minipage}{\columnwidth}
\makeatletter
\def\@captype{figure}
\makeatother
  \centering
  \subcaptionbox{Above  \label{fig:above}}{%
  \includegraphics[width=0.5\columnwidth]{example-image-a}}\\
  \subcaptionbox{Below  \label{fig:below}}{%
  \includegraphics[width=0.8\columnwidth]{example-image-b} }
  \caption{Two figures}\label{Fig}
\end{minipage}

% to run this session, please disable `subcaption` package and enable `subfig` package

%\subsection*{Subfloat section}
%
%\noindent
%\begin{minipage}{\columnwidth}
%\makeatletter
%\def\@captype{figure}
%\makeatother
% \centering
%  \subfloat[Above]{%
%  \includegraphics[width=0.5\columnwidth]{example-image-a}
%  \label{fig:above}
%}\\
%  \subfloat[Below]{%
%  \includegraphics[width=0.8\columnwidth]{example-image-b}
%  \label{fig:below}
%}
%  \caption{Two figures,\label{Fig}}
%\end{minipage}
\end{multicols}
\end{document}
Related Question