{"id":50464579,"url":"https://github.com/andrader/usp-thesis-typst-template","last_synced_at":"2026-06-01T06:32:49.198Z","repository":{"id":355883102,"uuid":"1229875899","full_name":"andrader/usp-thesis-typst-template","owner":"andrader","description":"A comprehensive, extensible Typst template for theses and dissertations at the University of São Paulo (USP), following the official guidelines (5th edition, 2024).","archived":false,"fork":false,"pushed_at":"2026-05-05T16:44:54.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-05T18:30:26.284Z","etag":null,"topics":["typst","typst-community","typst-package","typst-template"],"latest_commit_sha":null,"homepage":"","language":"Typst","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/andrader.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-05T13:17:14.000Z","updated_at":"2026-05-05T16:44:03.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/andrader/usp-thesis-typst-template","commit_stats":null,"previous_names":["andrader/usp-thesis-typst-template"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/andrader/usp-thesis-typst-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrader%2Fusp-thesis-typst-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrader%2Fusp-thesis-typst-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrader%2Fusp-thesis-typst-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrader%2Fusp-thesis-typst-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrader","download_url":"https://codeload.github.com/andrader/usp-thesis-typst-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrader%2Fusp-thesis-typst-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33763649,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["typst","typst-community","typst-package","typst-template"],"created_at":"2026-06-01T06:32:48.284Z","updated_at":"2026-06-01T06:32:49.190Z","avatar_url":"https://github.com/andrader.png","language":"Typst","funding_links":[],"categories":[],"sub_categories":[],"readme":"# USP Thesis Typst Template\n\nA comprehensive, extensible Typst template for theses and dissertations at the University of São Paulo (USP) and specifically the Institute of Mathematics and Statistics (IMEUSP), following the official guidelines (5th edition, 2024).\n\nExample output PDF generated with this template: [usp-example.pdf](examples/usp-example.pdf)\n\n## Features\n- **Official Layout**: Correct margins (3cm/2cm), A4 size, and 1.5 line spacing.\n- **Automated Elements**: Generates Cover, Title Page, Approval Sheet, and Abstracts.\n- **IMEUSP Support**: Specific branding and \"Standard Statement\" for the Institute of Mathematics and Statistics.\n- **Extensible**: Easily adaptable to other USP institutes.\n- **Pre-textual Elements**: Support for Dedication, Acknowledgments, and Epigraph.\n\n## Table of Contents\n- [USP Thesis Typst Template](#usp-thesis-typst-template)\n  - [Features](#features)\n  - [Table of Contents](#table-of-contents)\n  - [Prerequisites](#prerequisites)\n  - [Install the Template Package](#install-the-template-package)\n    - [MacOS](#macos)\n    - [Linux](#linux)\n    - [Windows](#windows)\n  - [Initialize a new project](#initialize-a-new-project)\n  - [Example Usage](#example-usage)\n  - [Configuration Options](#configuration-options)\n  - [Future Extensions](#future-extensions)\n  - [Development and Testing](#development-and-testing)\n  - [License](#license)\n\n## Prerequisites\n\n- [Typst Compiler](https://typst.app/): Typst is a modern, faster, and more intuitive typesetting alternative to LaTeX, featuring cleaner syntax and instant compilation, making it ideal for new projects. \n\n  \u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e[Click to expand] How to install Typst ⚙️\u003c/b\u003e\u003c/summary\u003e\n\n    ### MacOS\n\n    Open Terminal and run:\n\n    ```bash\n    brew install typst\n    ```\n\n    ### Linux\n\n    Open Terminal and run:\n\n    ```bash\n    # For Debian/Ubuntu-based distributions\n    sudo apt install typst\n    # For Fedora-based distributions\n    sudo dnf install typst\n    # Snap\n    sudo snap install typst\n    ```\n\n    ### Windows\n\n    Open PowerShell and run:\n\n    ```powershell\n    winget install typst\n    ```\n\n  \u003c/details\u003e\n\n\n\n\n## Install the Template Package\n\n### MacOS\n\n```bash\n# Clone the repository at the correct location for local Typst packages\ngit clone https://github.com/andrader/usp-thesis-typst-template ~/Library/Application\\ Support/typst/packages/local/usp-thesis/0.1.0/\n```\n\n### Linux\n\n```bash\n# Clone the repository at the correct location for local Typst packages\ngit clone https://github.com/andrader/usp-thesis-typst-template ~/.local/share/typst/packages/local/usp-thesis/0.1.0/\n```\n\n### Windows\n\n```powershell\n# Clone the repository at the correct location for local Typst packages\ngit clone https://github.com/andrader/usp-thesis-typst-template $env:APPDATA\\typst\\packages\\local\\usp-thesis\\0.1.0\n```\n\n## Initialize a new project\n\nIn your Typst project, on your terminal initialize the template with:\n\n```bash\ntypst init @local/usp-thesis:0.1.0\n```\n\nThen, you can generate the PDF with:\n\n```bash\ncd usp-thesis\ntypst compile main.typ\n```\n\nTo watch for changes and recompile automatically:\n\n```bash\ntypst watch main.typ\n```\n\n## Example Usage\n\n```typst\n#import \"@local/usp-thesis:0.1.0\": usp-thesis\n\n#show: usp-thesis.with(\n  title: [Your Thesis Title],\n  author: \"Your Name\",\n  advisor: \"Advisor's Name\",\n  institute: \"Instituto de Matemática e Estatística\",\n  program: \"Probability and Statistics\",\n  degree: \"Mestre\", // or \"Doutor\"\n  abstract-pt: [ ... ],\n  keywords-pt: (\"Keyword1\", \"Keyword2\"),\n  abstract-en: [ ... ],\n  keywords-en: (\"Keyword1\", \"Keyword2\"),\n  banca: (\n    (nome: \"Examiner 1\", instituicao: \"USP\"),\n    (nome: \"Examiner 2\", instituicao: \"Unicamp\"),\n  ),\n)\n\n= Introduction\nYour content starts here...\n```\n\n## Configuration Options\n\nThe `usp-thesis` function accepts the following parameters:\n\n| Parameter | Type | Description |\n| :--- | :--- | :--- |\n| `title` | content | The main title of the work. |\n| `subtitle` | content | Optional subtitle. |\n| `author` | string | Full name of the author. |\n| `advisor` | string | Full name of the supervisor. |\n| `institute` | string | Full name of the USP institute. |\n| `degree` | string | \"Mestre\" or \"Doutor\". |\n| `program` | string | Name of the graduate program. |\n| `version` | string | \"Original\" or \"Corrigida\" (Default: \"Original\"). |\n| `banca` | array | List of dictionaries `(nome: \"\", instituicao: \"\")` for the jury. |\n| `list-of-figures` | bool / auto | Whether to include the list of figures (auto: show if \u003e= 5). |\n| `list-of-tables` | bool / auto | Whether to include the list of tables (auto: show if \u003e= 5). |\n| `abstract-pt` | content | Abstract in Portuguese. |\n| `abstract-en` | content | Abstract in English. |\n\n## Future Extensions\n\nTo add support for a new institute with a specific \"Nature Text\", modify the logic in `src/lib.typ`:\n\n```typst\nlet nature-text = if institute.contains(\"Your Institute\") {\n  \"Specific Statement for your Institute\"\n} else {\n  // default ABNT/USP statement\n}\n```\n\n## Development and Testing\n\nTo install this Typst package locally for development or testing, create symlinks as follows (macOS example):\n\n```sh\n# Create the necessary directories if they don't exist\nmkdir -p ~/Library/Application\\ Support/typst/packages/local/usp-thesis/\n# Create a symbolic link to the current directory\nln -sfn $PWD ~/Library/Application\\ Support/typst/packages/local/usp-thesis/0.1.0\n# Verify the files are correctly linked\nls -l ~/Library/Application\\ Support/typst/packages/local/usp-thesis/0.1.0\n```\n\n\n\n\nThen, in your Typst files, import the package with:\n\n```typst\n#import \"@local/usp-thesis:0.1.0\": *\n```\n\n---\n\nYou can store packages in {data-dir}/typst/packages/{namespace}/{name}/{version} to make them available locally on your system. Here, {data-dir} is\n\n- $XDG_DATA_HOME or ~/.local/share on Linux\n- ~/Library/Application Support on macOS\n- %APPDATA% on Windows\n\nYou may also run typst info and check Package path for the actual path. \nThis would be helpful if you have installed the Typst compiler from Snap or are using special environment variables.\n\n\n\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrader%2Fusp-thesis-typst-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrader%2Fusp-thesis-typst-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrader%2Fusp-thesis-typst-template/lists"}