Generalshowexpl: how to skip the first n rows and the last m rows?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
yoyoimut
Posts: 120
Joined: Mon Oct 19, 2009 6:58 am

showexpl: how to skip the first n rows and the last m rows?

Post by yoyoimut »

Dear all,

I am using showexpl.sty to display side by side the code snippet and its corresponding output.

Because of the paper size limit, I intentionally want to remove the "redundant" rows, i.e., the first n rows and the last m rows from the code snippet.

Is it possible to do that in showexpl.sty ?


You can use the following minimal code: :)

Code: Select all

\documentclass{article}

\usepackage{showexpl}
\lstset{%
% any setting goes here.
}
\begin{document}

\begin{LTXexample}[%
%any option goes here.
]
%redundant n rows begin
% one
% two
% ...
% n th rows
Important parts go here.
Again... it is important!
...
%redundant m rows begin
% one 
% ...
% m th rows
\end{LTXexample}

% others important parts go here.
\end{document}
Thank you in advance.
Last edited by yoyoimut on Wed Nov 24, 2010 6:17 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

yoyoimut
Posts: 120
Joined: Mon Oct 19, 2009 6:58 am

showexpl: how to skip the first n rows and the last m rows?

Post by yoyoimut »

I got the answer using linerange option.
Post Reply