I used


For numbering my lines. I know it has problem with double dollars and for that case I replaced double dollars with \[\] and it worked but now I used \begin{gather*}\end{gather*} to fit an equation but it caused line-numbering doesn't work for a few lines before this equation. Id there any solution for this?