4

How can I change the color ans shape of

\note{0,0}{Center}

in this example

\documentclass[11pt]{scrartcl} % use larger type; default would be 10pt
\usepackage[wby]{callouts}
 \usepackage{mwe}% for the example image
\begin{document}

  \begin{annotate}{\includegraphics[width=\textwidth]{example-image}}{0.25}
    \helpgrid[gray]
    \note{0,0}{Center} <---------------------------------------------------------------
    \callout{40,3}{Mushrom}{3,2}
    \arrow{-3,-2.4}{-4.5,-3}
    %And raw tikz
    \draw[very thick,red] (-4,4) rectangle (-3,3);
  \end{annotate}
\end{document}

How can I put such notes

\node[rectangle callout, fill=myblue,text width=2cm,align=center,font=\sffamily\bfseries\color{white},#1] at #2 {#3}; 

in the example above?

1 Answers1

3

The callouts package is very simple, and it's not hard to change its commands to pass options explicitly. In this redefinition I've left all options up to the user. Note that the package doesn't use the TikZ shapes.callouts library, so I've added that so that you can use your callout shape code.

\documentclass[11pt]{scrartcl} % use larger type; default would be 10pt
\usepackage[wby]{callouts}
\usetikzlibrary{shapes.callouts} % added
 \usepackage{mwe}% for the example image
\renewcommand{\note}[3][]{%
\node [#1] at (#2) {#3};
}

\begin{document}

  \begin{annotate}{\includegraphics[width=.7\textwidth]{example-image}}{0.25}
    \helpgrid[gray]
    \note[rectangle callout, fill=blue,text width=2cm,align=center,font=\sffamily\bfseries\color{white}]{0,0}{Center} <---------------------------------------------------------------
    \callout{40,3}{Mushrom}{3,2}
    \arrow{-3,-2.4}{-4.5,-3}
    %And raw tikz
    \draw[very thick,red] (-4,4) rectangle (-3,3);
  \end{annotate}
\end{document}

enter image description here

Alan Munn
  • 218,180