2

I am trying to create two columns of text/mathematical expressions that are aligned to the left. In the flalign environment, the horizontal spacing between the two columns works well when the second column has a sufficient amount of text. However, in the case that the second column has minimal text, the horizontal spacing is too large. I have included a MWE of this below. How can I reduce the horizontal spacing?

\documentclass[a4paper,12pt]{report}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage[a4paper,top=2.5cm,bottom=3cm,left=3cm,right=3cm]{geometry}

\begin{document}
\noindent
\section*{Notation}
\begin{flalign*}
&\text{E} &&\text{Short example} \ \alpha \\
&\text{G} &&\text{Slightly longer example} \ \beta\\
\end{flalign*}
\end{document}

enter image description here

2
  • the fl in flalign stands for Full Length so the expression is the full width of the text block, and you get the expected result Sep 29, 2021 at 6:44
  • @DavidCarlisle I didn't know that. Thanks for clarifying!
    – M B
    Sep 29, 2021 at 10:17

2 Answers 2

2

I take it that it's important to you to have the first column of the two-column flalign* material start at the left-hand edge of the text block. To shift the second column to the left (and hence to create some whitespace to the right of the second column), one can insert pairs of && to the far right of (say) the first row. For instance, the first, second, and third such pairs of && reduce the space between the two columns by one half, two thirds, and three quarters, respectively.

enter image description here

\documentclass[a4paper,12pt]{report}
\usepackage[top=2.5cm,bottom=3cm,hmargin=3cm,showframe]{geometry}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}

\begin{document}

\section*{Notation}

\begin{flalign*}
&\text{E} &&\text{Short example} \ \alpha \\
&\text{G} &&\text{Slightly longer example} \ \beta 
\end{flalign*}
\begin{flalign*}
&\text{E} &&\text{Short example} \ \alpha && \\ % 1 pair of '&&'
&\text{G} &&\text{Slightly longer example} \ \beta 
\end{flalign*}
\begin{flalign*}
&\text{E} &&\text{Short example} \ \alpha &&&& \\ % 2 pairs of '&&'
&\text{G} &&\text{Slightly longer example} \ \beta 
\end{flalign*}
\begin{flalign*}
&\text{E} &&\text{Short example} \ \alpha &&&&&& \\ % 3 pairs of '&&'
&\text{G} &&\text{Slightly longer example} \ \beta 
\end{flalign*}

\end{document}
2

It is not entirely clear to me your intention with flalign. Description of some abbreviations or variables as can be concluded from section titles? For this seems to be use of some table, for example designed by tabularx, more appropriate tool:

\documentclass[a4paper,12pt]{report}
\usepackage[a4paper,
            hmargin=3cm,
            vmargin={2.5cm,3cm}
            ]{geometry}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{tabularx}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}

\begin{document}
\noindent
\section*{Notation}
    \begin{center}
\begin{tabularx}{\linewidth}{>{$}l<{$} @{\qquad} L}
E   &   Short example $\alpha$              \\
G   &   Slightly longer example $\beta$     \\
H   &   Very, very, very, very, very, very, very, very long description
\end{tabularx}
    \end{center}
\end{document}

by which you can get:

enter image description here

You must log in to answer this question.

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