Skip to content

Python script to ease the translation of latex files to other languages

License

Notifications You must be signed in to change notification settings

javiervales/latextlt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

latextlt

Python script to ease the translation of strings into latex files to other languages (python 3)

This script replaces non-text contents of the latex files (e.g., equation, figure, tikz) and all commands (e.g., \frametitle{.}, \section{.}, $.$, etc.) for a hash. After texts (strings) translation, the script is called another time to replace back the hash contents for the original contents. Review must be done on the resulting output, but this saves a considerable amount of post-processing time.

Usage:

  1. Code tex file:
    python latextlt.py -f yourlatexfile.tex
    
  2. Translate yourlatexfile.CODED.txt using google translator or similar
  3. Decode translation file:
    python latextlt.py -d -f yourlatexfile.tex > yourlatexfile.tlt.tex
    
  4. Manually review the output yourlatexfile.tlt.tex

About

Python script to ease the translation of latex files to other languages

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages