In the following MWE, the strike out content is shifted horizontally and vertically. How avoid these shifts?

  \tikz \node [strike out,draw=red,line width=5pt]

enter image description here

  • 1
    Without having tested it: Why not using nearly the same code with the strikeout for the first image, too, but with the option draw=none instead of draw=red?
    – epR8GaYuh
    Jun 16, 2017 at 8:31
  • 2
    You are changing the boundary box, hence the shift. Use strike out with opacity=0 in the frame without the strike.
    – Huang_d
    Jun 16, 2017 at 8:32
  • @epR8GaYuh Still shifts Jun 16, 2017 at 8:38
  • @Huang_d All the content has opacity=0 hence is invisible Jun 16, 2017 at 8:38

1 Answer 1


The bounding box adjusts to its contents, that is why your picture jumps around. In order to keep the bounding box without figuring out how much bigger it gets from the strike out command, we need to draw the red line with full transparency. Just a simple opacity=0 makes the contained node transparent as well; A way around it is to specify opacities for different aspects of the picture. There are draw opacity, fill opacity and text opacity (pgf manual sec. 23.2). We need draw opacity=0 and text opacity=1, the latter because the includegraphics is inside the text part of the node. Hence on the first frame we need the code:

\tikz \node [draw opacity=0, text opacity=1,strike out,draw=red,line width=5pt]{

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.