From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Malone Subject: Re: Collapse LaTeX source before start of main document? Date: Wed, 4 May 2011 14:05:08 -0400 Message-ID: References: <878vumsam8.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:44973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHgRj-00016Y-9g for emacs-orgmode@gnu.org; Wed, 04 May 2011 14:05:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHgRh-00006v-L3 for emacs-orgmode@gnu.org; Wed, 04 May 2011 14:05:11 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]:51189) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHgRh-000057-5e for emacs-orgmode@gnu.org; Wed, 04 May 2011 14:05:09 -0400 Received: by iyh42 with SMTP id 42so1576787iyh.0 for ; Wed, 04 May 2011 11:05:08 -0700 (PDT) In-Reply-To: <878vumsam8.fsf@fastmail.fm> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Matt Lundin Cc: emacs-orgmode Hi Matt, Sorry for the non-plain text... I added your suggestion to my .emacs but upon export it removed the entire block, which is odd based on the source code for the function... Anyway, I found another solution that now seems obvious: the #+begin...#+end blocks themselves can be folded by either hitting TAB on the #+begin line, or by setting the =3Dorg-hide-block-startup=3D variable. Chris On Wed, May 4, 2011 at 12:18 PM, Matt Lundin wrote: > > Chris Malone writes: > > (Note: When using gmail, please adjust the settings to send your > messages as plain text only instead of multipart/alternative.) > > > When I include the actual contents of my abstract, this preliminary mat= erial > > section (the #+begin ... #+end block) is rather large. =A0I'd like to b= e able > > to put this material into a headline so that I could collapse it - but = I > > don't want this headline exported as content of the main document. > > > > In other words, is there a property or tag that I can add to a headline= that > > causes LaTeX export to ignore the fact that it is a headline (i.e. \cha= pter, > > \section, \subsection, etc.), but still export its contents? =A0Somethi= ng > > like: > > You could add a hook to remove headlines with a "prelim" tag: > > --8<---------------cut here---------------start------------->8--- > (defun my-org-export-remove-tagged-headlines (tag) > =A0(save-excursion > =A0 =A0(goto-char (point-min)) > =A0 =A0(while (re-search-forward (concat ":" tag ":") nil t) > =A0 =A0 =A0(delete-region (point-at-bol) (point-at-eol))))) > > (add-hook 'org-export-preprocess-hook (lambda () (my-org-export-remove-ta= gged-headlines "prelim"))) > --8<---------------cut here---------------end--------------->8--- > > Best, > Matt