Alexander Baier <alexander.ba...@mailbox.org> writes:

> On 2014-05-15 21:57 Eric S Fraga wrote:
>> I put it under its own heading with an :ignoreheading: tag and use the
>> filter that was posted on this list (today in fact):
>
> I can't find the filter you are referring to. I guess it is in the
> org-ref thread?  I did not follow that thread as org-ref seems to be
> a somewhat full-fledged solution including a lot of things I do not
> need.  I looked through the thread but wasn't lucky to find said
> filter.  Could you kindly post a link? (if that's not to much to ask)
>

I don't have a link, but I have the following in an example file (which
afaik still works fine):

--8<---------------cut here---------------start------------->8---
#+LATEX_CLASS: article

#+include: "ch1.org" 
#+include: "ch2.org" :minlevel 1 
#+include: "ch3.org" :minlevel 1 
#+include: "ch4.org" :minlevel 1 
#+include: "ch5.org" :minlevel 1 
#+include: "bib.org"

* Code                                                                          
                              :noexport:

Suvayu's filter to get rid of :ignoreheading: tagged headlines - used in bib.org
#+BEGIN_SRC emacs-lisp :results silent
(defun sa-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 contents)))
    (replace-match "" nil nil contents)))

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

#+END_SRC
--8<---------------cut here---------------end--------------->8---

Using #+include also largely resolves your original concern I think
and is invaluable for larger files.

HTH,
-- 
Nick


Reply via email to