2006-07-23 15:52:01 +02:00
|
|
|
.\" @(#)boxes.1 1.1 07/23/06
|
1999-07-12 20:07:46 +02:00
|
|
|
.\"
|
2012-10-19 16:56:00 +02:00
|
|
|
.\" $Id: boxes.1.in,v 1.8 2006/07/23 13:52:01 tsjensen Exp tsjensen $
|
1999-07-12 20:07:46 +02:00
|
|
|
.\"
|
2006-07-22 21:49:13 +02:00
|
|
|
.TH boxes 1 "July 22 2006"
|
1999-07-12 20:07:46 +02:00
|
|
|
.UC 4
|
|
|
|
.SH NAME
|
|
|
|
boxes \- text mode box and comment drawing filter
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B boxes
|
2012-10-19 16:56:00 +02:00
|
|
|
[\-hlmrv] [\-a\ format] [\-d\ design] [\-f\ file] [\-i\ indent] [\-k\ bool]
|
2006-07-20 23:39:57 +02:00
|
|
|
[\-p\ pad] [\-s\ size] [\-t\ tabopts] [infile [outfile]]
|
1999-07-12 20:07:46 +02:00
|
|
|
.SH DESCRIPTION
|
2006-07-22 21:49:13 +02:00
|
|
|
.I Boxes
|
|
|
|
is a text filter which can draw any kind of box around its input text. Box
|
|
|
|
design choices range from simple boxes to complex ASCII art. A box can also
|
|
|
|
be removed and repaired, even if it has been badly damaged by editing of the
|
|
|
|
text inside. Since boxes may be open on any side,
|
1999-07-12 20:07:46 +02:00
|
|
|
.I boxes
|
|
|
|
can also be used to create regional comments in any programming language.
|
2006-07-22 21:49:13 +02:00
|
|
|
New box designs of all sorts can easily be added and shared by appending to
|
|
|
|
a free format configuration file.
|
1999-07-12 20:07:46 +02:00
|
|
|
.br
|
|
|
|
.I boxes
|
2006-07-22 21:49:13 +02:00
|
|
|
was originally intended to be used with the
|
1999-07-12 20:07:46 +02:00
|
|
|
.I vim(1)
|
2006-07-22 21:49:13 +02:00
|
|
|
text editor, but it can be tied to any text editor which supports filters,
|
|
|
|
as well as called from the command line as a standalone tool.
|
1999-07-12 20:07:46 +02:00
|
|
|
.\" =======================================================================
|
|
|
|
.SH OPTIONS
|
|
|
|
Options offered by
|
|
|
|
.I boxes
|
|
|
|
are the following:
|
|
|
|
.TP 0.6i
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-a \fIstring\fP
|
1999-07-12 20:07:46 +02:00
|
|
|
Alignment/positioning of text inside box. This option takes a format string
|
|
|
|
argument which is read from left to right. The format string may not
|
|
|
|
contain whitespace and must consist of one or more of the following
|
|
|
|
components:
|
|
|
|
.br
|
|
|
|
|
|
|
|
.B h\fPx
|
2012-10-19 16:56:00 +02:00
|
|
|
\- horizontal alignment of the input text block inside a potentially larger
|
1999-07-12 20:07:46 +02:00
|
|
|
box. Possible values for
|
|
|
|
.I x
|
|
|
|
are
|
|
|
|
.B l
|
|
|
|
(ell, for left alignment),
|
|
|
|
.B c
|
|
|
|
(center), or
|
|
|
|
.B r
|
|
|
|
(right). This does not affect the justification of text lines within the
|
|
|
|
input text block (use the
|
|
|
|
.B j
|
|
|
|
argument instead).
|
|
|
|
.br
|
|
|
|
.B v\fPx
|
2012-10-19 16:56:00 +02:00
|
|
|
\- vertical alignment of the input text block inside a potentially larger
|
1999-07-12 20:07:46 +02:00
|
|
|
box. Possible values for
|
|
|
|
.I x
|
|
|
|
are
|
|
|
|
.B t
|
|
|
|
(for top alignment),
|
|
|
|
.B c
|
|
|
|
(center), or
|
|
|
|
.B b
|
|
|
|
(bottom).
|
|
|
|
.br
|
|
|
|
.B j\fPx
|
2012-10-19 16:56:00 +02:00
|
|
|
\- justification of lines within the input text block. Possible values for
|
1999-07-12 20:07:46 +02:00
|
|
|
.I x
|
|
|
|
are
|
|
|
|
.B l
|
|
|
|
(ell, for left justification),
|
|
|
|
.B c
|
|
|
|
(center), or
|
|
|
|
.B r
|
|
|
|
(right). This does not affect the alignment of the input text block itself
|
|
|
|
within the box. Use the
|
|
|
|
.B h
|
|
|
|
and
|
|
|
|
.B v
|
|
|
|
arguments for input text block positioning.
|
|
|
|
.br
|
|
|
|
|
|
|
|
Short hand notations (can be combined with the above arguments):
|
|
|
|
.br
|
|
|
|
.B l
|
2012-10-19 16:56:00 +02:00
|
|
|
(ell) \- short for
|
1999-07-12 20:07:46 +02:00
|
|
|
.B h\fPl\fBv\fPc\fBj\fPl
|
|
|
|
.br
|
|
|
|
.B c
|
2012-10-19 16:56:00 +02:00
|
|
|
\- short for
|
1999-07-12 20:07:46 +02:00
|
|
|
.B h\fPc\fBv\fPc\fBj\fPc
|
|
|
|
.br
|
|
|
|
.B r
|
2012-10-19 16:56:00 +02:00
|
|
|
\- short for
|
1999-07-12 20:07:46 +02:00
|
|
|
.B h\fPr\fBv\fPc\fBj\fPr
|
|
|
|
.br
|
|
|
|
|
|
|
|
The factory default setting for
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-a
|
1999-07-12 20:07:46 +02:00
|
|
|
is
|
|
|
|
.B h\fPl\fBv\fPt.
|
|
|
|
.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
.TP 0.6i
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-c \fIstring\fP
|
2000-04-01 20:26:57 +02:00
|
|
|
Command line design definition for simple cases. The argument of this
|
|
|
|
option is the definition for the "west" (W) shape. The defined shape must
|
2012-10-19 16:56:00 +02:00
|
|
|
consist of exactly one line, i.e. no multi\-line shapes are allowed. The
|
|
|
|
.B \-c
|
2000-04-01 20:26:57 +02:00
|
|
|
option is intended as a shortcut for those cases where simple regional
|
|
|
|
comments are to be created, which only need a certain character or sequence
|
|
|
|
of characters to be placed in front of every line. In such cases, it is
|
|
|
|
much more convenient to simply specify
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-c
|
2000-04-01 20:26:57 +02:00
|
|
|
than to do a complete design definition in one's config file, where the
|
|
|
|
only shape defined is the west shape.
|
|
|
|
.br
|
|
|
|
This option implies a
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-d
|
2000-04-01 20:26:57 +02:00
|
|
|
and does not access the config file.
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-c
|
2000-04-01 20:26:57 +02:00
|
|
|
may of course be used in conjuction with any of the other options. By default,
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-c
|
2000-04-01 20:26:57 +02:00
|
|
|
is not specified.
|
|
|
|
.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
.TP 0.6i
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-d \fIstring\fP
|
1999-08-22 01:41:25 +02:00
|
|
|
Design selection. The one argument of this option is the name of the design to
|
1999-07-12 20:07:46 +02:00
|
|
|
use.
|
|
|
|
.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
.TP 0.6i
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-f \fIstring\fP
|
1999-07-12 20:07:46 +02:00
|
|
|
Use alternate config file. The one argument of this option is the name of a
|
|
|
|
valid
|
|
|
|
.I boxes
|
|
|
|
config file, containing new and exciting designs!
|
|
|
|
.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
.TP 0.6i
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-h
|
1999-07-12 20:07:46 +02:00
|
|
|
Print usage information.
|
|
|
|
.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
.TP 0.6i
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-i \fIstring\fP
|
1999-07-12 20:07:46 +02:00
|
|
|
Indentation mode. Possible arguments are "text" (indent text inside of
|
|
|
|
box), "box" (indent box, not text inside of box), or "none" (throw away
|
|
|
|
indentation). Arguments may be abbreviated. The default is to indent the
|
|
|
|
box, but not the text.
|
|
|
|
.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
.TP 0.6i
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-k \fIbool\fP
|
1999-08-18 21:14:08 +02:00
|
|
|
Kill leading/trailing blank lines on removal. The value of
|
|
|
|
.I bool
|
|
|
|
can be specified as on, yes, true, 1, or t, all meaning yes, or off, no,
|
2012-10-19 16:56:00 +02:00
|
|
|
false, 0, or f, which mean no. This is case\-insensitive. This option only
|
1999-08-18 21:14:08 +02:00
|
|
|
takes effect in connection with
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-r\fP.
|
1999-08-18 21:14:08 +02:00
|
|
|
If set to yes, leading and trailing blank lines will be removed from the
|
|
|
|
output. If set to no, the entire content of the former box is returned.
|
|
|
|
The default is no, if both the top and the bottom part of the box are open,
|
|
|
|
as is the case with most regional comments. If the box's design defines a
|
|
|
|
top part or a bottom part, the default is yes.
|
|
|
|
.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
.TP 0.6i
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-l
|
1999-07-12 20:07:46 +02:00
|
|
|
(ell) List designs. Produces a listing of all available box designs in the
|
|
|
|
config file, along with a sample box and information about it's creator.
|
1999-08-18 21:14:08 +02:00
|
|
|
Also checks syntax of the entire config file. If used in connection with
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-d\fP,
|
1999-08-18 21:14:08 +02:00
|
|
|
displays detailed information about the specified design.
|
1999-07-12 20:07:46 +02:00
|
|
|
.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
.TP 0.6i
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-m
|
2006-07-22 21:49:13 +02:00
|
|
|
Mend box. This removes a (potentially broken) box as with
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-r\fP,
|
2006-07-12 08:18:05 +02:00
|
|
|
and redraws it afterwards. The mended box is drawn according to the
|
|
|
|
options given. This may be important to know when it comes to restoring
|
2006-07-20 23:39:57 +02:00
|
|
|
padding, identation, etc. for the mended box. Implies
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-k
|
2006-07-20 23:39:57 +02:00
|
|
|
false.
|
2006-07-12 08:18:05 +02:00
|
|
|
.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
.TP 0.6i
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-p \fIstring\fP
|
1999-07-12 20:07:46 +02:00
|
|
|
Padding. Specify padding in spaces around the input text block for all
|
|
|
|
sides of the box. The argument string may not contain whitespace and must
|
|
|
|
consist of a combination of the following characters, each followed by a
|
|
|
|
number indicating the padding in spaces:
|
|
|
|
.br
|
|
|
|
.B a
|
2012-10-19 16:56:00 +02:00
|
|
|
\- (all) give padding for all sides at once
|
1999-07-12 20:07:46 +02:00
|
|
|
.br
|
|
|
|
.B h
|
2012-10-19 16:56:00 +02:00
|
|
|
\- (horiz) give padding for both horizontal sides
|
1999-07-12 20:07:46 +02:00
|
|
|
.br
|
|
|
|
.B v
|
2012-10-19 16:56:00 +02:00
|
|
|
\- (vertical) give padding for both vertical sides
|
1999-07-12 20:07:46 +02:00
|
|
|
.br
|
|
|
|
.B b
|
2012-10-19 16:56:00 +02:00
|
|
|
\- (bottom) give padding for bottom (south) side
|
1999-07-12 20:07:46 +02:00
|
|
|
.br
|
|
|
|
.B l
|
2012-10-19 16:56:00 +02:00
|
|
|
\- (left) give padding for left (west) side
|
1999-07-12 20:07:46 +02:00
|
|
|
.br
|
|
|
|
.B t
|
2012-10-19 16:56:00 +02:00
|
|
|
\- (top) give padding for top (north) side
|
1999-07-12 20:07:46 +02:00
|
|
|
.br
|
|
|
|
.B r
|
2012-10-19 16:56:00 +02:00
|
|
|
\- (right) give padding for right (east) side
|
1999-07-12 20:07:46 +02:00
|
|
|
.br
|
|
|
|
Example:
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-p a\fP4\fBt\fP2
|
1999-07-12 20:07:46 +02:00
|
|
|
would define the padding to be 4 characters on all sides, except for the
|
|
|
|
top of the box, where the input text block will be only 2 lines away from
|
|
|
|
the box.
|
|
|
|
.br
|
|
|
|
By default, unless specified otherwise in the config file, no padding is
|
|
|
|
used.
|
|
|
|
.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
.TP 0.6i
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-r
|
1999-07-12 20:07:46 +02:00
|
|
|
Remove box. Removes an existing box instead of drawing it. Which design to
|
|
|
|
use is detected automatically. In order to save time or in case the
|
|
|
|
detection does not decide correctly, combine with
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-d
|
1999-07-12 20:07:46 +02:00
|
|
|
to specify the design. The default is to draw a new box.
|
|
|
|
.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
.TP 0.6i
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-s \fIwidth\fBx\fPheight\fP
|
2006-07-12 08:18:05 +02:00
|
|
|
Box size. This option specifies the desired box size in units of columns
|
|
|
|
(for width) and lines (for height).
|
|
|
|
If only a single number is given as argument, this number specifies the
|
|
|
|
desired box width. A single number prefixed by 'x' specifies only the box
|
|
|
|
height. The actual resulting box size may vary depending on the individual
|
|
|
|
shape sizes of the chosen design. Also, other command line options may
|
|
|
|
influence the box size (such as
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-p\fP).
|
2006-07-12 08:18:05 +02:00
|
|
|
.br
|
1999-07-12 20:07:46 +02:00
|
|
|
By default, the smallest possible box is created around the text.
|
|
|
|
.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
.TP 0.6i
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-t \fIstring\fP
|
2006-07-20 23:39:57 +02:00
|
|
|
Tab handling. This option controls how tab characters in the input text are
|
|
|
|
handled. The option string must always begin with a
|
|
|
|
.I uint
|
|
|
|
number indicating the distance between tab stops. It is important that this
|
|
|
|
value be set correctly, or tabulator characters will upset your input text.
|
|
|
|
The correct tab distance value depends on the settings used for the text
|
|
|
|
you are processing. A common value is 8.
|
|
|
|
.br
|
2006-07-22 21:49:13 +02:00
|
|
|
Immediately following the tab distance, an optional character can be appended,
|
2006-07-20 23:39:57 +02:00
|
|
|
telling
|
|
|
|
.I boxes
|
2006-07-22 21:49:13 +02:00
|
|
|
how to treat the leading tabs. The following options are available:
|
2006-07-20 23:39:57 +02:00
|
|
|
.br
|
|
|
|
.B e
|
2012-10-19 16:56:00 +02:00
|
|
|
\- expand tabs into spaces
|
2006-07-20 23:39:57 +02:00
|
|
|
.br
|
|
|
|
.B k
|
2012-10-19 16:56:00 +02:00
|
|
|
\- keep tabs as close to what they were as possible
|
2006-07-20 23:39:57 +02:00
|
|
|
.br
|
|
|
|
.B u
|
2012-10-19 16:56:00 +02:00
|
|
|
\- unexpand tabs. This makes
|
2006-07-20 23:39:57 +02:00
|
|
|
.I boxes
|
|
|
|
turn as many spaces as possible into tabs.
|
|
|
|
.br
|
|
|
|
|
|
|
|
In order to maintain backwards compatibility, the
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-t
|
2006-07-20 23:39:57 +02:00
|
|
|
.I string
|
|
|
|
can be just a number. In that case,
|
2006-07-22 21:49:13 +02:00
|
|
|
.B e
|
2006-07-20 23:39:57 +02:00
|
|
|
is assumed for tab handling, which removes all tabs and replaces them with
|
|
|
|
spaces. The factory default for the
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-t
|
2006-07-20 23:39:57 +02:00
|
|
|
option is simply 8, which is just such a case.
|
|
|
|
.br
|
|
|
|
For example, you could specify
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-t \fP4u
|
2006-07-22 21:49:13 +02:00
|
|
|
in order to have your leading tabs unexpanded. In the box content, tabs are
|
|
|
|
always converted into spaces. The tab distance in this example is 4.
|
1999-07-12 20:07:46 +02:00
|
|
|
.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
.TP 0.6i
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-v
|
1999-07-12 20:07:46 +02:00
|
|
|
Print out current version number.
|
|
|
|
.\" =======================================================================
|
|
|
|
.SH CONFIGURATION FILES
|
1999-08-22 01:41:25 +02:00
|
|
|
.I Boxes
|
|
|
|
will use the configuration file specified on the command line (using
|
2012-10-19 16:56:00 +02:00
|
|
|
.B \-f\fP).
|
1999-08-22 01:41:25 +02:00
|
|
|
If no config file is specified on the command line,
|
|
|
|
.I boxes
|
|
|
|
will check for the BOXES environment variable, which may contain a filename
|
|
|
|
to use. If BOXES is not set,
|
|
|
|
.I boxes
|
|
|
|
will try to read $HOME/.boxes and use it as a config file. Failing that,
|
|
|
|
.I boxes
|
2012-10-19 16:56:00 +02:00
|
|
|
will try to read the system\-wide config file (see FILES).
|
1999-08-22 01:41:25 +02:00
|
|
|
.PP
|
1999-07-12 20:07:46 +02:00
|
|
|
The syntax of
|
|
|
|
.I boxes
|
2006-07-20 23:39:57 +02:00
|
|
|
config files is described on the website (see below). They are quite
|
2012-10-19 16:56:00 +02:00
|
|
|
self\-explanatory, though.
|
1999-07-12 20:07:46 +02:00
|
|
|
.\" =======================================================================
|
|
|
|
.SH AVAILABILITY
|
2006-07-20 23:39:57 +02:00
|
|
|
.I Boxes
|
|
|
|
is available from its website at
|
|
|
|
<URL:http://boxes.thomasjensen.com/>. The website also features a number
|
2012-10-19 16:56:00 +02:00
|
|
|
of examples illustrating this manual page as well as more in\-depth
|
1999-07-12 20:07:46 +02:00
|
|
|
documentation.
|
|
|
|
.PP
|
2006-07-20 23:39:57 +02:00
|
|
|
Check out
|
1999-07-12 20:07:46 +02:00
|
|
|
.I vim(1)
|
2006-07-20 23:39:57 +02:00
|
|
|
at <URL:http://www.vim.org/>!
|
1999-07-12 20:07:46 +02:00
|
|
|
.\" =======================================================================
|
|
|
|
.SH AUTHOR
|
2006-07-20 23:39:57 +02:00
|
|
|
.I Boxes
|
2006-07-12 08:18:05 +02:00
|
|
|
was made by Thomas Jensen <boxes@thomasjensen.com>.
|
1999-07-12 20:07:46 +02:00
|
|
|
.br
|
|
|
|
Please see the
|
|
|
|
.I boxes
|
2006-07-20 23:39:57 +02:00
|
|
|
website for a current email address.
|
1999-07-12 20:07:46 +02:00
|
|
|
.\" =======================================================================
|
|
|
|
.SH VERSION
|
|
|
|
This is
|
|
|
|
.I boxes
|
1999-08-22 01:41:25 +02:00
|
|
|
version --BVERSION--.
|
1999-07-12 20:07:46 +02:00
|
|
|
.\" =======================================================================
|
|
|
|
.SH BUGS
|
2006-07-12 08:18:05 +02:00
|
|
|
Although it is doing fine in most cases, imho the design autodetector
|
1999-08-22 01:41:25 +02:00
|
|
|
needs some more work.
|
1999-07-12 20:07:46 +02:00
|
|
|
.br
|
1999-08-22 01:41:25 +02:00
|
|
|
Should you notice any other unspecified behavior, please tell the author!
|
1999-07-12 20:07:46 +02:00
|
|
|
.\" =======================================================================
|
|
|
|
.SH ENVIRONMENT
|
2006-07-20 23:39:57 +02:00
|
|
|
.I Boxes
|
|
|
|
recognizes the following environment variables:
|
|
|
|
.TP 1.0i
|
1999-07-12 20:07:46 +02:00
|
|
|
HOME
|
|
|
|
The user's home directory.
|
2006-07-20 23:39:57 +02:00
|
|
|
.TP 1.0i
|
1999-07-12 20:07:46 +02:00
|
|
|
BOXES
|
|
|
|
Name of
|
|
|
|
.I boxes
|
|
|
|
configuration file, if different from ~/.boxes.
|
|
|
|
.\" =======================================================================
|
|
|
|
.SH FILES
|
2006-07-22 21:49:13 +02:00
|
|
|
.TP 1.0i
|
1999-07-12 20:07:46 +02:00
|
|
|
$HOME/.boxes
|
|
|
|
.I boxes
|
|
|
|
configuration file
|
2006-07-22 21:49:13 +02:00
|
|
|
.TP 1.0i
|
1999-08-22 01:41:25 +02:00
|
|
|
--GLOBALCONF--
|
2012-10-19 16:56:00 +02:00
|
|
|
system\-wide configuration file
|
1999-07-12 20:07:46 +02:00
|
|
|
.\" =======================================================================
|
|
|
|
.SH "SEE ALSO"
|
|
|
|
.I tal(1)
|
|
|
|
,
|
|
|
|
.I vim(1)
|