1

How to align an equation with a tag like this enter image description here

Here is my MWE

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
1.\ a\tag{blabla}\\
2.\ a+b+c+\frac{d}{5}\tag{ablabla}\\
3.\ a+b+d+D+D+D+D \\
4.\ a+b\tag{blabla}\\
5.\ a+b
\end{align*}
\end{document} 
2
  • The output of your code doesn't look anything like the screenshot your posted. Nevertheless, in both outputs the tags in the three rows which have \tag directives appear to be perfectly aligned with their associated equations. What is the question?
    – Mico
    Commented Dec 1, 2017 at 6:57
  • @Mico- You are right "the output of my code doesn't look anything like the screenshot I posted." That is exactly my problem. how to write the 'screenshot' is my question.
    – Maryà
    Commented Dec 1, 2017 at 10:08

2 Answers 2

2

I take it that you want to left-align the five rows of equations. (Commonly, the "tag" associated with an equation is its number. However, you seem to be using the term "tag" to refer to the numbers at the start of each row.) If this is assumption is correct, you should insert & -- the alignment character -- at the start of each row.

\documentclass{article}
\usepackage{amsmath} % for "align*" environment
\begin{document}
\begin{align*}
&1.\ a\tag{blabla}\\
&2.\ a+b+c+\frac{d}{5}\tag{ablabla}\\
&3.\ a+b+d+D+D+D+D \\
&4.\ a+b\tag{blabla}\\
&5.\ a+b
\end{align*}
\end{document} 
1

You should write & where you want the align

You must log in to answer this question.

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