8

I'm a beginner to LaTeX so I'm sure this question has probably been asked. I would be grateful if someone could link it as I haven't been able to find it!

Here is the structure of my desired output:

(1) x ~ x (Reflexivity)

(2) x ~ y <=> y ~ x (Symmetry)

(3) x ~ y and y ~ z => x ~ z (Transitivity)

I would like the numbers and the labels (reflexivity, symmetry, transitivity) to be aligned.

I've been trying to do this in the enumerate environment but am unsure how I would add the labels to it. Should I be doing this in the align environment instead?

Thanks!

3
  • Welcome to TeX.SE.
    – Mico
    Sep 11, 2021 at 18:04
  • Should the "tags" -- Reflexivity, Symmetry, and Transitivity -- be aligned to the far right of the text bock, akin to equation numbers?
    – Mico
    Sep 11, 2021 at 18:10
  • 1
    @Mico Thanks for the quick response! Yes, that's what I'm looking for.
    – Lauren S
    Sep 11, 2021 at 18:15

2 Answers 2

8

Here are two enumerate-based solutions. The first occupies the full width of the text block. If that's too wide for your taste, do consider the second solution, which encases the enumerate environment in a minipage of reduced width.

enter image description here

\documentclass{article} % or some other suitable document class
\usepackage{enumitem} 

\begin{document}

\begin{enumerate}[label=(\arabic*)]
\item $x\sim x$ \hfill (Reflexivity)
\item $x\sim y \Leftrightarrow y\sim x$ \hfill (Symmetry)
\item $x\sim y \mbox{ and } y\sim z \Rightarrow x\sim z$ \hfill (Transitivity)
\end{enumerate}

\bigskip\noindent
\begin{minipage}{3in}
\begin{enumerate}[label=(\arabic*)]
\item $x\sim x$ \hfill (Reflexivity)
\item $x\sim y \Leftrightarrow y\sim x$ \hfill (Symmetry)
\item $x\sim y \mbox{ and } y\sim z \Rightarrow x\sim z$ \hfill (Transitivity)
\end{enumerate}
\end{minipage}

\end{document}
2
  • 1
    This is exactly what I needed, I would upvote if I could :) Thanks again for your help!
    – Lauren S
    Sep 11, 2021 at 18:24
  • 3
    @LaurenS, you can upvote answer now and even accept it :-)
    – Zarko
    Sep 11, 2021 at 18:33
7

Another possibility with the listliketab package:

\documentclass{article} % or some other suitable document class
\usepackage{array}
\usepackage{amsmath}
\usepackage{listliketab}

\begin{document}

\begin{listliketab}
\storestyleof{enumerate}
\newcounter{tabenum}\setcounter{tabenum}{0}
\newcommand{\nextnum}{\refstepcounter{tabenum}(\thetabenum)}
\begin{tabular}{>{\nextnum}l >{$}l<{$}!{\qquad}l}
 & x\sim x &(Reflexivity) \\
 & x\sim y \Leftrightarrow y\sim x & (Symmetry) \\
 & x\sim y \text{ and } y\sim z \Rightarrow x\sim z & (Transitivity)
\end{tabular}
\end{listliketab}

\end{document} 

enter image description here

2
  • +1 for mentioning the listliketab package and environment.
    – Mico
    Sep 11, 2021 at 20:27
  • Thanks, @Mico! Indeed, in my opinion, it is a quite useful package, just like eqparbox.
    – Bernard
    Sep 11, 2021 at 20:34

You must log in to answer this question.

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