I agree that inline CSV probably better be done by overloading code blocks. Another reason for that is that CSV doesn't look like a table at all, and thus is a very un-markdownish syntax. this is a purely aesthetic concern though.

If someone would write the code to implement this it would be good if one could customize the delimiter, quote and escape characters through attributes. I wrote a simple filter once which simply passed such options on to the Text::CSV Perl module. It so happens that I deal with tab separated values more often than actual CSV. While TSV is much easier to convert into a pandoc table it would be good if a CSV reader could handle it.

/bpj

fredag 20 maj 2016 skrev John MACFARLANE <jgm@berkeley.edu>:
+++ Martin Fenner [May 20 16 12:38 ]:
  I would rather use Pandoc with a CSV reader, but my Haskell isn't good
  enough to write one.

This would be a pretty easy project for someone trying to
learn Haskell; maybe someone on the list wants to try it?
The cassava library works well for csv parsing.

  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 think that using a filter that processes specially marked
code blocks is a better way to go than introducing yet
another delimited block type.

For one thing, this will degrade much more gracefully when
you render it with a standard markdown renderer.
(The CSV will show up as code rather than garbage.)

One could think about integrating the filter into pandoc
itself, as an option, but the code and syntax would not
have to be different, I think.


--
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-/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/20160520183616.GB95956%40protagoras.berkeley.edu.
For more options, visit https://groups.google.com/d/optout.


--


SavedURI :Show URLShow URLSavedURI :
SavedURI :Hide URLHide URLSavedURI :
https://mail.google.com/_/scs/mail-static/_/js/k=gmail.main.sv.G3GZFwvcniQ.O/m=m_i,t,it/am=fUAcTAoZawdGHAZ2YD-g9N_f7LL4CX7WlSgHQKgABHaCv9kToPiBD8qOMw/rt=h/d=1/rs=AItRSTO5CF1YB_frDRXLXTeUsQ1zItcBvwhttps://mail.google.com/_/scs/mail-static/_/js/k=gmail.main.sv.G3GZFwvcniQ.O/m=m_i,t,it/am=fUAcTAoZawdGHAZ2YD-g9N_f7LL4CX7WlSgHQKgABHaCv9kToPiBD8qOMw/rt=h/d=1/rs=AItRSTO5CF1YB_frDRXLXTeUsQ1zItcBvw


--
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-/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/CAFC_yuTbCcn8rWR%2Byug%2B2CYzyFi3k%3DK1q3%2B1-VJnx7ZrKTBxcw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.