siduction / sidu-manual

2 stars 6 forks source link

Use correct width for codeblocks #45

Closed Mister00X closed 2 years ago

Mister00X commented 2 years ago

The previous settings for the listings package use \textwidth as line width but \textwidth is "The full horizontal width of the entire page body." which is too large in (nested) lists. Therefore use \linewidth which is always the width of the current environment for the listings environment.

Tested by generating the German manual.

Fixes siduction/sidu-manual#44

hhl commented 2 years ago

One question, should we shorten the code block a little,

linewidth=.95\linewidth,

So, the code box is a bit smaller

Mister00X commented 2 years ago

One question, should we shorten the code block a little,

linewidth=.95\linewidth,

So, the code box is a bit smaller

Good idea :+1: this may look visually more appealing.

I'm gonna change that.

EDIT: It looks indeed way better!

hhl commented 2 years ago

I have tested it too, works like charm.

Thank you for helping to bring the manual in form and fixing the LaTeX code.

Mister00X commented 2 years ago

You're welcome. I am glad that I'm able to help siduction.