Sign up ×
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 saw that several documentation packages use the environment to show macrocode long codes with page break, the example implementation of the package geometry. How do I do this? I wanted to show a code along with page break.

share|improve this question

1 Answer 1

The listings package provides this by default if you don't allow the code to float. Here's a little example:

enter image description here

for i:=maxint to 0 do
{ do nothing }
Write(’Case insensitive ’);
WritE(’Pascal keywords.’);
share|improve this answer
\usepackage{minted} \begin[linenos]{minted} bla bla bla \end{minted} – Regis da Silva Oct 2 '12 at 5:51

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.