Earlier quoted context omitted.
Codebraid[0] is another option for integrating code execution with Pandoc. I find myself using Quarto for building sites and Codebraid more for single documents. Both great tools building on Pandoc. -- [0]: https://codebraid.org/
Why do all these tools pretend that knitr / R Markdown never existed, and that they have invented some novel concept? I looked through the docs of Quarto, Jupytext, and now Codebraid, and none of them mention prior art. There's a long legacy here, it does nobody any good to disregard it. Maybe Knuth is well-acknowledged for his invention, but I think for instance Yihui Xie is a little under-recognized.
Pandoc
61–70 of 298 posts
Re: Pandoc
#62Earlier 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
We do the opposite of this - we write in markdown but sometimes need to get feedback in Google Docs. Pandoc doesn't convert to google docs so well, but it does to docx, so our pipeline is markdown -> pandoc -> docx -> upload to google doc -> share
Re: Pandoc
#63This 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]…
It is one of the most useful programs I use and the only useful program I ever used that was written in Haskell.
Never used Shellcheck?
Re: Pandoc
#64Has 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 it with my (closed source) software?
Re: Pandoc
#65The static site generator for my personal site is just it with a thin bash script wrapper: https://git.sr.ht/~kb/open-notes/tree/main/item/.build.sh.
So much simpler than pulling a universe of node modules.
Re: Pandoc
#66This 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]…
I also very much like Pandoc-markdown's ‘simple table’ syntax, because it's actually human-readable and human-writable without confusion and pain.
Re: Pandoc
#67Earlier 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…
We are the ones that have to suffer because people we are forced to collaborate with do not take 5 minutes out of their day to learn the basics of a tool they use professionally.
It is the equivalent of seeing somebody use right-click to copy-paste, except it tangibly makes my day worse.
Re: Pandoc
#68Re: Pandoc
#69A 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…
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 backend and Markdown in the frontend, based on my experiences with the edge cases (sometimes entirely solvable with a little Haskell or Lua).
Since LaTeX is the default for PDFs, it pays to keep that in mind and help LaTeX help you (you can use it inline with Markdown or included as preamble in configuration), but sometimes I've just had better luck converting via HTML to PDF ("-t html output.pdf" or directly chaining on from output.html) for what I'm writing in the moment, though other times I'm not stressing LaTeX as much and can just go straight from Markdown to PDF (for example, just writing up something with inline maths). I prefer to avoid LaTeX or HTML's escaped character encoding and often need far more than a single Latin font can provide, so I've ended up dealing with LaTeX's limitations here (even in lualatex and xelatex) more than what I'd suspect is typical. Meanwhile, the standard HTML to PDF backend uses Qt, and I've found it works for everything else I've needed when LaTeX isn't the right backend (and it does come up). On one occasion, I did have to switch that to weasyprint, and that was everything sorted. Alternative backends is an unsung power that few have, while pandoc not only has many built-in (or it is at least internally aware of) but will also integrate with any CLI needed.
Output to all three with HTML, EPUB, and PDF can just need a bit of fiddling before it comes out right, depending on how much you're willing to mess with specific metadata for each versus accepting the limits of what Pandoc can handle universally in its AST. Invariably, some compromise is required, but the core semantics of Markdown (including extensions) almost always translate without an issue. The dialect problem of Markdown is really just in the confluence of said semantics with things that have not been separately included, such as the lack of an actual header in Markdown (Pandoc here allows YAML for some, or you just fall back to HTML).
So, tldr; there's no "best" input format, except the one that you find most comfortable to just write the book in, but I find Pandoc is usually best approached from Markdown with the LaTeX or HTML backends. It's powerful and oh so very handy, but it's not going to do all the thinking for you, just a lot of the grunt work, same as any other tool. When in doubt, the user manual is quite readable, and I've found it answered almost every question I had. When it doesn't, other people do, and when they don't, it means I'm either going about it the wrong way or I get to solve an actual problem (but usually the former). But, as always, the most important thing is actually writing it, distribution comes later, so focus your efforts on that and the tools you need to do that effectively.
Re: Pandoc
#70Earlier 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…
Or maybe those people just have eyes which can spot the differences in spacing between documents created with different Word versions, the mediocre kerning, and a multitude of other typographical annoyances.
Even a website is easier to replicate exactly in another browser than a Word document to be replicated from scratch in a new version of Word. And if by some miracle you manage that, the end result will always look meh.