ueberdosis / pandoc Goto Github PK
View Code? Open in Web Editor NEWA PHP wrapper for Pandoc to convert any text format in any other text format
License: MIT License
A PHP wrapper for Pandoc to convert any text format in any other text format
License: MIT License
Hello,
i like the wrapper a lot, but I've stumbled on an issue, which is crucial for my implementation, and it looks like a bug.
When I pass multiple options of the same type, which are supported by pandoc ( you can pass multiple --metadata or --variable options), the wrapper passes on only the first one ... for example in
echo (new \Pandoc\Pandoc) ->from('markdown_mmd') ->inputFile(mmd_file($id)) ->option('standalone') ->option('self-contained') ->option('template',$okvir) ->option('css',$css) ->option('metadata-file', $yaml_file) ->option('metadata','x=y') ->option('metadata', 'n_izv_text='.$nizi['original']) ->to('html5') ->log($log_file) ->run();
I can access variable x in the template, but the n_izv_text or any other metadata does not get passed to template?
Any ideas on why is that?
Thank you in advance,
Regards, Om
I got this error when running from the application, but if I run the exact command in the bash, I get the PDF:
lstat(./pdflatex) failed: ./pdflatex: No such file or directory kpathsea: Can't get directory of program name: ./pdflatex
Any ideas why is this happening?
pandoc --version
outputs pandoc 2.17.0.1
(and more)pdflatex--version
outputs pdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian)
(and more)On line 200 of pandoc/src/Pandoc.php
the standalone
parameter has been forced, while I think this should not be the case.
This is problematic when converting strings to HTML because it returns a complete HTML file with headers and footers. The "standalone" parameter can already be used by $this->option('standalone')
.
Great wrapper, supper helpful, thanks.
Some food for thought, it would be helpful to be able to pass the many Pandoc options along on execution (https://pandoc.org/MANUAL.html).
For example, --standalone, --columns, --toc-depth, the list goes on:
->options('standalone, columns=2, toc-depth=3')
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.