tikz beamer math add tag
5 years ago Rmano

Hi all,

this is my first question here… I hope I am in the right place. So, this is a quite esoteric question so the example is a bit convoluted (and verbose, because I think it’s easier to understand like this).

The idea for the code is to have a command like \appearingbox<2->{name}{content}. This will typeset the content more or less “plain” in the first overlay and then boxed in the second one. Moreover, I will have the name available to link things with drawings.

I will dump the code here, will explain the problem after it.

This is the output:

ksnip_20200902-155136.png

Notice that when I use manually the versions of the \appearingbox macro for each style (non-math, displaystyle, etc.) like in the first frame (first row in the image) all is ok. The nodes are usable outside the command and, after a couple of runs, they work beautifully.

On the other hand, if I try to automatically select the appropriate function by way of \ifmmode and mathchoice I have a very puzzling (at leat for me) result. The appropriate macro is invoked but, alas, the nodes are in the wrong site.

I tried with \expandafter trickery, with older and newer TeXLives, by dancing around the computer… nothing works. I can survive with the manual method, but now I lost two hours trying to understand what happens and I’d like to understand it. Although probably the problem is that I misused \mathchoice (although I have a very similar construct in my package circledsteps).

Thanks!

Top Answer
5 years ago user 3.14159

This \mathchoice stuff is tricky, but the good news is that, if I understand correctly what you are up to, this is already taken care of by the tikzmark library.

ani.gif

5 years
user 3.14159 replying to Rmano — Thursday, 3rd Sep 2020 09:16

I do not think that these stars count. And there are more perfect numbers to come, it is not even known if there are infinitely many. Maybe we can find this out this way. 😉

Rmano — Thursday, 3rd Sep 2020 09:07

I was tempted to star it but you’ll lose your perfect number status…

5 hours
user 3.14159 — Thursday, 3rd Sep 2020 04:32

Rare footage of squirrel dancing around a computer.
ani.gif

8 hours
user 3.14159 replying to Rmano — Wednesday, 2nd Sep 2020 20:10

Yes, the OS has become what the religions were in the old days. (I should add that I “transitioned” from Linux to Mac, which was rather smooth since I have still the Linux shell so can do more or less everything I could do with Linux. I quit Windows for good some very long time ago.)

26 minutes
Rmano — Wednesday, 2nd Sep 2020 19:44

There is a MS Teams for Linux — it’s not guaranteed to work on 20.04 and sometimes it miss the microphone, but when it works it works ok.

32 minutes
user 3.14159 replying to Rmano — Wednesday, 2nd Sep 2020 19:12

OOOPS. This brings up a very interesting memory. Some very powerful person wanted my affiliation at that time to switch to Windows. The situation was really tense but in the end we could block it.

24 minutes
Rmano — Wednesday, 2nd Sep 2020 18:48

I have almost solved the QUCS problem (I managed to make an AppImage that works more or less everywhere) but I have no control on Teams…

Rmano — Wednesday, 2nd Sep 2020 18:47

😉 No the Ubuntu Problem is more mine. I have to use a couple of SW (namely, MS Teams forced by the University, and QUCS forced by me) that are not available yet on 20.04.

31 minutes
user 3.14159 replying to Rmano — Wednesday, 2nd Sep 2020 18:16

At some point, Andrew Stacey (=LoopSpace) was mentioning that the \mathchoice business is a bit tricky. One can see some of the issues e.g. here, but if you have fist-hand information from David you have an unfair advantage. 😉 (And sorry to hear about the Ubuntu problems, perhaps it is the penguins that freeze TeXLive in an old stage. 😉 )

Rmano — Wednesday, 2nd Sep 2020 18:14

On the other hand, I now know how mathchoice works (David Carlisle explained that to me)…

Rmano — Wednesday, 2nd Sep 2020 18:14

And now I found that the tikzmark on my main PC (which is for corporative reasons still stuck with Ubuntu 18.04) has an older version of it without \tikzmarknode. So I lost two hours of my life for not checking CTAN —

user 3.14159 replying to Rmano — Wednesday, 2nd Sep 2020 18:12

Makes sense.

Rmano — Wednesday, 2nd Sep 2020 18:09

The fit is for having a slighly bigger node around, I really use it with transparency, and then I use the node for several arrow/crossing/etc

Rmano — Wednesday, 2nd Sep 2020 18:08

Ouch! Missed the \tikzmarknode in tikzmarks… grrr. Thanks a lot.

27 minutes
user 3.14159 — Wednesday, 2nd Sep 2020 17:41

BTW, welcome here! (I should also say I that do not know precisely what the purpose of the fit is. If it is just to draw a frame, there might be alternatives.)

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.