Live data from Hacker News

Pandoc

pandoc.org

141–150 of 213 posts

Re: Pandoc

#141

Earlier quoted context omitted.

Hey. Can you give us some more context of your novel writing in Markdown? I'd be interested in your process.

Sure. The technical side of things is explained here: http://www.gabrielgambetta.com/tgl_open_source.html (same link as above). If you're more interested in the creative aspect, I wrote a bit here: http://www.gabrielgambetta.com/tgl_swiss_trains.html . If you're interested in anything not covered there, feel free to ask, I'll be happy to share :)

"Soon the structure underlying The Da Vinci Code and Angels and Demons and The Lost Symbol was laying bare before my eyes. I could see why the stories worked.

I had reverse-engineered Dan Brown."

Could you talk a little more in depth about what Dan Brown's pattern/structure is?

Re: Pandoc

#142
post #11

My favorite pandoc hack is using it to convert word docs into markdown which can then be diffed similar to source code. Works great for legal redlining.

Trying pandoc on a word doc gives me: # pandoc test.doc -o test.pdf pandoc: Unknown reader: doc Pandoc can convert from DOCX, but not from DOC.

[deleted]

Re: Pandoc

#143
post #99

It appears that Pandoc generates PDF documents via LaTeX. One problem with this is that, as far as I can tell, LaTeX can't generate tagged PDFs. This is an accessibility problem. Granted, for documents that are heavy on math and/or graphics, the point is probably moot. But many technical documents that are distributed as PDFs would benefit from being tagged. Luckily, LibreOffice can produce tagged PDFs. And unoconv i…

Pandoc can convert into ConTeXt which can produce PDF/A (tagging included) easily. Why this can't be done in one command like with xelatex, wkhtml2pdf and what else is supported, I don't know. Many programs can be used to create PDFs but the quality of output isn't always the same.

> Why this can't be done in one command

ConTeXt is supported as well: `pandoc input.md -t context -o output.pdf`

Re: Pandoc

#144
post #74

Earlier quoted context omitted.

I’ve never understood the impetus for not using full LaTeX in an academic contex, given that the boiler plate is so minimal and presumably one has a built up a personal template over time. For blog posts and notes I see the appeal, since the boilerplate can be a hindrance to spontaneous writing.

Having to use `\textbf{...}` is impetus enough for writing in Markdown instead.

LaTeX editors have simple keybindings for this, like ctl-b., or C-c C-f C-b in emacs, which makes this kind of thing a non-issue for me...

Re: Pandoc

#145

I do all of my academic writing in pandoc. As compared to LaTeX this means no boilerplate (yet you can still use full LaTeX syntax for equations and the like) and, if the publisher 'needs' a Word file, you are one click away from providing it. All with plain text files that you can put under version control, get meaningful diffs, etc. It's just great.

I tried and it didn't work for me. Pandoc's conversion functionality is good but unfortunately also fails very often, at least in my experience. I suppose with custom templates and a lot of trickery I could get it working for the kind of papers I write, but I've found it easier to convert LaTeX to Word manually when needed - which is a pain in the ass, too, of course.

In my experience it works so long as you keep to very vanilla LaTeX code. Pandoc's support for LaTeX packages tends to be very patchy.

Re: Pandoc

#146

I tried to use pandoc a while ago to convert the latex-sources of arxiv.org documents to epub, since those are often much more comfortable to read on small devices than pdfs. The problem I had was that latex was turned into images, but changing the font-size of the reader did not change the size of the images, making the text readable, but the maths barely readable. This is something I would love to see happen though…

> latex was turned into images

You can add some CSS to the generated EPUB to change that. But if your EPub reader supports MathML, you can do that with pandoc. See http://pandoc.org/epub.html#math

Re: Pandoc

#147
post #87

If you don't want to install Haskell and other dependencies, several folks have developed Docker images for using pandoc: https://users.soe.ucsc.edu/~ivo/_posts/2015-03-12-repeatable... http://gbraad.nl/blog/document-generation-using-markdown-and... https://github.com/jagregory/pandoc-docker

You'd only need to install Haskell if you wanted to build Pandoc. Pandoc the executable is a binary. I install it on Debian via: `apt install pandoc`.

although the version in the default repo is usually quite old. You can grab a binary from https://github.com/jgm/pandoc/releases/latest

Re: Pandoc

#148

The only problem I have with pandoc is I have to lug the entire GHC around with it.

That is not the case.

https://pandoc.org/installing.html

> We provide a binary package for amd64 architecture on the download page. This provides both pandoc and pandoc-citeproc. The executables are statically linked and have no dynamic dependencies or dependencies on external data files.

Re: Pandoc

#149

i have been using catdoc and pdftotext to convert doc and pdf files, respectively. nice to see that there's an alternative that also includes a library, will be checking this out. a couple questions i have, seems firstly that old school .doc files are not supported, docx yes. unfortunately i still get a lot of docs in .doc format which seems to be microsoft's proprietary format (docx seems to be more open). my second…

1. yes, only docx is supported. 2. for Go pandoc filters, this seems to work: https://github.com/oltolm/go-pandocfilters

Re: Pandoc

#150

Earlier quoted context omitted.

If you grab any academic paper (particularly two columns) there is a good chance getting the text out will be hard, and any part of the paper with maths or tables will be unusable. Sorry. I'm away from a computer now, to make a smaller example.

The paper "GADTs Meet Their Match" (first I had in my list) seems to work fine, but I don't know what it was generated with.

I'll pick on one of my own random papers:

https://www.cs.york.ac.uk/aig/projects/implied/docs/cp03.pdf

Try extracting "Theorem 2" on page 5, or any text really. I just get random noise through either a PDF reader, or something like pdf2ascii / ps2ascii.

We just made this with standard latex.

Post reply on HN