The cases
environment defined by the amsmath package sets each case to be inline math style. This will look ugly when the formulas in the cases are complicated, such as fractions or integrals. Consider the following sample code:
usepackage{amsmath} [ f(x)= begin{cases} frac{1}{2(x-1)}, & x>1 \ frac{Gamma(x)}{2^{x-1}}, & 0<x<1 end{cases} ]
The result looks like this:
The solution is to use the dcases
environment provided by the mathtools package instead. The prefix `d’ means `display’. It will set the cases in displayed math style (exactly the same as frac
versus dfrac
). So if we write the following code
usepackage{amsmath,mathtools} [ f(x)= begin{dcases} frac{1}{2(x-1)}, & x>1 \ frac{Gamma(x)}{2^{x-1}}, & 0<x<1 end{dcases} ]
then we will see the result which looks like this:
Note: The copyright belongs to the blog author and the blog. For the license, please see the linked original source blog.
Leave a Reply
You must be logged in to post a comment.