1

I am constructing a figure with Tikz, and I need to insert different vertical parentheses (brackets) like in my previous question (see : How to construct a synoptic table?) which have different heights as below:

  • parenthesis 1730-1740 : 0.717cm
  • parenthesis 1740-1747 : 0.5019cm
  • parenthesis 1760-1789 : 2.0793cm
  • parenthesis 1790-1797 : 0.5019cm
  • parenthesis 1790-1799 : 0.6453cm
  • parenthesis 1800-1819 : 1.3623cm
  • parenthesis 1820-1832 : 0.8604cm
  • parenthesis 1820-1839 : 1.3623cm

I use } with different size as \big}\Big}\bigg}\Bigg}, but I can't control the sizes of the parentheses. Here is my code :

\documentclass[symmetric,justified,marginals=raggedouter]{tufte-book}
\usepackage{ulem,tikz}
\usetikzlibrary{automata,positioning,arrows.meta,shapes,calc}
\usetikzlibrary{positioning}

\begin{document}

\begin{tikzpicture}
\node[anchor=west,font=\normalsize](a)at(5.63cm,9.7465cm){\Big \} \strut};
\end{tikzpicture}

\end{document}

Who can help me to solve this problem ?

Thanks you in advance.

2
  • I'd use decoration=brace from decorations.pathreplacing, or decoration=calligraphic brace, which requires in addition calligraphy.
    – user194703
    Apr 4, 2020 at 22:07
  • However, I also have a more general advice. Your current example contains mainly irrelevant stuff, where irrelevant means it is not needed to tackle the problem you have. You might want to remove all unused packages from the preamble and copy the body of the code from your previous question to help others trying to help you.
    – user194703
    Apr 4, 2020 at 23:05

2 Answers 2

1

Within TikZ you can just use a (calligraphic) brace decoration to get a brace of any size.

\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{decorations.pathreplacing,calligraphy}
\begin{document}
\begin{tikzpicture}
\begin{scope}[thick,decoration=calligraphic brace]
 \foreach \X in {2,...,5}{
 \draw[stealth-stealth] (1.5*\X-0.3,0) -- ++ (0,\X*1em);
 \draw[decorate] (1.5*\X,0) -- ++ (0,\X*1em) 
 node[midway,left=0.5ex,fill=white,font=\small\sffamily]{\X\,em};
 }
 \pgfmathsetmacro{\myrnd}{4+rnd*6}
 \draw[stealth-stealth] (9-0.3,0) -- ++ (0,\myrnd*1em);
 \draw[decorate] (9,0) -- ++ (0,\myrnd*1em) 
 node[midway,left=0.5ex,fill=white,font=\small\sffamily]{\pgfmathprintnumber\myrnd\,em};
\end{scope}
\end{tikzpicture}
\end{document}

enter image description here

0

Thanks to Schrödinger's cat, I solve my problem and an example of parenthesis I want is obtained like this :

\documentclass[symmetric,justified,marginals=raggedouter]{tufte-book}
\usepackage{ulem,tikz}
\usetikzlibrary{automata,positioning,arrows.meta,shapes,calc}
\usetikzlibrary{positioning}
\usetikzlibrary{decorations.pathreplacing,calligraphy}

\begin{document}
\begin{tikzpicture}
\begin{scope}[thick,decoration=calligraphic brace]
\pgfmathsetmacro{\myrnd}{0.717} % <= 0,717 is the height
\draw[decorate,decoration={mirror}] (5.9,9.408) -- ++ (0,\myrnd*1cm) % <= (5.9,9.408) is the position on the tikzpicture and cm is the length unit (centimeter)
node{};
\end{scope}
\end{tikzpicture}
\end{document}

You must log in to answer this question.

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