Last active
April 8, 2016 14:34
-
-
Save Liam0205/660a4d5dae5683903b70b98887752e11 to your computer and use it in GitHub Desktop.
multi aligned cases environ template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \documentclass{article} | |
| \usepackage{amsmath} | |
| \usepackage{mathtools} | |
| \MHInternalSyntaxOn | |
| \def\MT_start_cases:nnnnn #1#2#3#4#5{% | |
| \RIfM@\else | |
| \nonmatherr@{\begin{\@currenvir}} | |
| \fi | |
| \MH_group_align_safe_begin: | |
| \left#5 | |
| \vcenter \bgroup | |
| \Let@ \chardef\dspbrk@context\@ne \restore@math@cr | |
| \let \math@cr@@\AMS@math@cr@@ | |
| \spread@equation | |
| \ialign\bgroup | |
| \strut@#2 \strut@ | |
| #3 \strut@ | |
| #4 | |
| \crcr | |
| } | |
| \def\MH_end_cases:{\crcr\egroup | |
| \restorecolumn@ | |
| \egroup | |
| \MH_group_align_safe_end: | |
| } | |
| \newcommand*\mynewcases[7]{% | |
| \newenvironment{#1} | |
| {\MT_start_cases:nnnnn {#2}{#3}{#4}{#5}{#6}} | |
| {\MH_end_cases:\right#7} | |
| } | |
| \mynewcases{mydcases}{\relax} | |
| {$\m@th{##}$\hfil}{$\m@th{##}$\hfil}{$\m@th{##}$\hfil} | |
| {.}{\rbrace} | |
| \MHInternalSyntaxOff | |
| \begin{document} | |
| \[ | |
| \begin{mydcases} | |
| a &{} = b &{} = c \\ | |
| a &{} = b &{} = c \\ | |
| a &{} = b &{} = c | |
| \end{mydcases} | |
| \] | |
| \end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment