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
Owner
Michael Schwarz
Michael Schwarz
Yet another retry utility in Python

Yet another retry utility in Python, avereno being the Malagasy word for retry.

Haute École d'Informatique de Madagascar 4 Nov 02, 2021
This script allows you to retrieve all functions / variables names of a Python code, and the variables values.

Memory Extractor This script allows you to retrieve all functions / variables names of a Python code, and the variables values. How to use it ? The si

Venax 2 Dec 26, 2021
Grank is a feature-rich script that automatically grinds Dank Memer for you

Grank Inspired by this repository. This is a WIP and there will be more functions added in the future. What is Grank? Grank is a feature-rich script t

42 Jul 20, 2022
A program will generate a eth key pair that has the public key that starts with a defined amount of 0

ETHAdressGenerator This short program will generate a eth key pair that has the public key that starts with a defined amount of 0 Requirements Python

3 Nov 19, 2021
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.

Eduardo Ponce Mojica 2 Jan 29, 2022
password generator

Password generator technologies used What is? It is Password generator How to Download? Download on releases Clone repo git clone https://github.com/m

1 Dec 16, 2021
Abstraction of a Unit, includes convertions and basic operations.

Units Abstraction of a Unit, includes convertions and basic operations. ------ EXAMPLE : Free Fall (No air resistance) ------- from units_test import

1 Dec 23, 2021
PyHook is an offensive API hooking tool written in python designed to catch various credentials within the API call.

PyHook is the python implementation of my SharpHook project, It uses various API hooks in order to give us the desired credentials. PyHook Uses

Ilan Kalendarov 158 Dec 22, 2022
A utility tool to create .env files

A utility tool to create .env files dump-env takes an .env.template file and some optional environmental variables to create a new .env file from thes

wemake.services 89 Dec 08, 2022
A multipurpose python module

pysherlock pysherlock is a Python library for dealing with web scraping using images, it's a Python application of the rendertron headless browser API

Sachit 2 Nov 11, 2021
This two python programs can convert km to miles and miles to km

km-to-miles These two little python programs can convert kilometers to miles and miles to kilometers Needed Python3 or a online python compiler with t

Chandula Janith 3 Jan 30, 2022
'ToolBurnt' A Set Of Tools In One Place =}

'ToolBurnt' A Set Of Tools In One Place =}

MasterBurnt 5 Sep 10, 2022
Run functions in parallel easily, with their results typed correctly!

typesafe_parmap pip install pip install typesafe-parmap Run functions in parallel safely with typesafe parmap! GitHub: https://github.com/thejaminato

James Chua 3 Nov 06, 2021
Small project to interact with python, C, HTML, JavaScript, PHP.

Micro Hidroponic Small project to interact with python, C, HTML, JavaScript, PHP. Table of Contents General Info Technologies Used Screenshots Usage P

Filipe Martins 1 Nov 10, 2021
Script for generating Hearthstone card spoilers & checklists

This is a script for generating text spoilers and set checklists for Hearthstone. Installation & Running Python 3.6 or higher is required. Copy/clone

John T. Wodder II 1 Oct 11, 2022
Simple collection of GTPS Flood in Python.

GTPS Flood Simple collection of GTPS Flood in Python. NOTE Give me credit if you use this source, don't trade/sell this tool, And USE AT YOUR OWN RISK

PhynX 6 Dec 07, 2021
Utility to play with ADCS, allows to request tickets and collect information about related objects.

certi Utility to play with ADCS, allows to request tickets and collect information about related objects. Basically, it's the impacket copy of Certify

Eloy 185 Dec 29, 2022
Make some improvements in the Pizza class and pizzashop file by refactoring.

Make some improvements in the Pizza class and pizzashop file by refactoring.

James Brucker 1 Oct 18, 2021
NFT-Generator is the best way to generate thousands of NFTs quick and easily with Python.

NFT-Generator is the best way to generate thousands of NFTs quick and easily with Python. Just add your files, set your configuration and run the scri

78 Dec 27, 2022
A fancy and practical functional tools

Funcy A collection of fancy functional tools focused on practicality. Inspired by clojure, underscore and my own abstractions. Keep reading to get an

Alexander Schepanovski 2.9k Jan 07, 2023