From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/15007 Path: news.gmane.org!not-for-mail From: Frank Colcord Newsgroups: gmane.text.pandoc Subject: Re: Markdown, tables and CSV Date: Thu, 26 May 2016 12:48:43 +0100 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 Content-Type: multipart/alternative; boundary=047d7b3a81fc0700360533bd61d0 X-Trace: ger.gmane.org 1464263363 26874 80.91.229.3 (26 May 2016 11:49:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 May 2016 11:49:23 +0000 (UTC) To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCC2DANPWIHBBOWFTO5AKGQE25HGVAA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu May 26 13:49:19 2016 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-lb0-f190.google.com ([209.85.217.190]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b5tmt-0007O0-99 for gtp-pandoc-discuss@m.gmane.org; Thu, 26 May 2016 13:49:15 +0200 Original-Received: by mail-lb0-f190.google.com with SMTP id rs7sf2285795lbb.1 for ; Thu, 26 May 2016 04:49:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject: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=q+Hh3O64b31BE07UocB4hv0WPttaStw0c/ARxssXaAs=; b=J+06Q0rFajDpdAN8ZPNZHMgLCyy9cgSjIVlQeESm/4a6JLOwILzF7AP22crHGqDE4O X4yl611LBnAFfCAJbAbEGssl+SpI2D0RjGHRGe+gJyXnqW1a3m5VfjUgjm3WFvjDoKq4 lKjpwf53Csh/YcD7y1ovjgjcFgmywUOKU0tTVerDpeFXQrWeGQOUfW5qXnET2iXdC91n L+qd/f6w9DIOvUZF5R4Rq7B2Bx1DEizYkfD5oXBsXYOXUgad/hcsbC+QoDwLAwr/jy8A RdgjsdBVYiKaqRwi2w2nxqKZz9s9NT+qEaI8IQfNqBhFe7cLJzhozDO80Kwd/bjOWOYX cQVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject: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=q+Hh3O64b31BE07UocB4hv0WPttaStw0c/ARxssXaAs=; b=AmA1o7g8d8+jZQ0jF0Aq+MpY8uyb19w1yak3FJ7eY0G1DMwPROIDPAxD2Kx3GBz8Xf HRTiCMNH+M6IjRpfGzutWJ/PH4P2OhcaSQ69abELHDNgKKaPTEwS8/wCns+sUwGv6njV oZsRAjRAqPb5jMIaCqOiJ8XWyk+R2aRVMpNNEV85eWAALGUN2Y72YN/Up1XajevzLQ15 MbFfk61bKWWkcy/HEa4gpAUxhKRJONBrKH/AKGg3YL7W4CITWJIjnfiD8eV7JmmwsDFh xSEoAb5Qloq5IsVGcLPIpz2qlW0Ogk8rZY1hfYjlX3b+p+F7x/blsGVIHWjUo3vKnjSk ltMg== X-Gm-Message-State: ALyK8tJ1QkdUrZYIzWs5RPj0c4ESBNJP1RVPKCdB48UO5U4rU94PoNKkWs/8m9WKCVy0ow== X-Received: by 10.25.38.11 with SMTP id m11mr11126lfm.2.1464263354894; Thu, 26 May 2016 04:49:14 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.25.15.196 with SMTP id 65ls349403lfp.109.gmail; Thu, 26 May 2016 04:49:13 -0700 (PDT) X-Received: by 10.112.219.194 with SMTP id pq2mr1031296lbc.5.1464263353703; Thu, 26 May 2016 04:49:13 -0700 (PDT) Original-Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com. [2a00:1450:400c:c09::234]) by gmr-mx.google.com with ESMTPS id l184si136335wmg.2.2016.05.26.04.49.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 May 2016 04:49:13 -0700 (PDT) Received-SPF: pass (google.com: domain of fcolcord-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:400c:c09::234 as permitted sender) client-ip=2a00:1450:400c:c09::234; Original-Received: by mail-wm0-x234.google.com with SMTP id n129so95814366wmn.1 for ; Thu, 26 May 2016 04:49:13 -0700 (PDT) X-Received: by 10.194.3.51 with SMTP id 19mr9096292wjz.57.1464263353234; Thu, 26 May 2016 04:49:13 -0700 (PDT) Original-Sender: fcolcord-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Original-Received: by 10.28.142.78 with HTTP; Thu, 26 May 2016 04:48:43 -0700 (PDT) In-Reply-To: X-Original-Sender: fcolcord-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com; dkim=pass header.i=@colcord-net.20150623.gappssmtp.com; spf=pass (google.com: domain of fcolcord-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:400c:c09::234 as permitted sender) smtp.mailfrom=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:15007 Archived-At: --047d7b3a81fc0700360533bd61d0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable @sergio thanks for the pandoc filter. It looks very helpful. I don't know python, but I can see how helpful that would be. I've handled the csv in previous projects by changing the delimiters when saving a spreadsheet so the delimiters are pandoc friendly. @martin you say "The second step is then combining multiple Pandoc documents into one. This can of course be done already". I've done this by constructing long command line strings. I've also seen the preprocessors. Is there another way to include multiple markdown files? I've been writing in a wiki format where one txt file has links to others. I'd love to have an automatic recursive way to include all the links as separate chapters. If I have to, I don't mind setting up the includes manually. Please let me know if you have seen documentation how to do that. I've seen some documentation of recent pandoc versions which make it seem as if there are some ways to do this. I've seen this discussion: https://groups.google.com/forum/#!searchin/pandoc-discuss/include/pandoc-di= scuss/eRuhx2Md0BI/mfzp_ZhuDAAJ This discussion mentions preprocessors : FilePP and gpp. have I missed some easier way to include files? thanks, Frank On 26 May 2016 at 09:04, Martin Fenner wrote: > > Am 23.05.2016 um 23:22 schrieb John MACFARLANE : > > But the Markdown 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 Markdown syntax page: > > 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. > > > CSV is simple (though not as flexible as HTML formatting). > But it doesn't pass this test. > > 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 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 > markdown documents instead of appending multiple documents into one. The > only requirement would be that the external file referenced in ![]() woul= d > be in a format that Pandoc understands, otherwise it is loaded as binary > blob, as for images. > > > Am 26.05.2016 um 08:42 schrieb Sergio Correia : > > 2) For tables, I would also suggest to take a look at this filter: > > http://scorreia.com/software/panflute/guide.html#yaml-code-blocks > > 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 > > > This 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 additional > metadata to properly understand tabular data (see for example > http://data.okfn.org/doc/tabular-data-package). Very cool. > > Best, > > Martin > > -- > You received this message because you are subscribed to a topic in the > Google Groups "pandoc-discuss" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/pandoc-discuss/znGQ62WpWrg/unsubscribe. > To unsubscribe from this group and all its topics, 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/B4779237-F368-454A-8E43-= 93EBCDFDF8AB%40datacite.org > > . > > For more options, visit https://groups.google.com/d/optout. > --=20 frank-XCqNk0BTMejR7s880joybQ@public.gmane.org, cell: +447763116793, skype: colcord, if you ever get no response, please send to: fcolcord-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --=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/CADZiF%2BX6AuYJEnnNCs1M%3Dspfbp9Fn4X2GBVkxXKp9g9SSNH16A%40ma= il.gmail.com. For more options, visit https://groups.google.com/d/optout. --047d7b3a81fc0700360533bd61d0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
@sergio thanks for the pandoc filter. It looks very helpfu= l. I don't know python, but I can see how helpful that would be.
I&= #39;ve handled the csv in previous projects by changing the delimiters when= saving a spreadsheet so the delimiters are pandoc friendly.

=
@martin you say "The second step= is then combining multiple Pandoc documents into one. This can of course b= e done already". I've done this by constructing long command line = strings. I've also seen the preprocessors. Is there another way to incl= ude multiple markdown files? I've been writing in a wiki format where o= ne txt file has links to others. I'd love to have an automatic recursiv= e way to include all the links as separate chapters. If I have to, I don= 9;t mind setting up the includes manually. Please let me know if you have s= een documentation how to do that. I've seen some documentation of recen= t pandoc versions which make it seem as if there are some ways to do this.<= /span>

I've seen this discussion:=C2=A0https://groups.google.com/forum/#!s= earchin/pandoc-discuss/include/pandoc-discuss/eRuhx2Md0BI/mfzp_ZhuDAAJ<= /span>

This discussion mentions preprocessors : File= PP and gpp.

have I missed some easier way to = include files?

thanks, Frank



On 26 May 2016 at 09:04, Martin Fenner <marti= n.fenner-i39mICoz+qVg9hUCZPvPmw@public.gmane.org> wrote:

Am 23.05.2016 um 23:22 schrieb John MACFARLANE <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>:

But the= Markdown philosophy is not about being "simple but
powerful."= =C2=A0It's about having source files that are
human-readable text f= iles.

Quoting from John Gruber's original Markdown syntax page:<= br>
The ove= rriding design goal for Markdown=E2=80=99s formatting syntax
is to make = it as readable as possible. The idea is that a
Markdown-formatted docume= nt should be publishable as-is, as
plain text, without looking like it= =E2=80=99s been marked up with
tags or formatting instructions.

CSV is simple (though not as flexible as HTML formatting).
B= ut it doesn't pass this test.

This design goal is really importa= nt to keep in mind when
comparing Markdown to alternatives, which are of= ten 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 th= ink 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 s= tep is then combining multiple Pandoc documents into one. This can of cours= e be done already, but maybe extending the ![]() syntax would make it easie= r to import other documents (e.g. a number of tables in CSV format) into ma= rkdown documents instead of appending multiple documents into one. The only= requirement would be that the external file referenced in ![]() would be i= n a format that Pandoc understands, otherwise it is loaded as binary blob, = as for images.


Am 26.05.2016 um 08:42 schrieb Sergio Correia <sergio.correia@gmail= .com>:

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

http://scorreia.com/software/panflute/guide.html#yaml= -code-blocks

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

This combines pure CSV with option= s 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 additional metadata to properly unders= tand tabular data (see for example=C2=A0http://data.okfn.org/doc/tabular-d= ata-package). Very cool.

Best,

<= /div>
Martin

--
You received this message because you are subscribed to a topic in the Goog= le Groups "pandoc-discuss" group.
To unsubscribe from this topic, visit https://g= roups.google.com/d/topic/pandoc-discuss/znGQ62WpWrg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to p= andoc-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://gr= oups.google.com/d/msgid/pandoc-discuss/B4779237-F368-454A-8E43-93EBCDFDF8AB= %40datacite.org.

For more options, visit https://groups.google.com/d/optout.



--
=
frank-XCqNk0BTMejR7s880joybQ@public.gmane.org, cell: +447763116793, sky= pe: colcord,
if you ever get no response, please send to: fcolcord-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

--
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://gro= ups.google.com/d/msgid/pandoc-discuss/CADZiF%2BX6AuYJEnnNCs1M%3Dspfbp9Fn4X2= GBVkxXKp9g9SSNH16A%40mail.gmail.com.
For more options, visit http= s://groups.google.com/d/optout.
--047d7b3a81fc0700360533bd61d0--