柔性乳胶过滤器
tex2txt的Python项目详细描述
H1> TEX2TXT:一种柔性乳胶过滤器
这是用于提取纯文本的python脚本或模块 从乳胶文件。 由于以下特性,它可以与 校对软件:
- 在文本操作期间跟踪行号或字符位置,
- 简单地包含自己的乳胶宏和定制的环境 治疗,
- 小心保存文本流,
- 方程中拖尾函数的检测,
- 正确处理可嵌套元素,如{}大括号。
有关更完整的说明,请访问 Github page。
示例
This is\footnote{A footnote may be set
in \textcolor{red}{redx colour.}}
is the main text.
示例脚本shell2.py将提取纯文本,调用 LanguageTool, 并更正其消息中的位置号。 这是输出。
test.tex
========
1.) Line [1], column [6], Rule ID: ENGLISH_WORD_REPEAT_RULE
Message: Possible typo: you repeated a word
Suggestion: is
This is is the main text. A footnote may be set in r...
^^^^^
test.tex
========
2.) Line [2], column [20], Rule ID: MORFOLOGIK_RULE_EN_GB
Message: Possible spelling mistake found
Suggestion: red; Rex; reds; redo; Red; Rede; redox; red x
...s the main text. A footnote may be set in redx colour.
^^^^