2

I am trying to typeset a list of quotations in the following way:

  1. No quotation is split across pages.
  2. Between adjacent quotations on the same page, there is a separator (such as a fleuron or horizontal rule).

Note that, in particular, I do not want a rule after the last quotation on a given page.

I'd like to create a command that outputs a quotation and adds a rule only if a quotation follows (or precedes) it. How could I go about this?

  • Should the first quotation on a page be preceded by a fleuron (or something similarly decorative)? – Mico May 1 '15 at 4:31
  • this question in turn points to two others: Placing a decorative separator in text – barbara beeton May 1 '15 at 17:12
  • The separator should only appear between quotations; not before the first or after the last on any page. – Jacob Smullyan May 2 '15 at 14:23
3

The rule used in \leaders:

\leaders \hrule \vskip.4pt

is removable like another space on the page breaks. You can define somethig like this:

\raggedbottom
\newcount\quotnumber
\def\quotation{\par\global\advance\quotnumber by1
   \bigskip
   \ifnum\qoutnumber>1 \leaders \hrule \vskip.4pt \bigskip \fi
   \vbox
}

The introduction text.
\quotation{text of first quotation}
\quotation{text of second quotation}
etc.
\bye

The removable rule is placed before \vbox with quotation because we needn't to have the rule after the last quotation. The test "if it is the first quotation" is used because we needn't the rule between introduction text and the first quotation.

  • Thy is my first time asking a question here, and I see I didn't give enough information. I'm using LaTeX. If I use a counter to detect the first quotation on a page, how can I detect the page break? (Since quotations are formatted with minipages, they will never span pages.) – Jacob Smullyan May 2 '15 at 16:17
  • @JacobSmullyan OK, if you are using minipage then you can remove the last command \vbox from the definition of \quotation and you can use: \quotation \begin{minipage}...\end{minimage} \quotation\begin{minipage}...\end{minipage}. This looks more like LaTeX, isn't it? But \vbox does roughly the same as minipage environment. – wipet May 2 '15 at 16:40
  • I've had mixed success so far in getting /leaders to work. If the separator is an hrule, your solution works nicely; if I want to follow /leaders with something else, it never appears. E.g., using \leaders\hbox to \textwidth{\hfil \psvectorian[width=2em]{2} \hfil} \vskip.5pt \bigskip, nothing appears. – Jacob Smullyan May 3 '15 at 14:22
  • @JacobSmullyan Maybe your \hbox to has a width greater than .5pt, so it cannot fit into this very little space. You can check this and you can use \cleaders instead \leaders in such situation. If this doesn't solve your problem you can open new question and give your MWE because it seems to be somewhat different problem than the previous. – wipet May 3 '15 at 15:27
  • That fixed it, as I should have seen immediately. – Jacob Smullyan May 3 '15 at 23:41

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.