Box Drawings Help
Name: | Box Drawings |
Version: | 0.1 |
Last update: | 2019-10-17 13:28:40 |
Introduction
This package provides commands to draw a frame around a text selection
or draw table borders for a tabulated block of text.
To activate this feature, go to Alpha ↣ Global Setup ↣ Features… and
check the Box Drawings checkbox.
It inserts a submenu called Boxes in the Text menu. The various
commands apply to a text selection.
Box drawing commands
Draw a frame
The Draw Frame commands are designed to enclose the whole selection in a
frame. For instance, the following selection
Augustus miscere adfabilis rures.
Gulosus syrtes optimus libere fermentet Aquae Sulis.
Medusa celeriter corrumperet catelli.
would be turned into
┌─────────────────────────────────────────────────────┐
│Augustus miscere adfabilis rures. │
│Gulosus syrtes optimus libere fermentet Aquae Sulis. │
│Medusa celeriter corrumperet catelli. │
└─────────────────────────────────────────────────────┘
The selection is extended to contain complete lines.
Note that if the selected block of text contains tabulation
characters, the right edge of the frame may not be correctly aligned.
Indeed, a tabulation is considered as a single character. If you check the
Convert Tabs To Spaces preference in the Alpha ↣ Preferences ↣ Package Preferences ↣ Box Drawings panel,
then you will get a correct alignment (but lose your tabulations!).
Draw a table
The Draw Table commands are designed to draw a bordered table with
cell frames. The latter expect a selection of tabulated text i-e a block of
text whose lines contain fields separated by a tabulation character. For
instance, the following block of text (where <
TAB
>
designates a tabulation
character [\t])
Optimus <TAB> pretosius <TAB> zothecas
rures <TAB> corrumperet <TAB> cathedras
would be turned into
┌───────┬───────────┬─────────┐
│Optimus│pretosius │zothecas │
├───────┼───────────┼─────────┤
│rures │corrumperet│cathedras│
└───────┴───────────┴─────────┘
The commands Draw Styled Frame and Draw Styled Table let
you select a style.
Five styles are available to draw frame borders:
┌┬┐
├┼┤
└┴┘
Light
┏┳┓
┣╋┫
┗┻┛
Heavy
╔╦╗
╠╬╣
╚╩╝
Double horizontal and vertical
╒╤╕
╞╪╡
╘╧╛
Horizontal double and vertical single
╓╥╖
╟╫╢
╙╨╜
Horizontal single and vertical double
There are two commands called Remove Frame and Remove Table Borders
to unframe a selection.
Box drawing palette
The package also defines a floating palette containing all the Unicode box
drawing characters for easy insertion in a document. The palette, called
Box Drawings, is available from the Alpha ↣ Edit ↣ Palettes menu.
Very useful if you need to draw a maze like this !
│├───┬────┬──┐
│└┐┌┘││╶┼─┘╶┐│
├┐│└┐└┴─ ─┼╴│└
││├╴├──┬─┬┴─┘┌
└──────┴─────┘
Known problems
Please report any problem or bug you encounter to
Alpha's Bug Tracker.
License and Disclaimer
Copyright (c) 2019, Bernard Desgraupes.
All rights reserved.
The boxDrawings package is free software and distributed under
the terms of the new BSD license:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
- Neither the name of Bernard Desgraupes nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BERNARD DESGRAUPES BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.