Math & ScienceProblems in equation number at end of line

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
horizon_83
Posts: 5
Joined: Sun Oct 24, 2010 8:20 am

Problems in equation number at end of line

Post by horizon_83 »

Hi,

I am using Texworks under MikTex and am unable to figure out a way to put the equation number at the end of the line. The equation number is generated just at the end of the equation but not at the end of the line.
I would really appreciate any help on this issue.

Thanks!!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Problems in equation number at end of line

Post by gmedina »

Hi,

please post a minimal working example showing the undesired behaviour.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
horizon_83
Posts: 5
Joined: Sun Oct 24, 2010 8:20 am

Re: Problems in equation number at end of line

Post by horizon_83 »

Hi,

I mean if the equation is a = b + c then it should give
a = b + c (1)

but it gives a = b + c (1)

I am using \begin{equation} a = b + c \end{equation}
I am just not able to identify the problem...
Thanks in advance!!
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Re: Problems in equation number at end of line

Post by gmedina »

Again, please provide a minimal working example (MWE); instructions on how to build such a MWE can be found following the link I provided in my previous reply.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
horizon_83
Posts: 5
Joined: Sun Oct 24, 2010 8:20 am

Re: Problems in equation number at end of line

Post by horizon_83 »

Hi,
the equation I want is:

\begin{equation}
\label{eqn2}
J_{1, n} ={\frac{1}{|\mathfrak{S}_n|}}{\sum_{\sigma \in \mathfrak{S}_n} {Fix(\hat{\sigma})}} = {\frac{1}{n!}}{\sum_{\lambda \in p(n)}{N(\lambda)}\cdot{\prod_{m = 1}^{n}{\lambda}_m! m^{\lambda}_m},
\end{equation}

but I want the equation number at the end of line not just after the equation as mine.
Thanks....
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Problems in equation number at end of line

Post by frabjous »

That is not a minimal working example; you have been instructed not once but twice to read about what a minimal working example is. If you want help, you're going to have to do so.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Problems in equation number at end of line

Post by gmedina »

horizon_83 wrote:Hi,
the equation I want is:

\begin{equation}
\label{eqn2}
J_{1, n} ={\frac{1}{|\mathfrak{S}_n|}}{\sum_{\sigma \in \mathfrak{S}_n} {Fix(\hat{\sigma})}} = {\frac{1}{n!}}{\sum_{\lambda \in p(n)}{N(\lambda)}\cdot{\prod_{m = 1}^{n}{\lambda}_m! m^{\lambda}_m},
\end{equation}

but I want the equation number at the end of line not just after the equation as mine.
Thanks....
As frabjous mentioned, that is not a minimal working example; however, one sees the problem at once: there's a mismatched brace; a closing brace is missing, and after suitable completion:

Code: Select all

\documentclass{book}
\usepackage{amsmath,amssymb}

\begin{document}

\begin{equation}
\label{eqn2} 
J_{1, n} ={\frac{1}{|\mathfrak{S}_n|}}{\sum_{\sigma \in \mathfrak{S}_n} {Fix(\hat{\sigma})}} = {\frac{1}{n!}}{\sum_{\lambda \in p(n)}{N(\lambda)}\cdot{\prod_{m = 1}^{n}{\lambda}_m! m^{\lambda}_m}, 
\end{equation} 

\end{document}
the compilation ends with an error and the tag appears in the wrong position. The problem is solved once the formula is typeset correctly:

Code: Select all

\documentclass{book}
\usepackage{amsmath,amssymb}

\begin{document}

\begin{equation}
\label{eqn2} 
J_{1, n} = \frac{1}{|\mathfrak{S}_n|} \sum_{\sigma \in \mathfrak{S}_n} 
{Fix(\hat{\sigma})} = \frac{1}{n!}\sum_{\lambda \in p(n)} N(\lambda) \cdot \prod_{m = 1}^{n}{\lambda}_{m}! m^{\lambda}_{m}, 
\end{equation} 

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply