Live data from Hacker News

Pandoc

pandoc.org

81–90 of 298 posts

Re: Pandoc

#81

Earlier quoted context omitted.

It is one of the most useful programs I use and the only useful program I ever used that was written in Haskell.

> only useful program I ever used that was written in Haskell Never used Shellcheck?

xmonad team checking in.

Re: Pandoc

#82
post #78

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…

What snet0 suggested might be your best bet. You can use pandoc markdown but then slip into LaTex if you need to do something more complicated.

If anyone else was looking for what snet0 suggested and where, here's their comment: https://news.ycombinator.com/item?id=39227851

Re: Pandoc

#83
One of the best pieces of software you’ll ever use. And if you do find a bug, the maintainer will fix it within hours of your Github report.

Re: Pandoc

#84
post #35

Earlier quoted context omitted.

I'll probably lose some nerd cred: I do most of my writing in MS word, I find it easier to cut and paste and add footnotes and section headers. And then I use Pandoc to convert the docx into the format I want, usually HTML*. I used to do markdown in vim but I found that for most of what I do I prefer word. I do write code in vim... * I use this css file when converting: https://gist.github.com/killercup/5917178

I also use Word for all my writing too, so wanted to defend you. People (tech people at least) have lost sight of the fact that writing should happen in "word processing software", and Word is the best-in-class. To people who say "Word sux", I say "That just means you don't know how to use Word properly". Writing any markup or markdown syntax in an IDE is a disaster for the creative process. Jack Kerouac used to type…

> People (tech people at least) have lost sight of the fact that writing should happen in "word processing software", and Word is the best-in-class.

It depends on the person. The best way for me to write is on paper, on a desk with lots of empty space, with paper versions of all reference material.

Re: Pandoc

#85
post #35

Earlier quoted context omitted.

I'll probably lose some nerd cred: I do most of my writing in MS word, I find it easier to cut and paste and add footnotes and section headers. And then I use Pandoc to convert the docx into the format I want, usually HTML*. I used to do markdown in vim but I found that for most of what I do I prefer word. I do write code in vim... * I use this css file when converting: https://gist.github.com/killercup/5917178

I also use Word for all my writing too, so wanted to defend you. People (tech people at least) have lost sight of the fact that writing should happen in "word processing software", and Word is the best-in-class. To people who say "Word sux", I say "That just means you don't know how to use Word properly". Writing any markup or markdown syntax in an IDE is a disaster for the creative process. Jack Kerouac used to type…

> slowed me down and distracted me from actually writing

It's a bit of a matter of perspective.

The distinction between looking at a document in markdown versus Word is a bit analogous to the distinction between looking at a movie in its textual form as a screenplay versus looking at a movie as a piece of video: Text is capable of abstraction in a way that video is not.

In the screenplay, it might say "table", but when the director translates it to video, the director will have to decide: What kind of table? What design? What period? What texture? Is there anything on the table?

None of these decisions matter to the construction of the story, so, for a screenwriter, it would be very distracting if they had to make all of those decisions just to be able to get "table" committed to the medium.

In Markdown you worry about text and nothing but text. But Word shoves a particular font in your face as soon as you're laying down the first letter, so, if you don't like Word's choice of fonts, you can either let it annoy you throughout the project, or you can start worrying about fonts right then and there, which will be a distraction. If you write Markdown in a code editor, then, presumably, you've already set up the code editor in a way that doesn't annoy you. And then your future self (or someone else entirely) can worry about the font.

Re: Pandoc

#86

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.

I find that question uninteresting, because no matter where the fault lies (it's probably somewhere in the middle) the end consequence is that there is no use case where it makes sense for me to use Word (unless I'm literally held at gunpoint).

I'm either working on a document for myself or with collaborators.

In the first case I'll use markdown for simple things or LaTeX for bigger things since I can work in a familiar environment where I work most efficiently (VSCode).

In the second case, I'll work with collaborators so I will never be able to trust that a document I have sent off for reading is still consistently formatted when I receive it back. This means that any benefits of the collaboration tools (eg. review history or suggesting changes) are wiped off the table. I will have to integrate any suggested changes into my own authoritative version of the document by hand anyways. At that point I may as well work where I fell comfortable and use markdown / latex, and send off Pandoc converted word files for comments by others when it is relevant.

This is of course for serious pieces of writing, not throwaway stuff like eg. meeting notes, but for those Google docs is plenty.

Re: Pandoc

#87
post #69

Earlier quoted context omitted.

Personally, whatever helps with the specific writing part of it all the most is what's best. If you find writing in a given dialect of Markdown or LaTeX or Org-mode is easiest, do that. For me, that's Markdown with embedded LaTeX, for others it's Org-mode, or RST, and so on. Pandoc handles these fairly seamlessly, and with many options for PDF engines, though I'd say it has a preference for LaTeX and HTML in the back…

> If you find writing in a given dialect of Markdown or LaTeX or Org-mode is easiest, do that. I find Org-mode the easiest but like I said in my comment, the conversion quality is not great. Pandoc breaks a lot of stuff in Org-mode in edge cases. One example I shared in my comment was Pandoc breaking internal links. So by selecting something I find the easiest I have burned many hours of troubleshooting figuring out…

Unfortunately, the perfect is very much the enemy of the good here. Aside from HTML, I'm afraid that PDF and EPUB are very much driven by purpose-built tools designed to show interactively what it will look like as output. This means that they've both delved into a depth of subtle semantic differences that makes flawless output an extremely difficult task. Of course, practically, pandoc can resolve the vast majority of what people actually use, but everything will still be hit by edge cases from time to time, leading to subtle issues or incompatibilities between EPUB, PDF, and HTML. Each edge case can, of course, be solved in isolation, so finding something that's solved the ones you are encountering already is the ideal, providing a seamless experience for your work. Sadly, each of those is built to solve someone else's specific work, and so sometimes we just have to accept that we either need to compromise on something, we need to paper over the gaps by combining the right tools, or we have to write something ourselves. Fortunately, it isn't the 80s anymore, so many of the tools we have are the "right" ones, and pandoc is very good at combining them.

Again, I find that Markdown (with inline LaTeX or HTML) seems to be Pandoc's preferred starting point, and that the HTML backends are quite useful (particularly when not needing full LaTeX), so perhaps there's some luck to be had there, since HTML may preserve Org's linking and such a bit better, though I don't use Org myself so can't attest to it. And if there's really a problem, then perhaps Pandoc needs some help sorting Org-mode out!

Re: Pandoc

#88

Earlier quoted context omitted.

I also use Word for all my writing too, so wanted to defend you. People (tech people at least) have lost sight of the fact that writing should happen in "word processing software", and Word is the best-in-class. To people who say "Word sux", I say "That just means you don't know how to use Word properly". Writing any markup or markdown syntax in an IDE is a disaster for the creative process. Jack Kerouac used to type…

> slowed me down and distracted me from actually writing It's a bit of a matter of perspective. The distinction between looking at a document in markdown versus Word is a bit analogous to the distinction between looking at a movie in its textual form as a screenplay versus looking at a movie as a piece of video: Text is capable of abstraction in a way that video is not. In the screenplay, it might say "table", but wh…

We collaboratively write screenplays in markdown (actually fountain but its markdown plus some screenwriting stuff) and save them into Dropbox.

pandoc and some other tools turn those scenes into a full screenplay.

Re: Pandoc

#89

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).

Re: Pandoc

#90
post #48

Earlier quoted context omitted.

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.

Thanks! Didn't know Leanpub has its own markdown too. Yes I do want to keep everything local.

Ah, then probably not a fit.
Post reply on HN