Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How can I change delimiter (brace) size in cases environment (for piece-wise function)?

\begin{equation}
f(x)=\begin{cases}

\end{cases}
\end{equation}
share|improve this question
3  
You have to put something inside the cases environment to make it expand. Surely you can show the piece-wise function, otherwise it's difficult to assess what you're actually trying to do. –  Werner Dec 17 '13 at 20:02
3  
May be provide an image illustrating what you want? For example you can affect the vertical space between the cases with \\[<length>]. –  azetina Dec 17 '13 at 20:11
add comment

1 Answer 1

If the size of the brace (vertical and/or horizontal) are of prime concern, an alternative to the cases environment is given below. In this MWE, the stacked cases are composed of a \Vectorstack (stackengine package) in which the argument is set in math mode on equally spaced lines set about the math axis. The brace is produced by the scalerel package, and is merely a width-limited vertical scale of a glyph, in this case the left brace {.

\documentclass{article}
\usepackage[usestackEOL]{stackengine}
\usepackage{scalerel}
\begin{document}
\centering
Vertical height of brace matches target stack:
\[ f(x) =
  \scalerel[2ex]{\{}{\Vectorstack{a\\b\\c}}
\]
\[ f(x) =
  \scalerel[2ex]{\{}{\Vectorstack{a\\b\\c\\d}}
\]
Vertical height of stack can be extended beyond stack height:
\[ f(x) =
  \scalerel[2ex]{\{}{\addstackgap[3pt]{\Vectorstack{a\\b\\c\\d}}}
\]
Maximum horizontal width of brace set by optional parameter:
\[ f(x) =
  \scalerel[3ex]{\{}{\Vectorstack{a\\b\\c\\d}}
\]
\[ f(x) =
  \scalerel[4ex]{\{}{\Vectorstack{a\\b\\c\\d}}
\]
\[ f(x) =
  \scalerel[1ex]{\{}{\Vectorstack{a\\b\\c\\d}}
\]
\end{document}

enter image description here

This is just a demonstration of the ability to manipulate the brace. For a real problem, there may be other considerations... If the vertical separation between "cases" needs to be increased, \setstackgap{L}{length} prior to the stack can accomplish that, for example. See the package documentations for details. Your mileage may vary.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.