Live data from Hacker News

Pandoc

pandoc.org

171–180 of 213 posts

Re: Pandoc

#171
post #155

Earlier quoted context omitted.

Latex can't produce web output, which is increasingly a target I want. Also, Latex can't produce any output which is accessible to blind people (other than giving them the raw LaTeX). The PDFs latex produces are probably the least accessible format available (much worse than a word proeuced pdf, or some html). This matters to me, and should matter more to other people (in my opinion).

What about htlatex? It is quite powerful. In most of the cases, it produces nice HTML pages out of the box, with automatic rendering of figures and mathematical equations into PNG. It is part of most LaTeX distributions. On Linux, for example, just type $ htlatex mydoc.tex instead of $ pdflatex mydoc.tex

For me, at least, htlatex never works just quite right. There are a lot of edge cases where it's broken. If you want to preserve having non-PDF output, starting in something like Pandoc Markdown is a better idea. And I do most of my documents in regular LaTeX.

Re: Pandoc

#172
post #157

Earlier quoted context omitted.

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.

That’s interesting. Did you \usepackage[T1]{fontenc}?

Thanks paper is from 2003, so I'm not sure.

This is just an example. From experience, most PDFs at conferences and journals, generated from pdf, are not accessible to varying degrees.

Re: Pandoc

#173
post #170

Earlier quoted context omitted.

I get that request a lot, so I'll have to write something about it :) All I can offer right now is my raw notes, which are in Spanish. This is a structural analysis of Angels and Demons, The da Vinci Code, and The Lost Symbol: https://imgur.com/bX6ByJA This is an one-page treatment of the three books, with the "blanks" filled appropriately for each: https://imgur.com/LlDVUKn I doubt any of this is groundbreaking. Sto…

Very interesting! Could you maybe provide those links in text form, so that we may run them through Google Translate? ;-)

Sure, good idea - https://docs.google.com/spreadsheets/d/1HdlD_tmmm1D0zX1JgXzF...

Re: Pandoc

#174
post #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.

There's an unofficial Arch package for it: https://aur.archlinux.org/packages/pandoc-bin/

I wish I'd known about this sooner. I don't spend much time with text documents outside the web, but when I do, pandoc handles the disparate formats admirably. The only inconvenience is when I update my system, there's guaranteed to be a huge pile of Haskell libraries to download.

Re: Pandoc

#175
post #151

Occasional pandoc contributor here, AMA :-) Just a few links: - Where everything is documented: http://pandoc.org/MANUAL.html - If you have questions or suggestions: https://groups.google.com/forum/#!forum/pandoc-discuss - Contributing to pandoc is also a great way to get your feet wet with Haskell. In my experience, very supportive community. See http://pandoc.org/CONTRIBUTING.html and for good first issues: https:/…

everytime I see a project using google groups, i think it is already dead. Gladly yours seems to be used quite often. At least you can search it even years later, compared to an irc or slack channel.

Aren't mailing lists even older than IRC? Anyway, whatever works, right?

Re: Pandoc

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

Latex can't produce web output, which is increasingly a target I want. Also, Latex can't produce any output which is accessible to blind people (other than giving them the raw LaTeX). The PDFs latex produces are probably the least accessible format available (much worse than a word proeuced pdf, or some html). This matters to me, and should matter more to other people (in my opinion).

BUT that is what makes Pandoc powerful. You convert your latex or your whatever into: (Can we please add Racket's Scribble? It is by far the reason why Racket has the best documentation of any language. https://docs.racket-lang.org/scribble/)

Markdown, reStructuredText, textile, HTML, DocBook, LaTeX, MediaWiki markup, TWiki markup, TikiWiki markup, Creole 1.0, Vimwiki markup, OPML, Emacs Org-Mode, Emacs Muse, txt2tags, Microsoft Word docx, LibreOffice ODT, EPUB, or Haddock markup to

HTML formats

    XHTML, HTML5, and HTML slide shows using Slidy, reveal.js, Slideous, S5, or DZSlides
Word processor formats

    Microsoft Word docx, OpenOffice/LibreOffice ODT, OpenDocument XML, Microsoft PowerPoint.
Ebooks

    EPUB version 2 or 3, FictionBook2
Documentation formats

    DocBook version 4 or 5, TEI Simple, GNU TexInfo, Groff man, Groff ms, Haddock markup
Archival formats

    JATS
Page layout formats

    InDesign ICML
Outline formats

    OPML
TeX formats

    LaTeX, ConTeXt, LaTeX Beamer slides
PDF

    via pdflatex, xelatex, lualatex, pdfroff, wkhtml2pdf, prince, or weasyprint.
Lightweight markup formats

    Markdown (including CommonMark and GitHub-flavored Markdown), reStructuredText, AsciiDoc, Emacs Org-Mode, Emacs Muse, Textile, txt2tags, MediaWiki markup, DokuWiki markup, TikiWiki markup, TWiki markup, Vimwiki markup, and ZimWiki markup.
Custom formats

    custom writers can be written in lua.
https://pandoc.org/

Re: Pandoc

#177
I love pandoc, but I'm very surprised that such an established tool has (at time of writing) 865 points and is #1 on HN.

I guess it's not as well-known as I thought.

Re: Pandoc

#178

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 have to put in a word for Racket's Scribble. Programmiclly creating documents is powerful, and this system makes it simple. You can also basically use it as a "Markup-less" system.

Scribble Code Example:

#lang scribble/base

@title{On the Cookie-Eating Habits of Mice}

If you give a mouse a cookie, he's going to ask for a glass of milk.

@section{The Consequences of Milk}

That ``squeak'' was the mouse asking for milk. Let's suppose that you give him some in a big glass.

He's a small mouse. The glass is too big---way too big. So, he'll probably ask you for a straw. You might as well give it to him.

@section{Not the Last Straw}

For now, to handle the milk moustache, it's enough to give him a napkin. But it doesn't end there... oh, no.

Scribble -

Scribble is a collection of tools for creating prose documents—papers, books, library documentation, etc.—in HTML or PDF (via Latex) form. More generally, Scribble helps you write programs that are rich in textual content, whether the content is prose to be typeset or any other form of text to be generated programmatically. - https://docs.racket-lang.org/scribble/

Some languages based on Scribble

Skribilo -

Skribilo is a free document production tool that takes a structured document representation as its input and renders that document in a variety of output formats: HTML and Info for on-line browsing, and Lout and LaTeX for high-quality hard copies.

The input document can use Skribilo's markup language to provide information about the document's structure, which is similar to HTML or LaTeX and does not require expertise. Alternatively, it can use a simpler, “markup-less” format that borrows from Emacs' outline mode and from other conventions used in emails, Usenet and text. https://www.nongnu.org/skribilo/

Pollen -

Pollen is a publishing system built on top of Scribble and Racket. So far, I’ve optimized Pollen for web-based books, because that’s mainly what I use it for. But it can be used for small projects too, and non-webby things like PDF.

As a publishing system, Pollen includes:

    A programming language. The Pollen language is a variant of Scribble, with specific dialects tailored to different kinds of source files. You don’t need to use the programming features to do useful work, but they’re available when you need them.

    A set of tools & libraries. Pollen can produce output in any format, but it’s especially useful for markup-style formats like XML and HTML.

    A development environment. Pollen works with the DrRacket IDE. It also includes a project web server so you can dynamically preview and revise your publication. http://docs.racket-lang.org/pollen/Backstory.html

They are Domain Specific languages that excel at outputting awesome HTML and PDF. They really aren't markup but really they are a Macro system that is built on top of a full Lisp (Racket) It is easier and much more powerful then anything I have seen on Pandoc and Latex (I use Latex still for specific targets but not for general papers anymore).

Racket has the best documentation period and it is because the documentation

Re: Pandoc

#179
I "love" how many comments are one person praising pandoc for helping them in some workflow, and then commenters ripping into them for not using some other tool. I wonder if there's a corollary to some internet rule that the more generally useful a tool is, the more detractors will push for other tools to be used? It would help explain why programming language discussions get so contentious.

Pandoc is seriously a great tool! I love the way it's designed and have found it useful off and on over the years. Truly marvelous for making information available in any needed format.

Re: Pandoc

#180

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.

> if the publisher 'needs' a Word file, you are one click away from providing it Once the work has moved into a Word file, isn't that where it stays? Editors and publishers often make heavy use of features like track changes and notes . Doesn't pandoc lose that information?

pandoc has a --track-changes option, so you can convert a docx file with its proposed changes back to, say, markdown.
Post reply on HN