Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/torik42/yalafi
Yet another LaTeX filter
https://github.com/torik42/yalafi
emacs filter html-report languagetool latex parser python-3 vim
Last synced: 4 days ago
JSON representation
Yet another LaTeX filter
- Host: GitHub
- URL: https://github.com/torik42/yalafi
- Owner: torik42
- License: gpl-3.0
- Created: 2020-03-12T13:40:33.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-26T13:41:38.000Z (10 months ago)
- Last Synced: 2025-01-07T01:33:23.942Z (4 days ago)
- Topics: emacs, filter, html-report, languagetool, latex, parser, python-3, vim
- Language: Python
- Homepage:
- Size: 1.99 MB
- Stars: 69
- Watchers: 2
- Forks: 12
- Open Issues: 37
-
Metadata Files:
- Readme: README-short.md
- Changelog: HISTORY.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
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](https://github.com/torik42/YaLafi).The sample Python application script yalafi/shell/shell.py
integrates the LaTeX filter with the proofreading software
[LanguageTool](https://www.languagetool.org).
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](https://raw.githubusercontent.com/torik42/YaLafi/master/figs/shell.png)