11

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 2x2 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 3x3 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?

2
  • \usepackage[straightbraces]{mtpro2} should do.
    – egreg
    May 29, 2014 at 12:14
  • Thanks but I wanted the 2nd to look like the 1st which is curly!
    – mac
    May 29, 2014 at 15:14

1 Answer 1

10

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}
5
  • I want the opposite.The straight bracket to look like the 1st one which is curly. To create curly bracket also for the 3x3 system.
    – mac
    May 29, 2014 at 15:13
  • @mac I was just adding a more complex solution that should avoid changing syntax.
    – egreg
    May 29, 2014 at 16:37
  • I can see that the alignment of the variables has changed and x is under z which didnt happen before the new code.Is there any way we can fix that?Thanks.
    – mac
    May 29, 2014 at 16:42
  • @mac I switched the * position, sorry! I'll fix it immediately!
    – egreg
    May 29, 2014 at 16:43
  • It works perfect!That was a lot of work!Thanks!
    – mac
    May 29, 2014 at 17:05

You must log in to answer this question.

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