emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Cook, Malcolm" <MEC@stowers.org>
To: "'Charles C. Berry'" <ccberry@ucsd.edu>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: ox-html HOWTO? exporting #+RESULTS inside div
Date: Fri, 6 Nov 2015 19:45:50 +0000	[thread overview]
Message-ID: <791733313b1f4448bf69bde84a0f45ca@exchsrv2.sgc.loc> (raw)
In-Reply-To: <alpine.OSX.2.20.1511041918130.629@charles-berrys-macbook.local>

> > Charles, Thanks again for you suggestion.  Alas, using 'header-args
 > >:wrap org-results-container' has the unforeseen (by me) side effect
 > >of masking my use of `#+ATTR_HTML :class dataTable` on selected
 > >exported tables (which I use to allow for search/sortable/scrollable
 > >tables).  Now, the ':class dataTable' attribute is placed on the new
 > ><div> instead of the <table> with undesired outcome.
 > 
 > > Do you have any thoughts on how to accomplish both my goals (apply
 > > :class table to selected results, and making ALL results be
 > > addressable using javascript.  FYI - My application is to hide all
 > > source blocks on html open.  Clicking on a source block caption
 > > shows the source.  This provides an HTML view that hides the source
 > > until desired.  My recipients of such analysis write-ups really like
 > > this.
 > 
 > [snip]
 > 
 > > # #+PROPERTY: header-args :wrap org-results-container
 > > #
 > 
 > This creates a special block and attributes on the results will apply
 > to it - not its contents.
 > 
 > What you want can be obtained by creating a different special block
 > and then applying a filter. So, wrap like this
 > 
 > #+PROPERTY: header-args :wrap org-results-container-to-filter
 > 
 > and add a filter to `org-export-filter-special-block-functions' that
 > strips the 'to-filter' and adds the `dataTable' where it is needed.

Hi Charles - ok - you've got me looking at ox aspects I've not yet explored.... good!

If I understand your suggestion, the filter you propose would need to somehow "know" which tables I desire to be adorned with `class :dataTable`.

How do you reckon I might declare that?

Upon reflection, I wonder if following source block header syntax might rather be considered "in the spirit of things" and worthy of implementation:
	
	#+begin_src R :exports value table :prefix '#+attr_html :class dataTable'

which would be interpreted by ob-sbe (somehow) to emit and
	#+attr_html :class dataTable
Immediately prior to the #+results, all of which might be further :wrapped.

Or am I putting the cart before the horse?

Reminder (in part to self): my goal is two-fold 
 (a) declare to the ox-html exporter a :class (i.e. dataTable) to adorn selected exported results tables
 (b) have a means of addressing the exported html results of a code block allowing to conditionally hide or expose it (i.e. toggle exposure when user click on the export source code.  This is what "> #+PROPERTY: header-args :wrap org-results-container" provided for me, except that the introduction of the new <div> was blocking my means of doing (a)

Cheers,

Malcolm

 > 
 > HTH,
 > 
 > Chuck

  reply	other threads:[~2015-11-06 19:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-21 23:12 ox-html HOWTO? exporting #+RESULTS inside div Cook, Malcolm
2015-10-22  2:18 ` Charles C. Berry
2015-10-22  6:13   ` Cook, Malcolm
2015-11-05  0:02     ` Cook, Malcolm
2015-11-05  4:08       ` Charles C. Berry
2015-11-06 19:45         ` Cook, Malcolm [this message]
2015-11-06 21:01           ` Charles C. Berry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=791733313b1f4448bf69bde84a0f45ca@exchsrv2.sgc.loc \
    --to=mec@stowers.org \
    --cc=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).