GeneralLack of explpreset causes strange listing number separation

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
latexian
Posts: 19
Joined: Wed Aug 05, 2009 7:57 am

Lack of explpreset causes strange listing number separation

Post by latexian »

Hi all,

I notice a strange listing number separation when using LTXexample if explpreset option is not used GLOBALLY .

Here is my minimal code snippet:

Code: Select all

\documentclass[10pt]{article} % Because the minimal class does NOT define figure environment I use article class instead. 

\usepackage{showexpl}
\lstset{%necessary settings
	%explpreset={},
	breaklines=true,				
	frame=single,		
	numbers=left,pos=b}



\begin{document}

\begin{center} Using \verb|\lstlisting| as reference:\end{center}
\begin{lstlisting}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non nunc et velit tincidunt sagittis nec ut lacus. Vivamus tristique porttitor massa, nec elementum lacus sollicitudin sed.
\end{lstlisting}

\begin{center} Using \verb|LTXexample| environment without explpreset=\{\}\end{center}
\begin{LTXexample}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non nunc et velit tincidunt sagittis nec ut lacus. Vivamus tristique porttitor massa, nec elementum lacus sollicitudin sed.
\end{LTXexample}

\end{document}

And here is the output:

Image


However, this problem can be solved just by typing explpreset={} GLOBALLY.


Correct me if I am wrong.

Thank you.


regards,

LATEXIAN

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

Post Reply