Skip to content

euwbah/graph-gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

graph-gen

Graph view for your typst notes

alt text

Quick start

  1. Import the package and use the show rule in your typst document:

    #import "@preview/graph-gen:0.1.0": *
    
    #show: graph-gen-rules
    

    You may also use this repository directly as a local typst package.

  2. Clone this repository (path to repo will be referred to below as path/to/graph-gen).

  3. (Highly recommended) set up a virtual environment:

    cd path/to/graph-gen
    python -m venv .venv
    .venv/Scripts/activate

    or with uv:

    cd path/to/graph-gen
    uv venv .venv
    .venv/Scripts/activate
  4. Install dependencies:

    pip install .

    with uv:

    uv sync
  5. Open typst preview for your document (for preview sync feature).

  6. Run the graph viewer. Use -h to see all options.

    python graph-gen.py path/to/document.typ

    If you want to only scroll the preview and not the .typ source, use the -s or --no-src-point flag:

    python graph-gen.py path/to/document.typ -s
  7. Double-click any node to scroll to its location in typst preview.

  8. The python script caches graphs in graph-gen/. The cache should be manually deleted after updating this typst package.

Example

See 0.1.0/example.typ for how to add support for theorem-type content (definitions, theorems, etc...) and tutorial questions.

Generate the graph for the example with:

python graph-gen.py 0.1.0/example.typ

About

Graph view for your Typst notes with preview syncing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors