This gist demonstrates how to prepare CMS TDR documents to work on Overleaf.
All of the following files should be copied to the root directory of your project:
build.sh
: Compiles the document once and saves a tex document (and the current pdf) to a new directory, named "overleaf" by default, which can be used as a root document on Overleaf. Please note that changes to this document get lost once this build script is executed again.build_docker.sh
: Executes the build script in a docker container using the official tdr build image.latexmkrc
: Tells the LaTeX compiler on Overleaf where to find the tdr tool.
Both build.sh
and build_docker.sh
have the same arguments:
./build.sh [PROJECT_NAME] [BUILD_DIR]
./build_docker.sh [PROJECT_NAME] [BUILD_DIR]
PROJECT_NAME: The name of the document, e.g. "AN-21-017". When empty,
the name of the project directory is used.
BUILD_DIR : The name of the build directory. Defaults to "overleaf".