Good morning/afternoon/evening,
I'm having an issue with pandoc/wkhtmltopdf on Slackware. When trying to convert from markdown to pdf via html (so that I can use css), I get extra unwanted line breaks in the pdf inside code blocks.
Sample markdown:
Code:
### Python Code
```python
#!/bin/env/python
def myfunc():
i = input("Enter a value: ")
return i
x = myfunc()
```
pandoc command:
Code:
pandoc -t html -o sample.pdf sample.md
Output is shown in the attached image. You can see both lines in the function def have unwanted line breaks. This happens with all code blocks (```bash, etc.) when using syntax highlighting.
Pandoc does a fine job of md --> html and md --> pdf and html --> pdf. The code comes out correct. But the css does not appear to get applied unless I use "--css=mycss -t html" on the command line.
I'm using the pandoc-bin package from SBo. I've tried the pandoc package, but I cannot get ghc to build. Interestingly, this is not an issue on Manjaro or Ubuntu (VMs) - the command with "--css -t html" works as expected.
I posted this question to the pandoc users google group and the response was to convert to html and examine the html output. This does not help because the html produced that way renders fine. Since this is only happening on Slackware (in my limited testing) I thought I'd post here in case someone has any ideas. I've looked at the build scripts for wkhtmltopdf and pandoc and I don't see any build options that jump out at me as likely culprits.
Thanks,