Emacs ringing system: printing via PostScript

The emacs ringing system can output methods and groups of methods for printing via PostScript, in a variety of styles. Unlike most other ringing software's PostScript output, emacs-ringing outputs a ringing program in PostScript, and a method description, and a collection of drawing routines for the core of the PostScript ringing system to call.

Controlling the drawing style

Selecting the style of the output is done by providing different drawing routines.

There are four collections of drawing routines: method plotting style, title style (also affects the placement of the method on the page), grid style, and, for method groups, layout styles.

Layout and sizing is done according to the current drawing region (actually, the bounding box of the clipping path, for those who know PostScript) in practice, this will normally start off as the page boundaries. Because the PostScript is self-sizing, emacs-ringing doesn't output a %%BoundingBox comment to say how big the whole drawing is, and so the output isn't conformant EPSF and can't be imported into publishing programs. Later versions will let you force a particular size onto the output.

The printing commands prompt you to choose from the available styles. This document will list the styles available at the time, although there's a risk I'll write a new style and forget to include it here for a while.

Title styles

The title style file draws the title (and place notation, although it could omit that) and sets up the rest of the page for plotting the method, by setting up the drawing region to the part of the page that doesn't have the title on it.

Some of these have emacs file variables that cause the printing setup routines to prompt for more information.

Title styles available

default
A portrait format style.
half-width-portrait
A portrait style whose side margins are each a quarter of the available width, leaving the middle half for the method diagram.
third-width-portrait
Like half-width-portrait but with a different proportion for method and margins.
two-thirds-width-portrait
Like half-width-portrait but with a different proportion for method and margins.
two-inch-by-six-inch
A portrait style that ignores the drawing area given, and sets it to two inches wide and six high. You can edit this to produce some of other dimensions -- there are comments in it explaining how to do this. Note that it can't go beyond the drawing area it is given; it can only reduce it.
preset-dimensions
A portrait style occupying a set number of inches in height and width; quite like two-inch-by-six-inch, but the dimensions are prompted for (there is an emacs file variable that makes it do this).
preset-height-per-change
A portrait style with a set width, and a set height per change; these are prompted for.
preset-per-change-per-bell
A portrait style with a set width per bell, and a set height per change; these are prompted for.
landscape
A landscape format style.

Plotting style

The plotting style prints numbers and letters, draws lines and crossings, and so on. Plotting styles will typically fit themselves to the drawing region available.

Plotting styles available

circular
Like a one-column version of the Ringing World diary format, but wrapped round into a circle.
compact-line
A bit like Method-300, but each movement in one direction takes the same amount of space down the page, regardless of how many places up or down it goes.
cont-lines
Quite like the format in the Ringing World diary, but implemented differently from default, with each line being drawn in one go. You could use this as a basis for further styles that need each line drawn in one stroke.
course-bell
Like the default style, but puts the bell just before you in solid black, the one after you in mid-gray, and all the others apart from you and the treble in pale gray.
default
Quite like the format in the Ringing World diary. The file for this is well-commented, to serve as a base for people to add plotting styles. Each line is drawn as a series of short segments. You could use this as a basis for other styles that need to interleave the drawing of the lines with the plotting of the characters on a row-by-row basis.
full-grid
A full grid of thick lines, drawn in a variety of colours.
handbells-course
Draws a whole plain course on each pair of bells, intended for use with handbells.
handbells-lead
Draws a lead on each pair of bells, intended for use with handbells.
just-both-lines
Draws blue and red lines.
line-with-crossings
Draws the blue line, with the red line shown only where it crosses the blue line (for a distance of one row's height around the blue line).
line-with-wide-crossings
Draws the blue line, with the red line shown only where it crosses the blue line (for a distance of two rows' height around the blue line).
method-hundreds
Like in Method-300 and so on, with places taking up twice as much space as other changes.
one-column
Like in the Ringing World diary, but in one column.
stereo-grid
Like full-grid, but as a stereogram.

Producing a sampler

The command ringing:postscript-styles-sampler produces a PostScript file which prints a chosen method in all the styles available. You have to send this file to the printer or previewer yourself.

Group Layout styles

The group layout style draws the group title, and places the methods on the page by setting the drawing region for each one in turn and then using the title style and plotting style for the methods in turn.

Group Layout styles available

default
A portrait format style.
landscape
A landscape format style, which fits all the methods in the group across the page.
landscape-4-up
A landscape format style, which puts four methods on each page. You can take this as an example for other fixed per-page styles.
landscape-n-up
A landscape format style which puts a set number of methods on each page. It causes the printing system to prompt for this number, and also for whether to print page numbers.
landscape-n-by-m
A landscape format with several rows and columns -- it causes the printing commands to prompt the user for how many.

Grid styles

An optional underlying grid may be drawn for some method plotting styles.

Grid styles available

dots
A dot is drawn at each bell position of each row.
none
No grid is drawn.
triangular
A very thin line is drawn along each possible bell path.

Previewing

As well as the printing commands, there are similar previewing commands. Instead of sending the PostScript to a printer, they run a previewer to display it immediately.

Debugging

If you can't work out why a combination of styles is having a particular effect, try M-x ringing:postscript-debug before the command that creates the PostScript. This will produce a graduated border around each layout element, so you can see how the layout works. This takes a long time to print!


[John's ringing page] [John's home] Back to emacs-ringing index.
Contact me
Last modified: Thu Dec 16 14:53:40 GMT 2004