emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Exporting non utf8 org documents


From: Francesco Pizzolante
Subject: Re: [Orgmode] Exporting non utf8 org documents
Date: Fri, 08 Jan 2010 13:36:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt)

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




reply via email to

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