Skip to main content

A flexible LaTeX filter

Project description

Tex2txt: a flexible LaTeX filter

This Python script or module extracts plain text from LaTeX documents. Due to the following characteristics, it may be integrated with a proofreading software:

  • tracking of line numbers or character positions during text manipulations,
  • simple inclusion of own LaTeX macros and environments with tailored treatment,
  • careful conservation of text flows,
  • detection of trailing interpunction in equations,
  • proper handling of nestable LaTeX elements like {} braces.

A more complete description is available at the GitHub page. For instance, the LaTeX input

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

will lead to the subsequent output from example application script shell.py. The script invokes LanguageTool as proofreading software, using a local installation or the Web server hosted by LanguageTool.

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. 
                ^^

Run with option --html, the script produces an HTML report:

HTML report

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tex2txt-1.7.0.tar.gz (31.2 kB view details)

Uploaded Source

Built Distribution

tex2txt-1.7.0-py3-none-any.whl (43.9 kB view details)

Uploaded Python 3

File details

Details for the file tex2txt-1.7.0.tar.gz.

File metadata

  • Download URL: tex2txt-1.7.0.tar.gz
  • Upload date:
  • Size: 31.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.6.9

File hashes

Hashes for tex2txt-1.7.0.tar.gz
Algorithm Hash digest
SHA256 f1930a27132cdc7ad6146871c48445e75cf059009861f56d9a410d3376000c02
MD5 caeefa47273827fb127fa042d80f0b2d
BLAKE2b-256 554e5efcd2f5ce0036dd137df30d6e6b1c9dfa35f01752504bc58f8e50f8f326

See more details on using hashes here.

File details

Details for the file tex2txt-1.7.0-py3-none-any.whl.

File metadata

  • Download URL: tex2txt-1.7.0-py3-none-any.whl
  • Upload date:
  • Size: 43.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.6.9

File hashes

Hashes for tex2txt-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d77f5167c62d314669ff90edbdb04e451b386ee9ee3f4fe5d7d20cab92b1697e
MD5 23ab17f41eec48115dd93cc41a886184
BLAKE2b-256 957bd317768b6d41168aeff00c70929fb9f9797ebf0b1fe20391d3a383f16592

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page