Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 1.46 KB

README.md

File metadata and controls

46 lines (35 loc) · 1.46 KB

DocstringAsImage.jl

CI

This package allows us to visualize Julia docstrings as images. This feature works only in terminals that support Sixel Graphics. Internally we use Quarto and Typst to render images. We use Sixel.jl package to render generated images in your terminal.

image

Setup

julia> using Pkg; Pkg.add("DocstringAsImage")

To build from source, run the following commands:

$ git clone https://github.com/AtelierArith/DocstringAsImage.jl.git
$ cd DocstringAsImage.jl
$ julia --project -e 'using Pkg; Pkg.instantiate()'
$ ls
Manifest.toml Project.toml  README.md     src

Usage

Our package exports @imgdoc macro. It works like the @doc macro.

$ julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.2 (2024-12-01)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using DocstringAsImage
julia> @imgdoc exp
julia> using SpecialFunctions: zeta
julia> @imgdoc zeta
julia> using Distributions: Beta
julia> @imgdoc Beta