Skip to content

Checker for non unique tex labels and broken references

License

Notifications You must be signed in to change notification settings

akaeba/texrefchk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

texrefchk texcompile

TeX Label and reference checker. Searches for non unique TeX Labels and broken references.

Releases

Version Date Source Change log
latest latest.zip
v0.1.0 2022-08-XX v0.1.0.zip initial draft

Features

  • checks TeX sources for non unique labels, selector \label{} and label=
  • checks references for existing labels, selector \autoref{}, \nameref{}, \ref{}, \hyperref[]{}
  • output of broken labels/references with tag and issued file
  • outputs errors in file non_unique_labels.txt and non_defined_references.txt

Command line interface

Options

Option Description
--texdir[=.] path to analyzed TeX sources
--stoponerror stop on first error
--verbose advanced debug output

Run

Pass example

The listing below shows the CLI call and the belonging results for the Pass example:

./texrefchk.sh --texdir=./test/01_pass
[ INFO ]    texrefchk started
              Version : v0.1.0
              Script  : /home/ubuntu/Desktop/texrefchk
              Tex-Dir : /home/ubuntu/Desktop/texrefchk/./test/01_pass
[ INFO ]    Found Tex Files 3
[ INFO ]    Found Labels 8
[ INFO ]    Found References 10
[ INFO ]    Summary:
              TeX files  : 3
              Labels     : 8
              References : 10
            analyzed with no broken references and non unique labels
[ OKAY ]    texrefchk ended normally :-)

Fail example

Below an example with erroneous labels and references:

./texrefchk.sh --texdir=./test/02_fail
[ INFO ]    texrefchk started
              Version : v0.1.0
              Script  : /home/ubuntu/Desktop/texrefchk
              Tex-Dir : /home/ubuntu/Desktop/texrefchk/./test/02_fail
[ INFO ]    Found Tex Files 3
[ INFO ]    Found Labels 8
[ FAIL ]    Found 1 non unique labels
              main1
                mwe.tex
[ INFO ]    Found References 10
[ FAIL ]    Found 1 references without label
              fig:main1:sub:sub3
                sub/sub2/sub2.tex
[ INFO ]    Summary:
              Non Unique Labels : 1
              Broken References : 1
[ FAIL ]    texrefchk ended with errors :-(

About

Checker for non unique tex labels and broken references

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published