From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: exporting markdown with tables Date: Sun, 4 Jun 2017 13:38:17 -0700 Message-ID: References: <1496508393.398979.997639488.57C94D91@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHcI6-0000zE-8P for emacs-orgmode@gnu.org; Sun, 04 Jun 2017 16:38:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHcI3-0008W0-56 for emacs-orgmode@gnu.org; Sun, 04 Jun 2017 16:38:26 -0400 Received: from iport-bcv1-out.ucsd.edu ([132.239.0.119]:55430) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1dHcI2-0008Tg-Jn for emacs-orgmode@gnu.org; Sun, 04 Jun 2017 16:38:23 -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" To: Vicente Vera Cc: emacs-orgmode , Peter Davis On Sun, 4 Jun 2017, Vicente Vera wrote: > Cool, you're welcome. It is not the most convenient solution, but > keeping your tables in Editorial Markdown syntax should work: > > #+BEGIN_EXPORT md > Cat | Fur | > --- | --- | > A | A lot | > B | None | > #+END_EXPORT > Except that the above is not recognized as a table, so all the nifty tools for table editing are lost. IMO, a better solution is to create a filter for table-row that replaces the leading vertical with a space (or nothing) and bind that function to `org-export-filter-table-row-functions'. See (info "(org) Advanced configuration") --- However, those intimidated by filters can keep tables in org src blocks and convert them on export using a :post argument to clean the leading verticals. That way the tables can be edited as usual via org-edit-src-code: #+name: strip-leading-vertical #+BEGIN_SRC emacs-lisp (replace-regexp-in-string "^|" " " *this*) #+END_SRC #+header: :results replace :exports results #+header: :post strip-leading-vertical() :wrap export md #+BEGIN_SRC org | a | b | |---+---| | 1 | 2 | | 3 | 4 | #+END_SRC #+RESULTS: #+BEGIN_export md a | b | ---+---| 1 | 2 | 3 | 4 | #+END_export A call to `(require 'ob-org)' or suitable customization is needed to enable the org src block to execute. HTH, Chuck