same code, different margins

Hello,
I have the exact same Rmd file, but I get a PDF with different margins depending on which computer I use to knit the PDF.
I traced down the problem to one line that is added to the tex file by one of the computers:

\usepackage[margin=1in]{geometry}

The other computer does not add this line to the tex file when knitting. I would like to homogenize the behavior across computers, but I don't know where this difference is coming from.
I reiterate that the Rmd file is identical. The difference comes exclusively from which computer is used to knit the PDF.
Any help is appreciated!
Thanks,
Claudia

If the Rmd file is identical, then the issue could be caused by differences in package versions, R versions, RStudio versions, etc..

What do you get when you run packageVersion("rmarkdown") on each of the computers?

Thanks!
Yes, I get different versions.
In the computer that adds the geometry line, the package version is 1.10.16, and in the other computer (that does not add the geometry line), the package version is 1.15.
I guess adding this line was default for the older version. I will update and check again. Thanks! Do you know if there is a way to see (and change?) the default header that rmarkdown will add to the tex file?

Could you post an image of which header you'd like to change?

Nothing in particular. I was just trying to find the function within rmarkdown where the line \usepackage[margin=1in]{geometry} was added so that I could manually remove this line from the code.
I could never find such function, nor any place where the default header was specified. So, I was just wondering if you knew where the default header was specified within rmarkdown. This is just out of curiosity.
BTW I get the same PDF now after updating rmarkdown.

1 Like

Ah, okay. It was raised as an issue on GitHub, so that might provide you with some answers.