From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: Re: Re: Publishing subsections of an orgmode file (HTML) Date: Mon, 13 Jul 2009 11:29:28 -0400 Message-ID: <87y6qs7g9z.fsf@stats.ox.ac.uk> References: <87fxd01wdq.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MQNTG-0007HT-RP for emacs-orgmode@gnu.org; Mon, 13 Jul 2009 11:29:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MQNTB-00077I-1e for emacs-orgmode@gnu.org; Mon, 13 Jul 2009 11:29:38 -0400 Received: from [199.232.76.173] (port=33410 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQNTA-000771-P0 for emacs-orgmode@gnu.org; Mon, 13 Jul 2009 11:29:32 -0400 Received: from markov.stats.ox.ac.uk ([163.1.210.1]:50934) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MQNT9-0000kc-Mj for emacs-orgmode@gnu.org; Mon, 13 Jul 2009 11:29:32 -0400 In-Reply-To: <87fxd01wdq.fsf@fastmail.fm> (Matthew Lundin's message of "Mon, 13 Jul 2009 09:38:09 -0500") 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: Matthew Lundin Cc: emacs-orgmode@gnu.org Matthew Lundin writes: > Ben writes: > >> I think that's my first post here and I would like first of all to >> thank you all for your amazing work. > > Welcome! > >> >> My first question is: How can I publish a subsection of one of these >> files as a webpage (and this subsection only)? I occasionally do that >> manually with C-c C-e [R] export-region, which export the subsection >> as a HTML page in an Emacs buffer. What I would like to do is to put a >> comment in the org file subsection to set the HTML 'target' location >> page such as >> >> * Topic A >> ** Things to do [...] (private) >> ** Interesting Notes I would like to publish >> #+THIS_REGION_TARGET_FILE=~/public_html/myfile.html > > You can specify the target file for an exported region using the > property EXPORT_FILE_NAME. E.g. > > * Topic A > :PROPERTIES: > :EXPORT_FILE_NAME: ~/public_html/myfile.html > :END: > ** Things to do [...] (private) > ** Interesting Notes I would like to publish > > You'll need to select the tree with C-c @ before exporting for this to > work. > > See this section of the manual for more information: > > http://orgmode.org/manual/Export-options.html Hi Ben, Also, see this section http://orgmode.org/manual/Selective-export.html#Selective-export As the manual says, "This behavior is governed by two variables: org-export-select-tags and org-export-exclude-tags." These are both lists of tags. The default values contain a single tag each: "export" and "noexport" respectively. So, e.g. --8<---------------cut here---------------start------------->8--- #+title: Selective export test 1 * This subtree is exported :export: Stuff in expored subtree * But not this one as there is an `export' tag in the buffer Stuff that won't be exported --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- #+title: Selective export test 2 * This subtree will be exported, with a single subtree exclusion h1 contents *** h1.2 h1.2 contents *** h2.2 (won't be exported) :noexport: h2.2 contents * This subtree will be exported Stuff that will be exported --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- #+title: Selective export test 3 * This subtree will be exported, with a single subtree exclusion :export: h1 contents *** h1.2 h1.2 contents *** h2.2 (won't be exported) :noexport: h2.2 contents * This subtree won't be exported, since an export tag is present in the buffer Stuff that won't be exported --8<---------------cut here---------------end--------------->8--- Dan p.s. In the first and third case, is it arguable that the :export: tag should not appear in the exported HTML/pdf? > > Best, > Matt > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode