Math & ScienceSligthly larger parenthesis ?

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Sligthly larger parenthesis ?

Post by Cham »

I want to write something inside some parenthesis, but I'm having troubles with the parenthesis size. Of course, I tried the standard commands : \left( \right), \big( \big), \bigg( \bigg), \Big( \Big, but the results aren't satisfying.

More specifically, consider this example :

Code: Select all

f(x(t))
Currently, the exterior parenthesis are too small.

If I use this :

Code: Select all

f\left( x(t) \right)
the exterior parenthesis are of the same size as the interior parenthesis (I don't see any difference with the previous code)

If I use this instead :

Code: Select all

f\big( x(t) \big)
the exterior parenthesis are now too big.

Is there a way to define some slightly larger parenthesis than the normal ( ) ?
Last edited by Cham on Sun May 22, 2011 8:28 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Sligthly larger parenthesis ?

Post by Stefan Kottwitz »

Hi Cham,

it depends on the available font sizes. You can try it. The original definition of \big is:

Code: Select all

\def\big#1{{\hbox{$\left#1\vbox to8.5\p@{}\right.\n@space$}}}
Instead of 8.5pt, \Big uses 11.5pt, \bigg 14.5pt and \Bigg 17.5pt. You can define your own commands choosing different values, such as

Code: Select all

\makeatletter
\newcommand*{\bigs}[1]{{\hbox{$\left#1\vbox to8\p@{}\right.\n@space$}}}
\makeatother
It may look similar though. Raise the value step by step, until you can see a change. However, it might be the same symbol size like with \big.

Stefan
LaTeX.org admin
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Re: Sligthly larger parenthesis ?

Post by Cham »

It doesn't make any difference : I'm getting the same parenthesis as normal, or as "\big". I need something in between.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Sligthly larger parenthesis ?

Post by Stefan Kottwitz »

Hi Cham,

it seems that there's no symbol available of a size between. However, you could use \scalebox of the graphicx package, such as:

Code: Select all

\newcommand*{\bigs}[1]{\scalebox{1.07}{\ensuremath#1}}
A complete minimal working example:

Code: Select all

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}
\usepackage{graphicx}
\newcommand*{\bigs}[1]{\scalebox{1.07}{\ensuremath#1}}
\begin{document}
$\big(f\bigs(x(t)\bigs)\big)$
\end{document}
scaled_parentheses.png
scaled_parentheses.png (3.85 KiB) Viewed 9703 times
Stefan
LaTeX.org admin
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Re: Sligthly larger parenthesis ?

Post by Cham »

This command is working. However, I'm not getting exactly what you have shown on the picture above: the new parenthesis aren't well centered on the default parenthesis. The new ones are slightly above (vertical offset).

Is there a way to make them perfectly aligned with the default parenthesis ?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Sligthly larger parenthesis ?

Post by Stefan Kottwitz »

You could use \vcenter:

Code: Select all

\newcommand*{\bigs}[1]{\vcenter{\hbox{\scalebox{1.07}{\ensuremath#1}}}}
Stefan
LaTeX.org admin
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Re: Sligthly larger parenthesis ?

Post by Cham »

Works great ! Thanks a lot for your precious help !
Post Reply