From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/15005 Path: news.gmane.org!not-for-mail From: Martin Fenner Newsgroups: gmane.text.pandoc Subject: Re: Markdown, tables and CSV Date: Thu, 26 May 2016 11:04:54 +0300 Message-ID: References: <047d7b86ebe83c062b05332eab9b@google.com> <20BF19CB-A2B0-4B19-A749-D750CDD89736@martinfenner.org> <1463766905.1918988.613990665.6CD67781@webmail.messagingengine.com> <471daa3c-e2ec-4445-b4fd-44e5c8a3fd6b@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_033D8867-BB48-4307-A4E0-F353716B68EA" X-Trace: ger.gmane.org 1464249908 7341 80.91.229.3 (26 May 2016 08:05:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 May 2016 08:05:08 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCF6L25S3IKBBKW4TK5AKGQEPMLZLIY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu May 26 10:05:00 2016 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-wm0-f56.google.com ([74.125.82.56]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b5qHr-00078b-QJ for gtp-pandoc-discuss@m.gmane.org; Thu, 26 May 2016 10:05:00 +0200 Original-Received: by mail-wm0-f56.google.com with SMTP id n129sf16512469wmn.0 for ; Thu, 26 May 2016 01:04:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=sender:from:message-id:mime-version:subject:date:references:to :in-reply-to:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=HhhNBtf41McW5ve0iooFqzwDE/2Na5IqmobmeHYgGFw=; b=A/40bNUL2KtNauafH/KhcrZjeu5harmRjOpMeSyDj0/bIHI/qyzD7wLuJ4gOhqFF7v bLydxpw2Iftcz+hZSyvQh2g5QklbNMUKzDFNDaO7TlLgKyAoJRNEVJllUKDYfshjfIWT /oeCt06e2/0BOjIZ9SHvxHEQg+MWd6HddiXGzhJYFiMF0+CYLyEEktYB3ybZx/kyUT4C QI1JkxhKsXoyGAz/OPiQ7brhLV2pu4ZbxPqrMSyh1s/7HKWeHxCLWbzvx6ya3ehHWWMs lSLtkMKkEKTyUN0Dcm0PFMiR1N8G4Aaro/4OijI/AjslpbechyB4h9rQDOp6HXerw9rN CoRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=sender:x-gm-message-state:from:message-id:mime-version:subject:date :references:to:in-reply-to:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=HhhNBtf41McW5ve0iooFqzwDE/2Na5IqmobmeHYgGFw=; b=F7iHdB0etmsZ6WMUnMmTCuGD13ZbcpoAIgRIgJW51LU8TaWIrSN048MIi8zM3iK4Mg z7DeYqR4QCExF8RXxvUGBPTDNXEbfe9HqN5YAScNJhv1q+6U0q5SVGkxtIIHMbQKmiRJ AywOZf1zzzXyoqERSZZeQU9+2J3vBJCG9OcVpO3xGI9I4DWzfpyArxaNSaT+R/tciPDK IHTLsFmLVj89DWHmfD8XnjWi1ouB7IE+dv1EdqtfCK+VdPqYwlBZeHUX8+yHsinnK6kp +p13mzlucUWyH4SjVHWpPJQXpVH1C3W3/mqpbGYnVCb+k6s4ZsF4Jjf9ftRTEBa/p1Lo kn/g== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ALyK8tIgbxJHVX1rmEKT+fqBAuulwab92fudxV35LzrTJPsQv2vY4wOvpQHLQjKyNgaZ2g== X-Received: by 10.25.83.138 with SMTP id h132mr111233lfb.4.1464249899331; Thu, 26 May 2016 01:04:59 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.25.142.210 with SMTP id q201ls349962lfd.49.gmail; Thu, 26 May 2016 01:04:57 -0700 (PDT) X-Received: by 10.112.219.194 with SMTP id pq2mr901161lbc.5.1464249897871; Thu, 26 May 2016 01:04:57 -0700 (PDT) Original-Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com. [2a00:1450:400c:c09::22a]) by gmr-mx.google.com with ESMTPS id x203si73287wme.0.2016.05.26.01.04.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 May 2016 01:04:57 -0700 (PDT) Received-SPF: pass (google.com: domain of martin.fenner-i39mICoz+qVg9hUCZPvPmw@public.gmane.org designates 2a00:1450:400c:c09::22a as permitted sender) client-ip=2a00:1450:400c:c09::22a; Original-Received: by mail-wm0-x22a.google.com with SMTP id a136so12070801wme.0 for ; Thu, 26 May 2016 01:04:57 -0700 (PDT) X-Received: by 10.195.17.166 with SMTP id gf6mr7941823wjd.124.1464249897482; Thu, 26 May 2016 01:04:57 -0700 (PDT) Original-Received: from [192.168.1.4] ([80.106.206.97]) by smtp.gmail.com with ESMTPSA id e1sm12981431wjv.9.2016.05.26.01.04.55 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 May 2016 01:04:56 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3112) X-Original-Sender: martin.fenner-i39mICoz+qVg9hUCZPvPmw@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@datacite-org.20150623.gappssmtp.com; spf=pass (google.com: domain of martin.fenner-i39mICoz+qVg9hUCZPvPmw@public.gmane.org designates 2a00:1450:400c:c09::22a as permitted sender) smtp.mailfrom=martin.fenner-i39mICoz+qVg9hUCZPvPmw@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:15005 Archived-At: --Apple-Mail=_033D8867-BB48-4307-A4E0-F353716B68EA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 > Am 23.05.2016 um 23:22 schrieb John MACFARLANE : >=20 > But the Markdown philosophy is not about being "simple but > powerful." It's about having source files that are > human-readable text files. >=20 > Quoting from John Gruber's original Markdown syntax page: >=20 >> The overriding design goal for Markdown=E2=80=99s formatting syntax >> is to make it as readable as possible. The idea is that a >> Markdown-formatted document should be publishable as-is, as >> plain text, without looking like it=E2=80=99s been marked up with >> tags or formatting instructions. >=20 > CSV is simple (though not as flexible as HTML formatting). > But it doesn't pass this test. >=20 > This design goal is really important to keep in mind when > comparing Markdown to alternatives, which are often easier > to write (because, for example, sublists are indicated by > `**` instead of indentation), but don't look as natural > to read. John, you are right, and I will rephrase. I think that seemless integration= of markdown and CSV would make a lot of sense for many use cases. A Pandoc= CSV reader is a good first step. The second step is then combining multipl= e Pandoc documents into one. This can of course be done already, but maybe = extending the ![]() syntax would make it easier to import other documents (= e.g. a number of tables in CSV format) into markdown documents instead of a= ppending multiple documents into one. The only requirement would be that th= e external file referenced in ![]() would be in a format that Pandoc unders= tands, otherwise it is loaded as binary blob, as for images. > Am 26.05.2016 um 08:42 schrieb Sergio Correia : >=20 > 2) For tables, I would also suggest to take a look at this filter: >=20 > http://scorreia.com/software/panflute/guide.html#yaml-code-blocks >=20 > It allows markdown like this: > Some text >=20 > ~~~ csv > title: Some Title > has-header: True > --- > Col1, Col2, Col3 > 1, 2, 3 > 10, 20, 30 > ~~~ >=20 > More text >=20 > This combines pure CSV with options set up in YAML, so you can add captio= ns and customize the table. I like the use of YAML in code blocks, as you frequently need additional me= tadata to properly understand tabular data (see for example http://data.okf= n.org/doc/tabular-data-package ). Very cool. Best, Martin --=20 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 e= mail 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/B4779237-F368-454A-8E43-93EBCDFDF8AB%40datacite.org. For more options, visit https://groups.google.com/d/optout. --Apple-Mail=_033D8867-BB48-4307-A4E0-F353716B68EA Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8
Am 23.05.2016 um 23= :22 schrieb John MACFARLANE <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>:

But the Markdo= wn philosophy is not about being "simple but
powerful."  = ;It's about having source files that are
human-readable text = files.

Quoting from John Gruber's original Mar= kdown syntax page:

The overriding design goal f= or Markdown=E2=80=99s formatting syntax
is to make it as read= able as possible. The idea is that a
Markdown-formatted docum= ent should be publishable as-is, as
plain text, without looki= ng like it=E2=80=99s been marked up with
tags or formatting i= nstructions.

CSV is simple (thoug= h not as flexible as HTML formatting).
But it doesn't pass th= is test.

This design goal is really important = to keep in mind when
comparing Markdown to alternatives, whic= h are often easier
to write (because, for example, sublists a= re indicated by
`**` instead of indentation), but don't look = as natural
to read.

John, you are right, and I will rephrase. I think t= hat seemless integration of markdown and CSV would make a lot of sense for = many use cases. A Pandoc CSV reader is a good first step. The second step i= s then combining multiple Pandoc documents into one. This can of course be = done already, but maybe extending the ![]() syntax would make it easier to = import other documents (e.g. a number of tables in CSV format) into markdow= n documents instead of appending multiple documents into one. The only requ= irement would be that the external file referenced in ![]() would be in a f= ormat that Pandoc understands, otherwise it is loaded as binary blob, as fo= r images.


Am 26.05.2016 um 08:42 sc= hrieb Sergio Correia <sergio.correia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:

2) For tables, I would also suggest to take a look at this filter:=


It allows= markdown like this:
Some text

~~~ csv
title: Some Title
has-header: True
---
Col1, Col2, Col3
1, 2, 3
10, 20, 30
~~~

More text

T= his combines pure CSV with options set up in YAML, so you can add captions = and customize the table.

I like the use of YAML in code blocks, as you frequently need a= dditional metadata to properly understand tabular data (see for example&nbs= p;http= ://data.okfn.org/doc/tabular-data-package). Very cool.

Best,

Martin
<= /body>

--
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/msgi= d/pandoc-discuss/B4779237-F368-454A-8E43-93EBCDFDF8AB%40datacite.org. For more options, visit http= s://groups.google.com/d/optout.
--Apple-Mail=_033D8867-BB48-4307-A4E0-F353716B68EA--