Skip to content

kolosovpetro/github-latex-template

Repository files navigation

GitHub LaTeX Template

Build PDF Build and Deploy PDF

LaTeX template for GitHub including general CI/CD actions and Mathematica templates.

GitHub Actions used

Build and run using PowerShell (Windows)

Build and run in Intellij IDEA (Windows)

How to use Mathematica package

  • Open the package file GithubLatexTemplateMathematicaPackage.m in Wolfram Mathematica, I use version 13.0
  • Execute the package using Shift+Enter
  • Open the notebook file GithubLatexTemplateMathematicaNotebook.nb
  • Execute the line: Needs["GithubLatexTemplateMathematicaPackage"]
  • Continue your work as desired

Configure CI / CD

  • Update root file name in build-pdf.yml and build-and-deploy-pdf.yml
  • Set repository secrets
    • GH_ACCESS_TOKEN: Generate GitHub Personal access token at Settings -> Developer Settings -> Personal access tokens -> Generate mew token

Actions and their trigger policy

  • build-pdf.yml builds project using TeXLive. Triggered on pull_request, push to develop branch
  • build-and-deploy-pdf.yml builds project using TeXLive and deploys to GitHub Pages. Triggered on push to main branch

Template example

Compiled document looks like as follows

template_example template_example