#StackBounty: #math-mode #environments #vertical-spacing #belowdisplayskip Ignoring belowdisplayshortskip or belowdisplayskip at the …

Bounty: 50

I would like to ignore belowdisplayshortskip or belowdisplayskip when it is at the end of a given environment.

In the MWE below, I am looking for a command lookedForCommand that delete the extra space avec [ ... ] in the third occurence of begin{test} ... end{test} but not in the second.

Is it possible? If yes, how to do it?

Thanks

documentclass{article}

setlength{parindent}{0pt}

deflookedForCommand{}

newenvironment{test}{bigskip xxxxxxxxxxxxxxxxxxxx smallskippar}{lookedForCommandparsmallskip xxxxxxxxxxxxxxxxxxxx bigskip}

begin{document}

begin{test}
We know that $1+1=2$.
end{test}

begin{test}
We know that [1+1=2]
and $1+2=3$.
end{test}

begin{test}
We know that [1+1=2.]
end{test}

end{document}

enter image description here


EDIT

Someone has posted his solution and I’m using it (without problem so far). But since then he has deleted it! I put here his code. I will open a bounty for this questions if there are no answer. I think it is an interesting question for all the community.

defremoveBelowDisplayskip
{par%
 ifdimlastskip=belowdisplayshortskipvskip-lastskipfi%
 ifdimlastskip=belowdisplayskipvskip-lastskipfi
 }


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.