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
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
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}