Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a document with many occurrences of

\begin{tabular} 
... 
\end{tabular}

I have been unable to find a global command that will reduce the vertical space before and after this environment. Any help appreciated. Here is the context:

\documentclass{report}
\usepackage{setspace,relsize,needspace,etoolbox}
\makeatletter
\preto{\@verbatim}{\topsep=-1.5pt \partopsep=-1pt }
\makeatother
\parskip 14pt
\parindent 0ex
\setstretch{1}
\begin{document}
\rule{\linewidth}{1mm}
\vspace*{\stretch{2}}
\vspace{.3in}
. . . 
\begin{spacing}{0.7}
\vbox{\noindent\textbf{re : Race/Ethnicity}
{\smaller
\begin{tabular}{ rrr }
n&missing&unique \\
4269&0&5 \end{tabular}
\begin{verbatim}
Mexican American (744, 17%), Other Hispanic (478, 11%) 
Non-Hispanic White (2103, 49%), Non-Hispanic Black (762, 18%) 
Other Race Including Multi-Racial (182, 4%) 
\end{verbatim}
}}

As Peter Grill stated (even though I didn't write a completely executable example) the act of simplifying is very useful - I think the \parskip is much of my problem. I think a solution to this is:

\usepackage{etoolbox}
\makeatletter
\preto{\@tabular}{\parskip=0pt}
\makeatother

which gets rid of extra space before the tabular but leaves too much afterwards.

The reason I've set parskip and parindent as I have (14pt, 0ex) is that this is for handouts for a course that also look decent when projected on a screen, i.e., this is a cross between printed and projected material.

share|improve this question
6  
The environment tabular doesn't add any vertical skip. –  Marco Daniel Mar 13 '12 at 19:58
2  
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. –  Werner Mar 13 '12 at 20:01
    
I'm sorry that I didn't post an example. The code I'm using is fairly complex and lengthy but I'll try to list in the original question above the various packages that may be interacting with tabular to cause the problem. –  Frank Harrell Mar 13 '12 at 20:33
3  
While listing the packages and code snippets are useful in explanations, it is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. Personally, I have often solved my own problems in the process of reducing the amount of code actually required to reproduce the problem. –  Peter Grill Mar 13 '12 at 20:35
    
Sorry, I don't understand. It would be nice if you make this a complete question, with a compilable example that clearly shows the problem. And, if you have a solution that works for you, add a separate answer -- self-answers are fine. Then this question would be useful as it will help others in the future who attempt to do something similar. Furthermore, if others have a better suggestion they can post additional answers as well. –  Peter Grill Mar 14 '12 at 16:46

1 Answer 1

Have you tried to add this command to your preamble?

\setlength{\textfloatsep}{0.1cm}

You can globaly change parskip using

\addtolength{\parskip}{-0.5mm}

Set the values to fit your needs.

Hope this helps

share|improve this answer
    
Perhaps you could elaborate on what the length \textfloatsep references in terms of figures and text. –  Werner Mar 28 '12 at 7:04
    
textfloatsep is the separation between floats and text. You can regulate how much space is left before and after. You can get more information here and here. The package titlesec is a powerful one, but changes many many things. –  JuanPi Mar 30 '12 at 10:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.