Generalfirst label gets lost when enumerate enclosing LTXexample

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

first label gets lost when enumerate enclosing LTXexample

Post by yoyoimut »

EnumGetLost.jpg
EnumGetLost.jpg (20.26 KiB) Viewed 2534 times

Code: Select all

\documentclass{article}
\usepackage{showexpl}

\begin{document}
\begin{enumerate}
\item%
\begin{LTXexample}
one one one
\end{LTXexample}
\item%
\begin{LTXexample}
two two two
\end{LTXexample}
\end{enumerate}
\end{document}

I have no idea about this bug.


Thank you.


regards,


Yuko.

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

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

first label gets lost when enumerate enclosing LTXexample

Post by localghost »

yoyoimut wrote:[…] I have no idea about this bug. […]
Perhaps the package maintainer has.


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

first label gets lost when enumerate enclosing LTXexample

Post by yoyoimut »

Accidently, I found the solution of this bug.
Just wrap the previous with minipage and the bug vanishes.

Code: Select all

\documentclass{article}
\usepackage{showexpl}

\begin{document}
\begin{enumerate}
\item%
\begin{minipage}{\linewidth}
\begin{LTXexample}
Something
\end{LTXexample}
\end{minipage}
\item%
\begin{minipage}{\linewidth}
\begin{LTXexample}
Something
\end{LTXexample}
\end{minipage}
\end{enumerate}
\end{document}
Post Reply