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.

While reading one of Lev's answers, I encountered a pdfTeX primitive \quitvmode that I have never noticed before.

The pdfTeX manual states that this causes TeX to leave (internal) vertical mode and enter horizontal mode—the mode in which TeX is building paragraphs. This is the purpose of the plain TeX and LaTeX macro \leavevmode. The manual states that this does so without any bad interaction with \everypar.

The only examples I can think of where this would be useful are horribly contrived. For example,

\leavevmode foo

\quitvmode bar


which is more or less what I'd expect, but this use of \everypar is really silly.

What is an actual use where using \quitvmode instead of \leavevmode matters?

share|improve this question

1 Answer 1

up vote 7 down vote accepted

Discussion here. Take-home message seems to be "it's not really necessary with etex, but etex wasn't universally available when this was introduced in July 2004". Seems spurious to me, since if extensions to tex were needed, why should a pdftex extension preferable to an etex one? Anyway, the conclusion was that the primitive was already in use, so it shouldn't be removed lest something breaks.

share|improve this answer
Interesting discussion. I see why \ifvmode\indent\fi needs to be \protected. So I see why it's unnecessary with e-TeX extensions, but what I don't understand is why either a primitive or a \protected macro is needed at all. \leavevmode doesn't have expansion problems. The pdfTeX manual explicitly mentions \everypar, but I'm not really seeing the connection (beyond trivial examples like mine). –  TH. Mar 18 '11 at 3:26
@TH. My take is that it 'seemed like a good idea at the time', but like a few other primitives turns out to be not really that much use. –  Joseph Wright Mar 18 '11 at 6:44
Perhaps the e-TeX extensions weren't yet included in pdfTeX at that time? –  SamB Mar 6 '12 at 0:06

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.