watch: $(ALL)
while true; do \
clear; \
make $(WATCH); \
inotifywait -qr -e close_write .; \
done
"make watch WATCH=build" will now compile documents on every save. Works well for single documents, collections of documents or entire websites.Pandoc
31–40 of 213 posts
Re: Pandoc
#32As a guy attempting to transition from macOS to Linux: Pages to anything else, please.
Re: Pandoc
#33There are a few things (in latest version, 2.2.3.2) that don't really survive round-trip from markdown back to markdown:
- reference-style links (e.g. `[foo][f]`). They are converted to inline links e.g. `[foo](http://...)`.
- setext vs hashmark headers. `foo\n=====` will get converted to `# foo`.
- markdown allows for forced-linebreak
s to be added with two trailing blank spaces at the end of a line. Pandoc escapes these with a trailing `\` at the end of the line.
These are only occasional nuisances, but overall the documents (at least in my experience) are not butchered.
I also occasionally go from markdown to docx for the purposes of uploading to google-docs and copy/pasting large sections into other docs. This is the only markdown-to-google-docs workflow I've found that works to preserve formatting. It's never really butchered anything, except a few times the syntax-highlighting for code-blocks gets confused and keywords get the wrong colors.
Re: Pandoc
#34I love pandoc. I've been using it intermittently for years to turn my Markdown and org-mode documents into other formats. Just wish it would take Asciidoc as an input format.
Re: Pandoc
#35I use Pandoc to convert directories of Markdown files into static HTML websites. Here's the build command for responsive.style[1]: pandoc $file -f markdown -t html5 -H templates/header-prod.html -B templates/nav.html -A templates/footer-prod.html -o (echo "../$file" | sed '$s/\.md$/.html/') -s --data-dir=./ --highlight-style breezedark --variable=file:(echo "$file" | sed '$s/\.md$/.html/') Works beautifully! 1: https…
I know Blot.im as one static site generator that uses it: https://github.com/davidmerfield/Blot/blob/master/app/models...
Re: Pandoc
#36What don't I use it for? + Static websites from any input to html + Markdown & TeX & References to pdf for academia + Generating manpages for new tools + Generating ebooks ... Let's just say I get a bit lost when it isn't available.
Re: Pandoc
#37What don't I use it for? + Static websites from any input to html + Markdown & TeX & References to pdf for academia + Generating manpages for new tools + Generating ebooks ... Let's just say I get a bit lost when it isn't available.
> + Generating manpages for new tools Do any of your tools use long options (prefixed with a double dash)? If so, make sure you disable the "smart" extension, otherwise you might end up with en dashes.
Re: Pandoc
#38Re: Pandoc
#39I love pandoc. I've been using it intermittently for years to turn my Markdown and org-mode documents into other formats. Just wish it would take Asciidoc as an input format.
Asciidoctor and the other asciidoc tools do the job that I use pandoc for: tables, custom numbering, all the other markdown extensions that one needs to be able to create a highly structured document. With Asciidoc, you don't need md extensions. It's all in there.
Re: Pandoc
#40Earlier quoted context omitted.
> + Generating manpages for new tools Do any of your tools use long options (prefixed with a double dash)? If so, make sure you disable the "smart" extension, otherwise you might end up with en dashes.
OP said he doesn't use pandoc for such things. It's a list of things that have better tooling.