2

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.

1

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

| 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
0

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}
| 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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