Math-Mode – Systeme Package

math-modemtprosysteme

I am using the systeme package to create an equation system.
I am also using the mtpro2 package for mathematical notation.

When I want to create a 2×2 system with a curly bracket it works just fine by using the command : \sysdelim\{..
But it seems that the curly bracket doesn't look the same in a 3×3 system or above.

\documentclass[b5paper,11pt]{article}
 \usepackage{pgfplots}
 \usepackage{psfrag}
 \usepackage{amsmath}
 \usepackage{mtpro2}
 \usepackage{calc}
 \usepackage{systeme}

 \begin{document}
 \sysdelim\{.\systeme{2x+3y=5,x-4y=-3\quad}
 \sysdelim\{.\systeme[xzy]{2x+3y-z=5,x+2z-4y=-3,x+y=2}
 \end{document}

enter image description here

How can i make the 2nd bracket look like the 1st?

EDIT 2020 – TeXLive issue after update 10/4/2020

I have just updated my TeXLive distribution to TexLive 2020 and tried to run the same code using the patch recommended by egreg at the second part of his answer. Apparently there is a new issue

LaTeX3 Error: '\msg_term:n' deprecated on 2020-01-01. Use '\iow_term:n '. {}{}

Where exactly must I replace that code?

Best Answer

If you don't want those pesky curly braces, load the package with the straightbraces option:

\documentclass[b5paper,11pt]{article}
\usepackage{amsmath}
\usepackage[lite,straightbraces]{mtpro2} % lite because I only have that
\usepackage{systeme}

\begin{document}
\[
\systeme{2x+3y=5,x-4y=-3}      
\quad
\systeme[xzy]{2x+3y-z=5,x+2z-4y=-3,x+y=2}
\]
\end{document}

enter image description here

Note that \sysdelim\{. is the default.

If you prefer the pesky braces, you have to use \LEFTRIGHT, so an indirect path must be followed:

\documentclass[b5paper,11pt]{article}
\usepackage{amsmath}
\usepackage[lite]{mtpro2} % lite because I only have that
\usepackage{systeme,xparse}

\NewDocumentCommand{\csysteme}{som}{%
  \LEFTRIGHT\{.{%
    \sysdelim..
    \IfBooleanTF{#1}
     {\IfNoValueTF{#2}{\systeme*{#3}}{\systeme*[#2]{#3}}}
     {\IfNoValueTF{#2}{\systeme{#3}}{\systeme[#2]{#3}}}%
  }%
}

\begin{document}
\[
\csysteme{2x+3y=5,x-4y=-3}
\quad
\csysteme[xzy]{2x+3y-z=5,x+2z-4y=-3,x+y=2}
\]
\end{document}

enter image description here

With a patch one can avoid changing syntax; the idea is to use \LEFTRIGHT of mtpro2 instead of \left and \right.

\documentclass[b5paper,11pt]{article}
\usepackage{amsmath}
\usepackage[lite]{mtpro2}
\usepackage{systeme,regexpatch}

\makeatletter
% change the definition of \sysdelim not to store `\left` and `\right`
\def\sysdelim#1#2{\def\SYS@delim@left{#1}\def\SYS@delim@right{#2}}
\sysdelim\{. % reinitialize

% patch the internal command to use
% \LEFTRIGHT<left delim><right delim>{<system>}
% instead of \left<left delim<system>\right<right delim>
\regexpatchcmd\SYS@systeme@iii
  {\cB.\c{SYS@delim@left}(.*)\c{SYS@delim@right}\cE.}
  {\c{SYS@MT@LEFTRIGHT}\cB\{\1\cE\}}
  {}{}
\def\SYS@MT@LEFTRIGHT{%
  \expandafter\expandafter\expandafter\LEFTRIGHT
  \expandafter\SYS@delim@left\SYS@delim@right}
\makeatother

\begin{document}
\[
\systeme{2x+3y=5,x-4y=-3}
\quad
\systeme[xzy]{2x+3y-z=5,x+2z-4y=-3,x+y=2}
\]
\end{document}
Related Question