1

How to get a curly brace of given length? (e.g: 100px)

The following works but it is obviously not the best solution:

\begin{cases}
\\
\\
\\
\\
\\
\\
\\
\end{cases}
AvidSeeker
  • 37
  • 6

3 Answers3

1

By mirroring how \Big and similar existing LaTeX commands are defined:

\documentclass{article}
\begin{document}

[ \left{\vbox to 100pt{}\right. ]

\end{document}

Output is as you expect.

user202729
  • 7,143
  • Side note, use https://tex.stackexchange.com/q/4327/250119 to find out how something is defined. In this case latexdef suffices – user202729 Apr 02 '22 at 01:52
1

Here are two macros that take a length as an argument. Note that these are not "paired" in the sense that you can use \biggglB without a matching \bigggrB.

enter image description here

\documentclass{article}
\usepackage{amsmath}

\newcommand{\biggglB}[1]{\left{!\parbox{0pt}{\rule{0pt}{#1}}\right.} \newcommand{\bigggrB}[1]{\left.\parbox{0pt}{\rule{0pt}{#1}}!\right}}

\begin{document}

[ \biggglB{70pt}ABC\bigggrB{50pt}\Biggl{ABC\Biggr}{ABC} ]

\end{document}

Sandy G
  • 42,558
0

Maybe something like this??

\documentclass{article}
\usepackage{rotating}
\newcommand\leftbrace[1]{\mathopen  {\raisebox{+2pt}{%
  \,\rotatebox[origin=c]{-90}{\hbox to #1{\upbracefill}}\,}}}
\newcommand\rightbrace[1]{\mathclose{\raisebox{-2pt}{%
  \,\rotatebox[origin=c]{+90}{\hbox to #1{\upbracefill}}\,}}}
\begin{document}
$\leftbrace{100pt}XxxX\rightbrace{10pt}-1$
\end{document}

enter image description here