2
\documentclass[preview,border=12pt,12pt]{standalone}
\usepackage{mathtools}

\newcommand\specifier{%
        r@{}r@{}l
        @{\quad}c@{\quad}
        r@{}r@{}l
        @{}c}

\newcommand\action[1]{\xrightarrow{\quad\mathclap{\times #1}\quad}}
\newcommand\operator[1]{~\smash{\raisebox{.8\normalbaselineskip}{$#1$}}}

\begin{document}
$
    \begin{array}{\specifier}
    3x  & {}+ 2y    &  {}=7     & \action{1}    & 3x    & {}+ 3y    & {}= 7  \\[\jot]
    x   &           &  {}=22    & \action{3}    & 3x    &           & {}= 66 & \operator{+} \\\cline{5-7}
        %&           &           &               & \multicolumn{3}{l}{\rule{25mm}{1pt}}  & $+$\\
        &           &           &               &       &        3y & {}= -59  \\[\jot]
        &           &           &               &       &         y & {}= - 59/3 \\
    \end{array}
$
\end{document}

I want to increase the space of

enter image description here

such that it becomes as follows. The red line shows the space I mean.

enter image description here

How to increase the horizontal space in an array?

  • Up to now I still don't understand why we have to write mathematical expression with array as shown above where each term must be separated to get proper alignment. It makes the writing look unnatural. A smart package should be developed. – kiss my armpit May 19 '14 at 5:19
  • Well, I thought I gave you more natural syntax at tex.stackexchange.com/questions/177501/… :^), but you chose to go with the array approach 8^b – Steven B. Segletes May 19 '14 at 10:43
1

Instead of using \cline, you could use \cmidrule of the booktabs package. The added bit of vertical spacing provided by \cmidrule may just suit your needs.

enter image description here

\documentclass[preview,border=12pt,12pt]{standalone}
\usepackage{mathtools,booktabs}

\newcommand\specifier{%
        r@{}r@{}l
        @{\quad}c@{\quad}
        r@{}r@{}l
        @{}c}
\newcommand\action[1]{\xrightarrow{\quad\mathclap{\times #1}\quad}}
\newcommand\operator[1]{~\smash{\raisebox{.8\normalbaselineskip}{$#1$}}}

\begin{document}
$
\begin{array}{\specifier}
3x  & {}+ 2y  &  {}=\phantom{0}7 & \action{1} & 3x & {}+ 3y    & {}= \phantom{-0}7  \\[\jot]
x   &   &  {}=22   & \action{3}  & 3x    &  & {}= \phantom{-}66 & \operator{-} \\
\cmidrule{5-7}
        %&           &           &               & \multicolumn{3}{l}{\rule{25mm}{1pt}}  & $+$\\
        &           &           &               &       &        3y & {}= -59  \\[\jot]
        &           &           &               &       &         y & {}= - 59/3 \\
    \end{array}
$
\end{document}
1
\documentclass[preview,border=12pt,12pt]{standalone}
\usepackage{mathtools}

\newcommand\specifier{%
        r@{}r@{}l
        @{\quad}c@{\quad}
        r@{}r@{}l
        @{}c}
\newcommand*\xstrut[1][3ex]{\rule{0pt}{#1}}% default 3ex

\newcommand\action[1]{\xrightarrow{\quad\mathclap{\times #1}\quad}}
\newcommand\operator[1]{~\smash{\raisebox{.8\normalbaselineskip}{$#1$}}}

\begin{document}
$
    \begin{array}{\specifier}
    3x  & {}+ 2y    &  {}=7     & \action{1}    & 3x    & {}+ 3y    & {}= 7  \\[\jot]
    x   &           &  {}=22    & \action{3}    & 3x    &           & {}= 66 & \operator{+} \\\cline{5-7}
        %&           &           &               & \multicolumn{3}{l}{\rule{25mm}{1pt}}  & $+$\\
  \xstrut     &           &           &               &       &        3y & {}= -59  \\[\jot]
        &           &           &               &       &         y & {}= - 59/3 \\
    \end{array}
$
\end{document}

enter image description here

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.