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

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

Postby rais » Sat Jun 08, 2019 11:36 pm

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

User avatar
thomasb
Posts: 132
Joined: Thu Aug 03, 2017 10:54 am

Postby thomasb » Sun Jun 09, 2019 12:30 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 ?


User avatar
thomasb
Posts: 132
Joined: Thu Aug 03, 2017 10:54 am

Postby thomasb » Sun Jun 09, 2019 12:13 pm

It worked... What are you trying to do, get rid of the minipage ?
MinimalTest.pdf
(59.22 KiB) Downloaded 13 times


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

    Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
    1. \spn@wtheorem{example}{Example}{\itshape}{\rmfamily}

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

    Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
    1. \newcommand\qedsymbol{\hbox{\rlap{$\sqcap$}$\sqcup$}}
    2. \newcommand\qed{\relax\ifmmode\else\unskip\quad\fi\qedsymbol}
    3. \newcommand\smartqed{\renewcommand\qed{\relax\ifmmode\qedsymbol\else
    4. {\unskip\nobreak\hfil\penalty50\hskip1em\null\nobreak\hfil\qedsymbol
    5. \parfillskip=\z@\finalhyphendemerits=0\endgraf}\fi}}


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

user49915
Posts: 47
Joined: Wed Apr 17, 2019 12:51 pm

Postby user49915 » Sat Jun 15, 2019 3:46 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: 47
Joined: Wed Apr 17, 2019 12:51 pm

Postby user49915 » Sat Jun 15, 2019 4:00 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: 47
Joined: Wed Apr 17, 2019 12:51 pm

Postby user49915 » Sat Jun 15, 2019 4:15 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.

User avatar
thomasb
Posts: 132
Joined: Thu Aug 03, 2017 10:54 am

Postby thomasb » Sat Jun 15, 2019 7:47 pm

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

Postby user49915 » Sun Jun 16, 2019 3:53 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.

User avatar
thomasb
Posts: 132
Joined: Thu Aug 03, 2017 10:54 am

Postby thomasb » Sun Jun 16, 2019 10:27 pm

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 ?


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 5 guests