Graphics, Figures & TablesSpace after images and tables

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Aereus
Posts: 2
Joined: Fri Dec 16, 2016 1:36 pm

Space after images and tables

Post by Aereus »

Hello guys,
I have a little problem using LaTeX, whose solution I didn't find anywhere.
When I put a table or an image in my code, in the first line of text I write an undesired space appears. This is an example code with the relative PDF produced.

Code: Select all

\begin{figure}[!h]
		\centering
		\includegraphics[width=0.7\linewidth]{"Programma di Input-Output 1"}
		\caption{Programma di Input/Output 1}
		\label{io1}
	\end{figure}

	Si è osservato il valore contenuto nella locazione di memoria A attraverso il visualizzatore dati. In particolare sono stati scelti come valori del parametro xx il numero 1 e 5. Si osserva un incremento di tale valore del numero riportato sul visualizzatore che non viene mai inizializzato.
problem.PNG
problem.PNG (56.07 KiB) Viewed 2703 times
The same happens when I write a table with
table, tabulary
Can anyone help me?
Thank you.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
TikZ book
User avatar
Stefan Kottwitz
Site Admin
Posts: 10314
Joined: Mon Mar 10, 2008 9:44 pm

Space after images and tables

Post by Stefan Kottwitz »

That's the paragraph indentation: in every new paragraph (except after headings), the first line is indented. Either you have it or you don't...

Take a look at your text when you add this line:
  • \usepackage{parskip}
It uses a vertical space between paragraphs instead of indentation. If you don't like it or if your supervisor says "No", you can remove the line.

Stefan
LaTeX.org admin
Aereus
Posts: 2
Joined: Fri Dec 16, 2016 1:36 pm

Space after images and tables

Post by Aereus »

thank you, adding it the undesired spaces disappear. But in this way it doesn't execute the "\newpage"s I wrote in my code, and some images are gone in undesired places (although I put the [!h], it doesn't put there the images...). So I am forced to remove that line :(
Does another way to delete the spaces exist?
Thank you
User avatar
Stefan Kottwitz
Site Admin
Posts: 10314
Joined: Mon Mar 10, 2008 9:44 pm

Space after images and tables

Post by Stefan Kottwitz »

The things you notice, just show that other things are wrong. \newpage would not be disabled. Perhaps you want \clearpage or \cleardoublepage instead. Also, [!h] is bad: it allows "here" but it forbids "top" or "bottom" if meaningful. Try [!htbp] for easiest placement. Both topics have nothing to do with that paragraph indentation, you just notice an effect after a change.

Stefan
LaTeX.org admin
Post Reply