[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [new exporter] ignoring a headline on export to PDF via latex
From: |
Eric S Fraga |
Subject: |
Re: [O] [new exporter] ignoring a headline on export to PDF via latex |
Date: |
Wed, 6 Mar 2013 09:00:42 +0000 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) |
Nicolas Goaziou <address@hidden> writes:
[...]
> Indeed, this won't work anymore: `org-latex-translate-alist' has been
> removed. The equivalent would just be to use a defadvice:
>
> #+begin_src emacs-lisp
> (defadvice org-latex-headline (around my-latex-skip-headlines
> (headline contents info) activate)
> (if (member "ignoreheading" (org-element-property :tags headline))
> (setq ad-return-value contents)
> ad-do-it))
> #+end_src
>
> Another approach is, as mentioned by Charles Berry, to remove the first
> line of transcoded headline when it contains "ignoreheading".
>
> #+begin_src emacs-lisp
> (defun org-latex-ignore-heading-filter-headline (headline backend info)
> "Strip headline from HEADLINE. Ignore BACKEND and INFO."
> (when (and (org-export-derived-backend-p backend 'latex)
> (string-match "\\`.*ignoreheading.*\n" headline))
> (replace-match "" nil nil headline)))
> (add-to-list 'org-export-filter-headline-functions
> 'org-latex-ignore-heading-filter-headline)
> #+end_src
Nicolas,
this is exactly what I was looking for. It works perfectly. Many thanks!
eric
--
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_7.9.3f-1199-g3a0e55
- Re: [O] [new exporter] ignoring a headline on export to PDF via latex, (continued)
- Re: [O] [new exporter] ignoring a headline on export to PDF via latex, Eric S Fraga, 2013/03/05
- Re: [O] [new exporter] ignoring a headline on export to PDF via latex, Nick Dokos, 2013/03/05
- Re: [O] [new exporter] ignoring a headline on export to PDF via latex, Suvayu Ali, 2013/03/05
- Re: [O] [new exporter] ignoring a headline on export to PDF via latex, Charles Berry, 2013/03/05
- Re: [O] [new exporter] ignoring a headline on export to PDF via?latex, Suvayu Ali, 2013/03/05
- Re: [O] [new exporter] ignoring a headline on export to PDF via?latex, Charles Berry, 2013/03/06
- Re: [O] [new exporter] ignoring a headline on export to PDF?via?latex, Suvayu Ali, 2013/03/10
- Re: [O] [new exporter] ignoring a headline on export to PDF via latex, Eric S Fraga, 2013/03/06
- Re: [O] [new exporter] ignoring a headline on export to PDF via latex, Nicolas Goaziou, 2013/03/05
Re: [O] [new exporter] ignoring a headline on export to PDF via latex, Nicolas Goaziou, 2013/03/05
- Re: [O] [new exporter] ignoring a headline on export to PDF via latex,
Eric S Fraga <=