From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: collapsing some headings on html export? Date: Thu, 25 Aug 2011 22:19:55 +0200 Message-ID: <4E56AE6B.1030903@christianmoe.com> References: Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:50312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwgPH-0005kI-3P for emacs-orgmode@gnu.org; Thu, 25 Aug 2011 16:20:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwgPF-00075M-R6 for emacs-orgmode@gnu.org; Thu, 25 Aug 2011 16:20:07 -0400 Received: from mars.hitrost.net ([91.185.211.18]:49416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwgPF-0006y7-Ck for emacs-orgmode@gnu.org; Thu, 25 Aug 2011 16:20:05 -0400 In-Reply-To: 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 Price Cc: Org Mode Hi, org-info-js may be your best bet, but for a lightweight solution that works with your sample text without a single line of javascript, try this (mouse over headings to display contents): --------- #+TITLE: Folded headings in html export #+style: * Outline: Semester 1 ** 1.<2011-09-15 Thu> [[file:./syllabus/what-is-history-for][What is History For?]] :PROPERTIES: :HTML_CONTAINER_CLASS: folded :END: Why we should write history, why everyone should do it, and why that means we need the Web. Hacker cultures, collaborative learning, knowledge sharing, non-expert culture. Background: [[http://www.journalofamericanhistory.org/issues/952/interchange/index.html][JAH - The Promise of Digital History]] *** Lab: Introduction to Wordpress & the course site. :PROPERTIES: :HTML_CONTAINER_CLASS: folded :END: Blogging & social media review. Preliminary listing of potential NGO partners. --------- Drawbacks: You need to set a HTML_CONTAINER_CLASS property to "folded" on any subtree you want hidden from the start. And the unfolded text folds away again when your reader mouses out of the containing div. Yours, Christian On 8/25/11 5:41 PM, Matt Price wrote: > does anyone have any advice on the following: I'm thinking I would > like to collapse certain segments of a document when exporting to > HTML, so e.g., if it looks like this: > > * Outline: Semester 1 > ** 1.<2011-09-15 Thu> [[file:./syllabus/what-is-history-for][What is > History For?]] > Why we should write history, why everyone should do it, and why that > means we need the Web. Hacker cultures, collaborative learning, > knowledge sharing, non-expert culture. > Background: [[http://www.journalofamericanhistory.org/issues/952/interchange/index.html][JAH > - The Promise of Digital History]] > *** Lab: Introduction to Wordpress& the course site. Blogging& > social media review. Preliminary listing of potential NGO partners. > > I'd like to display just this by default: > > Outline: Semester 1 > 1. Sept. 15, 2011 What is History For > > but permit viewers to click on the headline or a '+' box to see the > details. Is it possible to do this somehow, e.g. by embedding some > javascript code somewhere or something? > > Really just wondering... > Thanks, > Matt > >