[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Exporting non utf8 org documents

From: Carsten Dominik
Subject: Re: [Orgmode] Exporting non utf8 org documents
Date: Sun, 10 Jan 2010 10:20:25 +0100

Hi Francesco,

you can remove the code I sent you again, and instead grab the latest git release.

Then you can also do

(setq org-export-latex-inputenc-alist '(("utf8" . "utf8x")))

to get utf8x instead of utf8.


- Carsten

On Jan 8, 2010, at 1:36 PM, Francesco Pizzolante wrote:

Hi Carsten,

here is a possible solution:

Please get the latest git version of org-mode. Then put the following code

   (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\\[\\(.*?\\)\\]
                                   nil t)
           (goto-char (match-beginning 1))
           (delete-region (match-beginning 1) (match-end 1))
           (insert opt))

   (eval-after-load "org-latex"
     '(add-hook 'org-export-latex-after-save-hook

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,

- Carsten

reply via email to

[Prev in Thread] Current Thread [Next in Thread]