{"id":43036052,"url":"https://github.com/i4h/latex-systemdynamics","last_synced_at":"2026-01-31T08:30:30.086Z","repository":{"id":94409352,"uuid":"60536511","full_name":"i4h/latex-systemdynamics","owner":"i4h","description":"A Latex package for drawing SD diagrams using tikz","archived":false,"fork":false,"pushed_at":"2016-06-06T15:33:55.000Z","size":72,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-01-30T07:00:31.699Z","etag":null,"topics":["dynamical-systems","latex","modeling","system-dynamics"],"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/i4h.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}},"created_at":"2016-06-06T14:55:16.000Z","updated_at":"2023-09-11T19:53:07.000Z","dependencies_parsed_at":"2023-05-17T21:45:14.787Z","dependency_job_id":null,"html_url":"https://github.com/i4h/latex-systemdynamics","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"d780f40b2fad564a4753d0d0d1efd52f1e14747a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/i4h/latex-systemdynamics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i4h%2Flatex-systemdynamics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i4h%2Flatex-systemdynamics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i4h%2Flatex-systemdynamics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i4h%2Flatex-systemdynamics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/i4h","download_url":"https://codeload.github.com/i4h/latex-systemdynamics/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i4h%2Flatex-systemdynamics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28935383,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T07:49:44.436Z","status":"ssl_error","status_checked_at":"2026-01-31T07:49:34.274Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["dynamical-systems","latex","modeling","system-dynamics"],"created_at":"2026-01-31T08:30:29.501Z","updated_at":"2026-01-31T08:30:30.080Z","avatar_url":"https://github.com/i4h.png","language":"TeX","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Latex package for System Dynamics \n\nThis aims at supporting latex users with some tikz experience to draw system dynamics (SD) diagrams\nin his/her latex documents.\n\n## Usage\n1. Add the following line to your preamble:\n    ````\n    \\usepackage{systemdynamics}\n    ````\n2. Compile using pdflatex. Make sure the systemdynamics.sty file is somewhere where your latex distribution will find it.\n\n\n\n## Commands\nThe package provides tikz styles and shortcuts.\n\n### Drawing Stocks\nTo draw a stock with the internal name _nodename_ and the label _nodelabel_ use the command:\n\n````\n\\node (nodename) [stock] {nodelabel};\n````\n\nTo position the node relative to an existing node, you can use the familiar positoning commands\ninside the [], i.e.\n````\n\\node (nodename) [stock, below=1em of othernode] {nodelabel};\n\n````\n\n### Drawing Nodes\nTo add positive or negative flows with the label _flowlabel_ to the node _stockname_, use the following commands:\n````\n\\flowIn{stockname}{flowlabel}\n````\n````\n\\flowOut{stockname}{flowlabel}\n````\nThis will create nodes with names  _in\\_stockname_ or _out\\_stockname_ respectively.\n\n\n### Drawing SD Variables\nTo create a system dynamics variable with name _varname_ and label _varlabel_, use the command \n````\n\\node (varname) [sdvariable]  {varlabel};\n````\n\n\n### Drawing Arrows\nTo indicate relationships, use the ````\\sdarrow```` command:\n````\n\\sdarrow{fromNode}{toNode}{bend left=5}\n````\nThe last argument is optional and contains tikz options that will be passed directly to tikz to control the arrow curvature etc.\n\nYou can use the node names of existing stocks, flows and variables to define start and end of the arrow.\nTo avoid arrows that overlap with the node labels, the flows have additional points that can be used as start or endpoints of sdarrows:\n- _in\\_stock_down_: A node below the incoming flow label\n- _in\\_stock_down\\_nolabel_: A node below the incoming flows hourglass (useful if the flow has no label)\n- _in\\_stock_up_: A node above the incoming flows hourglass\n- _out\\_stock_down_: A node below the outcoming flow label\n- _out\\_stock_down\\_nolabel_: A node below the outcoming flows hourglass (useful if the flow has no label)\n- _out\\_stock_up_ A: node above the outcoming flows hourglass\n\n\n## Example Diagram\nThe following code draws a simple two-state diagram.\n\n````latex\n\\documentclass{standalone}\n\\pagestyle{empty}\n\\usepackage{systemdynamics}\n\n\\begin{document}\n\\begin{tikzpicture} \n\n% Predator population\n\\node (predator) [stock] {Predator};\n\\flowIn{predator}{}\n\\flowOut{predator}{}\n\\sdarrow{predator}{out_predator_up}{bend left=70}\n\n% Prey population\n\\node (prey) [stock, below=7em of predator, xshift=1em] {Prey};\n\\flowIn{prey}{}\n\\flowOut{prey}{}\n\\sdarrow{prey}{in_prey_down_nolabel}{bend left=70}\n\n%Meetings\n\\node (meetings) [sdvariable, below=3em of predator, xshift=0.5em]  {Meetings};\n\\sdarrow{prey}{meetings}{bend left=5}\n\\sdarrow{predator}{meetings}{bend left=10}\n\\sdarrow{meetings}{in_predator_down_nolabel}{bend left=10}\n\\sdarrow{meetings}{out_prey_up}{bend left=10}\n\n\\end{tikzpicture}\n\\end{document}\n````\n\nThe output will look as follows:\n\u003cimg alt=\"Predator Prey model\" src=\"predator_prey.png\" style=\"width: 20em;\" /\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi4h%2Flatex-systemdynamics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fi4h%2Flatex-systemdynamics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi4h%2Flatex-systemdynamics/lists"}