From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: using gnuplot's "splot" and "every" commands on org-mode table data Date: Thu, 09 May 2013 22:23:58 +0200 Message-ID: <87y5bngaw1.fsf@Rainer.invalid> References: <87k3ncxeqt.fsf@gmail.com> <87r4hkuebb.fsf@Rainer.invalid> <87zjw4xqhr.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaXNx-0002Co-9S for emacs-orgmode@gnu.org; Thu, 09 May 2013 16:24:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UaXNv-0007i0-MX for emacs-orgmode@gnu.org; Thu, 09 May 2013 16:24:17 -0400 Received: from plane.gmane.org ([80.91.229.3]:58747) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaXNv-0007hg-Fh for emacs-orgmode@gnu.org; Thu, 09 May 2013 16:24:15 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UaXNr-00054C-AP for emacs-orgmode@gnu.org; Thu, 09 May 2013 22:24:11 +0200 Received: from pd9eb5254.dip0.t-ipconnect.de ([217.235.82.84]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 May 2013 22:24:11 +0200 Received: from Stromeko by pd9eb5254.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 May 2013 22:24:11 +0200 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: emacs-orgmode@gnu.org Eric S Fraga writes: > At present, there is no mechanism for selective deletion of these line > separators upon export (that I know of: I would be happy to be corrected > on this!). For the paper I submitted last week for publication, the > only post-org editing I had to do was delete a number \hline > specifications in the exported LaTeX file. Not a major problem, > obviously, but it would be nice to not have to do even that! Seems to me that one of the variants below would do what you wanted: --8<---------------cut here---------------start------------->8--- * Example table with multiple lines ** Data :noexport: #+NAME: raw-table | | Strategy | Average performance | |---+----------+---------------------| | / | | 8.69 | | / | | 9.72 | | / | | 9.03 | |---+----------+---------------------| | | 1 | 9.15 | |---+----------+---------------------| | / | | 9.15 | | / | | 7.60 | | / | | 7.46 | |---+----------+---------------------| | | 2 | 8.07 | |---+----------+---------------------| #+TBLFM: @5$3=vmean(@-I..@-II);%.2f::@9$3=vmean(@-I..@-II);%.2f ** Results #+BEGIN_SRC elisp :var table=raw-table :colnames yes :exports results table #+END_SRC #+RESULTS: | | Strategy | Average performance | |---+----------+---------------------| | / | | 8.69 | | / | | 9.72 | | / | | 9.03 | | | 1 | 9.15 | | / | | 9.15 | | / | | 7.6 | | / | | 7.46 | | | 2 | 8.07 | #+BEGIN_SRC elisp :var table=raw-table :hlines yes :exports results (delq nil (let (hl) (mapcar (lambda (tl) (if (listp tl) (unless (equal (car tl) "/") (cdr tl)) (unless hl (setq hl t) tl))) table))) #+END_SRC #+RESULTS: | Strategy | Average performance | |----------+---------------------| | 1 | 9.15 | | 2 | 8.07 | --8<---------------cut here---------------end--------------->8--- > Maybe there is a need for three different line separators: ~ for headers > (to be used as Achim indicates above but possibly helpful for exporters > as well), = for lines that should appear in exported output and - for > those that will not appear. Header lines would typically export as > well. All three would be used for formula definitions (i.e. @I > references) but would solely differ in how they are processed by the > exporters. We should keep "---" as lines to be exported and perhaps use ":::" for those that are just introducing convenience for table calculations as "===" looks far too heavy to me for that purpose. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptation for Waldorf microQ V2.22R2: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada