{"id":22550945,"url":"https://github.com/yunusey/latextemplate","last_synced_at":"2026-02-18T09:01:56.908Z","repository":{"id":266935413,"uuid":"876907826","full_name":"yunusey/LaTeXTemplate","owner":"yunusey","description":"A clean and convenient LaTeX template powered by GitHub Actions for automated builds and Nix for dependency management.","archived":false,"fork":false,"pushed_at":"2025-11-29T02:41:33.000Z","size":1208,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-01T03:39:50.045Z","etag":null,"topics":["automation","github-actions","latex","latex-template","nix","nix-flake","python","tex"],"latest_commit_sha":null,"homepage":"","language":"TeX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yunusey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-22T18:50:14.000Z","updated_at":"2025-11-29T02:38:21.000Z","dependencies_parsed_at":"2024-12-07T05:29:47.652Z","dependency_job_id":null,"html_url":"https://github.com/yunusey/LaTeXTemplate","commit_stats":null,"previous_names":["yunusey/latextemplate"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/yunusey/LaTeXTemplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunusey%2FLaTeXTemplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunusey%2FLaTeXTemplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunusey%2FLaTeXTemplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunusey%2FLaTeXTemplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yunusey","download_url":"https://codeload.github.com/yunusey/LaTeXTemplate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunusey%2FLaTeXTemplate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29574065,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T08:38:15.585Z","status":"ssl_error","status_checked_at":"2026-02-18T08:38:14.917Z","response_time":162,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","github-actions","latex","latex-template","nix","nix-flake","python","tex"],"created_at":"2024-12-07T17:09:07.207Z","updated_at":"2026-02-18T09:01:56.902Z","avatar_url":"https://github.com/yunusey.png","language":"TeX","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e LaTeX Template ✨ \u003c/h1\u003e\n\u003cdiv align=\"center\" border-radius=\"20px\"\u003e\n    \u003cimg src=\"./assets/latex-template-logo.png\" width=\"200\" height=\"200\" /\u003e\n\u003c/div\u003e\n\n*A clean and convenient LaTeX template powered by GitHub Actions for automated builds and Nix for dependency management.*\n\n## Showcase 📸\nYou can see the compiled versions of the PDFs in the [artifacts](https://github.com/yunusey/latextemplate/blob/artifacts) branch:\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\" width=\"50%\"\u003e\n\u003ca href=\"https://github.com/yunusey/latextemplate/blob/artifacts/Example/Example%20AcademicLight.pdf\"\u003eAcademicLight\u003c/a\u003e\u003cbr\u003e\n\u003cimg src=\"./assets/Example%20AcademicLight%20Preview.png\" width=\"100%\" alt=\"AcademicLight Theme Preview\"\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"50%\"\u003e\n\u003ca href=\"https://github.com/yunusey/latextemplate/blob/artifacts/Example/Example%20CatppuccinMocha.pdf\"\u003eCatppuccinMocha\u003c/a\u003e\u003cbr\u003e\n\u003cimg src=\"./assets/Example%20CatppuccinMocha%20Preview.png\" width=\"100%\" alt=\"CatppuccinMocha Theme Preview\"\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\" width=\"50%\"\u003e\n\u003ca href=\"https://github.com/yunusey/latextemplate/blob/artifacts/Example/Example%20GruvboxDark.pdf\"\u003eGruvboxDark\u003c/a\u003e\u003cbr\u003e\n\u003cimg src=\"./assets/Example%20GruvboxDark%20Preview.png\" width=\"100%\" alt=\"GruvboxDark Theme Preview\"\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"50%\"\u003e\n\u003ca href=\"https://github.com/yunusey/latextemplate/blob/artifacts/Example/Example%20SolarizedLight.pdf\"\u003eSolarizedLight\u003c/a\u003e\u003cbr\u003e\n\u003cimg src=\"./assets/Example%20SolarizedLight%20Preview.png\" width=\"100%\" alt=\"SolarizedLight Theme Preview\"\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\n## Usage\n\nYou can simply fork this repository and start writing. If you're a student like me and write your assignments in $\\LaTeX$, you can create a folder in the project root (e.g., `./MyClass`), copy the template:\n\n```bash\ncp ./Template/template.tex ./MyClass/MyAssignment.tex\n```\n\nThen start writing! Once you commit and push your changes, GitHub Actions will automatically build your project. When the build finishes, you’ll find the generated PDFs either as downloadable artifacts or directly in the `artifacts` branch.\n\n## Why Automated Builds?\n\nI often revisit my assignments or notes from my phone or another device. With this setup, every change triggers a GitHub Actions workflow that compiles my LaTeX files and pushes the results to the `artifacts` branch. This means I always have an up-to-date PDF available---anywhere, anytime.\n\n## Why Nix?\n\nAs a NixOS user, I rely heavily on the Nix package manager, and it handles LaTeX dependencies beautifully. It also gives me full control over which packages my project uses, making debugging or extending my setup much easier. However, you don't need to be on NixOS to use this template; Nix works on various Linux distributions and macOS.\n\n## Themes\n\nThis template supports custom themes! Check out [`./Modules/theme.tex`](./Modules/theme.tex) for some pre-defined schemes. You can define your own color scheme(s) there.\n\nIn [`./Modules/preamble.tex`](./Modules/preamble.tex#L26-L36), LaTeX checks the `TBOX_THEME` environment variable or any theme you manually override in your document via:\n\n```tex\n\\newcommand{\\theme}{GruvboxDarkTheme}\n```\n\nIn other words, if you specify a `theme` using `\\newcommand`, **it will override the theme for that specific document only**. To make a global change, set the `TBOX_THEME` environment variable or, even better if you are using Nix, change the `default_tbox_theme` in your `flake.nix` file.\n\n\u003e [!WARN]\n\u003e Currently, my template is limited on syntax highlighting themes. Catppuccin has a very nice package for syntax highlighting in LaTeX (you can check their [GitHub repo](https://github.com/catppuccin/latex) for more info--the package name on CTan is [`catppuccinpalette`](https://ctan.org/pkg/catppuccinpalette)), but it is not easily extensible to other themes. So, for now, if you have a dark theme (i.e., `GruvboxDarkTheme`, `CatppuccinMochaTheme`), the syntax highlighting will use Catppuccin's `mocha` flavor. For light themes (i.e., `AcademicLightTheme`, `SolarizedLightTheme`), it will use Catppuccin's `latte` flavor. I wouldn't argue that this is the best way, but it works and it isn't particularly ugly either.\n\u003e *In each theme's preview PDF, there is a code block demonstrating the syntax highlighting if you would like to check for more information.*\n\n\n**Build commands:**\n\n```bash\nnix build .#academic-light-theme-documents\nnix build .#catppuccin-mocha-theme-documents\nnix build .#gruvbox-dark-theme-documents\nnix build .#solarized-light-theme-documents\n\n# Or build the default theme (specified in flake.nix--`AcademicLight` by default)\nnix build .\n```\n\n## Adding New Fonts\n\nTo include additional fonts, open your `flake.nix` and locate:\n\n```nix\nos_font_dir = with pkgs; \"\";\n```\n\nSuppose you want to use **Fira Code**. Find it on [NixOS Search](https://search.nixos.org). Its package is `fira-code`, and its fonts live under `$out/share/fonts/truetype`. Update the line to:\n\n```nix\nos_font_dir = with pkgs; \"${fira-code}/share/fonts/truetype\";\n```\n\nThen, in [`./Modules/fonts.tex`](./Modules/fonts.tex), declare it via `fontspec`:\n\n```tex\n\\newfontfamily{\\firacode}{FiraCode-VF}[\n    Extension=.ttf,\n    Ligatures=TeX,\n    Scale=0.9\n]\n```\n\nNow you can use it like:\n\n```tex\n\\begin{myenvironment}\n{\n    \\firacode\n    This is my code with Fira Code!\n}\n\\end{myenvironment}\n```\n\nLocal fonts also work---just ensure they’re included in your `$OSFONTDIR` and loaded with `fontspec`.\n\n\n## Adding New Packages\n\nIf a package exists in TeXLive, simply find it on [NixOS Search](https://search.nixos.org) and add it to your flake:\n\n```nix\ntex = pkgs.texlive.combine {\n  inherit (pkgs.texlive) scheme-medium latexmk ... my-awesome-package;\n};\n```\n\n\n## What If a Package Isn’t in TeXLive?\n\nUse the `./packages` folder (feel free to rename it, e.g., `./styles`) and drop any `.sty` files there.\n\nIf you have additional directories elsewhere, you can manually extend `$TEXINPUTS` (see [`flake.nix`](./flake.nix#L87)). By default:\n\n```\nTEXINPUTS=./packages\n```\n\nSo anything in that folder will be picked up automatically.\n\n\n## How I Use It\n\nCheck out an example note in [`./Example/Example.tex`](./Example/Example.tex) and its compiled version [here](https://github.com/yunusey/latextemplate/blob/artifacts/Example/Example.pdf).\n\nMy LaTeX workflow:\n\n* IDE/PDE: [Neovim](https://neovim.io/)\n* PDF Viewer: [Zathura](https://github.com/pwmt/zathura)\n* LSP: [TexLab](https://github.com/latex-lsp/texlab)\n* Main LaTeX Plugin: [VimTex](https://github.com/lervag/vimtex)\n* Snippets: [LuaSnip](https://github.com/L3MON4D3/LuaSnip)\n\nMy dotfiles are private (they... need work :D), but these folks have excellent setups and guides:\n\n* [ejmastnak](https://github.com/ejmastnak)\n* [seniormars](https://github.com/seniormars/dotfiles)\n\nIn particular, [A guide to supercharged mathematical typesetting](https://ejmastnak.com/tutorials/vim-latex/intro/) is outstanding.\n\n## Development Environment\n\nStart a development shell with:\n\n```bash\nnix develop\n```\n\nIf you use [direnv](https://github.com/direnv/direnv):\n\n```bash\ndirenv allow\n```\n\nYou’ll then automatically enter the devshell whenever you `cd` into this project.\n\n\n## Quick Note on Formatting\n\nThe root folder includes an `indentconfig.yaml` for `latexindent`. Use it like:\n\n```bash\nlatexindent --local ./indentconfig.yaml -wd ./Template/template.tex -c /tmp\n```\n\nIf you use TexLab, you can configure it to use this file:\n\n```lua\nrequire('lspconfig').texlab.setup {\n    on_attach = on_attach,\n    capabilities = capabilities,\n    filetypes = { \"tex\", \"plaintex\", \"bib\" },\n    cmd = { \"texlab\", \"-vvvv\" },\n    settings = {\n        texlab = {\n            latexindent = {\n                ['local'] = vim.fn.getcwd() .. '/indentconfig.yaml',\n            }\n        }\n    }\n}\n```\n\nYou can customize your `indentconfig.yaml` that fits your needs the best. Check out their [documentation](https://latexindentpl.readthedocs.io/en/latest/). It is very detailed.\n\n## Features\n- [x] Dependency management using Nix\n- [x] Automated builds using GitHub Actions\n    + [x] Automatically generated table of contents as your README in `artifacts` branch (see [artifacts](https://github.com/yunusey/latextemplate/blob/artifacts/README.md) branch as an example).\n    + [x] Downloadable artifacts\n- [ ] Caching for faster builds using [Cachix](https://cachix.org)\n\n## References\n- [GitHub Actions](https://github.com/features/actions)\n    + [git-publish-subdir-action](https://github.com/s0/git-publish-subdir-action)\n    + [install-nix-action](https://github.com/cachix/install-nix-action)\n- [Nix](https://nixos.org)\n- [Nixpkgs](https://github.com/NixOS/nixpkgs)\n- [Cachix](https://cachix.org)\n- [ejmastnak](https://github.com/ejmastnak)\n- [seniormars](https://github.com/seniormars)\n- [latexindent.pl](https://github.com/cmhughes/latexindent.pl)\n\n## Reading List\n- [Exploring Nix Flakes: Build LaTeX Documents Reproducibly](https://flyx.org/nix-flakes-latex/)\n- [A guide to supercharged mathematical typesetting](https://ejmastnak.com/tutorials/vim-latex/intro/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyunusey%2Flatextemplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyunusey%2Flatextemplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyunusey%2Flatextemplate/lists"}