1

My latex document has latin1/utf-8 diacritics/accents such as é

I want to run a-transform-program file.tex > file-ascii.tex so that all diacritics/accents are replaced by their corresponding macros.

Is there such a a-transform-program?

2
  • What's wrong with search and replace?
    – Matsmath
    Aug 19, 2016 at 23:40
  • 1
    Consider the possibility of compiling with LuaLaTeX and fontspec, instead of what you are using now. UTF-8 characters can be used directly.
    – user103221
    Mar 19, 2017 at 23:33

1 Answer 1

1

Using module latex from mab2bib, it's a python one-liner:

 python -c 'import latex,codecs; latex.register(); print unicode(codecs.open("myfile.tex",encoding="utf-8").read()).encode("latex")'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .