# use eqref or ref for an equation inside flalign and aligned

TeX - LaTeX Asked by Hailey on December 6, 2020

I need to have an equation aligned on the left of my page and its tag on the right.
I managed to do it but when i want to call it with eqref or ref it doesn’t work.

documentclass[11pt]{article}
usepackage[english]{babel}

usepackage{mathtools}
usepackage{geometry}
usepackage{titlesec}
geometry{
a4paper,
total={170mm,257mm},
left=20mm,
top=20mm,
}

begin{document}

begin{flalign*}tag{1.8}
&begin{aligned}{}
label{eq:1.8}
x(t)=e^{-left|acdot tright|}  \
end{aligned}&&
end{flalign*}

noindent With the equation ref{eq:1.8} ...

end{document}


You do not have any alignment here so I used equation and it is usually better to let latex number the equations automatically, so I specified numbering within sections:

documentclass[11pt]{article}
usepackage[english]{babel}

usepackage{mathtools}
usepackage{geometry}
usepackage{titlesec}
geometry{
a4paper,
total={170mm,257mm},
left=20mm,
top=20mm,
}

numberwithin{equation}{section}

begin{document}
section{Intro}

setcounter{equation}{7}% just in this example

Using equation
begin{equation}label{eq:xt}
x(t)=e^{-lvert acdot trvert}
end{equation}
With the equation ref{eq:xt} (avoid numbers in labels)

end{document}


or left aligned

documentclass[11pt,fleqn]{article}
usepackage[english]{babel}

usepackage{mathtools}
setlengthmathindent{0pt}
usepackage{geometry}
usepackage{titlesec}
geometry{
a4paper,
total={170mm,257mm},
left=20mm,
top=20mm,
}

numberwithin{equation}{section}

begin{document}
section{Intro}

setcounter{equation}{7}% just in this example

Using equation
begin{equation}label{eq:xt}
x(t)=e^{-lvert acdot trvert}
end{equation}
With the equation ref{eq:xt} (avoid numbers in labels)

end{document}


Answered by David Carlisle on December 6, 2020

## Related Questions

### How to divide matrix over two lines (matrix too big for page)

1  Asked on April 5, 2021 by jayk

### How to Use BibTeX Citations with the amsrefs Package

0  Asked on April 5, 2021 by mishel-skenderi

### Error while updating TexLive using tlmgr

1  Asked on April 5, 2021

### algorithm2e with booktabs style and listing the algorithms in toc

1  Asked on April 5, 2021 by emanuele-nardi

### Color table rows and columns

3  Asked on April 5, 2021

### LaTeX3: selective expansion

1  Asked on April 5, 2021

### How can I display equations with long spaces between them?

2  Asked on April 5, 2021 by edgar

### Missing { inserted in a Math Expression

1  Asked on April 5, 2021 by eren-yldz

### Loop over pgfplotstable rows

2  Asked on April 5, 2021 by majkrzak

### vertical alignment in tabularx environment

0  Asked on April 5, 2021 by jopeto

### Writing a good formation with latex

1  Asked on April 5, 2021 by meteor

### For double column format paper, should we use .5textwidth or a slightly smaller textwidth for a table?

1  Asked on April 4, 2021

### text alignment in caption of table

2  Asked on April 4, 2021 by maria-arvaniti

### Is BibLaTeX incompatible with the Springer document class SVJour3?

1  Asked on April 4, 2021 by sapereaude

### Use Font and Emphasise at the same time

1  Asked on April 4, 2021 by bowen-liu

### Query left margin of page

1  Asked on April 4, 2021 by h-weirauch

### How can I split my equation into lines and have it boxed at the same time

3  Asked on April 4, 2021 by santiago-g

### Underfull hbox (badness 1226) in paragraph at lines 103–112

0  Asked on April 4, 2021

### Why the summation is printed like this?

1  Asked on April 4, 2021 by subham-soni