A script to check for common mistakes in LaTeX source files of scientific papers.

Overview

LaTeX Paper Linter

This script checks for common mistakes in LaTeX source files of scientific papers.

Usage

python3 paperlint.py 
   
     [-i/x 
    
     ] [--error]

    
   

By default, all rules are used for checking the document. The switches can be configured with the -x and -i parameters to exclude and include entire categories of rules or single rules. The include/exclude switches are evaluated in the order they are specified. For example, -i typography only activates the typography rules, whereas -i all -x typography -i cite-space enables all rules without the typography rules, but enables the cite-space rule from the typography category.

If --error is provided, the tool exits with error code 1 if there are warnings.

Warnings

Warnings are grouped in five different categories:

  • General
  • Typography
  • Visual
  • Style
  • References

General

This category includes general mistakes and discouraged things (switch general).

TODOs

  • Description: Warns if the string "TODO" appears in the paper
  • Switch: todo

Notes

  • Description: Warns if there are \note or \todo notes in the paper
  • Switch: note

Multiple Sentences per Line

  • Description: Warns if there are multiple sentences per line
  • Switch: multiple-sentences

Will Future

  • Description: Warns if there are sentences with "will" future
  • Switch: will

Short Forms

  • Description: Warns if short forms, such as "can't", "shouldn't", etc., are used
  • Switch: short-form

Typography

This category includes typography-related issues, such as wrong punctuation (switch typography).

No Space before Citation

  • Description: Warns if there is no space before a \cite command
  • Switch: cite-space

Numbers in math Environment

  • Description: Warns if the math environment is used purely to format numbers
  • Switch: math-numbers

Large Numbers without siunit

  • Description: Warns if large numbers are not formatted with the sinuit package
  • Switch: si

Percentage without siunit

  • Description: Warns if percentages are not formatted with the siunit package
  • Switch: percentage

Wrong Quotation Marks

  • Description: Warns if the wrong quotation marks (") are used
  • Switch: quotes

Space before Punctuation

  • Description: Warns if there is a space before a punctuation character
  • Switch: punctuation-space

Unbalanced Brackets

  • Description: Warns if the number of opening and closing brackets per line does not match
  • Switch: unbalanced-brackets

Usage of and/or

  • Description: Warns if "and/or" is used
  • Switch: and-or

Ellipsis with ...

  • Description: Warns if an ellipsis with three dots ("...") is used
  • Switch: ellipsis

Footnote before Period

  • Description: Warns if a footnote is before the period
  • Switch: footnote

No Punctuation Mark at End of Line

  • Description: Warns if a line does not end with a punctuation mark
  • Switch: punctuation

No Space before Comment

  • Description: Warns if there is no space before a comment
  • Switch: comment-space

Visual

This category includes warning regarding code that is visually not optimal and can be improved to make the paper look better (switch visual).

hlines in Tables

  • Description: Warns if \hline is used in tables instead of \toprule, \midrule, and \bottomrule
  • Switch: hline

No Text between Two Headers

  • Description: Warns if there are two section headers without text in between
  • Switch: two-header

Single Sentence Paragraphs

  • Description: Warns if a paragraph consists of only a single sentence
  • Switch: single-sentence

Tables with Vertical Lines

  • Description: Warns if vertical lines are used in tables
  • Switch: vline

Single subsection in a Section

  • Description: Warns if a section has only one explicit subsection
  • Switch: single-subsection

Mixed Compact and Regular Lists

  • Description: Warns if both compactitem and itemize (or compactenum and enumerate) are used
  • Switch: mixed-compact

Center instead of \centering in Floats

  • Description: Warns if float contents are centered with the center environment instead of \centering
  • Switch: float-center

Usage of eqnarray instead of align Environment

  • Description: Warns if the eqnarray environment is used instead of the align environment
  • Switch: eqnarray

Section-Title Capitalization

  • Description: Warns if the capitalization for section titles is wrong
  • Switch: capitalization

Style

This category includes warning of things that are discouraged or wrong for the style of an academic paper (switch style).

Wrong Appendix

  • Description: Warns if the appendix environment is used instead of \appendix
  • Switch: appendix

Non-generic Dimensions

  • Description: Warns if dimension macros are used that do not always work, such as \linewidth or \textwidth
  • Switch: dimensions

Usage of "etc"

  • Description: Warns if "etc" is used
  • Switch: etc

Enlarged Tables

  • Description: Warns if resizebox (instead of adjustbox) is used for tables
  • Switch: resize-table

Caption above Tables

  • Description: Warns if the caption for a table is not above the table
  • Switch: table-top-caption

Figure Alignment

  • Description: Warns if a figure has no explicit alignment
  • Switch: figure-alignment

Table Alignment

  • Description: Warns if a table has no explicit alignment
  • Switch: table-alignment

Listing Alignment

  • Description: Warns if a listing has no explicit alignment
  • Switch: listing-alignment

References

This category includes warnings for everything related to (cross-)references (switch references).

Figure without Label

  • Description: Warns if a figure has no label
  • Switch: figure-label

Table without Label

  • Description: Warns if a table has no label
  • Switch: table-label

Listing without Label

  • Description: Warns if a listing has no label
  • Switch: listing-label

Switched Order of Label and Caption in Figure

  • Description: Warns if the label is defined before the caption inside a figure
  • Switch: figure-caption-order

Switched Order of Label and Caption in Table

  • Description: Warns if the label is defined before the caption inside a table
  • Switch: table-caption-order

Switched Order of Label and Caption in Listing

  • Description: Warns if the label is defined before the caption inside a listing
  • Switch: listing-caption-order

Non-referenced Labels

  • Description: Warns if there is a label defined that is never referenced
  • Switch: label-referenced

Tabular not in Table Environment

  • Description: Warns if a tabular environment is not within the table float
  • Switch: tabular-float

TikZ not in Figure Environment

  • Description: Warns if a tikzpicture environment is not within the figure float
  • Switch: tikz-float

Code Listing not in Listing Environment

  • Description: Warns if an lstlisting environment is not within the listing float
  • Switch: listing-float
You might also like...
These scripts look for non-printable unicode characters in all text files in a source tree

find-unicode-control These scripts look for non-printable unicode characters in all text files in a source tree. find_unicode_control.py should work w

Utility to add/remove licenses to/from source files
Utility to add/remove licenses to/from source files

Utility to add/remove licenses to/from source files. Supports processing any combination of globs, files, and directories (recurse). Pruning options allow skipping non-licensing files.

Utility to extract Fantasy Grounds Unity Line-of-sight and lighting files from a Univeral VTT file exported from Dungeondraft
Utility to extract Fantasy Grounds Unity Line-of-sight and lighting files from a Univeral VTT file exported from Dungeondraft

uvtt2fgu Utility to extract Fantasy Grounds Unity Line-of-sight and lighting files from a Univeral VTT file exported from Dungeondraft This program wo

A small utility that sorts your files.

FileSorter A small utility that sorts your files. TODO: Scan directory to find files(thanks @corruptmemry for this!) Split extensions to determine fil

Edit SRT files to delay subtitle time-stamps.

subtitle-delay A program written in Python that directly edits SRT file to delay the subtitles. Features: Will throw an error if delaying with negativ

Blender 2.93 addon for loading Quake II MD2 files

io_mesh_md2 is a Blender 2.93 addon for importing Quake II MD2 files.

This code renames subtitle file names to your video files names, so you don't need to rename them manually.

Rename Subtitle This code renames your subtitle file names to your video file names so you don't need to do it manually Note: It only works for series

produces PCA on genotypes from fasta files (popPhyl's ID format)

popPhyl_PCA Performs PCA of genotypes. Works in two steps. 1. Input file A single fasta file containing different loci, in different populations/speci

A tool written in python to generate basic repo files from github
A tool written in python to generate basic repo files from github

A tool written in python to generate basic repo files from github

Owner
Michael Schwarz
Michael Schwarz
A collection of common regular expressions bundled with an easy to use interface.

CommonRegex Find all times, dates, links, phone numbers, emails, ip addresses, prices, hex colors, and credit card numbers in a string. We did the har

Madison May 1.5k Dec 31, 2022
A repository containing several general purpose Python scripts to automate daily and common tasks.

General Purpose Scripts Introduction This repository holds a curated list of Python scripts which aim to help us automate daily and common tasks. You

GDSC RCCIIT 46 Dec 25, 2022
Python tool to check a web applications compliance with OWASP HTTP response headers best practices

Check Your Head A quick and easy way to check a web applications response headers!

Zak 6 Nov 9, 2021
Check the basic quality of any dataset

Data Quality Checker in Python Check the basic quality of any dataset. Sneak Peek Read full tutorial at Medium. Explore the app Requirements python 3.

MalaDeep 8 Feb 23, 2022
Handy Tool to check the availability of onion site and to extract the title of submitted onion links.

This tool helps is to quickly investigate a huge set of onion sites based by checking its availability which helps to filter out the inactive sites and collect the site title that might helps us to categories what site we are handling.

Balaji 13 Nov 25, 2022
Check subdomains for Open S3 buckets

SuBuket v1.0 Check subdomains for Open S3 buckets Coded by kaiz3n Basically, this tool makes use of another tool (sublist3r) to fetch subdomains, and

kaiz3n 4 Dec 29, 2021
Check username

Checker-Oukee Check username It checks the available usernames and creates a new account for them Doesn't need proxies Create a file with usernames an

null 4 Jun 5, 2022
Cardano Stakepools: Check for scheduled blocks in current epoch.

ReLeaderLogs For Cardano Stakepool Operators: Lightweight Scheduled Blocks Checker for Current Epoch. No cardano-node Required, data is taken from blo

SNAKE (Cardano Stakepool) 2 Oct 19, 2021
Every 2 minutes, check for visa slots at VFS website

vfs-visa-slot-germany Every 2 minutes, check for visa slots at VFS website. If there are any, send a call and a message of the format: Sent from your

null 12 Dec 15, 2022
A script copies movie and TV files to your GD drive, or create Hard Link in a seperate dir, in Emby-happy struct.

torcp A script copies movie and TV files to your GD drive, or create Hard Link in a seperate dir, in Emby-happy struct. Usage: python3 torcp.py -h Exa

ccf2012 105 Dec 22, 2022