{"id":13790986,"url":"https://github.com/quarto-ext/latex-environment","last_synced_at":"2025-08-09T10:10:12.779Z","repository":{"id":46324409,"uuid":"508837075","full_name":"quarto-ext/latex-environment","owner":"quarto-ext","description":"Quarto extension to output custom LaTeX environments.","archived":false,"fork":false,"pushed_at":"2023-11-07T20:30:58.000Z","size":4195,"stargazers_count":34,"open_issues_count":8,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-12T20:54:03.232Z","etag":null,"topics":["quarto","quarto-extension"],"latest_commit_sha":null,"homepage":"https://quarto-ext.github.io/latex-environment/","language":"Lua","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/quarto-ext.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":"2022-06-29T20:30:29.000Z","updated_at":"2025-04-07T11:49:26.000Z","dependencies_parsed_at":"2023-01-22T15:30:41.409Z","dependency_job_id":"e66fea36-1d43-4b61-b1a4-40e5a5c0b683","html_url":"https://github.com/quarto-ext/latex-environment","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/quarto-ext/latex-environment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarto-ext%2Flatex-environment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarto-ext%2Flatex-environment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarto-ext%2Flatex-environment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarto-ext%2Flatex-environment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quarto-ext","download_url":"https://codeload.github.com/quarto-ext/latex-environment/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarto-ext%2Flatex-environment/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269562133,"owners_count":24438487,"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","status":"online","status_checked_at":"2025-08-09T02:00:10.424Z","response_time":111,"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":["quarto","quarto-extension"],"created_at":"2024-08-03T22:00:53.961Z","updated_at":"2025-08-09T10:10:12.687Z","avatar_url":"https://github.com/quarto-ext.png","language":"Lua","funding_links":[],"categories":["Extensions"],"sub_categories":[],"readme":"# latex-environment\n\n## Overview\n\nThis is Quarto extension that enables `divs` to be output as a custom environment in LaTeX. This is useful when you'd like to share content between LaTeX and other formats, but need the content to be placed in an environment when emitting LaTeX.\n\n## Installation\n\nTo install this extension in your current directory (or into the Quarto project that you're currently working in),  use the following command:\n\n```\nquarto add quarto-ext/latex-environment\n```\n\n## Usage\n\n### Environments\n\nDivs with a class name listed in the in the `environments` key will be emitted in LaTeX as an environment with the provided name (or the class name itself if no name is provided). All of the following are valid:\n\n```yaml\nenvironments: center\n```\n\n```yaml\nenvironments: [center]\n```\n\n```yaml\nenvironments:\n  center: center-env\n```\n\n#### Example\n\n```markdown\n---\ntitle: LaTeX Environment\nformat:\n   pdf: default\n   html: default\nfilters:\n   - latex-environment\nenvironments: [center]\n---\n\n::: {.center}\nThe contents of this div will be output in a `center`\nLaTeX environment, but will appear in HTML (and any other output \nformat as a simple div with the class `center`)\n:::\n```\n\n\n#### Options and Arguments\n\nIn addition, you may specify options and arguments for the environment as attributes of the div. For example:\n\n```markdown\n::: {.foo options=\"option\" arguments=\"argument\"}\nbody\n:::\n```\n\nwould transform to:\n\n```tex\n\\begin{foo}[option]{argument}\nbody\n\\end{foo}\n```\n\n\n### Commands\n\nSpans with a class name listed in the in the `commands` key will be emitted in LaTeX as a command with the provided name (or the class name itself if no name is provided). All of the following are valid:\n\n```yaml\ncommands: ce\n```\n\n```yaml\ncommands: [ce]\n```\n\n```yaml\ncommands:\n  ce: ce-command\n```\n\n#### Options\n\nYou may also provide options for commands using the `options` attribute. For example:\n\n```\n[Content]{.command options=\"option1\"}\n```\n\ngenerates the following:\n\n```\n\\command[option1]{Content}\n```\n\n\n## Example\n\n```markdown\n---\ntitle: LaTeX Command\nformat:\n   pdf:\n     include-in-header: \n       text: |\n         \\usepackage{mhchem}\n   html: default\nfilters:\n   - latex-environment\ncommands: [ce]\n---\n\nThis will replace spans of class `ce` with the `\\ce{}` command for LaTeX output, \nbut leave the spans intact for HTML output. So `[H2SO4]{.ce}` becomes [H2SO4]{.ce}.\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquarto-ext%2Flatex-environment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquarto-ext%2Flatex-environment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquarto-ext%2Flatex-environment/lists"}