1

I need to create the next set of equations in latex, at the moment the only thing I know is to create them independently but I need to place them as you can see in the attached image, thank you very much.

And I also need to label the equation.

\[
Roberts=\begin{cases}
           G_x = \begin{pmatrix}
                    1 & 0\\
                    0 & -1
                \end{pmatrix}\\
       G_y = \begin{pmatrix}
                0 & 1\\
                -1 & 1
            \end{pmatrix}\\
    \end{cases}

]

[ Prewitt=\begin{cases} G_x = \begin{pmatrix} 1 & 0 & -1\ 1 & 0 & -1\ 1 & 0 & -1 \end{pmatrix}\

       G_y = \begin{pmatrix}
                1 & 1 & 1\\
                0 & 0 & 0\\
                -1 & -1 & -1
            \end{pmatrix}\\
    \end{cases}

]

[ Sobel=\begin{cases} G_x = \begin{pmatrix} -1 & 0 & -1\ -2 & 0 & 2\ -1 & 0 & 1 \end{pmatrix}\

       G_y = \begin{pmatrix}
                1 & 2 & 1\\
                0 & 0 & 0\\
                -1 & -2 & -1
            \end{pmatrix}\\
    \end{cases}

]

enter image description here

1 Answers1

3

enter image description here

(red lines show text borders)

You need to write your cases in one equation. Note: this equation is quite long and may happen that will spill out of border in your document ...

\documentclass{article}
%--------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%
\usepackage{lipsum}                             % for dummy text
%---------------------------------------------------------------%

\usepackage[margin=25mm]{geometry} \usepackage{amsmath}

\begin{document} \lipsum[11] \begin{equation} % changed \setlength\arraycolsep{3pt}% added \text{Roberts} =\begin{cases} G_x = \begin{pmatrix} 1 & 0\ 0 & -1 \end{pmatrix}\[3ex] G_y = \begin{pmatrix} 0 & 1\ -1 & 1 \end{pmatrix} \end{cases} \text{Prewitt} =\begin{cases} G_x = \begin{pmatrix} 1 & 0 & -1\ 1 & 0 & -1\ 1 & 0 & -1 \end{pmatrix}\[4ex] G_y = \begin{pmatrix} 1 & 1 & 1\ 0 & 0 & 0\ -1 & -1 & -1 \end{pmatrix} \end{cases} \text{Sobel} =\begin{cases} G_x = \begin{pmatrix} -1 & 0 & -1\ -2 & 0 & 2\ -1 & 0 & 1 \end{pmatrix}\[4ex] G_y = \begin{pmatrix} 1 & 2 & 1\ 0 & 0 & 0\ -1 & -2 & -1 \end{pmatrix} \end{cases} \end{equation} \lipsum[12] \end{document}

Edit: Now equation has number. Also are changed size of \arraycolsep that equation can fit in determined page layout in above MWE,

Zarko
  • 296,517