eddelbuettel / pinp

Pinp Is Not PNAS -- Two-Column PDF Template
147 stars 25 forks source link

support multiple columns via easier pandoc notation #87

Closed eddelbuettel closed 3 years ago

eddelbuettel commented 3 years ago

Both @coatless and I already know and cherish (given that we talked about it in a different context) that pandoc lets us use multiple columns in a document using :::::: blocks with inner ::: blocks.

But only wizard @grantmcdermott knows how to do it in general or even in one document over html and pdf (giving the credit back to @yihui 's book).

As multi-column is really good for e.g. code snippets, I recently "borrowed" the css trick for a html vignette I tried (with a currently less widely-used markdown wrapper) but that hit the wall at CRAN over pandoc 2.0 lacking on Windoze so I converted it to pdf. Using this package.

Which was lacking the multi-column setup for LaTeX so I copied it into the document header, with an added \noindent. That is useful, so I will add this the package now and plan to let the PR sit there for a day or so.

grantmcdermott commented 3 years ago

Late seeing this, but everything LGTM.

(Quasi-related to the HTML to PDF printing: I have a longer-term goal of building a PNAS template for pagedown, but that's in the back of the queue with a bunch of other unrealised ideas!)

eddelbuettel commented 3 years ago

Go for it :)

I consider html rendering to be semi-random and html-to-pdf a fool's errand as I don't trust browsers. Make pdf files like the man himself intended. Related: https://twitter.com/keenanisalive/status/1309826322944978945

Update to pinp worked great when the (much) smaller and otherwise nice html vignette framework turned out to be "CRAN incomatible" as Uwe uses a pandoc.exe version from the very dark ages. Pdf has the very strong thing going for it that I can slurp it into a Sweave document and then not depend on anything that may change or break. And CI runs are quicker as there is not phantom bloat of Depends/Imports/LinkingTo/Suggests as you don't need rmarkdown and knitr.

Still a shame as the CSS I use for the mini html vignette was awesome for the purpose. Ah well.