emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Export to LaTeX and Beamer


From: Suvayu Ali
Subject: Re: [O] Export to LaTeX and Beamer
Date: Wed, 17 Jul 2013 23:00:17 +0200
User-agent: Mutt/1.5.21 (2012-12-30)

On Wed, Jul 17, 2013 at 10:47:12PM +0200, Julien Cubizolles wrote:
> Hi Ali (am I right in assuming that's your first nameĀ ?)
> 
> Suvayu Ali <address@hidden> writes:
> 
> > Here is an older version of the function:
> >
> >  (defun my-org-export-remove-tagged-headlines (tag)
> >    (save-excursion
> >      (goto-char (point-min))
> >      (while (re-search-forward (concat ":" tag ":") nil t)
> >        (delete-region (point-at-bol) (point-at-eol)))))
> >
> > Here I'm parsing the buffer in a pre-process hook.  In a filter, you
> > have to parse a string instead.  But the logic should be the same.
> 
> I'll try and adapt to make it work. I'll let you know how it goes.

Actually Rasmus shared his filter earlier today on the Emacs list.  Try
this:

(defun my-ignore-headline (contents backend info)
  "Ignore headlines with tag `ignoreheading'."
  (when (and (org-export-derived-backend-p backend 'latex 'html 'ascii)
                  (string-match "\\`.*ignoreheading.*\n"
                                (downcase headline)))
    (replace-match "" nil nil headline)))

(add-to-list 'org-export-filter-headline-functions 'my-ignore-headline)

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]