Skip to main content

YaLafi: Yet another LaTeX filter

This Python package extracts plain text from LaTeX documents. The software may be integrated with a proofreading tool and an editor. It provides

  • mapping of character positions between LaTeX and plain text,
  • simple inclusion of own LaTeX macros and environments with tailored treatment,
  • careful conservation of text flows,
  • some parsing of displayed equations for detection of included “normal” text and of interpunction problems,
  • support of multi-language documents (experimental).

A complete description is available at the GitHub page.

The sample Python application script yalafi/shell/shell.py integrates the LaTeX filter with the proofreading software LanguageTool. It sends the extracted plain text to the proofreader, maps position information in returned messages back to the LaTeX text, and generates results in different formats. You may easily

  • create a proofreading report in text or HTML format for a complete document tree,
  • check LaTeX texts in the editors Emacs and Vim via several plug-ins,
  • run the script as emulation of a LanguageTool server with integrated LaTeX filtering.

For instance, the LaTeX input

Only few people\footnote{We use
\textcolor{red}{redx colour.}}
is lazy.

will lead to the text report

1.) Line 2, column 17, Rule ID: MORFOLOGIK_RULE_EN_GB
Message: Possible spelling mistake found
Suggestion: red; Rex; reds; redo; Red; Rede; redox; red x
Only few people is lazy.    We use redx colour. 
                                   ^^^^
2.) Line 3, column 1, Rule ID: PEOPLE_VBZ[1]
Message: If 'people' is plural here, don't use the third-person singular verb.
Suggestion: am; are; aren
Only few people is lazy.    We use redx colour. 
                ^^

This is the corresponding HTML report:

HTML report

Release files for yalafi 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yalafi 1.3.0
File Size Uploaded
yalafi-1.3.0.tar.gz 45.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yalafi 1.3.0
File Interpreter ABI Platform
yalafi-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 127.8 kB

Release files / yalafi-1.3.0.tar.gz

Download URL yalafi-1.3.0.tar.gz
Size 45.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9cad9a78300d29536d6cc8e304d855617ebb1c718b541654e7183c81d2047be0
BLAKE2b-256 checksum
How to use checksums
9e41db0ec0eb28a0a8b6d61b47af4360d86f9788ae5eb7028cbe0864cba3badd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.1 CPython/3.6.9

Release files / yalafi-1.3.0-py3-none-any.whl

Download URL yalafi-1.3.0-py3-none-any.whl
Size 82.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae65e72c6522ddb6596b9fe5fd80967b6ed98c6ff92bbb0bf333f4abea838374
BLAKE2b-256 checksum
How to use checksums
9ef02cee2f0d2cd3dc29906b19e9db4ce47989d0faa94657762e09bd3b16ee32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.1 CPython/3.6.9

Release history Release notifications | RSS feed

1.5.0

2 release files

1.4.0

2 release files

1.3.1

2 release files

This release

1.3.0 This release

2 release files

1.2.0

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.9.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page