1

In some very very very restricted cases, "cum grano salis", I'd like to manually adjust some brackets heights.

The idea is to have a single macro that accepts an argument with the correct horizontal spacing like \bigl/bigr and similar. I only car about (), [] and {}. I tried:

\documentclass[11pt]{article}
\usepackage{amsmath}
\pagestyle{empty}

\makeatletter
\newcommand{\BracketHeight}[1]{\bBigg@{#1}}%
\makeatletter

\makeatletter
\newcommand{\BracketHeightlr}[1]{%
    \@ifnextchar({\mathopen\bBigg@{#1}}{%
    \@ifnextchar){\mathclose\bBigg@{#1}}{%
    \@ifnextchar[{\mathopen\bBigg@{#1}}{%
    \@ifnextchar]{\mathclose\bBigg@{#1}}{%
    \@ifnextchar\{{\mathopen\bBigg@{#1}}{%
    \@ifnextchar\}{\mathclose\bBigg@{#1}}{\relax}}}}}}}
\makeatletter


\begin{document}

\begin{align*}
x&=\big(\times\big)\\
x&=\bigl(\times\bigr)\\
    x&=\BracketHeight{1}( \times \BracketHeight{1})\\
  x&=\BracketHeightlr{1}( \times \BracketHeightlr{1})
\end{align*}

\[
\BracketHeight{1}(
\BracketHeight{1.1}(
\BracketHeight{1.2}(
\BracketHeight{1.3}(
\BracketHeight{1.4}(
\BracketHeight{1.5}(
\BracketHeight{1.6}(
\BracketHeight{1.7}(
\BracketHeight{1.8}(
\BracketHeight{1.9}(
\]

\end{document}

enter image description here

You see that some values are "rounded".

Another idea is to write a macro that expands in:

\left NEXT BRACKET \rule{0pt}{#1cm}\right.

where #1 is the argument given to the macro. E.g. \BH{2}( should expand to \left(\rule{0pt}{#cm}\right. and \BH{2}) should expand to \left.\rule{0pt}{2cm}\right). Honestly, this second idea does not convince me very much.

What's the right way to do it?

2
  • 1
    the font supplies a small set of delimiters at a fixed set of sizes, then the extendable version with the straight middle section, arbitrary sizes are not available Feb 10, 2020 at 0:56
  • @DavidCarlisle I understand. If you like, please provide this comment as an answer so I can accept it. Thank you,
    – Gabriele
    Feb 10, 2020 at 7:11

1 Answer 1

2

The font supplies a small set of delimiters at a fixed set of sizes, then the extendable version with the straight middle section, arbitrary sizes are not available.

You must log in to answer this question.

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