如何最好地编写针对 HTML 和 PDF 的文档?

2022-01-24 00:00:00 latex documentation pdf pdf-generation html

我过去见过的 Latex-to-html 转换器非常糟糕.编辑原始 html 并不好玩,而且似乎不能很好地转换为打印页面.其他人如何解决这个问题?示例(pdf 和 html)的链接会很棒.

Latex-to-html converters I've seen in the past have been pretty awful. Editing raw html is no fun and doesn't seem to translate well to the printed page. How do others solve this problem? Links to examples (both pdf and html) would be great.

补充:刚刚又问了一个类似的问题:

Added: Another similar question was just asked:

项目文档应该使用什么格式语言

推荐答案

对于代码文档,我也推荐 Sphinx.ReStructured Text 很好,因为它可读并且在某种程度上以纯文本形式标记,并且可以很好地转换为 html 和 pdf.对于某些事情,我仍然喜欢 LaTeX.我和我的妻子使用 LaTeX 写圣诞信,然后通过普通邮件寄出.pdf 版本非常漂亮,有两列,页眉和页脚.html版本更简单.我用塑料转换.这里的例子:http://fedibblety.com/annualReports

For documenting code, I also recommend Sphinx. ReStructured Text is nice because it is readable and somewhat marked up in plaintext, and can do a nice job converting to html and to pdf. I still like LaTeX for certain things. My wife and I use LaTeX to write our christmas letter, which we mail out via snail mail. The pdf version is pretty fancy, with two columns, and headers and footers. The html version is simpler. I convert with plastex. Examples here: http://fedibblety.com/annualReports

对于 10 年后您可能想阅读的任何类型的文档,我认为任何二进制格式都不是一个好的选择(Word).这是 LaTeX 的优点之一.

I don't think any binary format is a good choice (Word) for any sort of document that you might like to read 10 years from now. That is one of the nice things about LaTeX.

相关文章