tables add tag
lucas
Hi, is there a way to use `enumerate` like `tabular` so that the intervals in the snippet below are aligned with each other, like in the image? Thanks!

```
\usepackage[shortlabels,inline]{enumitem}

(...)

\begin{enumerate}[(i),before={\everymath{\displaystyle}}]
    \item \(f(x)=x^{3}-x^{2}-8x+1 \);       \([-2,2]\)
    \item \(f(x)=x^{5}+x+1 \);              \([-1,1]\)
    \item \(f(x)=3x^{4}-8x^{3}+6x^{2}\);    \([-\frac12,\frac12]\)
    \item \(f(x)=\frac{1}{x^{5}+x+1}\);     \([-\frac12,1]\)
    \item \(f(x)=\frac{x+1}{x^{2}+1}\);     \([-1,\frac12]\)
    \item \(f(x)=\frac{x}{x^{2}-1}\);       \([0,5]\)
\end{enumerate}
```

What I want:

![Captura de tela de 2021-02-11 15-20-08.png](/image?hash=61b056482a4e382ea4d9835d06a2dd3de5dce6a8e6da64024e9a736e3c12bc94)
Top Answer
samcarter
There are probably many possible approaches, here just a couple of them:

### Approach 1

one could make sure that the first terms in your enumerate all have the same width:

```
\usepackage[shortlabels,inline]{enumitem}
\begin{enumerate}[(i),before={\everymath{\displaystyle}}]
    \item \makebox[4.5cm][l]{\(f(x)=x^{3}-x^{2}-8x+1 \);} on \([-2,2]\)
    \item \makebox[4.5cm][l]{\(f(x)=x^{5}+x+1 \);} on \([-1,1]\)
    \item \makebox[4.5cm][l]{\(f(x)=3x^{4}-8x^{3}+6x^{2}\);} on \([-\frac12,\frac12]\)
    \item \makebox[4.5cm][l]{\(f(x)=\frac{1}{x^{5}+x+1}\);} on \([-\frac12,1]\)
    \item \makebox[4.5cm][l]{\(f(x)=\frac{x+1}{x^{2}+1}\);} on \([-1,\frac12]\)
    \item \makebox[4.5cm][l]{\(f(x)=\frac{x}{x^{2}-1}\);} on \([0,5]\)
\end{enumerate}
```

![Screen Shot 2021-02-11 at 22.24.55.png](/image?hash=3f9bb981d23b2a7ccafef2581c6479ff85b4c100a8175fed9a2cc42f9764100a)

### Approach 2

Use a table and emulate the enumerate label in the first column:

```
\newcounter{foo}
\newcommand{\myitem}{\stepcounter{foo}(\roman{foo})}

{
\everymath{\displaystyle}
\noindent\begin{tabular}{rll}
  \setcounter{foo}{0}
  \myitem & \(f(x)=x^{3}-x^{2}-8x+1 \) & on \([-2,2]\)\\
  \myitem & \(f(x)=x^{5}+x+1 \); & on \([-1,1]\)\\
  \myitem & \(f(x)=3x^{4}-8x^{3}+6x^{2}\); & on \([-\frac12,\frac12]\)\\
  \myitem & \(f(x)=\frac{1}{x^{5}+x+1}\); & on \([-\frac12,1]\)\\
  \myitem & \(f(x)=\frac{x+1}{x^{2}+1}\); & on \([-1,\frac12]\)\\
  \myitem & \(f(x)=\frac{x}{x^{2}-1}\); & on \([0,5]\)\\
\end{tabular}
}
```

![Screen Shot 2021-02-11 at 22.28.47.png](/image?hash=d8ec049c45a6baacaea99416d9eb6bb0fe41914d98ad0d20107a33d07a91dcbc)

### Approach 3

Or you could use an align environment from the `amsmath` package:

```
\newcounter{foo}
\newcommand{\myitem}{\stepcounter{foo}(\text{\roman{foo})}\quad}

\begin{flalign*}
  \setcounter{foo}{0}
  \myitem & f(x)=x^{3}-x^{2}-8x+1 && \text{on } [-2,2]\\
  \myitem & f(x)=x^{5}+x+1; && \text{on }[-1,1]\\
  \myitem & f(x)=3x^{4}-8x^{3}+6x^{2}; && \text{on } [-\frac12,\frac12]\\
  \myitem & f(x)=\frac{1}{x^{5}+x+1}; && \text{on } [-\frac12,1]\\
  \myitem & f(x)=\frac{x+1}{x^{2}+1}; && \text{on } [-1,\frac12]\\
  \myitem & f(x)=\frac{x}{x^{2}-1}; && \text{on } [0,5]
\end{flalign*}
```

![Screen Shot 2021-02-11 at 22.36.44.png](/image?hash=6642f2824f96a3d38612e3fc7d047ae5029185b158d9b1a2fef8ecc0f7089c57)

This room is for discussion about this question.

Once logged in you can direct comments to any contributor here.

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.