A Quarto Manuscript Template
This is a template for generating a repo for a Quarto project for a study that will include
- a study manuscript
- notebooks that display relevant calculations/code/analyses presented in the manuscript
- poster(s) based on the study
- slide set(s) for talks based on the study
It is based loosely off of a tutorial at: Quarto Manuscripts: RStudio but expanded to include linked posters and talks and with some customizations for our workflow and preferences.
We strongly recommend that you read the following pages from the Quarto website to better understand their manuscript format
If you plan to make slide sets, you can also read docs on making slides in quarto generally and more specifically with the revealjs format
- Go to the code tab for this repo
- Use the green
Use this template
drop down and selectcreate new repository
- Name this repository with a name selected for your paper
- Clone that new repository to your local computer
- Rename the RStudio project file
study_template.Rproj
to the same name that you used for your repo (i.e.,study_[insert_name]
.Rproj` - Begin working on your new manuscript!
- The main manuscript is saved as index.qmd.
- Additional quarto notebooks are saved in the /notebooks folder
- qmd files for posters are saved in individual folders within _presentations folder
- qmd files for slide sets for talks are saved in individual folders within _presentations
Github is a good choice to publish your manuscript and associated code from notebooks. Your code is already hosted there so why not keep the manuscript website there as well? There are three different methods available to publish there. We prefer the manual publish method. To use this method:
-
You need to make sure the repo is public. Go to Settings | Danger Zone and change visibility to public.
-
You need to configure GitHub to publish the website from the /root of the gh-pages branch. Go to Settings | Pages | Build and Deployment | Branch. Set Branch to
gh-pages
and folder to/root
and save these settings. [NOTE: if you started with our lab's template, this should already be configured for you] -
To publish the manuscript, go to the terminal at the root of the study project and type `quarto publish gh-pages.
-
The publishing process will occassionally fail to delete temporary folders and files. If this happens you should delete them manually. This may include
_manuscript
folderindex_files
folderindex.html
- You should commit and push any changes you made to index to qmd or your notebook qmd files. You should also commit and push any changes to the
_freeze
folder.
NOTE: John is working on a bash script that publishes index.qmd
and deletes these stray files. It works in Linux but may need bash manually installed to work in Windows. Not sure about Mac OS.
A Github repo can only have one website associated with it. If we are using the repo for the manuscript website, we need another location to publish slidesets from talks. We have been using Quarto Pub. You can publish there using quarto publish quarto-pub [filename.qmd]
from the folder that contains the qmd file for the talk. The first time you do this, you will need to verify your account and the page address. Follow the prompts. This info is saved in _publish.yml
so that you wont need to update it the next time you publish updates to your project.
More details are here
The apaish templates were copied into this project using this terminal command: quarto add mvuorre/quarto-apaish
.
- This allows for three pdf formats:
apaish-manuscript-typst
,apaish-document-typst
andapaish-journal-typst
. One of these formats can be specified in_quarto.yml
- See the github repo for more info.
A typst poster template was copied into the poster1 folder using this terminal command: quarto use template quarto-ext/typst-templates/poster