Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

root concept: order of use and overwriting #1166

Open
muzimuzhi opened this issue Jun 11, 2022 · 0 comments
Open

root concept: order of use and overwriting #1166

muzimuzhi opened this issue Jun 11, 2022 · 0 comments
Labels

Comments

@muzimuzhi
Copy link
Member

Brief outline of the bug

There are two problems with mindmap style root concept:

Changing root concept/.style to root concept/.append style in definitions of styles like small mindmap will solve the problem, though not very elegant. And uses of wrongly ordered mindmap, ..., root concept/.append style=... in pgfmanual, last example for key /tikz/concept color should be adjusted.

In my understanding, root concept is used by style mindmap rather than specified by user as in \node[root concept] {...} child {...}; because it's currently impossible to detect level 0 root node for node tree only. This would be enabled when node parser is changed to first parse and collect node components. This way it will know whether the first node is a single node or the root node of a node tree.

Minimal working example (MWE)

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{mindmap}

\begin{document}
  % Modifying root concept` before `mindmap` works
  \tikz[root concept/.append style={concept color=blue!80},
        mindmap]
    \node [concept] {Root concept}
      child[concept color=red,grow=0] {node[concept] {Child concept}};

  % Modifying `root concept` after `mindmap` has no effect
  \tikz[mindmap,
        root concept/.append style={concept color=blue!80}]
    \node [concept] {Root concept}
      child[concept color=red,grow=0] {node[concept] {Child concept}};

  % Modifying `root concept` has no effect on styles like `small mindmap`.
  \tikz[small mindmap,
        root concept/.append style={concept color=blue!80}]
    \node [concept] {Root concept}
      child[concept color=red,grow=0] {node[concept] {Child concept}};
  \qquad
  \tikz[root concept/.append style={concept color=blue!80},
        small mindmap]
    \node [concept] {Root concept}
      child[concept color=red,grow=0] {node[concept] {Child concept}};
\end{document}

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant