[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] new LaTeX exporter hook
From: |
Jambunathan K |
Subject: |
Re: [O] new LaTeX exporter hook |
Date: |
Wed, 23 May 2012 17:00:22 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.97 (windows-nt) |
Andreas Leha <address@hidden> writes:
> Hi all,
>
> the new LaTeX exporter does not seem to "run" the
> org-export-latex-final-hook. Is there an equivalent?
You are looking for `:filter-final-output' within
`org-export-filters-alist'.
I have defcustom that runs indent-region on final html output. Here is
the relevant sections from org-e-html together with it's final section.
Adopt this example to e-latex case.
(defconst org-e-html-filters-alist
'((:filter-final-output . org-e-html-final-function))
"Alist between filters keywords and back-end specific filters.
See `org-export-filters-alist' for more information.")
(defun org-e-html-final-function (contents backend info)
(if (not org-e-html-pretty-output) contents
(with-temp-buffer
(nxml-mode)
(insert contents)
(indent-region (point-min) (point-max))
(buffer-substring-no-properties (point-min) (point-max)))))
(defcustom org-e-html-pretty-output nil
"Enable this to generate pretty HTML."
:group 'org-export-e-html
:type 'boolean)
> Cheers,
> Andreas
>
>
>
--