{"id":24516257,"url":"https://github.com/duckymomo20012/latex-template","last_synced_at":"2025-03-15T10:41:42.528Z","repository":{"id":273459744,"uuid":"919784172","full_name":"DuckyMomo20012/latex-template","owner":"DuckyMomo20012","description":"Latex template","archived":false,"fork":false,"pushed_at":"2025-03-11T13:34:39.000Z","size":949,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T13:42:12.063Z","etag":null,"topics":["dev-container","latex","latex-template"],"latest_commit_sha":null,"homepage":"","language":"TeX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DuckyMomo20012.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-01-21T02:19:54.000Z","updated_at":"2025-03-11T13:34:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"71c80aee-7584-4e08-9351-f140a53c8b77","html_url":"https://github.com/DuckyMomo20012/latex-template","commit_stats":null,"previous_names":["duckymomo20012/latex-template"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DuckyMomo20012%2Flatex-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DuckyMomo20012%2Flatex-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DuckyMomo20012%2Flatex-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DuckyMomo20012%2Flatex-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DuckyMomo20012","download_url":"https://codeload.github.com/DuckyMomo20012/latex-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243719373,"owners_count":20336596,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["dev-container","latex","latex-template"],"created_at":"2025-01-22T01:22:35.558Z","updated_at":"2025-03-15T10:41:42.522Z","avatar_url":"https://github.com/DuckyMomo20012.png","language":"TeX","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n  \u003cimg src=\"https://user-images.githubusercontent.com/64480713/219921672-be3ebe86-c8bf-409a-923d-bdfee746ea06.svg\" alt=\"logo\" width=\"200\" height=\"auto\" /\u003e\n  \u003ch1\u003eLatex template\u003c/h1\u003e\n\n  \u003cp\u003e\n    Latex template project\n  \u003c/p\u003e\n\n\u003c!-- Badges --\u003e\n\u003cp\u003e\n  \u003ca href=\"https://github.com/DuckyMomo20012/latex-template/graphs/contributors\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/contributors/DuckyMomo20012/latex-template\" alt=\"contributors\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/last-commit/DuckyMomo20012/latex-template/main\" alt=\"last update\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/DuckyMomo20012/latex-template/network/members\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/forks/DuckyMomo20012/latex-template\" alt=\"forks\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/DuckyMomo20012/latex-template/stargazers\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/DuckyMomo20012/latex-template\" alt=\"stars\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/DuckyMomo20012/latex-template/issues/\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/issues/DuckyMomo20012/latex-template\" alt=\"open issues\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/DuckyMomo20012/latex-template/blob/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/DuckyMomo20012/latex-template\" alt=\"license\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch4\u003e\n    \u003ca href=\"https://github.com/DuckyMomo20012/latex-template/\"\u003eView Demo\u003c/a\u003e\n  \u003cspan\u003e · \u003c/span\u003e\n    \u003ca href=\"https://github.com/DuckyMomo20012/latex-template\"\u003eDocumentation\u003c/a\u003e\n  \u003cspan\u003e · \u003c/span\u003e\n    \u003ca href=\"https://github.com/DuckyMomo20012/latex-template/issues/\"\u003eReport Bug\u003c/a\u003e\n  \u003cspan\u003e · \u003c/span\u003e\n    \u003ca href=\"https://github.com/DuckyMomo20012/latex-template/issues/\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/h4\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003c!-- Table of Contents --\u003e\n\n# :notebook_with_decorative_cover: Table of Contents\n\n- [Getting Started](#toolbox-getting-started)\n  - [Prerequisites](#bangbang-prerequisites)\n  - [Run Locally](#running-run-locally)\n- [Usage](#eyes-usage)\n  - [Makefile](#package-makefile)\n  - [Compile](#computer-compile)\n  - [Cleanup](#wastebasket-cleanup)\n  - [Format Code](#sparkles-format-code)\n  - [Remote Development](#whale-remote-development)\n- [FAQ](#grey_question-faq)\n- [Contact](#handshake-contact)\n- [Acknowledgements](#gem-acknowledgements)\n\n\u003c!-- Getting Started --\u003e\n\n## :toolbox: Getting Started\n\n\u003c!-- Prerequisites --\u003e\n\n### :bangbang: Prerequisites\n\nThis project requires the following prerequisites:\n\n- Local Development:\n\n  - make:\n\n  ```bash\n  sudo apt-get update\n\n  sudo apt-get -y install make\n  ```\n\n  - [TexLive](https://www.tug.org/texlive/): A TeX distribution for Linux,\n    macOS, and Windows. Required about ~5GB of disk space.\n\n- Remote Development (**recommended**):\n\n  - [Docker](https://www.docker.com/) installed locally:\n\n    ```bash\n    curl -fsSL https://get.docker.com -o get-docker.sh\n    sudo sh get-docker.sh\n    ```\n\n\u003c!-- Run Locally --\u003e\n\n### :running: Run Locally\n\nClone the project:\n\n```bash\ngit clone https://github.com/DuckyMomo20012/latex-template.git\n```\n\nGo to the project directory:\n\n```bash\ncd latex-template\n```\n\nCompile `all` targets:\n\n```bash\nmake all\n```\n\nCompile `main` (Bachelor thesis):\n\n```bash\nmake main\n```\n\nThe generated pdf file will be located at `dist/main.pdf`.\n\nCompile `proposal` (Thesis proposal):\n\n```bash\nmake proposal\n```\n\nThe generated pdf file will be located at `dist/proposal.pdf`.\n\n\u003c!-- Usage --\u003e\n\n## :eyes: Usage\n\n\u003c!-- Makefile --\u003e\n\n### :package: Makefile\n\nThere are two targets in the `Makefile`:\n\n- `main`: Compile the `main.tex` file, which is the **Bachelor thesis**.\n\n  - Usage:\n\n    ```bash\n    make main\n    ```\n\n- `proposal`: Compile the `proposal.tex` file, which is the **Thesis proposal**.\n\n  - Usage:\n\n    ```bash\n    make proposal\n    ```\n\n- `all`: Compile both `main` and `proposal` targets.\n\n  - Usage:\n\n    ```bash\n    make all\n    ```\n\n- `pretty`: Format the code using `latexindent`.\n\n  - Usage:\n\n    ```bash\n    make pretty\n    ```\n\n- `clean`: Remove the `dist` directory.\n\n  - Usage:\n\n    ```bash\n    make clean\n    ```\n\n\u003c!-- Compile --\u003e\n\n### :computer: Compile\n\nThe compilation process is described in the following steps:\n\n1. Clone the directory tree:\n\n   In the next step, we want to output the compiled files to the `dist`\n   directory, using the option `-output-directory`; however, the `pdflatex` may\n   write some auxiliary files to the dependency directories (required files by\n   the main latex file) and it **can't write without those directories created\n   in the `dist` directory**.\n\n2. Compile the `tex` file:\n\n   The `pdflatex` will compile the `tex` file and write the output to the `dist`\n   directory.\n\n   Compile order:\n\n   - `main.tex`: `pdflatex` -\u003e `bibtex` -\u003e `pdflatex` -\u003e `pdflatex`.\n   - `proposal.tex`: `pdflatex` -\u003e `bibtex` -\u003e `pdflatex` -\u003e `pdflatex`.\n\n   \u003e **Note**: The pdf files will be **generated with different checksums** on\n   \u003e each run.\n\n3. Clean up the directory tree:\n\n   Sometimes, the `tex` file doesn't have any dependencies, so the cloned\n   directory tree will have an empty directory. In this case, we should clean up\n   empty directories.\n\n\u003c!-- Cleanup --\u003e\n\n### :wastebasket: Cleanup\n\nClean up the `dist` directory:\n\n```bash\nmake clean\n```\n\n\u003c!-- Format Code --\u003e\n\n### :sparkles: Format Code\n\nThe tool `latexindent` is used to format the code, this\n[should be shipped with the `TeXLive` distribution](https://latexindentpl.readthedocs.io/en/latest/sec-how-to-use.html#how-to-use-the-script).\n\nTo format the code, run the following command:\n\n```bash\nmake pretty\n```\n\n- When running the command, the backup directory `dist/backup` will be created\n  to store the backup files.\n\n- All the `tex` files will be formatted.\n\n- The `latexindent` will be used to format the code:\n\n  - `cruft`: Backup directory stored in `dist/backup`.\n  - `local`: Configuration file defined in `latexindent.yaml`.\n  - `overwrite`: Overwrite the original file.\n  - `silent`: Silent mode.\n  - `modifylinebreaks`: Modify line breaks.\n\n- Or, you can run the full command:\n\n  ```bash\n  latexindent --local=./latexindent.yaml --cruft=./dist/backup --overwrite --silent --modifylinebreaks main.tex\n  ```\n\nRead more about `latexindent` in the\n[documentation](https://ctan.org/pkg/latexindent) or on\n[Read the Docs](https://latexindentpl.readthedocs.io/en/latest/).\n\n\u003c!-- Remote Development --\u003e\n\n### :whale: Remote Development\n\n#### Introduction\n\nThis is the **recommended** way to develop this project. Using Docker provides a\nconsistent environment for development, quick setup, and teardown. Moreover,\ndevelopers don't have to install the `TexLive` distribution on their local\nmachine, which is quite large.\n\nFor remote development, we can use the `Dev Container` feature of the `VS Code`,\nwhich will create a docker container for us and mount the project folder.\n\n#### Setup\n\nInstall the extension\n[`Dev Containers`](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)\nin the `VS Code`:\n\n```bash\ncode --install-extension ms-vscode-remote.remote-containers\n```\n\nAfter the installation, the extension will immediately detect the file\n`devcontainer.json` in the project root directory and prompt you to reopen the\nproject in a container.\n\n#### Configuration\n\nThe `devcontainer.json` file is used to configure the development container.\n\n\u003c!-- FAQ --\u003e\n\n## :grey_question: FAQ\n\n- Can I develop this project on Overleaf?\n\n  - Yes, you can. You can use it as an editor, but you still need to commit\n    those changes to the repository.\n\n  - You can find the `Overleaf` template here:\n    https://www.overleaf.com/read/jwrxbcrmkgfh. You can read more about the\n    template instructions\n    [here](https://www.fit.hcmus.edu.vn/vn/LinkClick.aspx?fileticket=uQfVVVLFuE0%3D\u0026tabid=1064\u0026mid=3747).\n\n- Can't remove the `dist` directory?\n\n  - If you develop this project in the container, hence the `dist` is created by\n    the container, you can't remove it without changing the owner of the `dist`.\n\n  - To remove the `dist` directory, you have to change the owner:\n\n    ```bash\n    sudo chown -R $USER:$USER dist\n    ```\n\n  - Then you can remove the `dist` directory:\n\n    ```bash\n    rm -rf dist\n    ```\n\n    Or you can use the `make` command:\n\n    ```bash\n    make clean\n    ```\n\n\u003c!-- Contact --\u003e\n\n## :handshake: Contact\n\nDuong Vinh - [@duckymomo20012](https://twitter.com/duckymomo20012) -\ntienvinh.duong4@gmail.com\n\nProject Link:\n[https://github.com/DuckyMomo20012/latex-template](https://github.com/DuckyMomo20012/latex-template).\n\n\u003c!-- Acknowledgments --\u003e\n\n## :gem: Acknowledgements\n\nHere are useful resources and libraries that we have used in our projects:\n\n- [Development Containers](https://containers.dev/): An open specification for\n  enriching containers with development specific content and settings.\n- [TexLive](https://www.tug.org/texlive/): A comprehensive TeX system including\n  all the major TeX-related programs, macro packages, and fonts that are free\n  software.\n- [latexindent](https://github.com/cmhughes/latexindent.pl): latexindent.pl is a\n  perl script to beautify/tidy/format/indent (add horizontal leading space to)\n  code within environments, commands, after headings and within special code\n  blocks.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduckymomo20012%2Flatex-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduckymomo20012%2Flatex-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduckymomo20012%2Flatex-template/lists"}