4

I would like to write two equations side by side within a list (itemize). I have tried as follows:

\begin{itemize}
   \item first item:
        \begin{align}
              x = y && a = b
        \end{align}
   \item second item:
        \begin{align}
           x = y1+x3+253+x && a = 3*b_1
        \end{align}
\end{itemize}

Between the two formulas I would like to write 'or' instead of leaving a blank space. And also, trying to align all of them (centering?).

Do you know how I can do that?

6

2 Answers 2

3

Another possibility would be to mimic an itemize environment within align* or alignat* with \intertext:

\documentclass{article}

\usepackage{mathtools}
\newcommand{\myintertext}[1]{\intertext{\makebox[\leftmargini][r]{\textbullet\hspace{\labelsep}}#1}}

\begin{document}

\begin{itemize}
   \item first item:
        \begin{align}
              x = y && a = b
        \end{align}
   \item second item:
        \begin{align}
           x = y1+x3+253+x && a = 3*b_1
        \end{align}
\end{itemize}

\begin{alignat}{3}
  \myintertext{first item}
x & =y & \makebox[4em]{or} & & a & = b \\
  \myintertext{second item}
           x & = y1+x3+253+x & \makebox[4em]{or} & & a & = 3*b_1
\end{alignat}

\end{document} 

enter image description here

3

Being the presence of \hspace into the enviroment aligned...all it has been done manually...If you change the formulas into the aligned you must set (with the eyes) the correct distance.

\documentclass[a4paper,12pt]{article}
\usepackage{mathtools,amssymb}
\begin{document}
\begin{itemize}
   \item first item:
        $\begin{aligned}[c]
         &\hspace{1.4cm} & x = y & \hspace{3.15cm} & a = b & \hspace{3.03cm} (1)
      \end{aligned}$
   \item second item: 
   $\begin{aligned}[c]
         & x = y1+x3+253+x & \hspace{1.33cm} & a = 3*b_1 & \hspace{1.9cm} (2)
      \end{aligned}$  
        \item third item:
         $\begin{aligned}[c]
         &\hspace{1.2cm} & x = y & \hspace{3.2cm} & a = b & \hspace{3cm} (3)
      \end{aligned}$  
\end{itemize}
\end{document}

enter image description here

2
  • Hi Sebastiano, yes. But this should be already reproduced by the code provided. I would like to put 'or' between the two formulas in (1), similarly in (2) and (3). And whether possible, just for aesthetics, to center the formula in order to have a in (1), (2) and (3) almost aligned
    – Math
    Mar 24, 2021 at 22:08
  • 1
    @Math I think that the output (seem) to have the correct alignment :-)
    – Sebastiano
    Mar 24, 2021 at 22:44

You must log in to answer this question.

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