Open mshiner opened 5 years ago
There is a settings called “printBackground” or something in extension settings. Turn it on then the theme you chose will be used in print.
Wow.... quick response!
OK tried that, but didn't really do what I wanted. So I opened the MD file again in chromium and looked at the source. Its using a stylesheet as follows....
chrome-extension://ckkdlimhmcjmikdlpkmbgfkaikojcbjk/themes/github.css
This gives a particular style that I like - I think its from here, maybe https://github.com/sindresorhus/github-markdown-css
Can I use this custom css to generate the pdf? Sorry if this a basic question.
Thanks
Try it
---
class: "markdown-body"
---
@import "github-markdown-css.less"
# Title
your contents...
Would it be possible to add some VS Code user settings to reference CSS or LESS stylesheets in the workspace (either absolute or relative to the document)? This is the approach used by the build-in markdown preview, and the Markdown-PDF extension. I would really prefer this to an import (although the imports are very useful), since it means that I can keep a "standard" markdown document that will parse in other engines. Currently if I want to use say pandoc, I just get the import in text. I've noticed you can change the styles using settings in ~/.mume
but this is not very useful to me since I need to set up a workspace that will produce a consistent preview and export on different PCs after checking out a project - I can't rely on things in the user directory. This is really the only thing I can find missing from this plugin at the moment.
First off - well done for a great add in.
Before discovering MPE I used VScode to write up my markdown file and then opened it in Chromium with the markdown viewer extension. This provided a nice print/save using the Github theme but without the flexibility of doing everything 'within' VScode... plus all of the other goodies you provide (page headers and footers TOC etc etc).
But.... the default puppeteer pdf that is generated has a different 'theme' from the one I used before, and I'm struggling to understand how to change the style of PDF output produced.
Any help would greatly appreciated.... Thanks