From: tsd@tsdye.com (Thomas S. Dye)
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: Richard Lawrence <richard.lawrence@berkeley.edu>, emacs-orgmode@gnu.org
Subject: Re: org-export-preprocess-hook and the new exporter
Date: Mon, 28 May 2012 12:44:03 -1000 [thread overview]
Message-ID: <m1mx4s3ozw.fsf@tsdye.com> (raw)
In-Reply-To: <87k4093iog.fsf@gmail.com> (Nicolas Goaziou's message of "Fri, 18 May 2012 12:08:47 +0200")
Nicolas Goaziou <n.goaziou@gmail.com> writes:
> Hello,
>
> Eric S Fraga <e.fraga@ucl.ac.uk> 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
next prev parent reply other threads:[~2012-05-28 22:44 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-12 18:23 Using Org for a dissertation Richard Lawrence
2012-05-12 16:49 ` Eric Schulte
2012-05-15 5:02 ` Richard Lawrence
2012-06-14 12:39 ` Rasmus
2012-06-14 16:13 ` Eric S Fraga
2012-05-12 19:27 ` Thomas S. Dye
2012-05-15 5:16 ` Richard Lawrence
2012-05-15 17:08 ` Nicolas Goaziou
2012-05-16 0:38 ` Richard Lawrence
2012-05-21 3:56 ` New exporter [was: Re: Using Org for a dissertation] François Pinard
2012-05-21 17:54 ` Nicolas Goaziou
2012-05-21 19:10 ` François Pinard
2012-05-23 0:35 ` François Pinard
2012-05-12 20:29 ` Using Org for a dissertation Peter Münster
2012-05-15 12:26 ` suvayu ali
2012-05-16 1:15 ` Richard Lawrence
2012-05-17 2:37 ` org-export-preprocess-hook and the new exporter (was Re: Using Org for a dissertation) Eric S Fraga
2012-05-18 6:49 ` Bastien
2012-05-18 10:08 ` Nicolas Goaziou
2012-05-20 6:12 ` Eric Fraga
2012-05-20 8:03 ` Nicolas Goaziou
2012-05-28 22:44 ` Thomas S. Dye [this message]
2012-05-29 1:37 ` org-export-preprocess-hook and the new exporter Eric S Fraga
2012-05-29 3:20 ` Thomas S. Dye
2012-05-21 13:21 ` Using Org for a dissertation Matt Lundin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1mx4s3ozw.fsf@tsdye.com \
--to=tsd@tsdye.com \
--cc=emacs-orgmode@gnu.org \
--cc=n.goaziou@gmail.com \
--cc=richard.lawrence@berkeley.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).