2

I'm trying to change the text size and the gap between lines of caption of figure but it's not working.

I have tried these solution given by people in these questions How to adjust the gap between figure and caption within the same subfloat

Caption text and label size to only one figure

But none of them is working for me. A little help would be appreciated.

There's a list of packages i'm using.

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[a4paper,left=3.5cm,right=3.5cm,top=2.5cm]{geometry}
\renewcommand{\baselinestretch}{1.5} 
\renewcommand{\rmdefault}{phv} % Arial
\renewcommand{\sfdefault}{phv} % Arial
\usepackage{graphicx}
\usepackage{float}
\usepackage[demo]{graphicx}  
\usepackage[strict]{changepage}
\usepackage[justification=centering]{caption}
\usepackage[font=scriptsize]{caption}





\begin{figure}[H]
   \begin{adjustwidth}{-2cm}{-2cm}
\begin{minipage}[b]{0.49\linewidth}
   \includegraphics[width=\textwidth]{airmass_vs_ew_4854_87.pdf}
   \caption{\small The plot shows the difference of Equivalent width measured in two cases vs. Airmass. The red line shows the best linear fit.} 
\end{minipage}
\hfill
\begin{minipage}[b]{0.49\linewidth}
   \includegraphics[width=\textwidth]{airmass_vs_ew_by_ew4854_87.pdf}
   \caption{\small The plot shows ratio of the difference of Equivalent width  measured in two cases with Equivalent width measured using 2D blaze corrected spectra vs. Airmass. The red line shows the best linear fit.}
\end{minipage}
\end{adjustwidth}
\end{figure}
4
  • 1
    Welcome to TeX SX! Could you post a minimal working example?
    – Bernard
    Commented Oct 26, 2018 at 12:47
  • yeah ofcourse. @Bernard
    – astroluv
    Commented Oct 26, 2018 at 12:48
  • Let me guess: you want the caption to be typeset in \small`` size, not scriptsize` and the interline stretch to be normal (1), not 1.5?
    – Bernard
    Commented Oct 26, 2018 at 12:57
  • yeah exactly. That's what i want to do.
    – astroluv
    Commented Oct 26, 2018 at 13:01

2 Answers 2

2
\documentclass[11pt]{article}
\usepackage[a4paper,left=3.5cm,right=3.5cm,top=2.5cm]{geometry}
\usepackage{setspace}
\setstretch{1.5} 
\renewcommand{\rmdefault}{phv} % Arial
\renewcommand{\sfdefault}{phv} % Arial
\usepackage{graphicx}
\usepackage{float}
\usepackage[strict]{changepage}
%\usepackage[justification=centering,font=scriptsize]{caption}




\begin{figure}[H]
   \begin{adjustwidth}{-2cm}{-2cm}
\begin{minipage}[b]{0.49\linewidth}
    \includegraphics[width=\textwidth]{example-image-a}
   \caption{\fontsize{8}{7}\selectfont The plot shows the difference of Equivalent width measured in two cases vs. Airmass. The red line shows the best linear fit.} 
\end{minipage}
\hfill
\begin{minipage}[b]{0.49\linewidth}
\includegraphics[width=\textwidth]{example-image-a}
  \caption{\fontsize{8}{7}\selectfont The plot shows ratio of the difference of Equivalent width  measured in two cases with Equivalent width measured using 2D blaze corrected spectra vs. Airmass. The red line shows the best linear fit.}
\end{minipage}
\end{adjustwidth}
\end{figure}


\end{document}
0
2

I propose using floatrow for slightly different (and looking nicer, in myopinion) layout. I also used setspace to change the interlineskip, – it cooperates with the caption package, and replaced helvetica with the more complete clone TeX Gyre Heros:

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[a4paper, hmargin=3.5cm, top=2.5cm]{geometry}
\usepackage{setspace}
\renewcommand{\rmdefault}{qhv} % TeX Gyre Heros (Helveticalclone)
\renewcommand{\sfdefault}{qhv} %
\usepackage[demo]{graphicx}
%\usepackage{float}
\usepackage[demo]{graphicx}
\usepackage[strict]{changepage}
\usepackage[justification=centering]{caption}
\usepackage[font=scriptsize]{caption}
\usepackage{floatrow}
\onehalfspacing

\begin{document}

  \begin{figure}
\captionsetup{font={footnotesize, singlespacing}, format=plain, justification=centerlast}
   \begin{adjustwidth}{-2cm}{-2cm}
\begin{floatrow}
\ffigbox
   {\includegraphics[width=0.49\linewidth]{airmass_vs_ew_4854_87.pdf}}{\caption{The plot shows the difference of Equivalent width measured in two cases vs. Airmass. The red line shows the best linear fit.}}

\ffigbox{\includegraphics[width=0.49\linewidth]{airmass_vs_ew_by_ew4854_87.pdf}}{\caption{The plot shows ratio of the difference of Equivalent width measured in two cases with Equivalent width measured using 2D blaze corrected spectra vs. Airmass. The red line shows the best linear fit.}}%
\end{floatrow}
\end{adjustwidth}
\end{figure}
Some text. Some more ext. Some more ext. Some more ext. Some more ext. Some more ext. Some more ext. Some more ext. Some more ext. Some more ext. Some more ext. Some more ext. Some more ext. Some more ext. Some more ext. Some more ext.

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .