I would like to center a picture and draw an arrow to the part of the picture to have a text box with description. I have come up with an idea which is to put text box and picture under the same 'tikzpicture' but my picture doesn't go center that I want.

What I did is:

    \begin{tikzpicture}% based on https://tex.stackexchange.com/a/9561/ (Caramdir's fantastic answer to another question)
    \node (map) [anchor=south west, inner sep=0pt] at (1.35,0.0) 
    \node (box) [draw, rectangle] at (0.0,1.0) {Location};
    \begin{scope}[x={(map.south east)},y={(map.north west)}]
        \draw [->](box)--(.35,.4);

Any help is appreciated!

  • 1
    Using pgfinterruptedboundingbox as in \begin{pgfinterruptboundingbox} \node (box) [draw, rectangle] at (0.0,1.0) {Location}; \begin{scope}[x={(map.south east)},y={(map.north west)}] \draw [->](box)--(.35,.4); \end{scope} \end{pgfinterruptboundingbox} should solve this issue.
    – leandriis
    Commented Oct 8, 2020 at 8:47
  • @leandriis appreciated your help, it works!
    – Amos Tan
    Commented Oct 8, 2020 at 12:06
  • 1
    Welcome to TeX StackExchange! Commented Oct 8, 2020 at 12:20
  • @VeeHuaZhi Thank you for introducing, so good!
    – Amos Tan
    Commented Oct 8, 2020 at 12:24

1 Answer 1


Using @leandriis idea from his comment and some my small changes of your code, where consider also Caramdir's answer:

%--------------- show page layout. don't use in a real document!


\begin{tikzpicture}[node distance = 2mm]
    \node (map) [draw,
                 anchor=south west] % <--- https://tex.stackexchange.com/questions/9559/
                                    %   drawing-on-an-image-with-tikz)/9561#9561 (Caramdir)
\begin{pgfinterruptboundingbox}% <--- proposed by @leandriis
    \node (box) [draw, left=of map] {Location};
        \begin{scope}[x={(map.south east)},y={(map.north west)}]
            \draw[-Straight Barb, semithick] (box) -- (0.5,0.35);

enter image description here

  • thank you for typing out the code, appreciated!
    – Amos Tan
    Commented Oct 8, 2020 at 12:07
  • @AmosTan, Thanks on this site are normally given via upvotes. You may not be aware of this.
    – Zarko
    Commented Oct 8, 2020 at 12:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .