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.

Using the "preview"-package, I want to put several paragraphs into one preview-environment. This works; however, any parskip-setting seems to be ignored.

\documentclass{minimal}
\setlength\parskip{10pt}
\usepackage{blindtext}
\usepackage[active,tightpage]{preview}

\begin{document}
\begin{preview}
\blindtext

\blindtext
\end{preview}
\end{document}

In the result, there is no parskip between the two paragraphs.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

You can try this but I don't know the consequences ;-)

\documentclass[english]{article}
\usepackage{babel}
\setlength\parskip{10pt}
\usepackage{blindtext}
\usepackage[active,tightpage]{preview}
\makeatletter
\long\def\pr@startbox#1#2{%
  \ifpr@outer
    \toks@{#2}%
    \edef\pr@cleanup{\the\toks@}%
    \setbox\pr@box\vbox\bgroup
    \break
%    \pr@outerfalse\@arrayparboxrestore
    \let\insert\pr@insert
    \let\mark\pr@mark
    \let\marks\pr@marks
    \expandafter\expandafter\expandafter
    \pr@ship@start
    \expandafter\@firstofone
  \else
     \expandafter \@gobble
  \fi{#1}}
\makeatother
\begin{document}
\begin{preview}
\blindtext

\blindtext
\end{preview}

\end{document}

enter image description here

share|improve this answer
    
Thanks, it works! It also seems to work to only comment out the \@arrayparboxrestore. However, as I don't know much about macro programming (this seems to be quite sophisticated to me), I have no idea what this solution does or whether it might have any side effects. I will try to see what happens with more complicated examples... –  Stefan Aug 29 '11 at 19:57
add comment

use an own \Par

\documentclass{article}
\def\Par{\endgraf\vspace{10pt}}
\usepackage{blindtext}
\usepackage[active,tightpage]{preview}

\begin{document}
\begin{preview}
\blindtext\Par

\blindtext
\end{preview}
\end{document}
share|improve this answer
    
Unfortunately, the part I want to preview comes from an external source, so I do not have the possibility to insert macros in between the text. Thanks for your help, though! –  Stefan Aug 29 '11 at 19:58
add comment

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.