0

I have been writing my paper in LaTex, but I can't put the caption{} right below the figure and align to it. I also need a single spacing from \caption{} to \fonte{}.

\font{} is from package abntex2cite.

formato.cls

\ProvidesClass{formato}
\LoadClass[12pt,openright,oneside,a4paper,article]{abntex2}

%%%%%%%% Packages
    \usepackage{newtxtext} %  font Times New Roman text
    %\usepackage{newtxmath} % font Times New Roman math
    \usepackage[utf8]{inputenc} 
    \usepackage[brazil]{babel} 
    \usepackage[T1]{fontenc}
    \RequirePackage[bibjustif, 
                    abnt-full-initials=yes, 
                    abnt-repeated-title-omit=yes, 
                    abnt-emphasize=it, 
                    alf]{abntex2cite} %  ABNT
    \usepackage{indentfirst} 
    \usepackage{geometry}
    \usepackage{amsmath} 
    \usepackage{calc}   
    \usepackage{xcolor} 
    \usepackage{graphicx} 
    \usepackage{float}    
    \usepackage{enumerate} 
    \usepackage{url}  
    \usepackage{setspace} 
    \usepackage{multirow} 
   \usepackage{caption} 

% Structure
\geometry{
 a4paper,
 left=2cm,
 right=2cm,
 top=2cm,
 bottom=2cm
 }
\setlength{\parindent}{1cm}
\setlength{\parskip}{0.2cm}  
\DoubleSpacing        


\captionsetup[table]{
  justification=raggedright,singlelinecheck=false,
  labelsep=colon
  }
\captionsetup[figure]{
  justification=raggedright,singlelinecheck=false,
  labelsep=colon
  }

\makeindex


main.tex


\documentclass{formato}

\begin{document}
\pagestyle{plain}
\pagenumbering{arabic}

\begin{figure}[H]
  \includegraphics[width=\linewidth]{example-image-a}
  \caption{Distribuição do ROA do exercício}
  \label{fig:freqsobras}
  \fonte{Elaborado pelo autor.}
\end{figure}

\end{document}

What I have:

enter image description here

What I need:

enter image description here

8
  • 2
    What do you mean by "align" and "simple spacement"?
    – Ivan
    Mar 30, 2021 at 21:54
  • 3
    single spacing is the default in latex, you have provided no code to show double spacing and your caption only has one line so it is hard to see what change you want. The \fonte command you show is non standard and you give no definition for it so we can not comment on the space between \caption and \fonte. Mar 30, 2021 at 22:47
  • 1
    please always give a complete small document that shows your problem, you can use example-image for the example as that is available for tests. Then people can reproduce the issue and debug. Mar 30, 2021 at 22:49
  • 1
    If you mean to add a single space between the caption and the left margin, you can also specify the width or margin (see page 12 of caption manual). Mar 31, 2021 at 4:03
  • 1
    off-topic: align refers to a specific math display structure. I've changed the tag to "horizontal alignment". Apr 1, 2021 at 2:38

0

You must log in to answer this question.

Browse other questions tagged .