Help: pikchr

Help: pikchr

The "pikchr" command:

Usage: fossil pikchr [options] ?INFILE? ?OUTFILE?

Accepts a pikchr script as input and outputs the rendered script as an SVG graphic. The INFILE and OUTFILE options default to stdin resp. stdout, and the names "-" can be used as aliases for those streams.


On success, add a DIV wrapper around the resulting SVG output which limits its max-width to its computed maximum ideal size

Like -div but indent the div

Like -div but center the div

Like -div but float the div left

Like -div but float the div right

Set the 'toggle' CSS class on the div (used by the JavaScript-side post-processor)

Set the 'source' CSS class on the div, which tells CSS to hide the SVG and reveal the source by default.

Store the input pikchr's source code in the output as a separate element adjacent to the SVG one. Implied by -div-source.

Process the input using TH1 before passing it to pikchr

Disable $var and $<var> TH1 processing. Use this if the pikchr script uses '$' for its own purposes and that causes issues. This only affects parsing of '$' outside of TH1 script blocks. Code in such blocks is unaffected.

When using -th, output the post-TH1'd script instead of the pikchr-rendered output

Trace TH1 execution (for debugging purposes)

Change pikchr colors to assume a dark-mode theme.

The -div-indent/center/left/right flags may not be combined.

TH1-related Notes and Caveats:

If the -th flag is used, this command must open a fossil database for certain functionality to work (via a check-out or the -R REPO flag). If opening a db fails, execution will continue but any TH1 commands which require a db will trigger a fatal error.

In Fossil skins, TH1 variables in the form $varName are expanded as-is and those in the form $<varName> are htmlized in the resulting output. This processor disables the htmlizing step, so $x and $<x> are equivalent unless the TH1-processed pikchr script invokes the TH1 command [enable_htmlify 1] to enable it. Normally that option will interfere with pikchr output, however, e.g. by HTML-encoding double-quotes.

Many of the fossil-installed TH1 functions simply do not make any sense for pikchr scripts.