3

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?

2

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

  • Is there any possibility to get away from the grid-definition? For me it would be bette to define a number between 0...100 [% of the picture] – user146872 Oct 29 '17 at 19:02
  • And center left bottom. – user146872 Oct 29 '17 at 19:19

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.