GithubHelp home page GithubHelp logo

mb21 / pandoc-placetable Goto Github PK

View Code? Open in Web Editor NEW
38.0 5.0 1.0 41 KB

Pandoc filter to include CSV data (from file or URL)

License: GNU General Public License v2.0

Haskell 100.00%
pandoc-filter csv google-sheets pandoc

pandoc-placetable's Introduction

pandoc-placetable filter

Note: currently only compatible with pandoc < 2.10, since that release changed the way tables are represented in the document AST substantially.

A Pandoc filter that replaces fenced code blocks (that have the class table) with tables generated from CSV. The CSV is read from the code block and from an optional external CSV file (or URL) and concatenated. There's an option to enable parsing of inline markdown.

Some usage examples:

```{.table file="foo.csv"}
```

```{.table}
some,values
even,"with spaces"
```

```{.table file="https://docs.google.com/spreadsheets/my-publish-to-web-sheet-key&output=csv"}
```

```{.table inlinemarkdown=yes}
"when compiled with the inlineMarkdown flag","we _can_ write **Markdown** here"
```

```{.table file="foo.csv" header=yes}
Fruit,Quantity,Price
```

```{.table file="foo.csv" header=yes aligns=LRCRR inlinemarkdown=yes
     caption="my **caption**" delimiter="," quotechar="\"" }
```

Usage

Prepare a markdown file containing a fenced code block like the ones above, then:

pandoc --filter pandoc-placetable input.md

Alternatively, the program can be used as an ad-hoc csv-reader and run without a markdown file. Then the options can be provided as command-line arguments. For example:

$ pandoc-placetable --file=foo.csv --widths="0.2 0.8" | pandoc -f json -o output.html

Or also:

$ cat foo.csv | pandoc-placetable --widths="0.2 0.8" | pandoc -f json -o output.html

(For this use-case, you might not even need pandoc-placetable; pandoc 2.9.2 and later ships with a simple built-in csv-reader: pandoc foo.csv -o output.html)

All options are optional and are specified as follows (cf. pandoc-placetable -h):

  • csv: The path or URL to the CSV file that is appended to the code block's content
  • file: synonym for csv
  • header: If set to yes, then the first row of data is interpreted as the table headers.
  • aligns: For each column, one letter (L, R or C) that specifies the column's alignment.
  • widths: For each column, a number specifying its width as a fraction of the page width, e.g. widths="0.5 0.2 0.3".
  • inlinemarkdown: If set to yes, interprets the caption and CSV fields as markdown. This requires pandoc-placetable to be compiled with the inlineMarkdown flag (see below).
  • caption: The table caption.
  • delimiter: A one-character string used in the CSV to separate fields, defaults to ,. For characters not allowed standing alone in Pandoc markdown attributes, use \t for a tab and \s for a space.
  • quotechar: A one-character string that may be used in the CSV to quote fields containing special characters, defaults to ".

If there is an id set (e.g. {.table #my-id}), the table will be wrapped in a div with that id so it can be referenced.

Installation

Using cabal and Hackage

cabal update
cabal install pandoc-placetable

Using stack

git clone [email protected]:mb21/pandoc-placetable.git
cd pandoc-placetable
stack install pandoc-placetable

The inlineMarkdown flag

When compiled with the inlineMarkdown flag, the inlinemarkdown=yesoption is available to have CSV and the caption be interpreted as markdown. Note that the flag causes Pandoc to be required as a dependency so it will take a while to build.

cabal install -f inlineMarkdown pandoc-placetable

or:

cd pandoc-placetable
stack install --flag pandoc-placetable:inlineMarkdown pandoc-placetable

Acknowledgments

The idea and syntax for this filter was proposed by @jgm on pandoc-discuss and first implemented by @baig's pandoc-csv2table, over which I consider this filter an improvement.

pandoc-placetable's People

Contributors

mb21 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

itmgr

pandoc-placetable's Issues

cabal: Could not resolve dependencies; ExitFailure 1

Hi, I tried installing using cabal install -f inlineMarkdown pandoc-placetable, and the result is:

Resolving dependencies...
cabal: Could not resolve dependencies:
trying: pandoc-types-1.17.0.4/installed-MoT... (dependency of
pandoc-placetable-0.4)
trying: x509-system-1.6.4/installed-LCi... (dependency of
connection-0.2.6/installed-7Jp...)
rejecting: pandoc-placetable-0.4:-inlinemarkdown (constraint from config file,
command line flag, or user target requires opposite flag selection)
trying: pandoc-placetable-0.4:+inlinemarkdown
next goal: pandoc (dependency of pandoc-placetable-0.4:+inlinemarkdown)
rejecting: pandoc-1.17.2/installed-95F... (conflict: pandoc-types =>
aeson==1.0.2.0/installed-Iub..., pandoc => aeson==0.11.2.1/installed-B4z...)
rejecting: pandoc-1.17.2, pandoc-1.17.1, pandoc-1.17.0.3, pandoc-1.17.0.2,
pandoc-1.17.0.1, pandoc-1.17, pandoc-1.16.0.2, pandoc-1.16.0.1, pandoc-1.16
(conflict: pandoc-types==1.17.0.4/installed-MoT..., pandoc =>
pandoc-types>=1.16 && <1.17)
rejecting: pandoc-1.15.2.1, pandoc-1.15.2 (conflict: x509-system =>
process==1.4.2.0/installed-1.4..., pandoc => process>=1 && <1.4)
rejecting: pandoc-1.15.1.1, pandoc-1.15.1 (conflict: x509-system =>
process==1.4.2.0/installed-1.4..., pandoc => process>=1 && <1.3)
rejecting: pandoc-1.15.0.6, pandoc-1.15.0.5, pandoc-1.15.0.4, pandoc-1.15.0.3,
pandoc-1.15.0.2, pandoc-1.14.1 (conflict: pandoc-types =>
syb==0.6/installed-C65..., pandoc => syb>=0.1 && <0.6)
rejecting: pandoc-1.13.2.1, pandoc-1.13.2, pandoc-1.13.1, pandoc-1.13.0.1,
pandoc-1.13, pandoc-1.12.4.2, pandoc-1.12.4, pandoc-1.12.3.3, pandoc-1.12.3.2,
pandoc-1.12.3.1, pandoc-1.12.3, pandoc-1.12.2.1, pandoc-1.12.2, pandoc-1.12.1,
pandoc-1.12.0.2, pandoc-1.12.0.1, pandoc-1.12, pandoc-1.11.1, pandoc-1.11,
pandoc-1.10.1, pandoc-1.10.0.5, pandoc-1.10.0.4, pandoc-1.10.0.3,
pandoc-1.10.0.2, pandoc-1.10.0.1, pandoc-1.10, pandoc-1.9.4.5, pandoc-1.9.4.4,
pandoc-1.9.4.3, pandoc-1.9.4.2, pandoc-1.9.4.1, pandoc-1.9.4, pandoc-1.9.3,
pandoc-1.9.2, pandoc-1.9.1.2, pandoc-1.9.1.1, pandoc-1.9.1, pandoc-1.9.0.5,
pandoc-1.9.0.4, pandoc-1.9.0.3, pandoc-1.9.0.2, pandoc-1.9, pandoc-1.8.2.1,
pandoc-1.8.2, pandoc-1.8.1.2, pandoc-1.8.1.1, pandoc-1.8.1, pandoc-1.8.0.3,
pandoc-1.8.0.2, pandoc-1.8.0.1, pandoc-1.8, pandoc-1.6.0.1, pandoc-1.6,
pandoc-1.5.1.1, pandoc-1.5.1, pandoc-1.5.0.1, pandoc-1.5, pandoc-1.4,
pandoc-1.3, pandoc-1.2.1, pandoc-1.2, pandoc-1.1, pandoc-1.0.0.1, pandoc-1.0,
pandoc-0.46, pandoc-0.45, pandoc-0.44, pandoc-0.43, pandoc-0.42, pandoc-0.41,
pandoc-0.4 (conflict: pandoc-placetable-0.4:inlinemarkdown =>
pandoc>=1.14.0.0)
rejecting: pandoc-1.15.0.1, pandoc-1.15, pandoc-1.14.0.4, pandoc-1.14.0.3
(conflict: pandoc-types => syb==0.6/installed-C65..., pandoc => syb>=0.1 &&
<0.6)
rejecting: pandoc-1.14.0.2, pandoc-1.14.0.1 (conflict: pandoc-types =>
syb==0.6/installed-C65..., pandoc => syb>=0.1 && <0.5)
rejecting: pandoc-1.14 (conflict: pandoc-placetable-0.4:inlinemarkdown =>
pandoc>=1.14.0.0)
Backjump limit reached (currently 2000, change with --max-backjumps or try to
run with --reorder-goals).

Following suggestion in When installing some filters, cabal: Could not resolve dependencies... - Google Groups: cabal install --allow-newer=base -f inlineMarkdown pandoc-placetable, it then has the error:

Resolving dependencies...
Downloading pandoc-placetable-0.4...
Configuring pandoc-placetable-0.4...
Building pandoc-placetable-0.4...
Failed to install pandoc-placetable-0.4
Build log ( ~/.cabal/logs/pandoc-placetable-0.4.log ):
cabal: Entering directory '/var/folders/2d/grhmr40j2bnc5bmd13pk582r0000gn/T/cabal-tmp-1416/pandoc-placetable-0.4'
Configuring pandoc-placetable-0.4...
Building pandoc-placetable-0.4...
Preprocessing executable 'pandoc-placetable' for pandoc-placetable-0.4...
[1 of 2] Compiling Paths_pandoc_placetable ( dist/build/autogen/Paths_pandoc_placetable.hs, dist/build/pandoc-placetable/pandoc-placetable-tmp/Paths_pandoc_placetable.o )
[2 of 2] Compiling Main             ( pandoc-placetable.hs, dist/build/pandoc-placetable/pandoc-placetable-tmp/Main.o )

pandoc-placetable.hs:142:15: error: parse error on input ‘then’
cabal: Leaving directory '/var/folders/2d/grhmr40j2bnc5bmd13pk582r0000gn/T/cabal-tmp-1416/pandoc-placetable-0.4'
cabal: Error: some packages failed to install:
pandoc-placetable-0.4 failed during the building phase. The exception was:
ExitFailure 1

How to install properly?

I tried to install this via both methods (cabal and stack), but still there is no pandoc-placetable command available on my system.
What else is needed?

Problem using CSV containing UTF-8 special characters

My CSV is saved in UTF-8 and contains special Norwegian characters (æøå). These end up completely garbled in the generated docx file. The same characters in the .md itself (the file that includes the .csv table) is presented fine in the same docx file.

This is reproduced with other accented characters as well, so it seems to be a codepage conversion problem.

Using pandoc version 1.17.0.4 and latest pandoc-placetable.

[Feature Request] Ability to specify column widths

Pandoc's multiline_tables extension allows for a useful feature specific to these tables where the relative widths of columns are maintained. These relative widths are stored in an array just after column alignment it appears. In a simple table, and in pandoc-placetable, the array is just [0.0,0.0,0.0].

I would think it would be relatively easy to allow those widths to be specified as options in pandoc-placetable. This would allow for even more control than multiline_tables, as you'd be able to set those widths specifically instead of trying to do it visually in markdown.

See below for an example and the resulting JSON

-----------------------------------------------------
   Fruit  Price        Advantages
--------  ------  -----------------------------------
 Bananas  $1.34    Bright Color

 Oranges  $2.10    Oranges are
                   orange
-----------------------------------------------------

Table: Multiline Table Caption
,Table [Str "Multiline",Space,Str "Table",Space,Str "Caption"] [AlignRight,AlignLeft,AlignCenter] [0.1388888888888889,0.1111111111111111,0.4861111111111111]
 [[Plain [Str "Fruit"]]
 ,[Plain [Str "Price"]]
 ,[Plain [Str "Advantages"]]]
 [[[Plain [Str "Bananas"]]
  ,[Plain [Str "$1.34"]]
  ,[Plain [Str "Bright",Space,Str "Color"]]]
 ,[[Plain [Str "Oranges"]]
  ,[Plain [Str "$2.10"]]
  ,[Plain [Str "Oranges",Space,Str "are",Space,Str "orange"]]]]

[Feature request] Allow LaTeX to be formatted inside tables

Thanks for writing this pandoc filter!

I'd like to have tables with correctly formatted exponents, e.g. 10^9.

Normally pandoc lets me do this by adding dollar signs: $10^9$ if I'm converting from markdown to pdf.

However, if I import a CSV file with $10^9$ as an entry, the resulting table has plaintext $10^9$.

screenshot from 2018-09-21 20-43-11

Is there some way to add math formatting inside the table?

compile failure with pandoc-placetable-0.4.2

Hi, your last Hackage upload results in a compile failure:

Configuring component exe:pandoc-placetable from pandoc-placetable-0.4.2
Preprocessing executable 'pandoc-placetable' for pandoc-placetable-0.4.2...
[1 of 2] Compiling Paths_pandoc_placetable ( /tmp/matrix-worker/1480766852/dist-newstyle/build/x86_64-linux/ghc-8.0.1/pandoc-placetable-0.4.2/c/pandoc-placetable/build/pandoc-placetable/autogen/Paths_pandoc_placetable.hs, /tmp/matrix-worker/1480766852/dist-newstyle/build/x86_64-linux/ghc-8.0.1/pandoc-placetable-0.4.2/c/pandoc-placetable/build/pandoc-placetable/pandoc-placetable-tmp/Paths_pandoc_placetable.o )
[2 of 2] Compiling Main             ( pandoc-placetable.hs, /tmp/matrix-worker/1480766852/dist-newstyle/build/x86_64-linux/ghc-8.0.1/pandoc-placetable-0.4.2/c/pandoc-placetable/build/pandoc-placetable/pandoc-placetable-tmp/Main.o )

pandoc-placetable.hs:135:13: error: parse error on input ‘let’

Error running filter pandoc-placetable: Could not find executable pandoc-placetable

Hi,

I'm getting the error 'Error running filter pandoc-placetable: Could not find executable pandoc-placetable' when trying to run this filter on OS-X 10.12.6, with pandoc 2.0.2.

I have installed via cable as instructed (a couple of times), but to no avail. This is the message I get when installing the package:

Atanass-MacBook-Pro:~ atanas_____$ cabal install pandoc-placetable
Warning: --root-cmd is no longer supported, see
haskell/cabal#3353 (if you didn't type --root-cmd,
comment out root-cmd in your ~/.cabal/config file)
Resolving dependencies...
Configuring pandoc-placetable-0.4.2...
Building pandoc-placetable-0.4.2...
Installed pandoc-placetable-0.4.2
Updating documentation index
/Users/atanas_____/Library/Haskell/share/doc/x86_64-osx-ghc-8.2.1/index.html

I may be missing an obvious initial point in the install, I'm a bit new to installing packages from the terminal, so not sure what to do fairly regularly.

I've tried --filter and -Filter in the order: pandoc -F pandoc-placetable {other args, etc.}

I'm hoping someone can please help?

Feature Request: input from csv directly on cli

It will be useful if the filter can be used as a standalone cli program.

e.g. currently, I could do this in a makefile:

source/%.md: source/%.csv
	printf "%s\n" "~~~{.table inlinemarkdown=yes}" > $@
	cat $< >> $@
	printf "%s\n" "" "~~~" >> $@

to effectively wrap a csv around with the proper markdown code required by pandoc-placetable.

And my feature request would works somewhat like this:

pandoc-placetable -inlinemarkdown=yes source/table.csv | pandoc -f json -o ...

Since pandoc-placetable is already converting the CSV included into the pandoc AST, it seems natural to turn it into doing exactly only that. Effectively, it "adds" a CSV reader to pandoc.

I don't know if it make sense, perhaps it could even be added as an official CSV reader? What do @jgm think? I know previous discussions seem to rule out the possibility of having a markdown extension, say, csv_tables in official pandoc markdown. But being a CSV reader to turn into pandoc AST and output to any other format seems like a natural thing to do (except perhaps the "inlinemarkdown" part of the feature). e.g.

pandoc -f csv -t latex -o table.tex table.csv

[Feature request] Allow selection and ordering of CSV lines and columns by additional attributes

  1. Allow selective processing of CSV lines (== table rows) into the generated tables. For example by supporting an additional attribute like csvlines=3,7,33-end,2 (should be obvious what I mean with this). And the lines should appear in the same order as cvslines=... lists them.
  2. Allow selective processing of CSV columns (== table cols) into the table. For example by supporting an additional attribute like csvcolumns=6,3,2,13,44-end (similarly, allow re-arranging of order of columns).

Of course, these two features should also be working when combining them.

This feature would significantly ease the difficulty and amount of work that is required if you want to create smaller, selective tables from a larger CSV file, and it would spare the creation, handling and management of multiple, temporarily created smaller CSV files....

Working with pandoc2?

Seem to be unable to get pandoc-placetable to produce any output; keep getting the following error message:

pandoc-placetable: Error in $: expected product (:*:), encountered Object

Just wondering if it functions with pandoc 2?

Table format

Is it possible to set the table format when using pandoc-placetable?

For example, if I want a grid_table or pipe_table in the same document?

[Feature request] Allow headers to be defined in fenced block

  • Allow the table header line to be defined inside the fenced code block. For example by supporting an additional option for the header attribute: header="fenced" (to mean: first line within the fenced part is to become the header) or header="line 13" (to mean: line 13 of the external CSV source file is to become the header).

This is useful (also in combination with my other feature request) when you have rather large CSV files, but you do not want to change the headers (permanently or temporarily) just for the table inclusion in a Markdown/Pandoc document. (Some headers are fine for processing/maintaining the CSV table in a spreadsheet, but may not be good in their original version in a published document -- so you may define a current header line by noting it down in the fenced block).

Bug Report: LaTeX error when CSV table has block element and no width specified

I was using one of the example from baig/pandoc-csv2table/grid.csv:

Source

~~~{.table inlinemarkdown=yes}
**_Fruit_**,~~Price~~,_Number_,`Advantages`
*Bananas~1~*,$1.34,12~units~,"Benefits of eating bananas 
(**Note the appropriately
rendered block markdown**):    

- _built-in wrapper_        
- ~~**bright color**~~

"
*Oranges~2~*,$2.10,5^10^~units~,"Benefits of eating oranges:

- **cures** scurvy
- `tasty`"
~~~

Command used

pandoc --filter pandoc-placetable -s -o placetable/grid.pdf source/grid.md

Error

! LaTeX Error: Something's wrong--perhaps a missing \item.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.76   \emph

pandoc: Error producing PDF

I noticed that the error probably is from the lack of the use of minipage.

Notes

However, if I use pandoc --filter pandoc-placetable -o placetable/grid.md source/grid.md to generate an intermediate markdown file first, that markdown file can be used to produce a PDF without error, e.g. pandoc -s -o placetable/grid.pdf placetable/grid.md.

By comparing the intermediate AST generated by the original markdown and the output markdown, I noticed that the problem probably comes from the lack of width. If the source is modified into this:

~~~{.table inlinemarkdown=yes widths="0.25 0.25 0.25 0.25"}
**_Fruit_**,~~Price~~,_Number_,`Advantages`
*Bananas~1~*,$1.34,12~units~,"Benefits of eating bananas 
(**Note the appropriately
rendered block markdown**):    

- _built-in wrapper_        
- ~~**bright color**~~

"
*Oranges~2~*,$2.10,5^10^~units~,"Benefits of eating oranges:

- **cures** scurvy
- `tasty`"
~~~

Then the PDF can be generated without error.

Incompatible API versions

Hi - sorry for another question... thanks in advance for any help.

I've just switched across to MX Linux and am having troubles getting pandoc-placetable to work (installed through stack). The error I am getting is:

pandoc-placetable: Error in $: Incompatible API versions: encoded with [1,20] but attempted to decode with [1,17,3,1]. CallStack (from HasCallStack): error, called at ./Text/Pandoc/JSON.hs:122:13 in pandoc-types-1.17.3.1-2H9v0rGz1RlCFGpqGmPMq8:Text.Pandoc.JSON Error running filter /home/gjb/.local/bin/pandoc-placetable: Filter returned error status 1 done!

My pandoc version is

$ pandoc --version pandoc 2.9.1 Compiled with pandoc-types 1.20, texmath 0.12, skylighting 0.8.3 Default user data directory: /home/gjb/.local/share/pandoc or /home/gjb/.pandoc

I initially had some trouble installing with the following error:
Warning: Installation path /home/gjb/.local/bin not found on the PATH environment variable.

after running

$ stack install --flag pandoc-placetable:inlineMarkdown pandoc-placetable.

This was resolved by using

export PATH=~/.local/bin:$PATH

PATH=$PATH stack install --flag pandoc-placetable:inlineMarkdown pandoc-placetable

[Feature Request] Support for custom table styles

Pandoc 1.18 introduces custom styles for divs and spans in the docx writer.

I think you're already wrapping these tables in a div, so would it be possible to pass through the custom style as well? Having the ability to style tables in Word would be very useful!

Currently, most tables are styled as "Compact", but those with inlinemarkdown turned on are styled as "Normal", which causes some problems as I pointed out before.

Wrapping the whole pandoc-placetable in a div already works, so I would think this would work. It also opens up some flexibility for table formats.

Weird dependencies

This looks like a good idea -- but why is it installing so many dependencies, e.g. cryptonite? What elaborate processes are happening at the back end?

[Feature Request] Table cell style matching pandoc

Pandoc tables converted to .docx creates tables with table cells having the Compact style. Those created with pandoc-placetable use the Normal style for table cells.

This is problematic if the Normal style is double-spaced for example.

Error on csv file

Hi,

When I include this block:

```{.table file="/Users/lyndon/Documents/Study/Oxford/MSt/Dissertation/text/Neh5Heb.csv" header=yes aligns=LLRR caption="Nehemiah 5:1–13"}
```

I get this output from pandoc:
pandoc-placetable: Error in $: expected product (:*:), encountered Object
CallStack (from HasCallStack):
error, called at ./Text/Pandoc/JSON.hs:125:13 in pandoc-types-1.16.1.15mFcOVb9FTfFbF4KbltdaC:Text.Pandoc.JSON
pandoc: Error running filter pandoc-placetable
Filter returned error status 1

Any thoughts?

Best,
Lyndon

Compilation Error when Installing with Cabal and Pandoc 2.1.3

Hello,

I tried to setup pandoc-placetable in a Debian-based docker.

FROM debian:sid
RUN apt-get update
RUN apt-get install -y --no-install-recommends zlib1g-dev unzip zip ghc cabal-install dnsutils
RUN cabal update
RUN cabal install -f inlineMarkdown pandoc-placetable pandoc-crossref pandoc-citeproc

The last command cabal installgives the following errors:

...
Downloading pandoc-2.1.3...
Configuring pandoc-2.1.3...
Building pandoc-2.1.3...
Installed pandoc-2.1.3
Downloading pandoc-placetable-0.4.1...
Downloading pandoc-crossref-0.3.1.0...
Downloading pandoc-citeproc-0.14.3.1...
Configuring pandoc-placetable-0.4.1...
Configuring pandoc-crossref-0.3.1.0...
Building pandoc-placetable-0.4.1...
Building pandoc-crossref-0.3.1.0...
Failed to install pandoc-placetable-0.4.1
Build log ( /root/.cabal/logs/ghc-8.2.2/pandoc-placetable-0.4.1-AMD8DdWHNCv8O88m4uAws4.log ):
cabal: Entering directory '/tmp/cabal-tmp-6/pandoc-placetable-0.4.1'
Configuring pandoc-placetable-0.4.1...
Preprocessing executable 'pandoc-placetable' for pandoc-placetable-0.4.1..
Building executable 'pandoc-placetable' for pandoc-placetable-0.4.1..

<no location info>: warning: [-Wmissing-home-modules]
    These modules are needed for compilation but not listed in your .cabal file's other-modules: Paths_pandoc_placetable
[1 of 2] Compiling Paths_pandoc_placetable ( dist/build/pandoc-placetable/autogen/Paths_pandoc_placetable.hs, dist/build/pandoc-placetable/pandoc-placetable-tmp/Paths_pandoc_placetable.o )
[2 of 2] Compiling Main             ( pandoc-placetable.hs, dist/build/pandoc-placetable/pandoc-placetable-tmp/Main.o )

pandoc-placetable.hs:110:59: error:
    * Couldn't match type `[Char]'
                     with `text-1.2.3.0:Data.Text.Internal.Text'
      Expected type: [text-1.2.3.0:Data.Text.Internal.Text]
        Actual type: [String]
    * In the second argument of `map', namely `headers'
      In the third argument of `table', namely
        `(map strToBlocks headers)'
      In the expression:
        table (strToInlines caption) cellspecs (map strToBlocks headers)
    |
110 |   table (strToInlines caption) cellspecs (map strToBlocks headers)
    |                                                           ^^^^^^^

pandoc-placetable.hs:111:31: error:
    * Couldn't match type `[Char]'
                     with `text-1.2.3.0:Data.Text.Internal.Text'
      Expected type: [[text-1.2.3.0:Data.Text.Internal.Text]]
        Actual type: [[String]]
    * In the second argument of `map . map', namely `rows'
      In the second argument of `($)', namely
        `(map . map) strToBlocks rows'
      In the expression:
        table (strToInlines caption) cellspecs (map strToBlocks headers)
          $ (map . map) strToBlocks rows
    |
111 |     $ (map . map) strToBlocks rows
    |                               ^^^^

pandoc-placetable.hs:136:38: error:
    * Couldn't match expected type `text-1.2.3.0:Data.Text.Internal.Text'
                  with actual type `[Char]'
    * In the second argument of `readMarkdown', namely s'
      In the expression: readMarkdown def s'
      In the expression:
        case readMarkdown def s' of
          Right (Pandoc _ bs) -> fromList $ extractIns $ head bs
          Left e -> str $ show e
    |
136 |            in  case readMarkdown def s' of
    |                                      ^^

pandoc-placetable.hs:151:24: error:
    * Couldn't match type `text-1.2.3.0:Data.Text.Internal.Text'
                     with `[Char]'
      Expected type: String
        Actual type: text-1.2.3.0:Data.Text.Internal.Text
    * In the first argument of `str', namely `s'
      In the second argument of `($)', namely `str s'
      In the expression: plain $ str s
    |
151 |            plain $ str s
    |                        ^
cabal: Leaving directory '/tmp/cabal-tmp-6/pandoc-placetable-0.4.1'
Configuring pandoc-citeproc-0.14.3.1...
Building pandoc-citeproc-0.14.3.1...
Installed pandoc-crossref-0.3.1.0
Installed pandoc-citeproc-0.14.3.1
cabal: Error: some packages failed to install:
pandoc-placetable-0.4.1-AMD8DdWHNCv8O88m4uAws4 failed during the building
phase. The exception was:
ExitFailure 1
The command '/bin/sh -c cabal install -f inlineMarkdown pandoc-placetable pandoc-crossref pandoc-citeproc' returned a non-zero code: 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.