2

I have a rather large argument, where I want some equations to have text flushed left. This will usually just be a reference to the problem at hand

My desired outcome is something that looks like the image below. However, I have two specifications

  • Align the equation before the arrows
  • Flush a), b) and c) to the left.

enter image description here

In my code I did some very ugly manually fitting, to align the equations at the arrows, as I could not figure out how to do it with alignat. Any help would be much appreciated. I tried using alignedat inside flalign however, my compiler did not appreciate that. An MWE to produce the image above is presented below

Note I am not restricted to using either alignedat, alignat or flalign. Any solution that produces an adequate output is very welcome.

Code

\documentclass[preview,border={0cm 0cm 0cm -0.3cm}]{standalone}
\usepackage{mathtools}
\begin{document}
    \begin{alignat*}{3}
           a)
           &f(x) 
         = 2 - 3x 
           &\Rightarrow x 
         = \frac{2 - f(x)}{3} \hspace{0.25cm}
           &\Rightarrow f^{-1}(x) 
         = \frac{2 - x}{3} \\
           b)
           &g(x) 
         = 1 + x^3 
           &\Rightarrow x 
         = \sqrt[3]{g(x) - 1} 
           &\Rightarrow g^{-1}(x) 
         = \sqrt[3]{x - 1} \\
           c)
           &h(x) 
         = \frac{1}{x - 1} 
           &\Rightarrow x 
         = \frac{1}{h(x)} + 1 \hspace{0.25cm}  
           &\Rightarrow h^{-1}(x) 
         = \frac{1}{x} + 1
    \end{alignat*}
\end{document}

\end{document}
0

1 Answer 1

4

What about the following. The equation numbers were achieved using \leqnomode from here (Red lines indicate text width:

enter image description here

\documentclass{article}
\usepackage{mathtools}
\usepackage{amsmath}

\makeatletter
\newcommand{\leqnomode}{\tagsleft@true}
\newcommand{\reqnomode}{\tagsleft@false}
\makeatother

\begin{document}
\leqnomode
\renewcommand\theequation{\alph{equation}}
    \begin{alignat}{5}           
           f(x) &= 2 - 3x 
           &&\Rightarrow x &&= \frac{2 - f(x)}{3} 
           &&\Rightarrow f^{-1}(x) 
         &&= \frac{2 - x}{3} \\
           g(x) &= 1 + x^3 
           &&\Rightarrow x &&= \sqrt[3]{g(x) - 1} 
           &&\Rightarrow g^{-1}(x) 
         &&= \sqrt[3]{x - 1} \\
           h(x) &= \frac{1}{x - 1} 
           &&\Rightarrow x &&= \frac{1}{h(x)} + 1  
           &&\Rightarrow h^{-1}(x) 
         &&= \frac{1}{x} + 1
    \end{alignat}
\reqnomode

\end{document}
3
  • This looks promising, the only problem is that I do not use a), b) in my document, I use \cref to produce the references. What is the difference between using single and double ampersands for alignment? Sep 12, 2019 at 14:19
  • 2
    @N3buchadnezzar: As fas as I know, All alignat uses pairs of l and r type "columns". To skip an r type column (since you only wanted left alignment), I used && instead of juyt &.
    – leandriis
    Sep 12, 2019 at 14:34
  • 2
    @N3buchadnezzar Did you try \tag{\cref{...}}?
    – egreg
    Sep 12, 2019 at 15:40

You must log in to answer this question.

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