Live data from Hacker News

Pandoc

pandoc.org

211–213 of 213 posts

Re: Pandoc

#211

Earlier quoted context omitted.

Thanks for the second link! This is exactly what I meant. EDIT One more question. How do you write dialogues in MD?

Maybe I'm misunderstanding your question, but there's nothing special about dialogue in MD. Quotation marks, inner thoughts in italics. "It's just some text between quotation marks", Gabriel typed. *Have I completely misunderstood his question?*

No, that's exactly that. Thank you!

Re: Pandoc

#212

I wrote a little utility that uses Pandoc to read Markdown files like `man` pages in the terminal: https://github.com/ashton314/marked-man It's just a one-liner: `pandoc -s -t man "$1" | groff -T utf8 -man | $PAGER` (That was basically stolen from an answer to one of my questions on Stack Overflow—thanks to those who answered! :)

In a similar vein, I use pandoc to convert markdown pages to man pages, and write new/add notes to manpages. I think it's definitely easier than actually writing groff files.

I find it easier to write man pages directly. Admittedly, I write mdoc (not the ancient "man" macros), which has been around only since the 80s. It's easier for me to remember the semantics ("Is this a flag/command/function?") than the correct traditional markup ("Should this be bold/italic/nothing?").

Re: Pandoc

#213
post #31

Pandoc (or latex) + make + iNotifyWait work really well together for WYSIWYG like editing too: 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.

I've been using a JS script[1] to watch directories, but this seems neater. Would you mind sharing the whole makefile?

[1] https://gist.github.com/timpulver/0d01285952b97deb70df6104cc...

Post reply on HN