# How to put a counter in a long table?

46 views

By running the following file, the \thepage command in the longtable environment does not work properly. (All pages of the page number are equal to 1).
What is the cause and how can the problem be fixed?

\documentclass{article}
\usepackage{longtable}

\begin{document}
\begin{longtable}{| c | c |} \hline
A & page \thepage \\