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.

This question was originally entitled "inconsistent paragraph spacing with \parskip inside minipage" as the MWE below shows. But I found the answer at How to preserve the same parskip in minipage, which works great as shown in the Modified Minipage section.

At the above linked question it is stated that inside of a minipage the value of \parskip is set to zero. But before I apply this fix to all my minipages I would like to understand the reasoning behind this decisions to set \parskip to zero inside minipages?

enter image description here

Code:

\documentclass{article}
\usepackage[parfill]{parskip}%

\newlength{\currentparskip}

\begin{document}
\section*{Outide Minipage}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis convallis enim vel sem blandit consectetur rutrum mi pretium.

Donec est neque, aliquet in tincidunt at, aliquam vitae risus. Nunc consectetur mattis dignissim. Praesent condimentum blandit condimentum

\section*{Standard Minipage}
\begin{minipage}{0.9\linewidth}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis convallis enim vel sem blandit consectetur rutrum mi pretium.

Donec est neque, aliquet in tincidunt at, aliquam vitae risus. Nunc consectetur mattis dignissim. Praesent condimentum blandit condimentum
\end{minipage}

\section*{Modified Minipage}
{\setlength{\currentparskip}{\parskip}% save the value
\begin{minipage}{0.9\linewidth}
\setlength{\parskip}{\currentparskip}% restore the value
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis convallis enim vel sem blandit consectetur rutrum mi pretium.

Donec est neque, aliquet in tincidunt at, aliquam vitae risus. Nunc consectetur mattis dignissim. Praesent condimentum blandit condimentum
\end{minipage}}
\end{document}
share|improve this question
1  
I am also curious why \parindent=0pt\relax in minipage. –  Who is crazy first Jul 28 '12 at 6:13
    
minipage and \parbox execute \@parboxrestore that makes tham start in a known state. I hope that LaTeX3 will have at least a hook for stating parameter values to keep inside. –  egreg Jul 28 '12 at 8:36
    
@egreg: But there must be a good reason why that was done that way? Any downside of restoring \parskip inside all minipages? –  Peter Grill Jul 29 '12 at 1:15
    
@egreg We have some 'open questions' on this: what do galleys do at the start. Clearly some form of mechanism is needed. –  Joseph Wright Aug 5 '12 at 9:58

1 Answer 1

up vote 13 down vote accepted

There is no definite rule about stylistic choices. As egreg says in the comments, LaTeX uses \@parboxrestore in these cases to get LaTeX into a consistent state at the start of minipages and parboxes irrespective of the environment in which they are used. Leslie Lamport just took the essentially arbitrary decision that in the (typically) narrow column width of such a parbox that zero indentation and zero vertical parskip was the best default.

share|improve this answer

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.