We tend to write them in R markdown format. We make the html and/or pdf versions using either the "Knit to HTML"/"Knit to PDF" buttons in RStudio or using the following commands in R:
library(rmarkdown)
render("thedoc.Rmd",output_format=html_document())
render("thedoc.Rmd",output_format=pdf_document())
If you have a question that we haven't yet covered here, you can feel free to raise it in the Issues. First, however, you might check out the EGAP methods guides or Alex Coppock's guide to the R randomizr package and Don Green and Winston Lin's (standard operating procedures)[https://github.com/acoppock/Green-Lab-SOP]. Resources included are for reference purposes only, and do not reflect the views of or endorsement by the United States Government.