5

I'm trying to create asymmetric parentheses so they will look nice in the equation that the following code produces. For this I defined a new command according to an answer I found here, and it looks indeed perfect, as you can see in the output.

The problem is, it does not work in bold math font for some reason. Can someone please help me produce the same second equation in the color and bold font shown in the first equation?

The commented code is what does not work.

\documentclass[a4paper,12pt]{article}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}
\usepackage{bm}
\usepackage[dvipsnames]{xcolor}

\newcommand{\lowerparen}[2]{%
\raisebox{-#1}{\(\displaystyle\left(\raisebox{#1}{\(\displaystyle#2\)}\right)\)}}

\begin{document} 

\[\textcolor{pink!20!purple}{\bm{\omega_f(x)\coloneqq\inf_{\delta>0}\bigg(\sup_{d(x,t),\hspace*{0.5mm}d(x,u)\leq\delta}|f(t)-f(u)|\bigg)}}\]

%\[\textcolor{pink!20!purple}{\bm{\omega_f(x)\coloneqq\inf_{\delta>0}\lowerparen{3pt}{\sup_{d(x,t),\hspace*{0.5mm}d(x,u)\leq\delta}|f(t)-f(u)|}}}\]

\[\omega_f(x_0)=D\hspace*{2mm}\overset{\big.\text{def}\big.}{\Leftrightarrow}\hspace*{2mm}\inf_{\delta>0}\lowerparen{3pt}{\sup_{d(x,t),d(x,u)\leq\delta}|f(t)-f(u)|}=D\]

\end{document}
1
  • why do you want to lower the parenthesis? It looks very odd, especially the closing ). Dec 8, 2020 at 20:51

1 Answer 1

6

Don't lower the parentheses. It's wrong.

If you insist on it and also in typesetting bold formulas, you can do much better.

\documentclass[a4paper,12pt]{article}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}
\usepackage{bm}
\usepackage[dvipsnames]{xcolor}

\newcommand{\lowerparen}[2]{%
  \raisebox{-#1}{\(\displaystyle\left(\raisebox{#1}{\(\displaystyle#2\)}\right)\)}}

\newenvironment{boldequation*}
 {\boldmath\begin{equation*}}
 {\end{equation*}\ignorespaces}

\begin{document} 

This has nice fences
\begin{boldequation*}\color{pink!20!purple}
\omega_f(x)\coloneqq\inf_{\delta>0}
  \biggl(\sup_{d(x,t),\,d(x,u)\leq\delta}|f(t)-f(u)|\biggr)
\end{boldequation*}
whereas this has much less nice fences
\begin{boldequation*}\color{pink!20!purple}
  \omega_f(x)\coloneqq\inf_{\delta>0}
  \lowerparen{3pt}{\sup_{d(x,t),\,d(x,u)\leq\delta}|f(t)-f(u)|}
\end{boldequation*}
On the other hand, this is better
\begin{boldequation*}\color{pink!20!purple}
  \omega_f(x_0)=D
  \overset{\text{def}}{\Leftrightarrow}
  \inf_{\delta>0}
  \Bigl(\,\sup_{\substack{d(x,t)\leq\delta\\d(x,u)\leq\delta}}|f(t)-f(u)|\Bigr)=D
\end{boldequation*}

\end{document}

enter image description here

Please, do consider the third case. There's no law requiring the brackets to cover the whole material.

2
  • Thank you, this is the perfect answer I was looking for. The first option is what my professor did in the statement of the problems (this is for an assignment in a master's degree). But it didn't look quite right to me. The third option looks much better, although I'm not sure which one to use. I suppose there's no perfect solution here, since the equation is asymmetric in itself. Dec 8, 2020 at 16:56
  • 2
    @WildFeather Just forget that the parentheses need to comprise everything in between them (vertically). It's not true: in the third realization, the parentheses lead the eye, the fact that some material is deeper is not a problem.
    – egreg
    Dec 8, 2020 at 16:59

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.