1

Does any know how I can combine itemize and aligned (with argument [t]) -- or another multi-line mathematical environment -- in order to obtain a multi-line equation whose first line is aligned to the left and the remaining lines are aligned to the right?

I tried to illustrate what I would like to obtain in the picture below.

enter image description here

My current latex-code is the following:

\documentclass[letterpaper]{article}
\usepackage{amsthm}
\usepackage{mathtools}
\usepackage{bm}
\begin{document}

$\bm{f}^{\cup}(B^1,B^2), \bm{f}^{\cap}(B^1,B^2) \in \mathcal{B}(\Sigma_1\cup\Sigma_2, w\cdot w^{\prime})$, respectively, where
\begin{itemize}\small
    \item $\begin{aligned}[t]
       \ell(\bm{f}^{\cup}(B^1,B^2)) = \{w^{\prime}\cdot(\mathfrak{p}-1) + \mathfrak{p}^{\prime} \colon \mathfrak{p}\in\ell(B_i),\\
\mathfrak{p}^{\prime}\in\ell(B_i)\}\text{;}
          \end{aligned}$
    \item $r(B_i^{*}) = \{w^{\prime}\cdot(\mathfrak{q}-1) + \mathfrak{q}^{\prime} \colon \mathfrak{q} \in r(B_i), \mahfrak{q}^{\prime}\in r(B_i)\}$ ;
\end{itemize}
\end{document}

which results in something like the picture below.

enter image description here

Thanks!!

3
  • 1
    please be so kind and show us what you try so far. writing your equation from scratch is fun :-(
    – Zarko
    Commented Nov 15, 2018 at 17:55
  • In your example the second line of the item strating from $\ell$ is not aligned to the right. Some clarification of your expectations is needeed. Commented Nov 15, 2018 at 17:57
  • I am sorry for the missing details. I tried to explain better now. Commented Nov 15, 2018 at 18:18

2 Answers 2

1

Is this what you want?

enter image description here

\documentclass{article}
\usepackage{amsmath,amsfonts}

\begin{document}
\begin{itemize}
\item $\begin{aligned}[t]
\ell(\mathbf{f}{^\cup (B^1,B^2)})=\lbrace w' \cdot (\mathfrak{p}-1)+\mathfrak{p}') :& \\
\mathfrak{p}\in \ell(B_i), \mathfrak{p}1\in \ell(B'_i)\rbrace;
\end{aligned}$
\end{itemize}
\end{document}
4
  • Unfortunately, it is not. I want that the second line (and the remaining lines) are aligned to the right. Commented Nov 15, 2018 at 19:19
  • So, you want the second line touching the right margin?
    – Sigur
    Commented Nov 15, 2018 at 20:05
  • in this case, that is what I want. Actually, I am using a two-column template, so the right margin is really close to the left margin. Thus, to solve my problem in this template, it suffices the second line touching the right margin. However, in general, what I really want is that the second line follows the alignment defined by '&' until reaching the right margin. When the right margin is reached, instead of continuous going to the right, the text has to go to the left, according to the right margin. Commented Nov 16, 2018 at 9:13
  • In two-column mode, you will not have the same exact layout as you posted. Probably the simpler in this case is to replace the aligned environment with multlined, removing the &.
    – Bernard
    Commented Nov 16, 2018 at 9:48
0

I think you want something like this. Remeber align(ed) require & to mark the alignment points. I took the opportunity to simplify a bit your code : typing ^{\prime} isn't necessary, ' is enough.

\documentclass[letterpaper]{article}
\usepackage{amsthm}
\usepackage{mathtools, amsfonts}
\usepackage{bm}

\begin{document}

$\bm{f}^{\cup}(B^1,B^2), \bm{f}^{\cap}(B^1,B^2) \in \mathcal{B}(\Sigma_1\cup\Sigma_2, w\cdot w^{\prime})$, respectively, where
\begin{itemize}\small
    \item $\begin{aligned}[t]
       \ell(\bm{f}^{\cup}(B^1,B^2)) = \{w'\cdot(\mathfrak{p}-1) & + \mathfrak{p}' \colon \\
      & \phantom{+}\mathfrak{p}\in\ell(B_i),\mathfrak{p}'\in\ell(B_i)\}\text{;}
          \end{aligned}$
    \item $r(B_i^{*}) = \{w'\cdot(\mathfrak{q}-1) + \mathfrak{q}' \colon \mathfrak{q} \in r(B_i), \mathfrak{q}'\in r(B_i)\}$ ;
\end{itemize}

\end{document} 

enter image description here

4
  • Thanks a lot, Bernard. But this solution does not work in my case because I am using a two-column template. So, when I use '&' at beginning of the second line to define the alignment which I really want, I face a problem: the second line does not respect the right margin. Because of that I want to align the remaining lines of the equation to the right. Commented Nov 16, 2018 at 9:29
  • I was able to obtain the setting I want by using negative \hspace after '&'. But this trick seems "not elegant". Commented Nov 16, 2018 at 9:34
  • For me, it works with thetwocolumn option. You also have the possibility to replace the aligned environment with multlined, removing the &.
    – Bernard
    Commented Nov 16, 2018 at 9:53
  • multlined from mathtools does not push the last line to the right margin, only a little bit to right (at least in my test with $\begin{multlined}[t] \text{left side} \\ \text{center line}\\ \text{right side} \end{multlined}$).
    – Sigur
    Commented Nov 16, 2018 at 14:22

You must log in to answer this question.

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