-
Notifications
You must be signed in to change notification settings - Fork 18
suggestion: sign in \belowdisplayskip #809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Ah, I'm sorry, that suggestion was too naive because Nevertheless, the issue persists. I don't know what is the right behaviour for a contributed package? Set the value of |
The idea is good and yes it would be better if the sign-flipping is hidden. Not that I'm keen on proposing that as a document interface but it was possible in the past so ... A probably better interface is to offer such local parameter settings through a standard first optional key/value argument that should be available anyway (eventually) like with the lists. Anway, your suggestion has to happen in If you want to do me a favor, write up a test file that exhibits the desired results (or rather doesn't exhibits it if not resolved). |
Ah, very nice! I did not recognise how
|
Not relevant to the problem at hand but this should be done with |
Second remark:
that's a very bad idea. This is a primitive and you overwrite this way (plain TeX \newdimen doesn't warn) and so you basically break LaTeX as \prevdepth is needed, even though in this doesn't show in the particular example (probably). |
@FrankMittelbach this is defining predepth not preVdepth |
@FrankMittelbach Fully agree. This was merely a simple-minded patch to demonstrate that moving the two lines |
so it does. Tomatos on the eyes as we say in German |
The situation as such is more complicated, unfortunately. Changing This means that one has to change every place where |
looks dire... so |
Here's a different approach that captures a display equation in a vbox (edited to remove all traces as far as I can see):
Now the ending can be adjusted before releasing the contents of the vbox to the encapsulating vmode. I'm not sure whether a boxed display equation is fully equivalent, so you may consider this for your entertainment only. :-) Alternatively, one could handle In fact, is a tagged align structure allowed to break pages (cf. |
Thanks for the fix, looking forward to it. So to make things work, do I understand correctly that one should use For completeness, here is some replacement code for
As far as I can see, this preserves all spacing and avoids a potential error message for display equations ending where a page breaks. It works fine with a few basic examples in amsmath, but may have adverse side-effects that I'm not aware of. Anyway, thanks for fixing. |
yes, together with |
I would like to modify
\belowdisplayskip
within a math environment (for example, reduce it upon specifying an optional parameter to some math environment). This change works well in TeX at the level of the$$
group. However, the tagging support changes the meaning of\belowdisplayskip
including its short variant by flipping the sign. This breaks the functioning of such a math environment (or requires dedicated handling).May I propose a change of the sign flip mechanism as follows:
Rather than flipping the sign in
\everydisplay
:https://github.com/latex3/latex2e/blob/ad660baa99c8691ce723efe0b9193e2b8f69a33f/required/latex-lab/latex-lab-math.dtx#L2641
perform the flip in
\@@_tag_dollardollar_display_end:
https://github.com/latex3/latex2e/blob/ad660baa99c8691ce723efe0b9193e2b8f69a33f/required/latex-lab/latex-lab-math.dtx#L2094
This should have the same effect if
\belowdisplayskip
is left untouched by the body of$$
. But if it is indeed changed in the body of$$
, the new processing location would capture the change. That way the sign flip mechanism will not be exposed to the user / package author. It would also reduce side effects such as display within display flipping the sign twice. Same suggestion for\postdisplaypenalty
which could be saved and implemented manually after closing$$
.A corresponding sign in amsmath would have to be flipped, too:
https://github.com/latex3/latex2e/blob/63d6757d237d1058883b84395b64479fe8a0fd2c/required/latex-lab/latex-lab-amsmath.dtx#L965
grep shows a few other appearances of
\belowdisplayskip
within latex-lab, but only within testfiles.Further suggestion (towards permitting negative values for
\belowdisplayskip
): Within\@@_tag_dollardollar_display_end:
the values of\belowdisplayskip
and\belowdisplayshortskip
could be globally saved, set to dedicated values like 0pt and -1pt, and after retrieving which of the two skips had been used, the appropriate original skip can be implemented.Thanks for considering.
The text was updated successfully, but these errors were encountered: