So I was wondering if pdflatex was writing all the labels used from a main.tex document.
When you're working on a hundred pages-long document like a phd dissertation, it is humanly impossible to remember all the references and point to them :0 !
I ran into
Tex editor able to recover all labels of a document
and How to get a list of all the labels in a LaTeX document in WinEdt
But I figured one may also wish to get one's labels without scrolling tex code, switching editor nor move to windows. That got me blowing some dust off the manual, and produce the small script below, but still...
The open question:
Does tex not provide a way to do that??
.auxfile in lines beginning\newlabel. The mechanism is described in this answer. So looking for all instances of\newlabelin the.auxfile will give you the information you are looking for. There is also a packageshowlabelsthat will print out the information in the margin of your output. – barbara beeton Jan 23 '20 at 19:05main.aux, and running through the.texsource has the advantage providing some context. Packageshowlabellooks good :) I'd also like avoiding scrolling over and over again through the whole pdf when working on a specific part though... – shevket Jan 23 '20 at 19:39findwith the/Vswitch: At a command promptfind /V "\\newlabel" myfile.aux > myfile.lab. Load myfile.lab in separate window in you preferred est editor. If you have several aux-files, use afor %i in (*.aux) do find /V "\\newlabel" >>myfile.lab-loop – Sveinung Jan 23 '20 at 20:44showlablelsis the opposition:-) don't forget to mention teshowkeyspackage (which does the same thing:-) – David Carlisle Jan 23 '20 at 21:32grepthrough the.auxthen you'd might as wellgrepthrough all the*.texusingfind! and I definitely prefer the ouput :) prints me directories, filenames, line numbers, context... – shevket Jan 24 '20 at 11:56