6

I wanted to have a blue annotation to explain one of the points, but it has a green outline, like the color of my mind map. How can I fix that

    \documentclass[12pt]{article}

    \usepackage[ngerman]{babel}
    \usepackage[a4paper, text={16.5cm, 25.2cm}, centering]{geometry}
    \usepackage[sfdefault]{ClearSans}
    \usepackage[utf8]{inputenc}
    \setlength{\parskip}{1.2ex}
    \setlength{\parindent}{0em}

    \usepackage{tikz}
    \usetikzlibrary{mindmap}

    \begin{document}

    \tikzstyle{every annotation}=[fill=blue!20, text width={}, align=left]
    \begin{tikzpicture}[mindmap, grow cyclic,
    every node/.style=concept,concept color=lime!80, level 1/.append style={level distance=5cm, sibling angle=120}, level 2/.append style={level  distance=3 cm, sibling angle=60}]

  \node{Lehramt}
        child{node{Pädagogik}
        child{node{Steop}}
        child{node{Erziehen und Beraten}}
        child{node{Lehren und Lernen}}
        child{node{Schul\-architek\-tur}}
}
child{node{Sport}
    child{node{Physio\-logie}}
    child{node{Anatomie}}
    child{node{Inklusives}}
}
child[level distance=6cm]{node{Französisch}
    child{node{Sprach\-kurs}}
    child{node (n2) {Fach\-didaktik}}
    child{node{Sprach\-wissen\-schaft}} 
    child{node{Landes\-wissen\-schaft}}
    child{node{Medien\-wissen\-schaft}}
    child{node{Literatur\-wissen\-schaft}}
}
;
\node [annotation, right,] at (n2.east) {Französisch unterrichten lernen}
   ;
   \end{tikzpicture}

   \end{document}

Mindmap

Thank you :)

  • Welcome to TeX.SX. Please add an output sample. This isnt necessary but helpful. – MaestroGlanz May 27 '16 at 7:49
  • 4
    @MaestroGlanz: The example is compilable and as such helpful, which is much more than we get a lot of other times from other users ;-) – user31729 May 27 '16 at 7:51
  • a workaround could be, to set the mindmap color temporary to blue. – MaestroGlanz May 27 '16 at 7:52
  • @ChristianHupfer Right. But I encountered it sometimes, that it didn't compile or not immediately. And sometimes the mistake can be seen at first sight if we see the output. As I said: Not necessary, but helpful. – MaestroGlanz May 27 '16 at 7:55
  • @Katharina: the annotation node {Französisch unterrichten lernen} inherits the settings from the mindmap concept color – user31729 May 27 '16 at 7:57
4

Use concept color=blue or draw=blue to override the inherited color settings from the mindmap nodes.

\documentclass[12pt]{article}
\usepackage[ngerman]{babel}
\usepackage[a4paper, text={16.5cm, 25.2cm}, centering]{geometry}
\usepackage[sfdefault]{ClearSans}
\usepackage[utf8]{inputenc}
\setlength{\parskip}{1.2ex}
\setlength{\parindent}{0em}

\usepackage{tikz}
\usetikzlibrary{mindmap}

\begin{document}


\begin{tikzpicture}[mindmap, grow cyclic,
  every node/.style=concept,concept color=lime!80, level 1/.append style={level distance=5cm, sibling angle=120}, level 2/.append style={level  distance=3 cm, sibling angle=60},
  every annotation/.style={concept color=blue,fill=blue!20, text width={}, align=left}%
]
  \node{Lehramt}
  child{node{Pädagogik}
    child{node{Steop}}
    child{node{Erziehen und Beraten}}
    child{node{Lehren und Lernen}}
    child{node{Schul\-architek\-tur}}
  }
  child{node{Sport}
    child{node{Physio\-logie}}
    child{node{Anatomie}}
    child{node{Inklusives}}
  }
  child[level distance=6cm]{node{Französisch}
    child{node{Sprach\-kurs}}
    child{node (n2) {Fach\-didaktik}}
    child{node{Sprach\-wissen\-schaft}} 
    child{node{Landes\-wissen\-schaft}}
    child{node{Medien\-wissen\-schaft}}
    child{node{Literatur\-wissen\-schaft}}
  };
  \node[annotation, right] at (n2.east) {Französisch unterrichten lernen};
\end{tikzpicture}
\end{document}

enter image description here

  • I suppose, she wants to have the same blue. – MaestroGlanz May 27 '16 at 8:09
  • @MaestroGlanz: I think Katharina is clever enough to change the colour value ;-) – user31729 May 27 '16 at 8:11
1

This is no proper solution, but a workaround:

\tikzstyle{every annotation}=[fill=blue!20, text width={}, align=left, line width=0.0001pt,]

It is not nice, but I dont want to keep it for myself either.

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.