Text FormattingQED on the last line of the center environment containing a TikZ drawing

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

QED on the last line of the center environment containing a TikZ drawing

Post by rais »

thomasb wrote:What about \hfill\QEDendingNonProofSymbol at the end ?
Let me put it this way: if I calculated the width for the {minipage} right, \hfill or not shouldn't make a difference.
You could instead exchange the {center} with a {flushright} environment and omit the \hspace{\QEDSymbolSpace} before the {minipage}. ;)

KR
Rainer

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

thomasb
Posts: 134
Joined: Thu Aug 03, 2017 10:54 am

QED on the last line of the center environment containing a TikZ drawing

Post by thomasb »

Do you have the version for the document class book available, so I can give it try ?

Or maybe you can upload the SVMono class ?
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

QED on the last line of the center environment containing a TikZ drawing

Post by rais »

thomasb
Posts: 134
Joined: Thu Aug 03, 2017 10:54 am

QED on the last line of the center environment containing a TikZ drawing

Post by thomasb »

It worked... What are you trying to do, get rid of the minipage ?
MinimalTest.pdf
(59.22 KiB) Downloaded 409 times
[edit] :
  • line 1251 in the cls file, there is the definition of the environment Example :

    Code: Select all

    \spn@wtheorem{example}{Example}{\itshape}{\rmfamily}
  • line 696 : there is the end of the proof symbol

    Code: Select all

    \newcommand\qedsymbol{\hbox{\rlap{$\sqcap$}$\sqcup$}}
    \newcommand\qed{\relax\ifmmode\else\unskip\quad\fi\qedsymbol}
    \newcommand\smartqed{\renewcommand\qed{\relax\ifmmode\qedsymbol\else
      {\unskip\nobreak\hfil\penalty50\hskip1em\null\nobreak\hfil\qedsymbol
      \parfillskip=\z@\finalhyphendemerits=0\endgraf}\fi}}
    Maybe you can use the command \smartqed directly, there seem to be vertical space management.
user49915
Posts: 81
Joined: Wed Apr 17, 2019 12:51 pm

QED on the last line of the center environment containing a TikZ drawing

Post by user49915 »

rais wrote:I didn't understand the benefit of putting a `proof' symbol into an example environment;
Sometimes you wish to denote the end of the example. I do it in a compact way by placing a QED-like symbol at the end.
rais wrote:all that even for a Springer class, which I find highly unusual to be tinkered with.
In my case, I have to stick to the Springer formatting guidelines, but they don't care about how I got there. They get a PDF. So, I get svmono and change it a bit such that my typesetting is eased.
rais wrote:is that less troublesome for you?
Well, your solution works (whether using center or flushright). But, this is a much more cumbersome, LaTeX way, and it leaves less horizontal space for the picture (which is o.k. for my examples so far, but not o.k. in general). I'd prefer that the vertical spaces introduced by \endcenter (resp. \endtrivlist) be simply undone.

I guess, you know all of it yourself, so, I said nothing new to you. In any case, thank you!
Last edited by user49915 on Sat Jun 15, 2019 4:12 pm, edited 3 times in total.
user49915
Posts: 81
Joined: Wed Apr 17, 2019 12:51 pm

QED on the last line of the center environment containing a TikZ drawing

Post by user49915 »

That's an old one from 2009. The new one from this year is available using the link in the code in the OP, which boils down to getting
https://resource-cms.springernature.com ... 6/data/v10
as of now.
user49915
Posts: 81
Joined: Wed Apr 17, 2019 12:51 pm

QED on the last line of the center environment containing a TikZ drawing

Post by user49915 »

thomasb wrote:the definition of the environment Example
The example environment is a red herring. You get an equivalent problem with any kind of theorem-like environment such as, e.g., definition or note, - you name it and, if needed, define it. What does matter is what comes right before the qed symbol.
thomasb
Posts: 134
Joined: Thu Aug 03, 2017 10:54 am

QED on the last line of the center environment containing a TikZ drawing

Post by thomasb »

user49915 wrote:What does matter is what comes right before the qed symbol.
How would it possible to add the qed automatically after an Example environment ?
user49915
Posts: 81
Joined: Wed Apr 17, 2019 12:51 pm

QED on the last line of the center environment containing a TikZ drawing

Post by user49915 »

thomasb wrote:How would it possible to add the qed automatically after an Example environment ?
It's off-topic in this thread. Still, it is possible using \AtEndEnvironment of etoolbox. But, you don't want that, since, as of now, the automatic addition gives suboptimal results when the last thing before the environment ends is not pure text. You want to have qed right on the last baseline if there is space there, but not unconditionally after the last baseline.
thomasb
Posts: 134
Joined: Thu Aug 03, 2017 10:54 am

QED on the last line of the center environment containing a TikZ drawing

Post by thomasb »

user49915 wrote:You want to have qed right on the last baseline if there is space there, but not unconditionally after the last baseline.
Do you know a mean to conditionally adapt the vertical spacing for the qed ?
Post Reply