# Round parentheses in math mode when using kpfonts

I am trying to write a simple equation that contains fractions, square roots and parentheses. However the output is ugly I'd say

I tried reducing the space on the nominator using a user-defined command (\fixit) but it doens't do the trick.

The problem seems to be the kpfonts, but I have to use old style fonts without using XeLaTeX.

Any idea on how to make the parenthesis appear more circular?

A simple code can be seen bellow

\documentclass{book}

%~~~~~~~~~~~~~~~ Fonts ~~~~~~~~~~~~~~~~~~~~
\usepackage[]{kpfonts}

%~~~~~~~~~~~~~~~ Math ~~~~~~~~~~~~~~~~~~~~~
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsthm}

% To remove blank spaces when using \left( and \right)
\newcommand\fixit[4][\displaystyle]{
\setbox0=\hbox{$#1#3$}
\setbox2=\hbox{$\vcenter{\copy0}$}
\raisebox{\dimexpr\ht0-\ht2}{$#1\left#2\copy2\right#4$}
}

\begin{document}
$$E=mc^2\left(\dfrac{1}{\sqrt{1-\left(\frac{L}{tc}\right)^2}}-1\right)$$

$$E=mc^2\fixit{(}{\dfrac{1}{\sqrt{1-\left(\frac{L}{tc}\right)^2}}-1}{)}$$

\end{document}

• Are you committed to using the kpfonts package, or could you employ other (math) font packages as well? – Mico Jun 16 '18 at 11:32
• @Mico I had a feeling it was due to that... I will use it because I want an oldstyle package and avoid XeLaTeX at the same time... – Thanos Jun 16 '18 at 11:36

I think the \fixit positioning with displaced brackets looks a bit odd, \left\right often selects over-sized delimiters and here it's even more reason to choose them manually to avoid using the form with the straight extension section.

\documentclass{book}

%~~~~~~~~~~~~~~~ Fonts ~~~~~~~~~~~~~~~~~~~~
\usepackage[]{kpfonts}

%~~~~~~~~~~~~~~~ Math ~~~~~~~~~~~~~~~~~~~~~
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsthm}

\begin{document}
$$E=mc^2\,\biggl(\sqrt{1-\bigl(\frac{L}{tc}\bigr)^2}-1\biggr)$$

\end{document}

• Thank you very much for your answer! The thing is that \bigl and \bigr don't look well when the square root is in a fraction. imgur.com/StZjbSM So any idea how to make it rounder and still be able to fully cover the vertical dimension? – Thanos Jun 17 '18 at 14:13
• @Thanos as i showed you can go bigger than \bigl the \biggl in my answer is still round, It is a choice of the font designer how many "designed" parenthesis to put in the font before switching to a form that extends to arbitrary size with a straight extension piece. tex has no control over that at all. So by choosing kpfonts you chose the point at which the change occurs. – David Carlisle Jun 17 '18 at 15:29

(rewrote answer after receiving information that using the kpfonts package is essential)

AFAICT, the only way to make the tall parentheses "rounder", when using the kpfonts package, is to make the tall parentheses less tall. In the present case, I suggest replacing the \frac term in the denominator with an inline-fraction expression and replacing \sqrt{...} with \{ ... \}^{1/2}. That way, the denominator and hence the overall fraction expression as well become much less tall, implying that the surrounding parentheses can be made less tall -- and hence automatically "more round".

\documentclass{book}
\usepackage[]{kpfonts}
\usepackage{amsmath}
\usepackage{mleftright} \mleftright
% To remove blank spaces when using \left( and \right)
\newcommand\fixit[4][\displaystyle]{
\setbox0=\hbox{$#1#3$}
\setbox2=\hbox{$\vcenter{\copy0}$}
\raisebox{\dimexpr\ht0-\ht2}{$#1\left#2\copy2\right#4$}
}

\begin{document}
\begin{align*}
E&=mc^2\left(\frac{1}{\sqrt{1-\left(\frac{L}{tc}\right)^2}}-1\right)\\
E&=mc^2\fixit{(}{\frac{1}{\sqrt{1-\left(\frac{L}{tc}\right)^2}}-1}{)}\\
E&=mc^2\left(\frac{1}{\{1-[L/(tc)]^2\}^{1/2}}-1\right)
\end{align*}

\end{document}

• Thank you very much for your answer! The thing is that I have to stick with kpfonts.. – Thanos Jun 16 '18 at 12:14
• @Thanos - I've revised my answer thoroughly. – Mico Jun 16 '18 at 12:40
• Just a not on kpfonts (which I use a lot myself), IMO the jump between ( and \bigl( is quite noticeable and too large, I've mentioned it to the maintainer who does not have the time to fix it. – daleif Jun 16 '18 at 13:13
• @Mico Thank you very much for the updated answer. Indeed the parentheses are rounded, but I think the fraction is required. As it is now it looks a bit weird. I guess there is no way to meet all... – Thanos Jun 16 '18 at 14:55