Math & ScienceUnequally sized delimiters

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
Alrik
Posts: 13
Joined: Wed Aug 05, 2009 9:27 am

Unequally sized delimiters

Post by Alrik »

Hi together,

does anyone have an idea why the following code produces delimiters for the two cases that are not of equal size?


$$

Code: Select all

$$
\mu_{\text{log}_{i}} = \begin{cases}
                    \left(1 + \text{e}^{-\left[(x_{i} - \tau_{c})\left(\frac{-\text{log}(19)}{\tau_{e} - \tau_{c}}\right)\right]}\right)^{-1} & \text{if } x_{i} < \tau_{c}\\
                    \left(1 + \text{e}^{-\left[(x_{i} - \tau_{c})\left(\frac{\text{log}(19)}{\tau_{i} - \tau_{c}}\right)\right]}\right)^{-1} & \text{if } x_{i} \geq \tau_{c}\end{cases}
Thanks for your help.
Last edited by Alrik on Thu Aug 05, 2010 5:24 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Re: Unequally sized delimiters

Post by Stefan Kottwitz »

The enclosed formulas are not of the same height. In such cases you could use \big(, \Big(, \bigg( or \Bigg( instead of \left( etc. to get a fixed delimiter height.

Stefan
LaTeX.org admin
torbjorn t.
Posts: 162
Joined: Wed Jun 17, 2009 10:18 pm

Unequally sized delimiters

Post by torbjorn t. »

A couple of remarks, first:

You shouldn't use $$ ... $$ for displaymath, use \[ ... \] instead. (See l2tabu.)

Also, there is no need to write \text{log}, you can simply use \log


What causes the difference seems to be the subscript i or e in by the tau in the denominator, which makes the formulas of different height. An alternative to Stefan's approach, is to insert a \vphantom{i} in the subscript.

Code: Select all

\documentclass{article}

\usepackage{amsmath}

\begin{document}
\[
\mu_{\text{log}_{i}} = \begin{cases}
                    \left(1 + \text{e}^{-\left[(x_{i} - \tau_{c})\left(\frac{-\log(19)}{\tau_{e\vphantom{i}} - \tau_{c}}\right)\right]}\right)^{-1} & \text{if } x_{i} < \tau_{c}\\
                    \left(1 + \text{e}^{-\left[(x_{i} - \tau_{c})\left(\frac{\log(19)}{\tau_{i} - \tau_{c}}\right)\right]}\right)^{-1} & \text{if } x_{i} \geq \tau_{c}\end{cases}
\]
\end{document}
Alrik
Posts: 13
Joined: Wed Aug 05, 2009 9:27 am

Re: Unequally sized delimiters

Post by Alrik »

Thanks to both of you. The solution with the \vphantom command is indeed very elegant.

Alrik
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Re: Unequally sized delimiters

Post by Stefan Kottwitz »

So, don't forget to mark the topic as solved. ;)

Stefan
LaTeX.org admin
Post Reply