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
Compute the fair market value (FMV) of staking rewards at time of receipt.

tendermint-tax A tool to help calculate the tax liability of staking rewards on Tendermint chains. Specifically, this tool calculates the fair market

5 Jan 07, 2022
A clock app, which helps you with routine tasks.

Clock This app helps you with routine tasks. Alarm Clock Timer Stop Watch World Time (Which city you want) About me Full name: Matin Ardestani Age: 14

Matin Ardestani 13 Jul 30, 2022
Aggregating gridded data (xarray) to polygons

A package to aggregate gridded data in xarray to polygons in geopandas using area-weighting from the relative area overlaps between pixels and polygons.

Kevin Schwarzwald 42 Nov 09, 2022
Color getter (including method to get random color or complementary color) made out of Python

python-color-getter Color getter (including method to get random color or complementary color) made out of Python Setup pip3 install git+https://githu

Jung Gyu Yoon 2 Sep 17, 2022
Script to rename and resize folders of images

script to rename and resize folders of images

Tega Brain 2 Oct 29, 2021
Modeling Category-Selective Cortical Regions with Topographic Variational Autoencoders

Modeling Category-Selective Cortical Regions with Topographic Variational Autoencoders Getting Started Install requirements with Anaconda: conda env c

T. Andy Keller 4 Aug 22, 2022
Abby's Left Hand Modifiers Dictionary

Abby's Left Hand Modifiers Dictionary Design This dictionary is inspired by and

12 Dec 08, 2022
A simple toolchain for moving Remarkable highlights to Readwise

A simple toolchain for moving Remarkable highlights to Readwise

zach wick 20 Dec 20, 2022
Airspy-Utils is a small software collection to help with firmware related operations on Airspy HF+ devices.

Airspy-Utils Airspy-Utils is a small software collection to help with firmware related operations on Airspy HF+ devices on Linux (and other free syste

Dhiru Kholia 11 Oct 04, 2022
An extremely simple package with a single utillity class used for gracefully handling POSIX shutdown signals.

graceful-killer An extremely simple package with a single utillity class used for gracefully handling POSIX shutdown signals. Installation Use pip to

Sven Ćurković 1 Dec 09, 2021
Protect your eyes from eye strain using this simple and beautiful, yet extensible break reminder

Protect your eyes from eye strain using this simple and beautiful, yet extensible break reminder

Gobinath 1.2k Jan 01, 2023
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
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
Simple profile athena generator for Fortnite Private Servers.

Profile-Athena-Generator A simple profile athena generator for Fortnite Private Servers. This profile athena generrator features: Item variants Get al

Fevers 10 Aug 27, 2022
A simple example for calling C++ functions in Python by `ctypes`.

ctypes-example A simple example for calling C++ functions in Python by ctypes. Features call C++ function int bar(int* value, char* msg) with argumene

Yusu Pan 3 Nov 23, 2022
A time table app to notify the user about their class timings

kivyTimeTable A time table app to notify the user about their class timings Features This project incorporates some features i wanted to see in a time

2 Dec 15, 2021
🌲 A simple BST (Binary Search Tree) generator written in python

Tree-Traversals (BST) 🌲 A simple BST (Binary Search Tree) generator written in python Installation Use the package manager pip to install BST. Usage

Jan Kupczyk 1 Dec 12, 2021
A simple dork generator written in python that outputs dorks with the domain extensions you enter

Dork Gen A simple dork generator written in python that outputs dorks with the domain extensions you enter in a ".txt file". Usage The code is pretty

Z3NToX 4 Oct 30, 2022
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
Nmap script to guess* a GitLab version.

gitlab-version-nse Nmap script to guess* a GitLab version. Usage https://github.com/righel/gitlab-version-nse cd gitlab-version-nse nmap target --s

Luciano Righetti 120 Dec 05, 2022