(This post bases on: lstaddons: Dynamic linewidth calculation)
Hey everyone,
is there a way to do this with a multiplication instead of two additions?
\dimexpr\linewidth+\lst@linebgrdsep+\lst@linebgrdsep\relax
Thank you in advance 🙂
calculations
(This post bases on: lstaddons: Dynamic linewidth calculation)
Hey everyone,
is there a way to do this with a multiplication instead of two additions?
\dimexpr\linewidth+\lst@linebgrdsep+\lst@linebgrdsep\relax
Thank you in advance 🙂
Best Answer
If
\lst@linebgrdsep
is a register then:Hint: Real numbers are also possible.
Otherwise:
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
\lst@linebgrdsep
in\dimexpr
.