I'm trying to have LaTeX examples in a document. I use the showexpl
package which lets me use the listings
package options. Because all fragments are short, line numbers are redundant.
The following MWE does not yield the result I want (i.e. there is a line number).
\documentclass{article}
\usepackage{showexpl}
\lstset{numbers=none}
\begin{document}
\begin{LTXexample}
Hello World!
\end{LTXexample}
\end{document}
When I define the option local(\begin{LTXexample}[numbers=none]
) the number is gone. I would rather delete them globally and not have to type extra code for every example, so using a new style would preferably be avoided.
I think the solution will be somewhat like this.