crossnote icon indicating copy to clipboard operation
crossnote copied to clipboard

Some advice to HTML and PDF export

Open leozzyzheng opened this issue 6 years ago • 1 comments

I'm using mume to generate my documentation web page and pdf, there are some advice:

  1. embed_local_images is 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.
  2. In resolved-image-paths.js, there is one line img.attr(srcTag, resolveFilePath(src, options.useRelativeFilePath));, the resolveFilePath will 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.
  3. 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.
  4. 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-wrap and white-space CSS style to get rid of scroll bar, I think it would be helpful to correct the default CSS files.
  5. Just a personal suggestion: the wkhtmltopdf would be a better tool to generate the PDF files without installing additional dependencies.

leozzyzheng avatar Apr 09 '19 02:04 leozzyzheng

  1. 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 enableScriptExecution to false in order to disable it, but it will also dsiable other related features, so another option for it is also useful. Also the mathRenderingOption: '' is what I used for get rid of some link dependencies.

leozzyzheng avatar Apr 09 '19 03:04 leozzyzheng