Live data from Hacker News

Pandoc

pandoc.org

121–130 of 213 posts

Re: Pandoc

#121
post #46

Earlier quoted context omitted.

Can you diff two Word docs with Word? Afaik you can only hit the "track changes" button, which doesn't help if you got a new version of a document from someone else.

Yes, and you can merge changes too. Classic Word workflow: I make a document and send it to my boss; he makes some changes but suggests further research etc. and sends me his altered version, but I stupidly work on my own version . Making this right takes like four clicks.

Syncdocs [0] is also pretty good for merging and tracking changes between Word and Google Docs. It also has a feature with real-time collaboration between Google Docs and Word.

[0] https://www.syncdocs.com/

Re: Pandoc

#122
post #74

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

Re: Pandoc

#123

Pandoc's creator, John MacFarlane, is also the lead guy on CommonMark[1]. There are a small number of corner cases that need to be spec'd out before CommonMark can declare a v1.0 release[2]. If you have the skills for this kind of thing, please weigh in! [1] https://commonmark.org [2] https://talk.commonmark.org/t/issues-we-must-resolve-before-...

Please, please involve definition lists. They are useful. They were present on the first webpage[1].

[1]: http://info.cern.ch/hypertext/WWW/TheProject.html

Re: Pandoc

#125
Another happy Pandoc user here :)

I built a pipeline to convert a Markdown file to publishing-ready files for ebooks, Kindle and paperback for my novel; the whole thing is described here: http://www.gabrielgambetta.com/tgl_open_source.html

My website itself is static, generated from a bunch of Markdown files, some HTML templates, and a bit of postprocessing. But most of the work is done by Pandoc.

Re: Pandoc

#126
post #112
post #97

Earlier quoted context omitted.

None of that is version control. At best that's a visual based manual patch file tool. That you can't concat two word files together in 2018 is ridiculous.

> That you can’t concat two word files Of course you can! # cat word1.doc word2.doc > word3.doc Sounds ludicrous? So does your statement. Setting aside the hyperbole, I believe it would be a conceptual nightmare to start defining concat of two docs. For simple cases, feel free to make copy pasta :-)

> I believe it would be a conceptual nightmare to start defining concat of two docs.

Just append the pages of document 2 to the end of document 1. Then the user can decide whether to remove the page break introduced by it. I have this in my env for doing this with PDF:

  $ cat =concatpdf
  #!/bin/bash
  if [ "$1" = "to" ]; then
      shift
      gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$*
  else
      echo Usage: concatpdf to out.pdf in.pdf in2.pdf in3.pdf
  fi
The peculiar syntax with "to" ensures that I do not invocate it incorrectly.

Re: Pandoc

#127
I write any document that doesn't need extensive custom typesetting (which is 90% of stuff) in org-mode and then use pandoc to convert it to "normal people" formats at the end. I have made a basic template for MS Word that looks pretty good.

Re: Pandoc

#128

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

I mainly use Asciidoc for two reasons. 1) Ability to include external code snippets. This is not possible in pandoc without installing the pandoc-iclude-code filter which doesn't have Windows binaries. I am on Windows. 2) Tables. Asciidoc has powerful support for tables. You can create tables that include rowspan and colspan among other features. You can even specify an external CSV file as a table.

I tried creating a workflow from Asciidoc through Pandoc to MS Word but that didn't work so well. Tables being the biggest issue.

Re: Pandoc

#129
post #106

One nice trick that I use all the time is to convert html to md and back again in order to clean it. Anyway, pandoc is great.

Would that be a good way to sanitise user input? Like removing script tags etc...

Only if you trust Pandoc enough to expose it to unsanitised user input.

Re: Pandoc

#130
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.

Post reply on HN