mermaid-filter icon indicating copy to clipboard operation
mermaid-filter copied to clipboard

Option to use includepdf instead of includegraphics?

Open gijswijs opened this issue 6 years ago • 2 comments

I love this filter, but I have a feature request. I'm using it to create a gantt chart as an appendix to my document. The output filetype of the document is always PDF. I use pdf as output type for the gantt chart as well, because it has superior quality compared to the png output. But when including the pdf using includegraphics (which is what this filter does by returning pandoc.image) you get Latex complaints about the graphic being too large for the textbody, resulting in weird page breaks (it tries to fit the image on the following page)

Is there a possibility to force this filter to use includepdf (assuming the pdfpages package is installed)?

gijswijs avatar Jan 28 '19 03:01 gijswijs

I already seemed to have found a workaround:

Add a .mermaid.css file with the following content

@page {
    size: Landscape;
}

gijswijs avatar Jan 28 '19 05:01 gijswijs

I have the same issue.

The workaround only works if the plot happens to have the appropriate size.

I think this is the actual bug:

  • https://github.com/mermaidjs/mermaid.cli/issues/48

bebuch avatar Aug 29 '19 13:08 bebuch