Live data from Hacker News

Pandoc

pandoc.org

101–110 of 298 posts

Re: Pandoc

#101
post #7

I wrote pretty much all my university work in Markdown with inline Latex, using Pandoc to generate a pdf. I'm sure there are things you can do in "pure" latex that you can't do this way, but for most normal cases, it's so much easier. You just use the simple Markdown syntax for basic text formatting, and then can use the power of Latex when you need to display mathematics, graphs, tables or similar.

I'm doing that too... did you render against a template file in the end? I also went ahead and set up my root "notes" folder to be served with mkdocs so I can easily browse them, and just render a PDF when I must submit some file to a third party

I used a vim template plugin (I believe called vim-templates, believe it or not) to get some YAML and formatting boilerplate, and then I think I rendered against the default templates. I do remember having to adjust the defaults for some reports, though.

Re: Pandoc

#102

This is one of the most useful programs that I use. I use it for turning .md files into .html or .pdf. I use it for creating slides with it. I even use it for fixing the hard-wrapped text I write in vim before sending emails. When I write in vim, I prefer the text to be hard-wrapped, but for emails, I like it better when the text is not wrapped. I recommend arp242's essay explaining the problem with hard-wrapping [1]…

Quite a coincidence: I also stopped hard-wrapping my emails after reading that same essay, and I also use Pandoc to prepare my emails (or a program, invoked by a shortcut in vim, that sends the selected text to Pandoc).

A very interesting coincidence indeed. Nice to see that others have also thought about the same problem and have found solutions similar to mine. :)

Re: Pandoc

#103

Earlier quoted context omitted.

I used to use Mutt, but now I don't because my email has its own special domain, and the email hosting service I use doesn't let me export IMAP and POP3 details unless I pay them. Currently, I just open vim in the terminal, write what I need, then copy the text. I open dmenu using a shortcut, type something like "unwr", which is sufficient for selecting the "unwrap-clipboard" script of mine, press enter, which unwrap…

I had a script that piped to curl to send, Mail.app for downloading via POP and Vim to read/write, but I gave up and ended up copy/pasting as well. Someday I may try that again, if email is still relevant by then. Vim and email would be my perfect set up.

> I had a script that piped to curl to send, Mail.app for downloading via POP and Vim to read/write

Wow, this is very interesting, and I might even try it at some point. It might have been a bit challenging to sync and read the emails though, but the sending part seems nice.

Was the reason for why you gave up related to syninc emails?

Re: Pandoc

#104
post #77

A question to experienced Pandoc users: I want to write a small book that I want to generate in 3 formats: HTML pages, EPUB and PDF. What is the best input format (source format) for the book? Pandoc Markdown? CommonMark? GFM? I'm a little hesitant to committing myself to Pandoc Markdown or any Markdown because they all have tiny differences with each other. Each is like its own standard. I considered Org-mode for so…

Is there any reason for why you’re not considering AsciiDoc?

Seconding this. Asciidoc was created to be a simple mapping to DocBook - which was specifically designed for writing books. It should be able to handle everything you need, but if there is some esoteric requirement, you can write your own processor.

Then again, content is king. Write it on napkins if you must. When complete, you can spend two days to transcribe to whatever format the publisher requires.

Re: Pandoc

#105
post #48

A question to experienced Pandoc users: I want to write a small book that I want to generate in 3 formats: HTML pages, EPUB and PDF. What is the best input format (source format) for the book? Pandoc Markdown? CommonMark? GFM? I'm a little hesitant to committing myself to Pandoc Markdown or any Markdown because they all have tiny differences with each other. Each is like its own standard. I considered Org-mode for so…

I'd use leanpub markdown. They generate those formats plus you get a page for the book, can charge for it, and advertise it. (Some of those tasks cost money). Won't work if you want to keep everything local, though.

I came here to say the same thing. Laying content out for a book comes with way more issues than "just" converting between document formats. Leanpub does it well out of the box.

If you want to look down the path of implementing book layout yourself, here are two breadcrumbs from my bookmarks:

https://journal.stuffwithstuff.com/2014/11/03/bringing-my-we...

https://iangmcdowell.com/blog/posts/laying-out-a-book-with-c...

Re: Pandoc

#107

Earlier quoted context omitted.

Most tech people who use Word know how to use it and that is exactly the problem. We don't have the benefit of ignorance. We send off drafts to someone for commenting or editing and get an inconsistently formatted mess back because others don't even know that styles exist and use manual / direct formatting instead. We are the ones that have to suffer because people we are forced to collaborate with do not take 5 minu…

So what you're saying is that the problem with Word is that it makes it easy to write unpolished and unprofessional documents? In your opinion, is that the fault of the word processor or the user? [0] [0]: Not a rhetoric question that implies one answer to be the only "right" one.

IMO entirely user.

Word (and similar text processors) is a toolset. All it gives you are tools. Word lets you define formatting rulesets, lets you apply formatting rules and create rulesets from applied rules.

Some evangelists may say that "safe" text processor would only allow application of rulesets, because direct application of rules leads to "spaghetti formatting". However that is one of the powers of WYSIWYG text processors: you apply the rules and extract those to rulesets once you are satisfied with results, in an explorative way. Direct application of rules is a feature that makes Word what it is.

Now, if a user takes a document with predefined rulesets and still applies their own rules inconsistently that's simply misuse of the tool.

Re: Pandoc

#108

The only issue I have with pandoc is the dependency hell it requires. It requires a lot of haskell dependencies and just eats up your storage space.

The pandoc binary I have is certainly large at 206MiB (more than I expected!), but it doesn't have any weird dependencies I can see. Just GMP, ncurses, and such. All the Haskell parts are statically linked, which is probably the reason it is so large.

Re: Pandoc

#109

I have develop a commercial data wrangling tool (Easy Data Transform) that outputs data tables to CSV, Excel, markdown, XML, JSON etc. It would be neat to support output to some of the other formats supported by Pandoc, such as DOCX, PPTX, PDF, Latex etc. Has anyone tried integrating the Pandoc command line tool into a desktop product on Windows or Mac? How big is it? What are the licensing implications of shipping i…

(not a lawyer, not legal advice) With Pandoc being GPLv3 you can't just link it with your software. Distributing pandoc standalone (different, unmodified binary) and calling it from your software should be okay as they're technically different programs. Probably requires further investigation and maybe a lawyer though.

Re: Pandoc

#110

A question to experienced Pandoc users: I want to write a small book that I want to generate in 3 formats: HTML pages, EPUB and PDF. What is the best input format (source format) for the book? Pandoc Markdown? CommonMark? GFM? I'm a little hesitant to committing myself to Pandoc Markdown or any Markdown because they all have tiny differences with each other. Each is like its own standard. I considered Org-mode for so…

I've translated HTML markup to Markdown, and from Markdown to LaTeX before fine-tuning the LaTeX, to produce PDFs for printing hard-cover books.

Does Markdown have any way to specify eg "begin a chapter on a new page" ? I don't think this is really a thing in Markdown or HTML but I'm admittedly a casual Pandoc user.

Post reply on HN