26 Apr 2012 15:45
Re: change latex output with csquotes
> Yes. Something like (untested)
>
> -- compile with ghc --make fixit.hs
> -- run with pandoc [opts] -t json | ./fixit | pandoc -f json -t latex -s
> import Text.Pandoc
>
> main = toJsonFilter fixit
>
> fixit :: [Inline] -> [Inline]
> fixit (Quoted qt ils : Space : Cite cs : rest) =
> RawInline "latex" "\\textquote[" : Cite cs : rawInline "latex" "]{" :
> ils ++ [rawInline "latex" "}"] ++ rest
> fixit xs = xs
John,
I added the import Text.Pandoc.Builder (RawInLine seemed to require
it).
Now it’s failing with:
fixit.hs:7:32:
Constructor `Cite' should have 2 arguments, but has been given 1
In the pattern: Cite cs
In the pattern: Cite cs : rest
In the pattern: Space : Cite cs : rest
I have no clue how to fix this.
By the way, can this deal with the optional arguments in citations
(e.g. `[See <at> key, p. 100]`, which becomes `\autocite[See][p. 100]{key}
`)?
Thanks,
D.
--
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To post to this group, send email to pandoc-discuss@...
To unsubscribe from this group, send email to pandoc-discuss+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pandoc-discuss?hl=en.
RSS Feed