Skip to content

Commit

Permalink
- added pgf template
Browse files Browse the repository at this point in the history
- updated Features/Diagrams section in readme
  • Loading branch information
npgrosser committed May 19, 2023
1 parent 34c7512 commit 15963ea
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ representation (aka 'Diagrams as Code').
- [Pikchr](https://pikchr.org/)
- [Structurizr](https://structurizr.com/)
- [Vega](https://vega.github.io/)
- [Vega-Lite](https://vega.github.io/vega-lite/)
- [WaveDrom](https://wavedrom.com/)
- [D2](https://d2lang.com/)
- [UMlet](https://www.umlet.com/)
- [SvgBob](https://ivanceras.github.io/svgbob-editor/)
- [PGF/TikZ](https://tikz.dev/)

### Math

Expand Down
15 changes: 15 additions & 0 deletions src/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,21 @@ const templates: Template[] = [
\\draw[->] (maintopic.east) -- (rightsquare.west);
\\draw[->] (rightsquare.south) .. controls +(down:7mm) and +(right:7mm) .. (lowercircle.east);
\\end{tikzpicture}
\\end{document}
`)),
new InMemoryTemplate("tikz", "PGF Diagram", dedent(`
\\usepackage{pgf}
\\begin{document}
\\begin{pgfpicture}
\\pgfpathrectangle{\\pgfpointorigin}{\\pgfpoint{3cm}{2cm}}
\\pgfusepath{stroke}
\\pgfpathcircle{\\pgfpoint{1.5cm}{1cm}}{1cm}
\\pgfusepath{stroke}
\\end{pgfpicture}
\\end{document}
`)),
new InMemoryTemplate("blockdiag", "BlockDiag Diagram", dedent(`
Expand Down

0 comments on commit 15963ea

Please sign in to comment.