{"id":13475327,"url":"https://github.com/st--/annotate-equations","last_synced_at":"2025-04-08T09:11:58.753Z","repository":{"id":45171502,"uuid":"456917746","full_name":"st--/annotate-equations","owner":"st--","description":"LaTeX package and annotated examples for annotating equations using TikZ.","archived":false,"fork":false,"pushed_at":"2024-10-09T15:24:31.000Z","size":972,"stargazers_count":511,"open_issues_count":8,"forks_count":22,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-01T08:42:39.874Z","etag":null,"topics":["annotations","equations","latex"],"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/st--.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-02-08T12:12:19.000Z","updated_at":"2025-03-30T02:48:59.000Z","dependencies_parsed_at":"2024-01-15T19:44:29.204Z","dependency_job_id":"64dd3467-31f2-4732-9e34-3294f846d219","html_url":"https://github.com/st--/annotate-equations","commit_stats":{"total_commits":62,"total_committers":2,"mean_commits":31.0,"dds":"0.016129032258064502","last_synced_commit":"ff0d770b55d53142613b8001c21c7ed9b8361edc"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st--%2Fannotate-equations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st--%2Fannotate-equations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st--%2Fannotate-equations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st--%2Fannotate-equations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/st--","download_url":"https://codeload.github.com/st--/annotate-equations/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247809964,"owners_count":20999816,"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":["annotations","equations","latex"],"created_at":"2024-07-31T16:01:19.440Z","updated_at":"2025-04-08T09:11:58.706Z","avatar_url":"https://github.com/st--.png","language":"TeX","readme":"# Annotate equations in LaTeX using TikZ\n\n( [Documentation](annotate-equations.pdf) | License: [MIT](LICENSE) | [CTAN](https://ctan.org/pkg/annotate-equations) )\n\nThis package provides commands that make it easy to highlight terms in equations \u0026 add annotation labels (based on TikZ).\nTested with pdflatex and lualatex, but should work with most other LaTeX engines such as xelatex as well.\n\nInspired by Sibin Mohan's https://github.com/synercys/annotated_latex_equations/\n\nPlease report any bugs, issues, contribute changes \u0026 improvements on https://github.com/st--/annotate-equations/ :)\n\nPackage author: ST John, http://www.infinitecuriosity.org/\n\n\n## A package with reusable commands\n\n![rendering of annotated equation](examples/example_annotation_package.png)\n\nUsing [`annotate-equations.sty`](https://github.com/st--/annotate-equations/blob/main/annotate-equations.sty), an equation can easily be annotated as follows:\n```latex\n\\begin{equation*}\n    \\mathcal{O}\\big(\n        (\n        \\eqnmarkbox[NavyBlue]{p1}{p}\n        \\eqnmarkbox[OliveGreen]{k1}{\\kappa}^3  % note that we have the ^3 outside the \\eqnmark/\\tikzmarknode arguments\n        )\n        \\eqnmarkbox[WildStrawberry]{T1}{T}\n        +\n        (\n        \\eqnmarkbox[NavyBlue]{p2}{p}  % tikz nodes need distinct names!\n        \\eqnmark[OliveGreen]{k2}{\\kappa}\n        )\n        (\n        \\eqnmarkbox[WildStrawberry]{T2}{T}^2\n        \\tikzmarknode{Is}{|\\mathcal{I}^*|}  % manual \\tikzmarknode works, too\n        \\eqnmarkbox[Plum]{Nb}{N_b}\n        \\eqnmark[RoyalPurple]{M}{M}\n        )\n    \\big)\n\\end{equation*}\n\\annotatetwo[yshift=1em]{above}{p1}{p2}{\\# of nodes}\n\\annotatetwo[yshift=-1em,xshift=0.2ex]{below}{T1}{T2}{\\# of graphs in $\\hat{\\mathcal{G}}_T$}\n\\annotatetwo[yshift=-2em]{below}{k1}{k2}{max.\\ indegree in $\\hat{\\mathcal{G}}_T$}\n\\annotate[yshift=3em]{above,left}{Is}{size of set of allowed interventions}\n\\annotate[yshift=1em]{above}{Nb}{\\# of samples per batch}\n\\annotate[yshift=-1em]{below}{M}{\\# of samples for $\\mathbb{E}_y$}\n```\n\nMore details are in the [user manual](annotate-equations.pdf).\nShould work with both pdflatex and lualatex.\n\n## How to do it from scratch: annotated examples\n\n![rendering of annotated equation](examples/example_annotation.png)\n\nInspired by Sibin Mohan's https://github.com/synercys/annotated_latex_equations/, but with significantly simplified TikZ code, and with lots of comments to explain what is going on.\n\nTwo versions, one [as Beamer slides with transitions](https://github.com/st--/annotate-equations/blob/main/examples/demo_manual_annotate_beamer.tex), one [as an article](https://github.com/st--/annotate-equations/blob/main/examples/demo_manual_annotate_article.tex). For further examples, see https://github.com/synercys/annotated_latex_equations/.\n\n### Giving all highlight boxes the same height\n\nSimply add a `\\mathstrut` within the colorbox:\n```diff\n-\\newcommand{\\highlight}[2]{\\colorbox{#1!17}{$#2$}}\n+\\newcommand{\\highlight}[2]{\\colorbox{#1!17}{$\\mathstrut #2$}}\n```\n\n![rendering of annotated equation with equal-height highlights](examples/example_annotation_equal_height.png)\n\n## Much more information...\n\n...in the answers to [this TeX StackExchange question](https://tex.stackexchange.com/q/254844/171664).\n","funding_links":[],"categories":["TeX"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fst--%2Fannotate-equations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fst--%2Fannotate-equations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fst--%2Fannotate-equations/lists"}