I am preparing a document that has only one equation. I tried to write it using both the align and equation environment. But surprisingly, none worked for me. When I used the align environment, no equation no was shown. When I used the equation environment, the equation no was 0 (zero).

No equation no shown No equation no is shown with the align environment

Equation no is set as zero with equation environment Equation no is set to zero with equation environment

I have tried writing only the equation with all used packages in a separate tex file and that worked as expected. So, I couldn't generate a minimal example. As my whole code is too large to share here, I am sharing an overleaf link of the code.The link is: https://www.overleaf.com/read/gsnqfcjdhrfn

The equation is between 117 and 120 lines (at the bottom of the code). How can this problem be solved?

Edit: As I didn't know exactly what was causing the problem, I couldn't add any code here. But as @campa said in a comment, without a code this question will be pointless in the future. Also, @daleif pointed out the problem in the code. So, I am adding a minimal working example here.



           blah blah blah
    blah blah blah

    The swing equation of a power system is:
         2\times H \times f \times \frac{df}{dt} = P_m - P_e    
    where $f$ is the system frequency, $H$ is the inertia constant, 
    $t$ denotes time, $P_m$ is the input mechanical power and $P_e$ 
    is the output electrical power.
  • 1
    Please post the relevant part of the code here. Links to external pages are pointless as the question will become useless when the link disappears.
    – campa
    Nov 14, 2020 at 19:04
  • @campa I am not understanding why it's happening and thus can't exactly say which part is relevant. That's why I haven't added the code here.
    – Imran
    Nov 14, 2020 at 19:09
  • 2
    What is that nonumber doing right after the title page? Additionally you're making a lit of mistakes in that code.
    – daleif
    Nov 14, 2020 at 19:12
  • 1
    Since you're not providing code here (always preferred as links rot over time) your question might not be useful to others. But please look up a good intro to larex as you're making a lot of mistakes in that code.
    – daleif
    Nov 14, 2020 at 19:18
  • 1
    Thanks for your kind suggestion. I will provide a mwe to make it bit more useful.
    – Imran
    Nov 14, 2020 at 19:21

1 Answer 1


There is no alignment here so you should use equation not align but the reason that you have no number is that you have used


While it gives no error there, that command is completely mis-placed it should only be used inside an equation where it will suppress the number for that equation only.

  • 3
    Possibly \nonumber might check for not being in a display…
    – egreg
    Nov 14, 2020 at 21:10

You must log in to answer this question.

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