Quantcast
Viewing all articles
Browse latest Browse all 2

Command that outputs at the end of the document the pages and line numbers where it was used

I need to a command that outputs at the end of the document the pages and line numbers where it was used.I've tried different variants of the following code but my knowledge of latex is limited. I'm using lineno for line number and endnotes for having the notes at the end of the document. I think some knowledge about latex expansion could help me but didn't get it so far.

In the example below, I get all the end notes with the page and line number of the last use of the revised command.

Can you help me to correctly get the page and line numbers of the uses of the command? Thank you!

\usepackage{endnotes}\let\footnote=\endnote\usepackage[pagewise,switch]{lineno}\linenumbers\newcounter{modification}\newcommand{\revised}[2]{%    \stepcounter{modification}    \linelabel{ln:line\arabic{modification}}    #1    \footnote{#2. Page \pageref{ln:line\arabic{modification}}, Line \ref{ln:line\arabic{modification}}, Counter \arabic{modification}}}% revision with footnote\begin{document}\revised{New text 1.}{Reason of change 1.}\revised{New text 2.}{Reason of change 2.}\revised{New text 3.}{Reason of change 3.}\theendnotes\end{document}

Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>