## LaTeX forum ⇒ Text Formatting ⇒ QED on the last line of a center environment containing a tabular

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
user49915
Posts: 75
Joined: Wed Apr 17, 2019 12:51 pm

### QED on the last line of a center environment containing a tabular

Continuing http://latex.org/forum/viewtopic.php?t=32551, running pdflatex on the input

we obtain
mwe.png (21.9 KiB) Viewed 358 times

As you might see, the bottom of the QED symbol (black square) aligns neither with the baseline of the last line of the tabular nor with the bottom of the tabular. The QED symbol is placed simply way too high. Any way to adjust the macro \qedEndingNonProofAfterCenter specifically for a tabular-inside-center setup such that the bottom of the QED symbol aligns either with the bottom of the tabular or with the baseline of the last line of the tabular?

(An aside is worth being made. Marginnote-based solutions to place the qed symbol are of second choice, since the package is abandoned and does lead to problems with a large book. Marginpar/marginline sometimes requires manual vertical adjustments, i.e., a no-go for automation. Using amsthm or ntheorem is also a no-go: in a non-minimal example, I use the class svmono V 5.6, and amsthm clashes with svmono in various ways, and ntheorem has bugs (e.g., doesn't jive with UTF-8 engines and has other problems, see http://tex.stackexchange.com/questions/tagged/ntheorem) and is both antique and abandoned. The inclusion of ntheorem with some options into svmono.cls is, in fact, so far from a clever design that I had to turn off ntheorem manually. (If you have problems with getting svmono.cls for the purpose of trying this very example out, go with the book class instead).

A minipage-based solution would probably work, but pollute the contents with formatting. I prefer the formatting related to QED to be hidden inside separate QED-placing macros (\qedEndingNonProofAfterCenter above) as much as possible.)
Last edited by user49915 on Mon Feb 03, 2020 1:22 am, edited 1 time in total.

Stefan Kottwitz
Posts: 9563
Joined: Mon Mar 10, 2008 9:44 pm
Perfect minimal example, so I tested it.

I did not have time to find out more besides testing if inserting a simple \vspace before the symbol would work. \vspace{0pt} already changes the baseline, so one my take minus the height of the symbol or a certain value. If it has to be quick it could be \end{center}\vspace{-2ex}\qedEndingNonProofAfterCenter but that's like a manually done fix.

Stefan

user49915
Posts: 75
Joined: Wed Apr 17, 2019 12:51 pm
Stefan Kottwitz wrote:\end{center}\vspace{-2ex}\qedEndingNonProofAfterCenter

First, thanks for taking your time to look into this.
Second, the main problem I have with verbatim values such as -2ex above is that they are ad-hoc, hence, have to be adapted whenever you change the font or, even worse, the current formatting (e.g. \parskip, \topskip, etc.), or, at worst, when the glue is automatically added/subtracted.
Third, beyond any doubt you know it already, I know that you know, and you know that I know that you know...