Hi Carsten, > here is a possible solution: > > Please get the latest git version of org-mode. Then put the following code > into > .emacs: > > (defun my-org-export-latex-fix-inputenc () > "Set the codingsystem in inputenc to what the buffer is." > (let* ((cs buffer-file-coding-system) > (opt (latexenc-coding-system-to-inputenc cs))) > (when opt > (goto-char (point-min)) > (while (re-search-forward "\\\\usepackage\\[\\(.*?\\)\\] > {inputenc}" > nil t) > (goto-char (match-beginning 1)) > (delete-region (match-beginning 1) (match-end 1)) > (insert opt)) > (save-buffer)))) > > (eval-after-load "org-latex" > '(add-hook 'org-export-latex-after-save-hook > 'my-org-export-latex-fix-inputenc)) > > Let me know how it goes.....
Thanks for your solution. I've tested with both latin1 and utf8 Org buffers and I get the correct encoding passed to LaTeX in both cases. Regarding the utf8 encoding, I had a remark in my first message, which was: >> In addition, Org should use the `utf8x' option (instead of `utf8') which >> enables to handle unbreakable spaces (useful in french). Could you change that too? Thanks a lot, Francesco _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode