Andreas Leha <[email protected]> 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
>
>
>
--