(This post bases on: lstaddons: Dynamic linewidth calculation)
Hey everyone, is there a way to do this with a multiplication instead of two additions?
Thank you in advance :)
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.Sign up to join this community
\lst@linebgrdsep is a register then:
\dimexpr\linewidth + 2\lst@linebgrdsep \relax
Hint: Real numbers are also possible.
\dimexpr\linewidth + (\lst@linebgrdsep)*2 \relax
Note, the first factor is the length value, the integer factors follows afterwards in the product. This is limited to integer numbers.
Real numbers can be supported by wrapping the macro
\dimexpr\linewidth + 1.5\dimexpr\lst@linebgrdsep\relax \relax