0

How can I automatically increase the distance between the columns to use the whole horizontal space that is accessible for equations (this might not necessarily be the whole page width)? Note, that I use the environments equation and split as I want to write formulas with alignments that get a single number. I can set the spacing manually, e.g. by \quad, however, replacing it with \hfill does not work.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\begin{split}
a&=(1,2,3,4,5,6,7,8,9,10)\\
b&=(1,2,3,4,5,6,7,8)
\end{split}
\quad
\begin{split}
c&=(1,2,3,4,5,6,7,8,9,10)\\
d&=(1,2,3,4,5,6,7,8,9,10)
\end{split}
\end{equation}
\end{document}
4
  • Please extend your code fragment to complete small document with your equations. BTW, are you sure that equations had to be from left to right page border? From showed images this is not evident.
    – Zarko
    Commented Feb 16, 2022 at 12:09
  • Amsmath has flalign (and flalign*). Do they do what you want?
    – mickep
    Commented Feb 16, 2022 at 12:36
  • @Zarko Code extended. If the equations are longer than shown in the example then it makes sense to have as much space as possible. Commented Feb 16, 2022 at 14:10
  • well, meanwhile I provide an answer ... is suggested solution is close to what you after?
    – Zarko
    Commented Feb 16, 2022 at 14:12

1 Answer 1

3

Just guessing that actually your equation is not to be from page border to border but have a bit bigger distance between equations columns ...

\documentclass{article}
\usepackage{amsmath}
\usepackage{lipsum}

\begin{document}
\lipsum[66]
    \begin{align}
\begin{split}
    a & = (1,2,3,4,5,6,7,8,9,10)    \\
    c & = (1,2,3,4,5,6,7,8)
\end{split}
    &   &
\begin{split}
    b & = (1,2,3,4,5,6,7,8,9,10)\\
    d & = (1,2,3,4,5,6,7,8,9,10)
\end{split}
    \end{align}
\end{document}

enter image description here

Addendum: You can also use flalign as sugggest by @mickep in his comment:

% preamble
\begin{document}
\lipsum[66]
    \begin{flalign}
\begin{split}
    a & = (1,2,3,4,5,6,7,8,9,10)    \\
    c & = (1,2,3,4,5,6,7,8)
\end{split}
    &   &
\begin{split}
    b & = (1,2,3,4,5,6,7,8,9,10)\\
    d & = (1,2,3,4,5,6,7,8,9,10)
\end{split}
    \end{flalign}
\end{document}

which produce:

enter image description here

2
  • Align environment works better here than equation and Flalign does want the OP wants. Commented Feb 16, 2022 at 14:20
  • @Author, better to stick suggestion in addendum to my answer.
    – Zarko
    Commented Feb 16, 2022 at 14:22

You must log in to answer this question.

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