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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Please forgive me. I am quite the novice when it comes to LaTeX. I've been learning "on the fly" by downloading documents from the web and referring to sites like these to answer my questions. I'm at a total loss here.

In general, my question is how I can disable or otherwise override stretch/shrink on a page. I've tried \raggedbottom. thinking that it would leave white space at the bottom of a given page and keep all default text spacing. No such luck. So, then I tried using \vspace, thinking surely it would keep it's assigned size. 10pt would always be 10pt, right? No such luck. On this site, I read about how vertical shrink/stretch works, but I don't know how or where to "turn it off."

A very simple example:

\begin codeblock
   code (multi-colored)
\end codeblock

Paragraph text.....

codeblock is a custom environment and code is the actual code. The words in the code are colored based on there function. When I look at the codeblock environment, I see no references to stretch or shrink. The problem I'm having is that I always want the same distance after the end of codeblock and the start of the next paragraph (currently using \vspace to do this), but currently this keeps changing.

I'm having the same trouble with the tabular environment. I don't care if the rest of the page shrinks or stretches a small bit (although I want to continue to use raggedbottom), but I want the space after a table or code block to be uniform. Any suggestions??? Much appreciated.

share|improve this question

closed as too localized by egreg, lockstep, Gonzalo Medina, Kurt, Stefan Kottwitz Nov 3 '12 at 23:03

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

I just found a posting about \textfloatsep and \intextsep. If I don't include a shrink or stretch parameter, will this maintain a fixed vertical size? – Paul Kronmeyer Jul 16 '12 at 20:17
Welcome to TeX.SX! It's quite difficult to say something without an example of code. It may depend on many different factors. – egreg Jul 16 '12 at 20:20
Q "... will this maintain a fixed vertical size?" Not having a "glue" (stretchable and/or shrinkable) component will certainly help. Do check also that \parskip is a rigid length in your documents -- the default definition (given in latex.ltx) is \parskip=0pt plus 1pt, i.e., there's some (very slight) stretchability there. – Mico Jul 16 '12 at 20:25
Perhaps \parskip is defined to have stretchable/shrinkable parts. Redefine it to a fixed amount. There are a lot of other LaTeX dimensions that will need to be "fixed" too, but \parskip can explain the behaviour you saw with your codeblock – JLDiaz Jul 16 '12 at 22:11

Browse other questions tagged or ask your own question.