2

Is it possible to set mtpro2 curly braces as default as given below?

When I write \left\{...\right\} it should give the first result.

enter image description here

enter image description here

Code:

\documentclass[10pt,a4paper]{article}
\usepackage[utf8x]{inputenc}
\usepackage{ucs}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[lite]{mtpro2}

\begin{document}

\begin{equation*}
    \def\arraystretch{1.2}\LEFTRIGHT\lbrace.{\, 
        \begin{array}{rrr}
            1 & , & 1  \\ 
            2 & , & 2  \\ 
            3 & , &  3 \\ 
            5 & , &  4
        \end{array}}%
\end{equation*}

\begin{equation*}
        \LEFTRIGHT\lcbrace\rcbrace{\begin{array}{rrr}
                1 & , & 1  \\ 
                2 & , & 2  \\ 
                3 & , & 3  \\ 
                5 & , & 4 
            \end{array}}
\end{equation*}
as default.

\begin{eqnarray*}
&&\left\{ 
\begin{array}{rrr}
1 & , & 1  \\ 
2 & , & 2  \\ 
3 & , & 3  \\ 
5 & , & 4 
\end{array}%
\right.  \\
&&
\left\{ 
\begin{array}{rrr}
1 & , & 1  \\ 
2 & , & 2  \\ 
3 & , & 3  \\ 
5 & , & 4 
\end{array}%
\right\} 
\end{eqnarray*}
change this.

\end{document}
4
  • 1
    I believe you need \LEFTRIGHT for those braces.
    – egreg
    Aug 9, 2014 at 17:33
  • thanks for reply. I know, i added the \LEFTRIGHT in the code. I wonder if i can get what i want using \renewenvironment.
    – mert
    Aug 9, 2014 at 17:36
  • I have one more question. Is mtpro2 lite free for publishing? May I use this fonts for a book?
    – mert
    Aug 9, 2014 at 18:33
  • 1
    I think it's free for any purpose.
    – egreg
    Aug 9, 2014 at 19:52

1 Answer 1

3

No, you can't get those braces with \left\{ and \right\}, because they require special massaging depending on the material between the braces.

On the other hand, selected environments can be defined using environ: here I do cases and Bmatrix. You can also do

\RenewEnviron

if you prefer to use cases and Bmatrix.

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage[lite]{mtpro2}
\usepackage{environ}

%% choose a better name
\NewEnviron{Bmatrix2}{%
  \LEFTRIGHT\lcbrace\rcbrace{\,\begin{matrix}\BODY\end{matrix}\,}%
}
\makeatletter
\NewEnviron{cases2}{%
  \def\arraystretch{1.2}%
  \LEFTRIGHT\lcbrace.{%
    \,\array{@{}l@{\quad}l@{}}\BODY\endarray\,
  }%
}
\makeatother

\begin{document}

\begin{equation*}
\begin{cases2}
  1, & 1 \\ 
  2, & 2 \\ 
  3, & 3 \\ 
  4, & 4
\end{cases2}
\qquad
\begin{cases}
  1, & 1 \\ 
  2, & 2 \\ 
  3, & 3 \\ 
  4, & 4
\end{cases}
\end{equation*}

\begin{equation*}
\begin{Bmatrix2}
  1 & 1 & 1  \\ 
  2 & 2 & 2  \\ 
  3 & 3 & 3  \\ 
  4 & 4 & 4 
\end{Bmatrix2}
\qquad
\begin{Bmatrix}
  1 & 1 & 1  \\ 
  2 & 2 & 2  \\ 
  3 & 3 & 3  \\ 
  4 & 4 & 4 
\end{Bmatrix}
\end{equation*}

\end{document}

enter image description here

3
  • Is there a way to change the braces (from straight to curly) of the {cases} environment without having to rename it?
    – Paulo Ney
    Oct 1, 2020 at 21:21
  • @PauloNey Use \RenewEnviron{cases}{...}
    – egreg
    Oct 1, 2020 at 22:15
  • Why does this only work with pdflatex and not lualatex?
    – azazello
    May 22 at 5:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .