2

I've tried to use the align environment for my work. But, I don't know how to get vertical lines either side of the equations. The picture shows my attempt, but, it uses the tabular environment and the lines aren't the same length.

\begin{tabular}{|ccc|}

$\mathsf{-1x+5y}            $&$=$&      $\mathsf{6}$\\

$\mathsf{-3x-5y}            $&$=$&      $\mathsf{-4}$\\ \\

\end{tabular}

tabular

I can't go close to that result with the align environment.

2
  • Any motivation behind this need? Do you need the individual equations numbered, or the whole thing numbered?
    – Werner
    Sep 10 at 17:22
  • Just remove the backslashes at the end of the second line.
    – Mico
    Sep 10 at 17:42
4

empheq provides functionality for inserting content before (to the left) or after (to the right) of an align-like environment:

enter image description here

\documentclass{article}

\usepackage{empheq}

\begin{document}

\begin{empheq}[left=\left|,right=\right|]{align*}
  -1x + 5y &=  6 \\
  -3x - 5y &= -4
\end{empheq}

\end{document}
4

It is very simple with the systeme package:

\documentclass{article}
\usepackage{systeme}
\usepackage{sansmath} 

\begin{document}

\sansmath
\[ \sysdelim| |
\systeme{%
   -1x+5y=6,
    -3x-5y=-4\,} \]

\end{document}

enter image description here

2

Since the contents of the tabular environment are all math-y, I'd switch to an array environment to save myself from having to enter lots of $ symbols. Since you seem to be interested in sans-serif math lettering, I'd load the sansmath package and run \sansmath, freeing me from having to inputs lots of \mathsf directives.

enter image description here

\documentclass{article}

\usepackage{sansmath}
\sansmath
\usepackage{array}
\newcolumntype{C}{>{{}}c<{{}}} % for columns with binary and relational operators

\begin{document}

$\begin{array}{| r @{}C@{} r @{}C@{} r|}
  -1x &+& 5y  &=&  6 \,\\
  -3x &-& 5y  &=& -4 
\end{array}$
   
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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