From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Collapse LaTeX source before start of main document? Date: Wed, 04 May 2011 12:18:07 -0400 Message-ID: <878vumsam8.fsf@fastmail.fm> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:60010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHemC-0001oW-FH for emacs-orgmode@gnu.org; Wed, 04 May 2011 12:18:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHemB-0005fZ-IO for emacs-orgmode@gnu.org; Wed, 04 May 2011 12:18:12 -0400 Received: from out2.smtp.messagingengine.com ([66.111.4.26]:34307) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHemB-0005fE-Ce for emacs-orgmode@gnu.org; Wed, 04 May 2011 12:18:11 -0400 In-Reply-To: (Chris Malone's message of "Wed, 4 May 2011 11:36:58 -0400") 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: Chris Malone Cc: emacs-orgmode 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 material > section (the #+begin ... #+end block) is rather large. I'd like to be 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. \chapter, > \section, \subsection, etc.), but still export its contents? Something > 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) (save-excursion (goto-char (point-min)) (while (re-search-forward (concat ":" tag ":") nil t) (delete-region (point-at-bol) (point-at-eol))))) (add-hook 'org-export-preprocess-hook (lambda () (my-org-export-remove-tagged-headlines "prelim"))) --8<---------------cut here---------------end--------------->8--- Best, Matt