4

The only curly braces in TikZ I'm currently aware of are the ones in the library \usetikzlibrary{decorations.pathreplacing}. However, I don't like the way they look, I'd much prefer ordinary braces used in math mode.

I have no idea how to get them. Help is appreciated. Thank you in advance and God bless.

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\setlength{\parindent}{0cm}

\begin{document}

This is ugly:

\begin{tikzpicture}[scale=1]
\draw [decorate,decoration={brace,amplitude=10pt}] (0,0) -- (5,0);
\end{tikzpicture}

This is pretty: \\
$\overbrace{\qquad\qquad\qquad\qquad\qquad\qquad\qquad\;}$

\end{document}

enter image description here

EDIT

When trying to compile this code:

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{decorations,calligraphy}

\begin{document}

\begin{tikzpicture}[scale=1]
\draw [very thick,decorate,decoration={calligraphic brace,amplitude=10pt}] (0,0) -- (5,0);
\end{tikzpicture}

\end{document}

I get the following log file with errors (Pastebin link).

pdflatex --version gives this output:

pdfTeX 3.14159265-2.6-1.40.19 (TeX Live 2018/W32TeX)
kpathsea version 6.3.0
Copyright 2018 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.34; using libpng 1.6.34
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with xpdf version 4.00
  • 3
    \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations,calligraphy} \begin{document} \begin{tikzpicture}[scale=1] \draw [very thick,decorate,decoration={calligraphic brace,amplitude=10pt}] (0,0) -- (5,0); \end{tikzpicture} \end{document} – user121799 Jul 27 '19 at 7:16
  • @marmot Thank you! The thing is, the compiler is giving me an error in tikzlibrarycalligraphy.code.text on line 707. I also encourage you to post this as an answer so I can upvote and tick it after the issue is resolved. :) – Gregor Perčič Jul 27 '19 at 7:23
  • 3
    Update your TeX installation. If you are using overleaf, quit. – user121799 Jul 27 '19 at 7:24
  • 2
    You could just post the very precise code you trying to compile, specify your TeX installation and post the exact version of the error message. I am sure this will be resolved then. Without this information I am less sure. – user121799 Jul 27 '19 at 7:37
  • 1
    @GregorPerčič as I see it's similar error tex.stackexchange.com/questions/463282/… – Denys Potapov Jul 27 '19 at 9:21
1

Try to use the very thick modifier. And if you have an older version of latex uncomment the fix:

\documentclass{article}

\usepackage{tikz}

% uncommment next lines if you get "Undefined control sequence ..." error
% \usepackage{expl3}
% \ExplSyntaxOn
% \int_new:N \g__prg_map_int 
% \ExplSyntaxOff

\usetikzlibrary{decorations,calligraphy}

\begin{document}

\begin{tikzpicture}[scale=1]
\draw [very thick,decorate,decoration={calligraphic brace,amplitude=10pt}] (0,0) -- (5,0);
\end{tikzpicture}

\end{document}
  • 1
    If you have recent (less than about half year old) installation of LaTeX, than this fix is not needed anymore. And, please extend your answer with complete code for this calligraphic brace :-). – Zarko Jul 30 '19 at 17:55

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.