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.

I'm looking for a conditional that checks if the visual processor puts the depictable content of the macro that is going to be expanded at a specific place on the page where the content is placed.

The conditional should help me with the following task:

I have consecutive paragraphs that are separated by ornaments. Each ornament should only be processed if it's not the first box on the current page and if it's not the last box on the current page.

If my limited knowledge is right TeX's text processor has nothing to do with the placement of the calculated boxes on the actual page. So the questioned conditional should instruct the visual processor to put the wanted information into an auxiliary file that could be read on the second pass.

Is it possible to request such information from the visual processor to operate with it in the source file?


Addendum:

Although it takes a while until i grasp the effect of the \leaders directive i managed it with your help!

This is how it looks without using any leaders directive:

enter image description hereenter image description here

This is how it looks with \cleaders:

enter image description hereenter image description here

\documentclass{article}

\usepackage[pdf]{pstricks}
\usepackage{psvectorian}
\usepackage{lipsum}

\newlength\TextDividerHeight
\setlength\TextDividerHeight{11ex}

\newcommand{\TextDivider}{%
    \cleaders
        \vbox to \TextDividerHeight{%
            \vfil
            \centering%
            \psvectorian[color=black,scale=0.35]{88}%
            \vfil
        }%
    \vskip \TextDividerHeight
}

\begin{document}

    \section{section}
    \lipsum[1]
    \TextDivider
    \lipsum[1]
    \TextDivider
    \lipsum[1]
    \TextDivider
    \lipsum[1]
    \TextDivider
    \lipsum[1]
    \TextDivider
    \lipsum[1]
    \TextDivider
    \lipsum[1]
    \TextDivider
    \lipsum[1]
    \TextDivider

    \section{section}

\end{document}
share|improve this question
2  
The ornament should be realized with \leaders, so it behaves like glue that disappears at page breaks. Can you add an example, please? –  egreg Aug 15 '13 at 11:43
    
Thanks a lot for stating \leaders! –  user1146332 Aug 16 '13 at 10:12

1 Answer 1

up vote 8 down vote accepted

enter image description here

Your description of TeX's processing model doesn't really match the way it works, there is no "visual processor" really.

As mentioned in comments, you basically want the decoration to act like a space and be discarded when space is discarded, TeX calls such constructs leaders

\documentclass{article}

\addtolength\textheight{-20\baselineskip}

\def\a{One two three four five six seven eight nine ten. }
\def\b{Red yellow blue green. }
\def\c{\a\a\b\b\a\b\a\b\a}

\def\sep{%
\par
\vspace{1pt plus 5pt}%
\xleaders
\hbox to \textwidth{\hss\S\S\S\hss}
\vskip\baselineskip
\vspace{1pt plus 5pt}%
}
\begin{document}


\c

\sep

\b\c

\sep

\a\a\c\b

\sep

\b\a\a\c\b

\sep

\c\c

\end{document}
share|improve this answer
    
Thanks a lot for your help and the thorough example! –  user1146332 Aug 16 '13 at 10:29

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.