General ⇒ showexpl : If ”numbers=none” then margin should be 0. Why?
showexpl : If ”numbers=none” then margin should be 0. Why?
I am using LTXexample and don't want to enable code numbering.
However, I need to change xleftmargin and xrightmargin to equal to \fboxsep such that the frame of the formated text has the same width as that of the code.
Later I noticed that these changes will not take effect because showexpl
always reset both options. You can see the showexpl source code here : http://ftp.kaist.ac.kr/tex-archive/macr ... owexpl.pdf and please locate the code snippet between 324~326.
My question is
why did the author reset those options?
I want to disable the code between 324~326, but I am wondering unseen side effect will appear.
Thank you.
regards,
LATEXIAN
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
showexpl : If ”numbers=none” then margin should be 0. Why?
Code: Select all
\documentclass{article}
\usepackage{showexpl}
\newcommand*{\MARKER}{%
\noindent\strut\vrule%
\hrulefill~{\scriptsize half text area}~\hrulefill\vrule%
\hrulefill~{\scriptsize half text area}~\hrulefill\vrule%
\marginpar{\strut\vrule\hrulefill~{\scriptsize margin area}~\hrulefill\vrule}\\}% I add line break.
\lstset{%necessary settings
explpreset={pos=b,xleftmargin=\fboxsep,xrightmargin=\fboxsep},
breaklines=true,
frame=single,
numbers=none}
\begin{document}
\MARKER
\begin{LTXexample}
something something
\end{LTXexample}
\MARKER
\end{document}