TeX - LaTeX Asked by Hadi GhahremanNezhad on November 9, 2020
I am trying to left-align a cases
inside an equation, like this:
and I need it to be inside equation
because of the number (16)
.
When I try this:
begin{equation} label{eq:evaluate_metrics}
begin{align*}
&begin{cases}
TPR=T_P/(T_P+F_N)
FPR=F_P/(F_P+T_N)
ACC=(T_P+T_N)/(T_P+F_N+F_P+T_N)
PRE=T_P/(T_P+F_P)
end{cases}
end{align*}
end{equation}
gives me an error:
Package amsmath Error: Erroneous nesting of equation
structures;(amsmath) trying to recover with `aligned’. end{align*}
How can I make it look like the picture while including the equation number?
You can obtain locally left-aligned equations nesting them inside a fleqn
environment from nccmath
. This environment can take the distance from the text left margin at which it starts as an optional argument:
documentclass{article}
usepackage{amsmath, nccmath}
usepackage[upright]{fourier}
usepackage[reset, showframe]{geometry}
begin{document}
begin{fleqn}
begin{equation} label{eq:evaluate_metrics}
begin{cases}
TPR=T_P/(T_P+F_N)
FPR=F_P/(F_P+T_N)
ACC=(T_P+T_N)/(T_P+F_N+F_P+T_N)
PRE=T_P/(T_P+F_P)
end{cases}
end{equation}
end{fleqn}
begin{fleqn}[1em]
begin{equation} label{eq:evaluate_metrics}
begin{cases}
TPR=T_P/(T_P+F_N)
FPR=F_P/(F_P+T_N)
ACC=(T_P+T_N)/(T_P+F_N+F_P+T_N)
PRE=T_P/(T_P+F_P)
end{cases}
end{equation}
end{fleqn}
Correct answer by Bernard on November 9, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP