11

Three cheers to Andrew Stacey for giving us the calligraphy TikZ library that allows for elegant calligraphic braces in TikZ (something I've wanted for ages but was afraid to ask) -- among many other things. Output looks like this:

Brace produced by TikZ calligraphy library

which is produced with this code:

\documentclass[tikz,border=3mm]{standalone}

\usetikzlibrary{decorations.pathreplacing,calligraphy}

\begin{document}

\begin{tikzpicture}
    \draw[red,decorate,decoration={calligraphic brace,amplitude=6pt},thick] (0,0) -- (0,3);
\end{tikzpicture}

\end{document}

Notice the red option to \draw, which seems to have no effect on the brace. I've tried all sorts of things (even pen colour=red which gives an error), but I can't seem to colorize the brace. Tried with both XeLaTeX and pdfLaTeX. Any suggestions?

1 Answer 1

11

pen colour works for me:

\documentclass[tikz,border=10pt,multi]{standalone}
\usetikzlibrary{decorations.pathreplacing,calligraphy}
\begin{document}
\begin{tikzpicture}
  \draw[pen colour={red}, decorate, decoration={calligraphic brace, amplitude=6pt}, thick] (0,0) -- (0,3);
\end{tikzpicture}
\end{document}

red fancy curly bracket

10
  • 1
    As it happens, the presence or absence of braces is not the issue. My error was in assuming that pen colour=red belonged in the \decoration={...} statement. It does not. Again, my bad.
    – sgmoye
    Commented Jun 20, 2016 at 13:19
  • Yes, it is a little counter-intuitive. But it kind of makes sense because, if it was a regular brace decoration, your red outside decoration={} would change the colour. But actually, I just looked at the library's documentation :-).
    – cfr
    Commented Jun 20, 2016 at 15:07
  • As did I. What indicated the behavior that makes this work? Just curious to know what I missed...
    – sgmoye
    Commented Jun 20, 2016 at 15:11
  • @sgmoye I don't know if I have a good answer. pen colour seemed OK from the manual. It didn't like it inside decoration so the only other obvious place to try was really outside decoration. And I also did an example with a regular brace decoration, trying the colour inside and outside to see what gave an error and what worked, and then figured by analogy. The best thing I can really say is that I looked at the documentation and then ... er ... fiddled a little bit :-).
    – cfr
    Commented Jun 20, 2016 at 16:06
  • No problem. I fiddle a lot myself -- apparently just not enough.
    – sgmoye
    Commented Jun 20, 2016 at 16:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .