Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport non US-letter paper #24
Comments
|
I can try to help out as I have a printer with a4. I had a quick look at the code and see that the paper size is defined in the
I assumed that intent to make the paper size selection via the yaml header meaning that the |
|
Thanks for offering to help! If you know a little bit R, you should be able to follow the (sometimes a little byzantine) path from something declared in the YAML header, to possibly being processed by R, to eventually being used as variables in the template.tex (or class file). You can look at one or two of the other variables in the YAML header and see what happens. If should be possible to set it in YAML, and then maybe have it called in template overriding the existing setting in pinp.cls. |
|
@saghirb See https://stackoverflow.com/a/50763865/8416610 for further pointers how other templates handle this. |
|
Or in pinp itself, the first line of template.tex is full of if/else:
Some values get intermediated by rmarkdown / boodown R code. I find that a little cleaner than R's direct setting. |
|
Thanks @rstub & @eddelbuettel . I've implemented something based on what you both wrote. Now Any valid paper name can be used but there is an issue with the page layouts as they still are based on I think that a quick fix could be to define I have not sent a pull request (I can do should you wish) but you can see the changes that I have made at my fork repository: Any comments, suggestions or pointers? |
|
I'm lost, what are you trying to say with that StackOverflow link? That is just a question, ie conjecture, with a downvoted answer. Having a boolean which can select usletter (default) and a4paper is better than just usletter. |
|
I would prefer
over
in the YAML headers, just like it is with the standard template. In the template that would mean:
I have also removed the Concerning layout a first step would be to make them relative to the selected papersize, i.e.:
For |
|
@eddelbuettel sorry I missed the downvote (force of habit of filtering out likes, etc which I should not do on SO). |
|
@rstub thanks for your comment. Indeed it I should be working with "relative" layout values. You can set:
The My forked version is up to date. I will issues a pull request. The |
|
Yes, I gave found the PR looks good too at a first glance. |
|
I think the A4 layout looks fine. Concerning the placement of |
|
Fixed in #54 |
|
@rstub Yes that is what I tried first (and just double checked) and the layout reverts to letter paper setting. I followed it up further and opted for this "quicker" fix. I would prefer it to be part of |
PNAS being the Academy of the US, the layout assumes 8.5in by 11in paper. Which is not the standard in the rest of the world.
The code uses the very powerful LaTeX package
geometryso there is no reason why a switch could not be added to support, say,a4paper size. But someone with access to a printer with a4 needs to drive this.