LaTeX forum ⇒ Text Formatting ⇒ QED 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: 268
Joined: Sun Nov 16, 2014 8:51 pm

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

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

thomasb
Posts: 132
Joined: Thu Aug 03, 2017 10:54 am
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: 268
Joined: Sun Nov 16, 2014 8:51 pm

thomasb
Posts: 132
Joined: Thu Aug 03, 2017 10:54 am
It worked... What are you trying to do, get rid of the minipage ?
MinimalTest.pdf

 :
• line 1251 in the cls file, there is the definition of the environment Example :

\spn@wtheorem{example}{Example}{\itshape}{\rmfamily}

• line 696 : there is the end of the proof symbol


Maybe you can use the command \smartqed directly, there seem to be vertical space management.

user49915
Posts: 77
Joined: Wed Apr 17, 2019 12:51 pm
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: 77
Joined: Wed Apr 17, 2019 12:51 pm

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/springer-cms/rest/v1/content/20566/data/v10
as of now.

user49915
Posts: 77
Joined: Wed Apr 17, 2019 12:51 pm
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: 132
Joined: Thu Aug 03, 2017 10:54 am
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: 77
Joined: Wed Apr 17, 2019 12:51 pm
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: 132
Joined: Thu Aug 03, 2017 10:54 am
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 ?