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 have two paragraphs of instructions and I need to indicate to readers that they have a choice of one or another. I am using this code, to put the data into different columns, with a line between:

\startcolumns[n=2, rule=on]
        This is some instructions.
        This is some other instructions.

This makes a document like this, with a nice divide line in the middle:

|                               |
| This is some  : This is some  |
| instructions. : other instru- |
|               : ctions.       |
|                               |

I'd like to add the text "or", beween the two columns, to make it more clear that readers have a choice. This breaks the divide line and appears exactly in the middle, centered vertically on the line, and horizontally centered as well, e.g.:

|                               |
| This is some  :  This is some |
| instructions. or other instr- |
|               :  uctions.     |
|                               |

How can I add "or" text to the line dividing the two columns?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

There isn't any inbuilt command do add text to the column rule. Assuming that you are only interested in two column text that do not break across pages, you can fake two column text using low-level TeX and add a frame using metapost.




  ht := 2*StrutHeight;
  draw (OverlayWidth/2, OverlayHeight/2-ht/2) -- (OverlayWidth/2, 0);
  draw (OverlayWidth/2, OverlayHeight/2+ht/2) -- (OverlayWidth/2, OverlayHeight);

  setbounds currentpicture to boundingbox OverlayBox;

\newbox\leftcolumnbox   \newbox\rightcolumnbox

     \setbox\leftcolumnbox \hbox{\fakecolumn{#1}}%
     % location=top sets the ht of the box to structheight
     % and depth to the remaining length
         \dp\ifdim\dp\leftcolumnbox>\dp\rightcolumnbox\leftcolumnbox\else\rightcolumnbox \fi
    \hbox to \textwidth

\input zapf
  \input knuth
  \input ward
\input zapf

enter image description here

share|improve this answer
add comment

Your Answer


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.