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
Control-Alt-Delete - Help Tux Escape Beastie's Jail!

Control-Alt-Delete Help Tux escape Beastie's jail by completing the following challenges! Challenges Challenge 00: Drinks: Tux needs to drink less. Ch

NDLUG 8 Oct 31, 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
Lock files using python and cmd

Python_Lock_Files Lock files using python and cmd license feel free to do whatever you want to with these files, i dont take any responsibility tho, u

1 Nov 01, 2021
convert a dict-list object from / to a typed object(class instance with type annotation)

objtyping 带类型定义的对象转换器 由来 Python不是强类型语言,开发人员没有给数据定义类型的习惯。这样虽然灵活,但处理复杂业务逻辑的时候却不够方便——缺乏类型检查可能导致很难发现错误,在IDE里编码时也没

Song Hui 15 Dec 22, 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 based tool to extract forensic info from EventTranscript.db (Windows Diagnostic Data)

EventTranscriptParser EventTranscriptParser is python based tool to extract forensically useful details from EventTranscript.db (Windows Diagnostic Da

P. Abhiram Kumar 24 Nov 18, 2022
Python utility for discovering interesting CFPreferences values on iDevices

Description Simple utility to search for interesting preferences in iDevices. Installation python3 -m pip install -U --user cfprefsmon Example In this

12 Aug 19, 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
Program to extract signatures from documents.

Extracting Signatures from Bank Checks Introduction Ahmed et al. [1] suggest a connected components-based method for segmenting signatures in document

Muhammad Saif Ullah Khan 9 Jan 26, 2022
Finger is a function symbol recognition engine for binary programs

Finger is a function symbol recognition engine for binary programs

332 Jan 01, 2023
Parse URLs for DOIs, PubMed identifiers, PMC identifiers, arXiv identifiers, etc.

citation-url Parse URLs for DOIs, PubMed identifiers, PMC identifiers, arXiv identifiers, etc. This module has a single parse() function that takes in

Charles Tapley Hoyt 2 Feb 12, 2022
Package that allows for validate and sanitize of string values.

py.validator A library of string validators and sanitizers Insipired by validator.js Strings only This library validates and sanitizes strings only. P

Sanel Hadzini 22 Nov 08, 2022
This tool analyzes the json files generated by stream-lnd-htlcs to find hidden channel demand.

analyze_lnd_htlc Introduction Rebalancing channels is an important part of running a Lightning Network node. While it would be great if all channels c

Marimox 4 Dec 08, 2022
a demo show how to dump lldb info to ida.

用一个demo来聊聊动态trace 这个仓库能做什么? 帮助理解动态trace的思想。仓库内的demo,可操作,可实践。 动态trace核心思想: 动态记录一个函数内每一条指令的执行中产生的信息,并导入IDA,用来弥补IDA等静态分析工具的不足。 反编译看一下 先clone仓库,把hellolldb

25 Nov 28, 2022
Gradually automate your procedures, one step at a time

Gradualist Gradually automate your procedures, one step at a time Inspired by https://blog.danslimmon.com/2019/07/15/ Features Main Features Converts

Ross Jacobs 8 Jul 24, 2022
JeNot - A tool to notify you when Jenkins builds are done.

JeNot - Jenkins Notifications NOTE: under construction, buggy, and not production-ready What A tool to notify you when Jenkins builds are done. Why Je

1 Jun 24, 2022
Quickly edit your slack posts.

Lightning Edit Quickly edit your Slack posts. Heavily inspired by @KhushrajRathod's LightningDelete. Usage: Note: Before anything, be sure to head ove

14 Nov 19, 2021
Just some scripts to export vector tiles to geojson.

Vector tiles to GeoJSON Nowadays modern web maps are usually based on vector tiles. The great thing about vector tiles is, that they are not just imag

Lilith Wittmann 77 Jul 26, 2022
Functional UUIDs for Python.

🏷️FUUID stands for Functional Universally Unique IDentifier. FUUIDs are compatible with regular UUIDs but are naturally ordered by generation time, collision-free and support succinct representations

Phil Demetriou 147 Oct 27, 2022
Attempts to crack the compression puzzle.

The Compression Puzzle One lovely Friday we were faced with this nice yet intriguing programming puzzle. One shall write a program that compresses str

Oto Brglez 14 Dec 29, 2022