hplgit / doconce

Lightweight markup language - document once, include anywhere
http://hplgit.github.io/doconce/doc/web/index.html
Other
310 stars 60 forks source link

Preview mode of compiled document #115

Open ofenerci opened 7 years ago

ofenerci commented 7 years ago

Hello,

When I write document in markdown or LaTeX, I usually open browser or pdf document to check myself that I am writing correctly. I wonder it is possible with doconce. There is already emacs mode for doconce (https://github.com/hplgit/doconce/blob/master/misc/.doconce-mode.el) but it lacks live preview mode. Does anybody use doconce with a live preview browser. If it is so, could you post here your configuration here?

KGHustad commented 7 years ago

There isn't any built-in functionality for this yet, but you could run

watch -n 10 doconce format html mydoc

and keep the generated HTML file open in a browser which you can manually refresh when needed.

It's possible to do something similar with LaTeX, but you may need to set the interval to a higher value, since pdflatex may take a while with larger documents. latexmk can do regular updates of a pdf when the source tex file changes. I would recommend having a look at that if you haven't already.

In the future, we will hopefully have a better solution for this.