eddelbuettel / pinp

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

one_column doesn't always work #49

Closed bryanhanson closed 6 years ago

bryanhanson commented 6 years ago

I was trying to get a one column document, and while there are no errors reported, the pdf produced is empty (though the .tex is produced and can be processed separately, I don't understand enough to know why the result is empty).

I'm attaching a MWE that demonstrates this if you set one_column: true (attachment is .txt to satisfy Github; rename to .Rmd).

MWE.txt

I have pandoc 2.1.3 and other session info is below. I process via:

library("rmarkdown")
render("MWE.Rmd")

Thanks for this very nice package by the way, and any assistance.

> sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.4

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] MASS_7.3-49   rmarkdown_1.9

loaded via a namespace (and not attached):
 [1] compiler_3.4.4  backports_1.1.2 magrittr_1.5    rprojroot_1.3-2
 [5] tools_3.4.4     htmltools_0.3.6 yaml_2.1.18     tinytex_0.4    
 [9] Rcpp_0.12.16    pinp_0.0.4      stringi_1.1.7   knitr_1.20     
[13] stringr_1.3.0   digest_0.6.15   evaluate_0.10.1
eddelbuettel commented 6 years ago

If I enable one column mode then I may need to add more filler material to get all chunks to appear.

We have seen the same in two-column mode. I suspect that this is a "feature" of the pnas.cls trying to balance columns. I have no answer or solution.

image

eddelbuettel commented 6 years ago

The only cue I have, if there is there is one, is that you need the 'final' page you want to appear to be full. Or nearly full.

bryanhanson commented 6 years ago

OK, thanks. My original discovery of this issue was on a larger document, but still only about a half page worth of material, which is consistent with your thinking. Thanks again for looking at it.

eddelbuettel commented 6 years ago

We had odd issues at the end of larger documents too when we converted the Rcpp vignettes. The PNAS style seems fiddly :-/ Which is a pity as it is otherwise quite nice.