0

In fact, I want to have a horizontal space after a section, but the problem is when I include an image without using float environment there is no horizontal space. Here are the captions: When the image isn't used everything is fine enter image description here When the image is used : enter image description here

Here is the code that I used, the reason why I included those packages is to show if the use of a package might be the main cause for this no space alignment:

\immediate\write18{makeindex \jobname.nlo -s nomencl.ist -o \jobname.nls}
\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{lineno}
\usepackage{amsmath}
\usepackage{array, nccmath}
\usepackage[nottoc]{tocbibind}
\newcolumntype{L}{>{$}l<{$}}
\newcolumntype{m}{>{\displaystyle}l}
\usepackage{framed}
\usepackage{cclicenses}
\usepackage{makecell}
\usepackage[french]{babel}
\usepackage{setspace}
\usepackage{mathptmx}
\usepackage{multirow}
\usepackage{gensymb}
\usepackage{empheq}
\usepackage{mathtools}
\usepackage{array}
\renewcommand{\arraystretch}{1.9}
\newcolumntype{P}{>{\centering\arraybackslash$}p{1.6em}<{$}}
\newcolumntype{C}{>{\centering\arraybackslash$}c<{$}}
\usepackage{makecell}
\usepackage{booktabs}
\usepackage{subcaption}
\usepackage[intoc]{nomencl}
\begin{document}
\subsection{Section 1}
This first section concernes ....
%\begin{center}
\renewcommand{\cellset}{\renewcommand{\arraystretch}{0.8}}
\captionof{table}{Caption of IMAGE 1}
%\begin{tabular}
%\end{tabular}
%\end{center}
\begin{center}
\includegraphics[scale=0.450]{caption of image}
\end{center}
\subsection{Section 2}
This section 2 concerns.....
\end{document}
0

You shouldn't put a caption outside a proper environment (as the warning says). Using it inside a table environment, results in

result

with the following code:

\immediate\write18{makeindex \jobname.nlo -s nomencl.ist -o \jobname.nls}
\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{lineno}
\usepackage{amsmath}
\usepackage{array, nccmath}
\usepackage[nottoc]{tocbibind}
\newcolumntype{L}{>{$}l<{$}}
\newcolumntype{m}{>{\displaystyle}l}
\usepackage{framed}
\usepackage{cclicenses}
\usepackage{makecell}
\usepackage[french]{babel}
\usepackage{setspace}
\usepackage{mathptmx}
\usepackage{multirow}
\usepackage{gensymb}
\usepackage{empheq}
\usepackage{mathtools}
\usepackage{array}
\renewcommand{\arraystretch}{1.9}
\newcolumntype{P}{>{\centering\arraybackslash$}p{1.6em}<{$}}
\newcolumntype{C}{>{\centering\arraybackslash$}c<{$}}
\usepackage{makecell}
\usepackage{booktabs}
\usepackage{subcaption}
\usepackage[intoc]{nomencl}


\begin{document}
\subsection{Section 1}
This first section concerns\dots
\renewcommand{\cellset}{\renewcommand{\arraystretch}{0.8}}

\begin{table}[htp]
  \centering
  \captionof{table}{Caption of IMAGE 1}
  \includegraphics[scale=0.450]{example-image}
\end{table}

\subsection{Section 2}
This section 2 concerns.....
\end{document}

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.