MikTeX
packages: MikTeX Console -> Updates -> Check for updates
;Intellij IDEA
for SumatraPDF: Tools -> LaTeX -> Configure Inverse Search
, whichCreate in root folder a new folder with the name of the subproject;
Go to settings.gradle.kts and add the new subproject with:
include(":subproject-name")
Compile and build pdf, resolving any bibliographic references, with the Gradle task buildPdf
using the Gradle Panel
or the following command in the terminal:
./gradlew :subproject-name:buildPdf
[Optional] Configure alternative names for the subproject directories and the main tex file in
the build.gradle.kts
file:
Create a build.gradle.kts
file in the subproject directory;
Add the following code:
ext.set("variable", "value")
Variable | Default value | Description |
---|---|---|
srcDirName |
src |
name of the tex source file's directory |
outDirName |
out |
name of the output directory, where the pdf file will be generated to |
auxDirName |
auxil |
name of the auxiliary directory, where the auxiliary files will be generated to |
mainTexFileName |
main |
name of the main tex file |
useBibtex |
true |
use bibtex to resolve bibliography references |
[Optional] If no changes are made to the bibliography references in development, it is possible to speed up the
compilation process by using IDEA's run configuration in the <main>.tex
file instead of the Gradle task buildPdf
,
as the latter has more compile iterations to resolve the bibliography references.
Edit Run Configuration |
Shift + F10
or the gutter icon Run
.[!IMPORTANT] It is advised to not delete the generated auxiliary files as they can be used in subsequent compilations to speed up the process.
To compile and build all pdfs in all subprojects, use the Gradle task buildAllPdfs
which can be found in the Gradle
Panel or by running the following command in the terminal:
./gradlew buildAllPdfs
A workflow using github actions is set up
to automatically compile
and build all pdfs in all subprojects when a push
is made to the repository in the main
branch or from
a pull request
.