Modify locally the "array" environment for Equation Systems
You want to avoid the \tabcolsep
altogether; note also the correction for the null delimiter. You can use an optional argument to enlarge the leading in special cases.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{amsmath}
\newenvironment{system}[1][1.1]
{\renewcommand{\arraystretch}{#1}
\left\{\begin{array}{@{}l@{}}}
{\end{array}\right.\kern-\nulldelimiterspace}
\begin{document}
A centered formula for showing the center:
\[
\int_{-\infty}^{\infty}e^{-x^2}\,dx=\sqrt{\pi}
\]
The new \texttt{system} environment:
\[
\begin{system}
x^{n}+y^{n}=z^{n}\\
x^{m}+y^{m}=z^{m}
\end{system}
\]
Predefined \texttt{array} environment:
\[
\left\{%
\begin{array}{l}
x^{n}+y^{n}=z^{n}\\
x^{m}+y^{m}=z^{m}
\end{array}%
\right.
\]
A \texttt{system} environment with the optional argument:
\[
\begin{system}[1.5]
x^{n}+y^{n}=z^{n}\\
x^{m}+y^{m}=z^{m}
\end{system}
\]
\end{document}
The cases
environment
This is one solution that after this time came to my mind, so I'll be able to use LyX with the cases environment defined as the more advanced dcases
by re-defining cases
using mathtools
:
\documentclass{article}
%
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{amsmath}
%
\usepackage{mathtools}
\renewenvironment{cases}{%
\begin{dcases}%
}{%
\end{dcases}%\kern-\nulldelimiterspace%
}
%
\begin{document}
A centered formula for showing the center:
\[
\int_{-\infty}^{\infty}e^{-x^2}\,dx=\sqrt{\pi}
\]
The new defined \texttt{cases} environment:
\[
\begin{cases}
\int x^{n}+y^{n}=z^{n}\\
x^{m}+y^{m}=z^{m}
\end{cases}
\]
Second method for \texttt{array} environment:
\[
\left\{%
\begin{array}{l}
\int x^{n}+y^{n}=z^{n}\\
x^{m}+y^{m}=z^{m}
\end{array}%
\right.
\]
%
\end{document}
The only thing that keeps me from inserting this lines inside my package LyXbasic
is if this code does make some messing up with other math declarations.
So when inside LyX is typed this:
The output is as follows:
The difference in typesetting can be easily observed by a great improvement not only inside the pure LaTeX code but also "below" the command inside LyX.
The array
environment
In order to modify correctly the array
environment it has to be added this lines of code before the single environment:
\BeforeBeginEnvironment{array}{%
\let\{\lbrace%
\hskip-\arraycolsep%
}
\AfterEndEnvironment{array}{%
\kern-\nulldelimiterspace%
}
So if the single MWE is being added there will be a behaviour similar to @{}l
using \hskip-\arraycolsep
\[
\left\{
\begin{array}{l}
x^n+y^n=z^n \\
x^m+y^m=z^m
\end{array}
\right.
\]
\[
\begin{array}{ccc}
a & b & c \\
a & b & c \\
a & b & c \\
a & b & c
\end{array}
\]
The output is as follows:
So now the common arraycolsep
is not changed over the columns, but only aside the left delimiter.