GeneralCan't get \parskip rubber values to behave

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
jandyman
Posts: 2
Joined: Thu Oct 25, 2012 4:08 pm

Can't get \parskip rubber values to behave

Post by jandyman »

Hello,

This my first post to the forum. I am relatively new to LaTeX. I'm posting in the general forum because the topic seems to span forum topic areas. Please redirect me if this is not the right forum to post on.

I am having problems getting LaTeX not to insert large amounts of space between paragraphs on a page when there is a large figure on an adjacent page. I'd rather have LaTeX leave blank space at the bottom of the adjacent page. I thought that the "rubber" values for \parskip would fix this, but they don't always seem to.

I've put together my best attempt at a MWE, which I'm attaching. There are two files - testit.tex and the included figure. I just run pdflatex and makeindex to generate the .pdf. I've also attached the resulting pdf.

I'm confused about a couple other issues - being a LaTeX newbie. One is how parameter scoping for parameters like \parskip works in LaTeX. Pointers to any sources that would help me learn about this would be appreciated. I'm a programmer, so documents with a "under-the-hood" focus are most useful to me.

Another thing I'm curious about is whether it is possible to give LaTeX some flexibility as to where it places a figure. In the attached example, I'm using an \mbox to include the figure. Is there a way to tell LaTeX "could you put the figure in this vicinity?" or "could you put the figure anywhere between here and here?". And even though this is not an example, I'm also curious about how one sets up wrapping text around a figure that is tall and narrow.

Thanks for any help in advance!

- Andy
Attachments
testit.pdf
(50.19 KiB) Downloaded 209 times
Overall_State_Diagram.pdf
(5.91 KiB) Downloaded 233 times
testit.tex
(2.41 KiB) Downloaded 216 times
Last edited by cgnieder on Fri Oct 26, 2012 2:36 pm, edited 1 time in total.

Recommended reading 2024:

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

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

josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Can't get \parskip rubber values to behave

Post by josephwright »

Most of the time, you should place figures and other large items as floats. The standard for a figure is

Code: Select all

\begin{figure}
  \includegraphics...
\end{figure}
LaTeX will then float the item to a suitable place. (This is covered by most LaTeX beginners texts such as LaTeX for Complete Novices.

On how scoping works, TeX is a macro expansion language, so there is no scope by 'function'. Instead, you need explicit groups, either

Code: Select all

{ ... }
or

Code: Select all

\begingroup ... \endgroup
. LaTeX environments for example form groups as they contain a \begingroup/\endgroup pair.
Joseph Wright
jandyman
Posts: 2
Joined: Thu Oct 25, 2012 4:08 pm

Can't get \parskip rubber values to behave

Post by jandyman »

Thanks for the reply! It was helpful in answering the second and third questions, which will serve me well 90% of the time. It also helped me find out why the content creation I was using (Doxygen) wasn't doing what I wanted in terms of generating LaTeX source.

And the pointer to the tutorial is good, I'll read it and it will hopefully add to what I've learned from other tutorials.

What I still don't understand, though, is why the "rubber values" for the \parskip parameter don't seem to work as advertised. Suppose I wanted to place a figure at a very specific place, and I didn't want LaTeX to stretch out all the inter-paragraph spaces on an adjacent page, but instead put extra white space at the bottom of the adjacent page. I've certainly seen this in books, and I still don't know how to do it.

- Andy
Last edited by cgnieder on Fri Oct 26, 2012 2:34 pm, edited 1 time in total.
Post Reply