add tag
5 years ago topnush

Take the following MWE:

I would like to highlight one instance of \Var{\tilde{f}_{a_i}} and draw an arrow from some boxed text placed at an arbitrary position on the right hand side of the slide to it. I only want this to appear for one transition.

Top Answer
5 years ago samcarter

One can use hf-tikz for the highlighting:

Screen Shot 2020-10-01 at 13.12.17.png

5 years
samcarter — Thursday, 1st Oct 2020 13:06

^^^ load the package earlier

samcarter — Thursday, 1st Oct 2020 13:05
topnush — Thursday, 1st Oct 2020 13:02

but it works if you comment out \usepackage[beamer,customcolors]{hf-tikz}

topnush — Thursday, 1st Oct 2020 13:01

that won’t compile

topnush — Thursday, 1st Oct 2020 13:01
topnush — Thursday, 1st Oct 2020 13:00

hf-tikz seems to have some incompatibility I don’t understand.

32 minutes
samcarter replying to topnush — Thursday, 1st Oct 2020 12:29

cool, I’ll wait then

topnush — Thursday, 1st Oct 2020 12:28

I’ll ask on the main bit 😃

topnush — Thursday, 1st Oct 2020 12:25

out of interest, is there any way to comment out a line in listings?

topnush — Thursday, 1st Oct 2020 12:23

now I want to upvote it again!

topnush — Thursday, 1st Oct 2020 12:23

😃

samcarter replying to topnush — Thursday, 1st Oct 2020 12:17

done 😃

topnush — Thursday, 1st Oct 2020 12:14

could you add this to your answer for others to enjoy too?

topnush replying to samcarter — Thursday, 1st Oct 2020 12:13

thank you

samcarter — Thursday, 1st Oct 2020 12:12

Screen Shot 2020-10-01 at 13.12.17.png

samcarter replying to topnush — Thursday, 1st Oct 2020 12:12
samcarter replying to topnush — Thursday, 1st Oct 2020 12:09

text width

samcarter replying to topnush — Thursday, 1st Oct 2020 12:09

Well done 😃

topnush — Thursday, 1st Oct 2020 12:08

how do you get the arrow to start at the top of the box? Currently it is going inside the box

topnush — Thursday, 1st Oct 2020 12:07

so I can have more than one line

topnush — Thursday, 1st Oct 2020 12:07

but I have remembered the align=left trick 😃

topnush replying to samcarter — Thursday, 1st Oct 2020 12:06

thank you

topnush — Thursday, 1st Oct 2020 12:06

I wasn’t sure how to use it that was the problem

samcarter replying to topnush — Thursday, 1st Oct 2020 12:06

What do you expect your tikzset to do if you don’t use the N style you define?

samcarter — Thursday, 1st Oct 2020 12:04
topnush — Thursday, 1st Oct 2020 12:03

my tikzset is currently doing nothing as well

topnush — Thursday, 1st Oct 2020 12:01

so I just need to get the text in the box and fix the arrow which isn’t quite pointing from the box

topnush — Thursday, 1st Oct 2020 12:00
topnush — Thursday, 1st Oct 2020 12:00

ok here is my latest failure

topnush replying to samcarter — Thursday, 1st Oct 2020 11:50

let me try that again

topnush — Thursday, 1st Oct 2020 11:48

sorry, I meant this problem.Screenshot from 2020-10-01 11-46-54.png

samcarter — Thursday, 1st Oct 2020 11:48
samcarter — Thursday, 1st Oct 2020 11:48

… or resuse your boxes from

samcarter replying to topnush — Thursday, 1st Oct 2020 11:45

You can move the start of the arrow around by modifying (0,2), or place a tikzmark at the boxed text

topnush — Thursday, 1st Oct 2020 11:41

I thought I would try it as a node

topnush — Thursday, 1st Oct 2020 11:40

how do I get it to be at the source of the arrow?

samcarter replying to topnush — Thursday, 1st Oct 2020 11:40

You can do the boxed text however you want. a tikz node, a tcolorbox, a beamer block …

topnush — Thursday, 1st Oct 2020 11:39

\draw<2>node {text}[->, overlay, dashed] (2,0) to [bend right](pic cs:foo); is as far as I have got so far

topnush — Thursday, 1st Oct 2020 11:35

is that right?

topnush — Thursday, 1st Oct 2020 11:35

to add the boxed text I think I need to add node on the line \draw<2>[->] (2,0) – (pic cs:foo);

13 minutes
topnush — Thursday, 1st Oct 2020 11:22

thank you this is great! And simple enough for me to understand too 😃

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.