Open ekuiter opened 4 months ago
In 7b93138468ac9605f1e5267958eb9a619ed71544, I have manually reviewed all usages of \vspace
and \\
and mostly needed to change \vspace*{-4ex}
to \vspace*{-3ex}
to get the old look back.
This is a workaround for the issue at hand, but the inline todo % TODO Benno: why is this hack needed?
still applies. Can we somehow avoid these manually added margins altogether @Benno2000 and whether this is an issue in the template or in our usage here? I think this only happens when a math environment begins right after \begin{fancycolumns}
.
I ask because I want to avoid readjusting these margins again, should the template change in the future.
I just took a look at this issue. It does not seem to be an issue with the fancycolumns
environment, as a math-environment inside a single colorbox also has the space above it.
However, this seems to be the normal behavior of a math display environment as it is usually used inside a text and not at the beginning of a new paragraph: https://tex.stackexchange.com/a/337107
To solve this, the paddings of the math display environments can be adjusted like shown in the post mentioned above. So for example you could use \setlength{\abovedisplayskip}{0ex}
(or something < 0 if the padding is still to large) to set the top padding of the environments to 0 at the top of the document (after \begin{document}
).
If I understand it correctly, this \setlength
would affect all boxes, those with only text included. So it would be difficult to distinguish both kinds of boxes ... which probably means we have to stick with \vspace
, I guess.
Display-math environments should never, ever occur at the start of a paragraph.
To me, that seems to be an unreasonable expectation. But if it's the official way LaTeX handles this, there is probably little we can do.
Thanks for looking into it!
We should then at least use a common macro such that we can easily change that vspace by changing a single location.
Unfortunately, the space itself depends also on the content that follows (e.g., if it is \small
). :/
I can try and look whether this can be unified somehow.
Isn't if feasible to insert some dummy content of height zero on top to avoid this extra handling? This could then be added using a macro.
Good idea, unfortunately it does not seem to work (I tried \hphantom), because I need to set a negative space, height zero does not cut it.
I also experimented with different units of length (millimeters are independent of the selected font, but this does not work either).
I would prefer to have a minimal example and to discuss this further for the template. Florian may be able to help then.
Due to commit 26dba4b (updated slide template), some paddings in boxes have now been "improved":
This is due to additional
\vspace
commands, which I originally added to fix some broken paddings. This is not an issue in the slide template. The correct fix is go to through the slides and remove some of these\vspace
commands. I will do it when I find the time.