{"id":15693236,"url":"https://github.com/lucacappelletti94/adigraph","last_synced_at":"2025-04-30T05:44:48.502Z","repository":{"id":98554190,"uuid":"121785356","full_name":"LucaCappelletti94/adigraph","owner":"LucaCappelletti94","description":"A tex package to draw automatically tex graphs.","archived":false,"fork":false,"pushed_at":"2024-03-05T14:06:24.000Z","size":5300,"stargazers_count":7,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-30T05:44:41.177Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://ctan.org/pkg/adigraph","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/LucaCappelletti94.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":"2018-02-16T18:26:34.000Z","updated_at":"2024-04-08T22:21:54.000Z","dependencies_parsed_at":"2024-10-24T00:17:53.729Z","dependency_job_id":"c6487987-ff93-47c8-8e8f-4212fd7253bb","html_url":"https://github.com/LucaCappelletti94/adigraph","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaCappelletti94%2Fadigraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaCappelletti94%2Fadigraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaCappelletti94%2Fadigraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaCappelletti94%2Fadigraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LucaCappelletti94","download_url":"https://codeload.github.com/LucaCappelletti94/adigraph/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251651221,"owners_count":21621702,"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":[],"created_at":"2024-10-03T18:42:21.553Z","updated_at":"2025-04-30T05:44:48.479Z","avatar_url":"https://github.com/LucaCappelletti94.png","language":"TeX","readme":"# Adigraph\n[![Build status](https://github.com/LucaCappelletti94/adigraph/actions/workflows/latex.yml/badge.svg)](https://github.com/LucaCappelletti94/adigraph/actions)\n[![Version](https://img.shields.io/badge/CTAN_Version-1.7.2-blue.svg)](https://ctan.org/pkg/adigraph)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/LucaCappelletti94/adigraph/blob/main/LICENSE)\n[![Available in](https://img.shields.io/badge/Available_in-TEX_Live-green.svg)](https://ctan.org/pkg/texlive)\n[![Available in](https://img.shields.io/badge/Available_in-MiKTEX-green.svg)](https://ctan.org/pkg/miktex)\n\n[Adigraph](https://ctan.org/pkg/adigraph) is a pure latex library for drawing directed graphs and augmenting directed graphs, and to draw cuts over them. It DOES NOT require external libraries such as Graphviz or DOT. \n\nIt handles automatically the positioning of labels, with the exception of the horizontal position, and the inclinations of cuts.\n\n**This library is released under MIT license (Copyright 2018 Luca Cappelletti)**.\n\n## Documentation\nFor more information, you can read the documentation available [here](https://github.com/LucaCappelletti94/adigraph/blob/main/adigraph_documentation.pdf)\n\n## Basic setup\n### Installing the package\nIf you are on Linux or macOs you can run the following.\n```bash\nsudo tlmgr install fp etoolbox adigraph\n```\n\nOtherwise install the packages with the package manager of your choice.\n\n## Checking the version\nAll recent (1.3+) Adigraph versions offer the following command:\n\n```latex\n\\AdigraphVersionNumber\n```\n\nIf you get an `Undefined control sequence` error you have a version previous to 1.3, you should consider updating it manually.\n\nAn approach could be the following:\n\n1. Download the latest version from ctan: [here](https://ctan.org/pkg/adigraph).\n2. Identify the position of the installed adigraph by running `find / -type d -name adigraph`.\n3. Replace the old adigraph.sty with the new adigraph.sty downloaded from ctan.\n\n### Requiring the package in the document\nRemember to require the package in the document.\n\n```latex\n\\usepackage{adigraph}\n```\n\n## Basic example\nMore examples and step by step explanation is available in the [documentation](https://github.com/LucaCappelletti94/adigraph/blob/main/adigraph_documentation.pdf).\n\nSuppose you want to create a graph as the following, with an augmenting path highlighted and a couple of cuts:\n\n![Basic example](https://github.com/LucaCappelletti94/adigraph/blob/main/img_examples/example_3.jpg?raw=true)\n\nWe start by defining a new graph, called *myAdigraph*:\n\n```latex\n\\NewAdigraph{myAdigraph}{\n    s:0,0;\n    1:2,2;\n    3:2,-2;\n    2:6,2;\n    4:6,-2;\n    t:8,0;\n}{\n    s,1:25;\n    s,3:25;\n    3,4:25;\n    1,2:35;\n    2,t:20;\n    4,t:30;\n    3,1:10;\n    4,2:10;\n    2,3:15::near start;\n    4,1:5::near start;\n}\n```\n\nAt this point the output is the following:\n\n```latex\n\\myAdigraph{}\n```\n\n![First adigraph](https://github.com/LucaCappelletti94/adigraph/blob/main/img_examples/example_0.jpg?raw=true)\n\nThen we can add the augmenting path as follows:\n\n```latex\n\\myAdigraph{\n    s,3,4,2,t:5;\n}\n```\n\n![Augmenting adigraph](https://github.com/LucaCappelletti94/adigraph/blob/main/img_examples/example_1.jpg?raw=true)\n\nAnd the cuts (remember that the paths from previous steps are memorized by the library) are added as follows:\n\n```latex\n\\myAdigraph{}{\n    2,t,red;\n    3,4,blue;\n}\n```\n\nThe result with the cuts is the following:\n\n![Cuts adigraph](https://github.com/LucaCappelletti94/adigraph/blob/main/img_examples/example_2.jpg?raw=true)\n\nYou can add both cuts and paths at the same time to keep the latest path highlighted:\n\n```latex\n\\myAdigraph{\n    s,3,4,2,t:5;\n}{\n    2,t,red;\n    3,4,blue;\n}\n```\n\n![Cuts adigraph](https://github.com/LucaCappelletti94/adigraph/blob/main/img_examples/example_3.jpg?raw=true)\n\nHave a nice day!\n\n**Luca Cappelletti**\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucacappelletti94%2Fadigraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucacappelletti94%2Fadigraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucacappelletti94%2Fadigraph/lists"}