[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org-export-preprocess-hook and the new exporter
From: |
Thomas S. Dye |
Subject: |
Re: [O] org-export-preprocess-hook and the new exporter |
Date: |
Mon, 28 May 2012 12:44:03 -1000 |
Nicolas Goaziou <address@hidden> writes:
> Hello,
>
> Eric S Fraga <address@hidden> writes:
>
>> This is probably more for Nicolas... and apologies for hijacking the
>> thread slightly!
>>
>> I was intrigued by the comment above regarding the ignoreheading
>> tag. Sounded just like what I needed. However, it doesn't do anything
>> with org /out-of-the-box/. A little searching led to Suvayu's posting
>> in stackoverflow [1] and that does the job nicely, but only for the
>> standard (read: old) export engine.
>>
>> The question is: is there an equivalent hook for the new exporter?
>
> For heavy structure modifications (like headlines removal), there is
> `org-export-before-parsing-hook' and the dynamically bound variable
> `org-export-current-backend'.
>
> Another way to solve the problem could be to implement your own headline
> parser:
>
> #+BEGIN_SRC emacs-lisp
> (defun my-e-latex-headline (headline contents info)
> (if (member "ignoreheading" (org-element-property :tags headline)) contents
> (org-e-latex-headline headline contents info)))
> #+END_SRC
>
> Then you can either install it in the current `e-latex' back-end:
>
> #+BEGIN_SRC emacs-lisp
> (add-to-list 'org-e-latex-translate-table '(headline . my-e-latex-headline))
> #+END_SRC
Aloha Nicolas,
Has org-e-latex-translate-table gone away? I get:
Symbol's value as variable is void: org-e-latex-translate-table
I tried grepping the source code for it, but came up empty there, too.
All the best,
Tom
>
> Or you can define your own back-end for this purpose:
>
> #+BEGIN_SRC emacs-lisp
> (org-export-define-derived-backend dissertation e-latex
> :translate-alist ((template . my-e-latex-headline)))
>
> (defun org-dissertation-export-to-pdf
> (&optional subtreep visible-only body-only ext-plist pub-dir)
> (interactive)
> (org-e-latex-compile
> (let ((outfile (org-export-output-file-name ".tex" subtreep pub-dir)))
> (org-export-to-file
> 'dissertation outfile subtreep visible-only body-only ext-plist))))
> #+END_SRC
>
> You need a recent Org version to do this, though.
>
>
> Regards,
--
Thomas S. Dye
http://www.tsdye.com
- Re: [O] New exporter [was: Re: Using Org for a dissertation], (continued)
Re: [O] Using Org for a dissertation, Peter Münster, 2012/05/12
Re: [O] Using Org for a dissertation, suvayu ali, 2012/05/15
- Re: [O] Using Org for a dissertation, Richard Lawrence, 2012/05/15
- [O] org-export-preprocess-hook and the new exporter (was Re: Using Org for a dissertation), Eric S Fraga, 2012/05/16
- Re: [O] org-export-preprocess-hook and the new exporter (was Re: Using Org for a dissertation), Bastien, 2012/05/18
- Re: [O] org-export-preprocess-hook and the new exporter (was Re: Using Org for a dissertation), Nicolas Goaziou, 2012/05/18
- Re: [O] org-export-preprocess-hook and the new exporter (was Re: Using Org for a dissertation), Eric Fraga, 2012/05/20
- Re: [O] org-export-preprocess-hook and the new exporter (was Re: Using Org for a dissertation), Nicolas Goaziou, 2012/05/20
- Re: [O] org-export-preprocess-hook and the new exporter,
Thomas S. Dye <=
- Re: [O] org-export-preprocess-hook and the new exporter, Eric S Fraga, 2012/05/28
- Re: [O] org-export-preprocess-hook and the new exporter, Thomas S. Dye, 2012/05/28
Re: [O] Using Org for a dissertation, Matt Lundin, 2012/05/21
Re: [O] Using Org for a dissertation, Markus Grebenstein, 2012/05/15