Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render graphics in the manual #7549

Open
fricklerhandwerk opened this issue Jan 4, 2023 · 0 comments
Open

Render graphics in the manual #7549

fricklerhandwerk opened this issue Jan 4, 2023 · 0 comments

Comments

@fricklerhandwerk
Copy link
Contributor

Problem

We want to add graphs and illustrations to the manual to better explain concepts and mechanisms.
Make a setup to declare and maintain graphics to be displayed in the manual.

Requirements

  • The manual is rendered for the web and the terminal from the same source
    • There must either be a terminal representation for the graphics, or a transparent way of not displaying them (without artifacts such as "The following diagram shows...")
    • The web representation should be static, i.e. not require JavaScript to display correctly
  • The setup must allow displaying diffs and previews conveniently
    • The interface should ideally be text-based and declarative, or require additional tools that are well-supported and easy to learn and use
  • The number of required manipulations outside making the actual changes to the graphics should me minimal, ideally zero
  • The closure size for building the manual should be considered and kept minimal

Based on prior discussion by the Nix team..

Alternatives considered

  • Graphviz
  • Mermaid
    • (+) good preview support in modern tooling
      • (+) automatically renders on GitHub markdown
    • (+) well-documented
    • (-) requires JavaScript to display output without pre-processing
      • (+) image output possible
    • (-) requires JavaScript in the build closure
    • (-) no ASCII output
  • PlantUML
    • (+) well-documented and supported
    • (+) text-based
    • (+/-) supports ASCII output, but only for sequence diagrams
  • Plain SVG
    • (+) text-based format
      • (-) diffs are unreadable for all but the most trivial graphics
    • (-) very cumbersome to get right manually
    • (-) external tooling usually produces verbose output
  • Plain ASCII
    • (+) WYSIWYG, everywhere
    • (+) diffs are obvious
    • (-) tedious to get right manually
    • (-) looks clunky on the web
      • (+) can be converted to SVG with svgbob
        • (-) requires abiding to a bespoke, largely undocumented syntax

          It's like markdown brought to its bitter conclusion.

        • (-) requires Rust in the build closure

Priorities

Add 👍 to issues you find important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant