0

Main question: In order spell checkers can apply, M-x iso-tex2iso is nice for converting TeX-encoded files to e.g. UTF-8 encoded ones. But, in case a numerous files to convert, running this command in a batch mode would be helpful. How to do that?

Subsidiary question: (not for me, for a friend of mine owning a Mac) On OSX, how to make this batch thing a script with an associated icon that could "receive" (by "drag and drop") a file to be converted?

  • 1
    I don't know how exactly iso-tex2iso works, but I'm certain of that you can run Emacs in batch mode: emacswiki.org/emacs/BatchMode gnu.org/software/emacs/manual/html_node/elisp/Batch-Mode.html - it could be enough for your task as is, or maybe you will need to write a wrapper function to feed the data to iso-tex2iso. Of course you could also do it from Emacs interactively too with either macros or some Elisp code - depends on your actual requirement. – wvxvw Jan 29 '15 at 7:15
  • 1
    Also, studying how batch-byte-compile does it's job could be useful. – politza Jan 29 '15 at 7:51
3

Thanks to wvxvw's comment, I can answer my own (main) question: in order to convert a TeX-encoded file, say foo.tex, into an UTF-8 encoded one, it is enough to run (no need to open the file in emacs):

emacs -batch foo.tex -f mark-whole-buffer -f iso-tex2iso -f save-buffer -kill

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.