.TH "SCHEMATIC\-FORMAT" "1" "September 2016" "Schematic User Manuals" "Version 0.2.1" .SH NAME .PP \f[B]schematic\-format\f[] \- Scheme source formatter .SH SYNOPSIS .PP \f[B]schematic\-format\f[] [\f[I]option\f[] ...] [\f[I]indent\-file\f[]] .SH DESCRIPTION .PP \f[B]schematic\-format\f[] is a formatter for R7RS Scheme source. It reads Scheme code from standard input, reindents it according to a fairly conventional set of rules, and writes the result to standard output. .SH OPTIONS .TP .B \-b Enable bracket parentheses. When enabled, brackets ("[" and "]") will be treated as though they were parentheses. This option supercedes bracket closure (\f[B]\-c\f[]). .RS .RE .TP .B \-c Enable bracket closure. When enabled, any closing brackets ("]") in the input will cause all open forms to be closed before continuing. .RS .RE .TP .B \-t \f[I]tabstop\f[] Enable tabbed indentation. When enabled, output will be indented by tabs rather than spaces, with each tab being equivalent to \f[I]tabstop\f[] spaces. .RS .RE .TP .B \-h, \-\-help Display a usage summary and exit. .RS .RE .TP .B \-v, \-\-version Print version information to standard output and exit. .RS .RE .SH INDENT FILE .PP An \f[I]indent\-file\f[], if given, may specify custom indentation rules. It should contain a single S\-expression, which must be a list of indentation rules where each rule is one of the following forms: .IP .nf \f[C] (keyword\ .\ offset) (keyword\ offset\ ...) \f[] .fi .PP Each \f[C]keyword\f[] is a symbol specifying the head of the source forms for which the rule should be activated, and each \f[C]offset\f[] is an integer value specifying a (characterwise, columnar) offset from the previous indentation level to use for that form. .PP For example, the rule \f[C](receive\ 1)\f[] would cause the body of each \f[C]receive\f[] form to be indented one space beyond the head of the form: .IP .nf \f[C] (receive\ 1)\ =>\ (receive\ (a\ b)\ (foo\ bar) \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (baz\ a) \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (qux\ b)) \f[] .fi .PP Rules with multiple offsets are applied to the form\[aq]s data in order, with the final offset persisting until the form is closed: .IP .nf \f[C] (receive\ 3\ 3\ 1)\ =>\ (receive \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (a\ b) \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (foo\ bar) \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (bar\ a) \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (qux\ b)) \f[] .fi .PP Negative offsets are specifically allowed. .SH CAVEATS .PP \f[C]cond\f[]\[aq]s clauses are indented by one space beyond its opening parenthesis by default, which may surprise some Emacs users. .PP Implementation\-specific reader extensions such as here documents and alternative parenthetical syntaxes may not be handled nicely. .SH SEE ALSO .PP \f[C]schematic\-markdown\f[](1), \f[C]scmindent\f[] (http://www.ccs.neu.edu/home/dorai/scmindent/index.html) .SH AUTHORS Evan Hanson .