crossnote
crossnote copied to clipboard
Some advice to HTML and PDF export
I'm using mume to generate my documentation web page and pdf, there are some advice:
embed_local_imagesis a very useful option for generate a standalone HTML file, but I need write down the option inside every document, add an option on engine side is very helpful to set it to true for all documents by default.- In resolved-image-paths.js, there is one line
img.attr(srcTag, resolveFilePath(src, options.useRelativeFilePath));, theresolveFilePathwill add"file:///"and treat it as the local link if the link is start from/, but I think it is also used for the online url not only the local files. So I think it would be helpful to give an option which could let users to decide whether they want to treat it as a online link or local file link. - style-template.css is not very suitable in some cases and I want to modify it. I see this file's path is hard-coded, please give an option to use a custom one.
- Code block will have a scroll bar if the code line is too long, it will have problem when exporting to PDF, I have changed
word-wrapandwhite-spaceCSS style to get rid of scroll bar, I think it would be helpful to correct the default CSS files. - Just a personal suggestion: the wkhtmltopdf would be a better tool to generate the PDF files without installing additional dependencies.
- When exporting HTML and PDF, I have my own TOC so I don't need the default TOC which will also cause the PDF has an image of TOC button, I need set
enableScriptExecutionto false in order to disable it, but it will also dsiable other related features, so another option for it is also useful. Also themathRenderingOption: ''is what I used for get rid of some link dependencies.