Graphics, Figures & Tablesdistance between paragraph and table

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
medi3ed
Posts: 4
Joined: Mon Sep 07, 2009 12:39 pm

distance between paragraph and table

Post by medi3ed »

Hello. Please, tell me, how can I decrease the distance between paragraph and table.
I'm tried to do this:

Code: Select all

\parskip=0cm
\setlength{\parskip}{0cm}
But it has no effect.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

php1ic
Posts: 192
Joined: Wed Jan 28, 2009 8:17 pm

distance between paragraph and table

Post by php1ic »

Try using \vspace with a negative value

Code: Select all

end of paragraph

\vspace{-0.5cm}

\begin{table}
medi3ed
Posts: 4
Joined: Mon Sep 07, 2009 12:39 pm

Re: distance between paragraph and table

Post by medi3ed »

It works. You are my heroy, php1ic. )) Thanks.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

distance between paragraph and table

Post by localghost »

medi3ed wrote:[...] Please, tell me, how can I decrease the distance between paragraph and table. [...]
The global solution would be to modify the length \intextsep by assigning a suitable value.


Best regards and welcome to the board
Thorsten
kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Re: distance between paragraph and table

Post by kaiserkarl13 »

You might also change the value of \textfloatsep (which is the distance between the paragraph and the floating table).
medi3ed
Posts: 4
Joined: Mon Sep 07, 2009 12:39 pm

distance between paragraph and table

Post by medi3ed »

The global solution would be to modify the length \intextsep by assigning a suitable value.
It's not work for me.
This is the part of LaTeX code.

Code: Select all

\documentclass[10pt,a4paper]{proc}
\usepackage[english,russian]{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphics}
\usepackage[height=29cm,a4paper,hmargin={0.5cm,0.5cm}]{geometry}
\begin{document}
  %\vspace{-0.4cm}
  \setlength\intextsep{-2cm}
  \begin{flushleft}
    \begin{tabular}[t]{|*{7}{p{1cm}|}}
What's wrong?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

distance between paragraph and table

Post by localghost »

Always provide complete examples. Assigning a negative value to this length register makes no sense. It would cause an overlap of the surrounding text and the table. Moreover you don't use a float environment (table here) in your example. The \intextsep length affects only the space between the text and a floating object. The flushleft environment is superfluous.
medi3ed
Posts: 4
Joined: Mon Sep 07, 2009 12:39 pm

distance between paragraph and table

Post by medi3ed »

Always provide complete examples.
Ok, this is complete example.

Code: Select all

\documentclass[10pt,a4paper]{proc}
\usepackage[english,russian]{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphics} % This package contains "rotatebox"
\usepackage[height=27cm,a4paper,hmargin={0.5cm,0.5cm}]{geometry}
\begin{document}

\newcommand{\myphonenum}{8-888-88-88}
\newcommand{\advertbody}{
  Текст объявления текст объявления текст объявления текст объявления текст объявления текст объявления текст объявления текст объявления 
  текст объявления текст объявления текст объявления текст объявления текст объявления текст объявления текст объявления текст объявления 
  текст объявления текст объявления текст объявления текст объявления 
  \setlength\intextsep{0cm}
  \setlength\textfloatsep{0cm}
  \vspace{0cm}
}

\newcommand{\continfo}{
  \begin{table}[H]
    % \caption{\advertbody}
    % \begin{center}  %flushleft}
    \begin{tabular}[t]{|*{7}{p{1cm}|}}
      \rotatebox{90}{
        \myphonenum
      }
      \rotatebox{90}{
        текст объявления 
      } &
      \rotatebox{90}{
        \myphonenum 
      }
      \rotatebox{90}{
        текст объявления 
      } &
      \rotatebox{90}{
        \myphonenum
      } 
      \rotatebox{90}{
        текст объявления 
      } &
      \rotatebox{90}{
        \myphonenum
      }
      \rotatebox{90}{
        текст объявления 
      } &
      \rotatebox{90}{
        \myphonenum
      }
      \rotatebox{90}{
        текст объявления 
      } &
      \rotatebox{90}{
        \myphonenum
      }
      \rotatebox{90}{
        текст объявления 
      } &
      \rotatebox{90}{
        \myphonenum
      }
      \rotatebox{90}{
        текст объявления 
      } \\ 
      \hline
    \end{tabular}
    % \end{center} %flushleft}
  \end{table}
}

\advertbody\
\continfo\

\advertbody\
\continfo\

\advertbody\
\continfo\

\advertbody\
\continfo\

\advertbody\
\continfo\

\advertbody\
\continfo\

\advertbody\
\continfo\

\advertbody\
\continfo\

\end{document}
Assigning a negative value to this length register makes no sense. It would cause an overlap of the surrounding text and the table.
OK, \intextsep has positive length now.
Moreover you don't use a float environment (table here) in your example. The \intextsep length affects only the space between the text and a floating object.
OK, I'm fixing it.
The flushleft environment is superfluous.
I don't think so. Try yourself.

So, I don't get the good result yet. This is my output.
sample0.png
sample0.png (32.87 KiB) Viewed 7347 times
P.S. My code isn't optimal, because I'm beginner.
Post Reply