TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i'm making a documentation of a system, and i have a lot of code chunks that i want to explain, but some of them are too long. My questions if there are some way to automatically shrink those too big chunks to a fixed number of lines, let say N+3 where 3 are the 3 dotted lines, something like


i'm actually using listings to typeset those code chunks.

share|improve this question
up vote 1 down vote accepted

You can use the linerange setting to limit the number of lines in the code that you are displaying.

share|improve this answer
Nice! that helps a lot, now i need to write the three dotted vertical lines, do you know how? – mjsr Jan 5 '11 at 21:57

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.