From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/15000 Path: news.gmane.org!not-for-mail From: Frank Colcord Newsgroups: gmane.text.pandoc Subject: Re: Markdown, tables and CSV Date: Wed, 25 May 2016 07:18:09 -0700 (PDT) Message-ID: <471daa3c-e2ec-4445-b4fd-44e5c8a3fd6b@googlegroups.com> References: <047d7b86ebe83c062b05332eab9b@google.com> <20BF19CB-A2B0-4B19-A749-D750CDD89736@martinfenner.org> <1463766905.1918988.613990665.6CD67781@webmail.messagingengine.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_235_1928253325.1464185890076" X-Trace: ger.gmane.org 1464185909 29141 80.91.229.3 (25 May 2016 14:18:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 May 2016 14:18:29 +0000 (UTC) To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCC2DANPWIHBBIXIS25AKGQE3K2NPOA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed May 25 16:18:17 2016 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-io0-f187.google.com ([209.85.223.187]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b5ZdZ-0002tj-ET for gtp-pandoc-discuss@m.gmane.org; Wed, 25 May 2016 16:18:17 +0200 Original-Received: by mail-io0-f187.google.com with SMTP id f8sf10378975ioe.1 for ; Wed, 25 May 2016 07:18:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=J+G7rINsA7Vv5W5+O8A90SrlVnrbifIJBeNACstY9eE=; b=aXBCRUnuCKDg4yAgfhxNNjh5vmZujHvMHf8RkOyYCRxZs05T5qsb8DvM2LTb1OEY2Q RBdIK51LalKOuDLwMdHdxq/0tQE0LrDZGOyAiwP+EubyRsjSYYJqJFdRJR/38p3TgfiS gIRkGoQxWdpH2Z43swvqKG7or0zaTjW/MtWPMr0nPPJFfFwSvn+q0lsMdxIHTMIZhTed RiiQUnlmM6dVk66MGMc4FZ6ABoHBMJczpvGs0j51FYvnNonc9GIrgIurzV5OIaLgqjRN 9+T/SxyDrL/vUP4sqPVXubL8raEZU7hVVnnlXfC57vewWUUhMRRXkeaq3jLpMScKRNFN 0pnw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=J+G7rINsA7Vv5W5+O8A90SrlVnrbifIJBeNACstY9eE=; b=vcuTrW5INDjwrzrYB9QuDn8kaLIoW9KmFb+/58o6JxXSWR7BapbfkRlOv3CIOc6gXr qLL2VABI4yFnTeGBTa9UCmhHOh0lzW+Y3UMLNhczra+D2gibcFWGvXmpmpYq/MGf8vii f+nnjxkRgrGbzULGCb09dKCfB6N7oEvYcxlr7LaTMsJTDRT4FSE8E7bNkOBFxKrhdVYZ 2CIEf8on0aKcf0GjbS+Hp8JzH/5/V8dLpYIR3acz3wq5FVIAGKjntQOb5yD5nYNIS9rv AzFXqWQeN/wFENbKc65fltiIAi5kAbDVVqywlpWD6MN0c4NdXx+8Pyxi5Tuz3KSogucm nE0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=J+G7rINsA7Vv5W5+O8A90SrlVnrbifIJBeNACstY9eE=; b=FYCiDsbsfpY1FMylaBSgxrW3XTGKB8XHbrlyfz8ovipyQnaPMSDHVcM4Ghq4hLqVRG bPIGVL+qXYM1uUhB5kGES7rDKe8C9YNcLq7modx8b1ev0XJgfProSUZod6fzYeJyw+s5 WKJ82lKmOn9SO1/+ju6RRry+QygTlgM5sfzzu4hq+V+alikndeVzXX0xpqvXfRzqY2aT 2cak7u20UvFLS8QqNKUDigbEdzy/64jSfPuDhZpVYx0lS1AaB7ppqh7BxZlaN+3FjptF mwwj2ocqKOhPLJTVkw0tlYr3iCf2QBsadzBlqIxczKD7W9tWWU9NdJnDhNEUXJekIsFn EmKQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ALyK8tIP9HZkBVua6BnauQEHhfzRrjlku51qBT42SxfEoVwwiQI1Oy911LgXsD9TPHJT1w== X-Received: by 10.157.32.49 with SMTP id n46mr57045ota.11.1464185891444; Wed, 25 May 2016 07:18:11 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.157.41.105 with SMTP id d96ls434483otb.12.gmail; Wed, 25 May 2016 07:18:10 -0700 (PDT) X-Received: by 10.157.24.88 with SMTP id t24mr58157ott.18.1464185890636; Wed, 25 May 2016 07:18:10 -0700 (PDT) In-Reply-To: <1463766905.1918988.613990665.6CD67781-2RFepEojUI2N1INw9kWLP6GC3tUn3ZHUQQ4Iyu8u01E@public.gmane.org> X-Original-Sender: fcolcord-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Spam-Checked-In-Group: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:15000 Archived-At: ------=_Part_235_1928253325.1464185890076 Content-Type: multipart/alternative; boundary="----=_Part_236_1824862318.1464185890076" ------=_Part_236_1824862318.1464185890076 Content-Type: text/plain; charset=UTF-8 I'd like to second this proposal. As a simple Pandoc user, these would be very helpful: ![an image](foo.jpg) ![an include](foo.txt) ![a csv to be rendered as a table](foo.csv) thanks for all the development. Frank On Friday, May 20, 2016 at 6:55:10 PM UTC+1, jgabriele wrote: > > Hi Martin, > > There's also [issue 553](https://github.com/jgm/pandoc/issues/553 > > ). > > Personally, I think I like (from that issue thread) anton-k's original > idea: > > ![an image](foo.jpg) > > ![an include](foo.txt) > > ![a csv to be rendered as a table](foo.csv) > > (that is, based on filename extension) > > Those seem sensible, symmetrical, easy to remember, and I think fit well > with what pandoc already does (`![]()` is already like an include). > > As for a syntax to allow writing your csv data right into your md file, > ... Pandoc already supports a generous number of table formats that are > pretty easy to type. And for larger tables that you might be tempted to > copy/paste in, might be better easier to bang-include them (as in, > `![]()`), rather than muck up your pretty markdown file with a giant bunch > of csv data. :) > > -- John > > > > > On Fri, May 20, 2016, at 05:38 AM, Martin Fenner wrote: > > Dear group, > > The topic of CSV support in Pandoc has come up several times on this list, > includes this thread from 2014: > https://groups.google.com/forum/#!topic/pandoc-discuss/kBdJU_JktzI > > Since last year I work for an organisation that frequently deals with > tabular data (and helped organize CSVconf earlier this month), and I have > done some thinking on how CSV could fit into Pandoc. I see two important > use cases: > > * CSV reader that converts to tables in HTML, docx, latex, etc. > * CSV has a format to describe tables in markdown > > For the first use case I wrote a hack for the Jekyll blogging platform > this week that turns CSV files into markdown grid tables format that is > then processed by Pandoc (https://github.com/datacite/jekyll-csvy). I > would rather use Pandoc with a CSV reader, but my Haskell isn't good enough > to write one. But for now I can generate blog posts directly from CSV > files. Other people have done similar things with Pandoc and CSV. > > For the second use case I see a clear advantage of CSV over the various > attempts to format tables in markdown (simple_tables, multiline_tables, > grid_tables, pipe_tables). Everyone (and many tools) understands the CSV > format, and you can do most of the things with CSV that the other table > formats allow (multi-column formats and column alignment are a bit > trickier). This has been done before using Pandoc filters, but I think a > Pandoc "csv_tables" Pandoc extension would make this easier for the casual > user. Using the grid_tables example from the Pandoc documentation, this > could look like this: > > : Sample csv table. > > ,,, > Fruit,Price,Advantages > Bananas,$1.34,- built-in wrapper\n- bright color > Oranges,$2.10, - cures scurvy\n- tasty > ,,, > > I like three commas on a new line to indicate the start and end of a > table, but that is of course open for discussion. The format is much easier > to read and edit for humans compared to grid tables, the only tricky bit is > maybe the \n for multiline columns. I would think we could add metadata to > the fenced table blog similar to code blocks, e.g. > > ,,,{ #mytable .numberRows } > > One challenge with CSV is that it is an ill-defined format somewhat > similar to markdown before CommonMark. It may make things easier to only > support a specific CSV variant (e.g. comma as separator, header required, > comment lines not allowed). > > Thoughts? > > Best, > > Martin > > > > > > -- > You received this message because you are subscribed to the Google Groups > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org . > To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > . > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/20BF19CB-A2B0-4B19-A749-D750CDD89736%40martinfenner.org > > . > For more options, visit https://groups.google.com/d/optout. > > > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/471daa3c-e2ec-4445-b4fd-44e5c8a3fd6b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_236_1824862318.1464185890076 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I'd like to second this proposal. As a simple Pandoc u= ser, these would be very helpful:

=C2=A0
=C2=A0=C2=A0=C2= =A0 ![an image](foo.jpg)
=C2=A0=
=C2=A0=C2=A0=C2=A0 ![an include](f= oo.txt)
=C2=A0
=C2=A0=C2=A0=C2=A0 ![a csv to be rendered as a tab= le](foo.csv)
=C2=A0
thanks for all the development.

= Frank

On Friday, May 20, 2016 at 6:55:10 PM UTC+1, jgabriele wrote= :
Hi Martin,
=C2=A0
=C2=A0
Personally, I think I like (from that issu= e thread) anton-k's original idea:
=C2=A0
=C2=A0=C2=A0=C2=A0 ![an image](foo.jpg)
=C2=A0
=C2=A0=C2=A0=C2=A0 ![an include](foo.txt)<= br>
=C2=A0
=C2=A0=C2=A0=C2=A0 ![a csv to be rendered = as a table](foo.csv)
=C2=A0
(that is, based on filename extension)
=
=C2=A0
Those seem sensible, symmetrical, easy to = remember, and I think fit well with what pandoc already does (`![]()` is al= ready like an include).
=C2=A0
As for a syntax to allow writing your csv = data right into your md file, ... Pandoc already supports a generous number= of table formats that are pretty easy to type. And for larger tables that = you might be tempted to copy/paste in, might be better easier to bang-inclu= de them (as in, `![]()`), rather than muck up your pretty markdown file wit= h a giant bunch of csv data. :)
=C2=A0
-- John
=C2=A0
=C2=A0
=C2=A0
=C2=A0
On Fri, May 20, 2016, at 05:38 AM, Martin Fenner wrote:
Dear group,
<= /div>
=C2=A0
The topic of CSV support in Pandoc has come up several times on this l= ist, includes this thread from 2014:
=C2=A0
Since last year I work for an organisation that frequently deals with = tabular data (and helped organize CSVconf earlier this month), and I have d= one some thinking on how CSV could fit into Pandoc. I see two important use= cases:
=C2=A0
* CSV reader that converts to tables in HTML, docx, latex, etc.
* CSV has a format to describe tables in markdown
=C2=A0
For the first use case I wrote a hack for the Jekyll blogging platform= this week that turns CSV files into markdown grid tables format that is th= en processed by Pandoc (https://github= .com/datacite/jekyll-csvy). I would rather use Pandoc with a CSV r= eader, but my Haskell isn't good enough to write one. But for now I can= generate blog posts directly from CSV files. Other people have done simila= r things with Pandoc and CSV.
=C2=A0
For the second use case I see a clear advantage of CSV over the variou= s attempts to format tables in markdown (simple_tables, multiline_tables, g= rid_tables, pipe_tables). Everyone (and many tools) understands the CSV for= mat, and you can do most of the things with CSV that the other table format= s allow (multi-column formats and column alignment are a bit trickier). Thi= s has been done before using Pandoc filters, but I think a Pandoc "csv= _tables" Pandoc extension would make this easier for the casual user. = Using the grid_tables example from the Pandoc documentation, this could loo= k like this:
=C2=A0
: Sample csv table.
=C2=A0
,,,
Fruit,Price,Advantages
Bananas,$1.34,- built-in wrapper\n- bright color
Oranges,$2.10, - cures scurvy\n- tasty
,,,
=C2=A0
I like three commas on a new line to indicate the start and end of a t= able, but that is of course open for discussion. The format is much easier = to read and edit for humans compared to grid tables, the only tricky bit is= maybe the \n for multiline columns. I would think we could add metadata to= the fenced table blog similar to code blocks, e.g.
=C2=A0
,,,{ #mytable .numberRows }
=C2=A0
One challenge with CSV is that it is an ill-defined format somewhat si= milar to markdown before CommonMark. It may make things easier to only supp= ort a specific CSV variant (e.g. comma as separator, header required, comme= nt lines not allowed).
=C2=A0
Thoughts?
=C2=A0
Best,
=C2=A0
Martin
=C2=A0
=C2=A0
=C2=A0


--
You received this message because you are= subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop r= eceiving emails from it, send an email to pandoc-discus...@googlegroups.c= om.
To post to this group, send email to pandoc-..= .@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
=C2=A0

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/471daa3c-e2ec-4445-b4fd-44e5c8a3fd6b%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_236_1824862318.1464185890076-- ------=_Part_235_1928253325.1464185890076--