From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Selective Export Question Date: Sun, 3 Jan 2010 14:20:25 +0100 Message-ID: <73AED298-3401-48FC-B38E-0085B6E4FC2D@gmail.com> References: <4B30662A.4010302@comcast.net> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NRQNm-00037X-5X for emacs-orgmode@gnu.org; Sun, 03 Jan 2010 08:20:34 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NRQNh-00036D-6l for emacs-orgmode@gnu.org; Sun, 03 Jan 2010 08:20:33 -0500 Received: from [199.232.76.173] (port=41817 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NRQNh-000368-04 for emacs-orgmode@gnu.org; Sun, 03 Jan 2010 08:20:29 -0500 Received: from mail-ew0-f224.google.com ([209.85.219.224]:56539) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NRQNg-0007Aa-Se for emacs-orgmode@gnu.org; Sun, 03 Jan 2010 08:20:29 -0500 Received: by ewy24 with SMTP id 24so17081240ewy.26 for ; Sun, 03 Jan 2010 05:20:27 -0800 (PST) In-Reply-To: <4B30662A.4010302@comcast.net> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Mark Elston Cc: org-mode emacs-orgmode On Dec 22, 2009, at 7:24 AM, Mark Elston wrote: > I have been making progress on my use of org-mode to manage both > my teaching notes and handouts in a single document. However, there > is something I still have not been able to make happen. That is > selective exporting of text *without* exporting a headline along with > it. > > Here is a sample of what I would like. In this example I have > sections > with "common" text (should be in both teaching notes and handouts) and > sections that are specific to each individual output format. What I > have below is set up to export the notes. What I would like is to > have the text (only) of the non-excluded sections and not the > headlines. Hi Mark, I think the right path for this is a function that you write and install in org-export-preprocess-hook. Then you can set your own conditions and remove those headlines before Org even tries to look at them. HTH - Carsten > > -------------------------------------------------------------- > #+TITLE: Test > #+LaTeX_CLASS: ClassNotes > > #+OPTIONS: toc:nil H:8 tags:nil > > #+EXPORT_EXCLUDE_TAGS: handouts > > * Headline 1 > some text > > ** Headline 1-1 > even more text > > * Headline 2 > some more text > > ** Headline 2-1 > Common text 1. Should be followed by handout or notes text. > > ***** should be handouts only :handouts: > handout text > > ***** should be notes only :notes: > notes text > > ** Headline 2-2 > Common text 2. Should be followed by handout or notes text. > > ***** :handouts: > handout text again > > ***** :notes: > notes text again > -------------------------------------------------------------- > > > The relevant material from my org-export-latex-classes is: > > ("ClassNotes" "\\documentclass[letter,twoside,openright]{memoir} > ... > ("\\chapter{%s}" . "\\chapter*{%s}") > ("\\section{%s}" . "\\section*{%s}") > ("\\subsection{%s}" . "\\subsection*{%s}") > ("\\subsubsection{%s}" . "\\subsubsection*{%s}") > ("%% Level 5" . "%% Level 5") > ("%% Level 6" . "%% Level 6") > ("%% Level 7" . "%% Level 7") > ("%% Level 8" . "%% Level 8")) > ... > > > I was hoping to allow all levels of heading to be exported but only > write comments for the levels below level 4. It didn't work out that > way. > > With the above I don't get *any* of the :notes: or :handouts: > sections written out. However, if I include empty level three and > four > headlines (the stars followed by a mandatory space) I get the :notes: > and :handouts: sections just fine. Except now I also get empty > \subsection{} and \subsubsection{} blocks in my latex output. I have > attached the resulting .tex file with comments pointing out the > extra heading lines I would like to *not* see... > > The net result is a lot of blank space in the resulting .pdf file > between the 'common' text and the note- or handout-specific text. > This > is *definitely* not what I had in mind. > > Is there any way of working around this or correcting this behavior? > > Mark > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten