[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 (was Re: Using O
From: |
Eric Fraga |
Subject: |
Re: [O] org-export-preprocess-hook and the new exporter (was Re: Using Org for a dissertation) |
Date: |
Sun, 20 May 2012 15:42:30 +0930 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux) |
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
Nicolas,
I tried this but I get:
,----
| Warning (initialization): An error occurred while loading
`/home/ucecesf/.emacs':
|
| Symbol's value as variable is void: org-e-latex-translate-table
|
| To ensure normal operation, you should investigate and remove the
| cause of the error in your initialization file. Start Emacs with
| the `--debug-init' option to view a complete error backtrace.
`----
I think it should be
#+BEGIN_SRC emacs-lisp
(add-to-list 'org-e-latex-translate-alist '(headline . my-e-latex-headline))
#+END_SRC
i.e. =alist= instead of =table=.
In any case, with this change, it works like a charm! Many thanks.
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-527-gc2aac5
- [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, Matt Lundin, 2012/05/21
Re: [O] Using Org for a dissertation, Markus Grebenstein, 2012/05/15