1

We suppose to take, as example, a very good @Jake's solution: Drawing on an image with TikZ where I have put a generic image (I not remember where I have download it).

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
    \node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=0.9\textwidth]{cat}};
    \begin{scope}[x={(image.south east)},y={(image.north west)}]
        \draw[help lines,xstep=.1,ystep=.1] (0,0) grid (1,1);
        \foreach \x in {0,1,...,9} { \node [anchor=north] at (\x/10,0) {0.\x}; }
        \foreach \y in {0,1,...,9} { \node [anchor=east] at (0,\y/10) {0.\y}; }
    \end{scope}
\end{tikzpicture}
\end{document}

The output is this:

enter image description here

I make my images in pdf using Adobe Illustrator. Is there a package that can generate this kind of callouts with comments that can be placed according to the coordinates of the grid. Probably a grid with squares, than the rectangle grid, could be more useful.

Here there is an example, where the line of the callout is fixed if I can to choose the coordinate of a point (x,y).

enter image description here

I don't remember where I downloaded the photo right now. Excuse me.

  • \usetikzlibrary{shapes.callouts}? (see my user profile ;-) – Schrödinger's cat Sep 15 '19 at 20:44
  • @Schrödinger'scat I have seen your profile but your code (excuse me for this) has any problem. "Are there any missing closing brackets in your document? Use Ctrl+Shift+9 to activate Bracket Matcher tool which will help you to spot the problem." using Papeeria and with TeXworks the process stops. – Sebastiano Sep 15 '19 at 20:49
  • On my computer the code from my profile works fine. – Schrödinger's cat Sep 15 '19 at 20:56
1

What I meant is

\documentclass[tikz]{standalone}
\usetikzlibrary{shapes.callouts,shadows.blur,positioning}
\definecolor{dunno}{RGB}{182,192,180}
\begin{document}
\begin{tikzpicture}
    \node[anchor=south west,inner sep=0] (image) at (0,0) 
    {\includegraphics[width=0.9\textwidth]{example-image-duck}};
    \begin{scope}[x={(image.south east)},y={(image.north west)}]
        \draw[help lines,xstep=.1,ystep=.1] (0,0) grid (1,1);
        \foreach \x in {0,1,...,9} { \node [anchor=north] at (\x/10,0) {0.\x}; }
        \foreach \y in {0,1,...,9} { \node [anchor=east] at (0,\y/10) {0.\y}; }
        \path (0.5,0.5) coordinate (c)
         node[blur shadow,text opacity=1,opacity=0.8,font=\sffamily,
          align=center, fill=dunno,rounded corners,draw=none,rectangle callout,
          anchor=pointer,callout absolute pointer={(c)},above right=1cm and 2cm of c] {This is
          a duck.\\ Are ducks beings?}; 
    \end{scope}
\end{tikzpicture}
\end{document}

enter image description here

  • Are callouts always on the right? Is there a possibility of having them on the left too? – Sebastiano Sep 15 '19 at 21:26
  • 1
    @Sebastiano The callout is right because it says above right=.... If you say above left=..., it will be left. – Schrödinger's cat Sep 15 '19 at 21:29

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.