Aegidius wrote:I'm inserting inline images in this way
Code: Select all
\centerline{
\includegraphics[width=90mm]{/home/egidio/Dropbox/laurea/img/nursing-home.jpg}
}
I'd avoid
\centerline
. This is a Plain TeX command that LaTeX only keeps for compatibility. If you use LaTeX's
{center}
environment you'll get also some vertical space above and below (what I guess you meant by margins?)
Aegidius wrote:but I need to add captions to images. I'm not able to use
this external package. Would you please help me?
Instead of capt-of you can use caption and its
\captionof
command:
Code: Select all
\documentclass{article}
\usepackage{caption}
\usepackage{mwe}% example images
\usepackage{kantlipsum}% example text
\begin{document}
\kant[1]
\begin{center}
\includegraphics{example-image-a}
\captionof{figure}{A non-floating figure \emph{with} a caption!}
\end{center}
\kant[2]
\end{document}

- captionof1.png (29.33 KiB) Viewed 136104 times
Should you happen to use a KOMA-Script class you can use
\captionof
out of the box:
Code: Select all
\documentclass{scrartcl}
\usepackage{mwe}% example images
\usepackage{kantlipsum}% example text
\begin{document}
\kant[1]
\begin{center}
\includegraphics{example-image-a}
\captionof{figure}{A non-floating figure \emph{with} a caption!}
\end{center}
\kant[2]
\end{document}
If your class is memoir you can define something called
fixed caption:
Code: Select all
\documentclass{memoir}
\newfixedcaption{\figcaption}{figure}
\usepackage{mwe}% example images
\usepackage{kantlipsum}% example text
\begin{document}
\kant[1]
\begin{center}
\includegraphics{example-image-a}
\figcaption{A non-floating figure \emph{with} a caption!}
\end{center}
\kant[2]
\end{document}
If non of that helps you then please provide a
minimal working example (MWE) similar to the code I posted.
Regards