Postscript Mode Help
Name:Postscript Mode
Version:1.2
Last update:2020-05-27 14:28:44





Introduction

Postscript mode is a mode for the text editor Alpha: it is designed to facilitate editing, processing, viewing for both PostScript (.ps) and Portable Document Format (.pdf) files.
Once it is in Postscript mode, Alpha displays a menu (called PS) in the menu bar. The commands in this menu let you perform tasks such as converting Postscript files to PDF format, manipulate and modify Postscript files with the psutils tools, convert Type 1 fonts with the t1utils tools.
If you need to edit and execute command lines with GhostScript, see the Gs Menu package in Alpha.
In order to test the Postscript mode functionality, you can open the PostScript Example file, and then try using the various menu items.

Description

Description of the Postscript Menu items:

Main menu

Send To Viewer
View the current postscript or pdf document.
Send To Printer
Print the current document: if it is a PostScript file, the code is sent to the printer (you must have a PostScript printer of course). If it is a pdf file, it is sent to Alpha's default PDF viewer and printed from there.
Convert Ps To Pdf
Just as it says.
Display Bindings
Display the bindings currently defined in Postscript mode.
Menu Shortcuts...
Define custom shortcuts for the menu items.

Postscript Tools submenu

This submenu contains various utilities concerning PostScript files and PostScript fonts.
epstopdf
Converts an encapsulated PostScript file to a Pdf file.
afm2tfm
Converts Adobe metrics files to Tex metrics files. Can be used also to build elementary virtual fonts.

psutils suite

The psutils suite contains four programs designed to select, manipulate, rearrange the pages of a PostScript file. All these four items display a dialog in which you can specify different options. Press the Execute button to process the command from Alpha.

t1utils suite

The T1utils suite contains six programs designed to convert PostScript font files. The output file will be in the same folder as the input file.

The Mark pop-up menu

Marking is different in PostScript source files and in AFM (Adobe Fonts Metrics) metrics files. If the Auto Mark checkbox is checked in the preferences, the file is automatically marked at opening.

The Functions pop-up menu

The Parse pop-up menu contains the bind def, dict def and load def statements.

Shift-Command double clicking a word

If you Shift-Command-Double-Click on a keyword, you access its definition. This procedure looks first for a definition in the current file itself, then in the list of Postscript primitives.

Option clicking the title bar

If you Option-Click in the title bar, you get a list of all the .ps and .pdf files located in the folder of your current window).

Completions

There is a set of completion procedures in Postscript mode. There is also a set of abbreviations. Just type the following abbreviations and hit the completion key to have them expanded to a complete structure:
def
for
forall
if
ifelse
loop
repeat
You can also type the first letters of a word and hit the completion key. If it is recognized as a keyword, it will be completed. If there are different possible completions, they will be listed in the status bar: hit the completion key again and you will have a list of all the possibilities from which you can select the one you want.

Key bindings

A few key bindings are defined in Postscript mode. Use the command Display Bindings in the Postscript menu to see them or click here.

Postscript Mode preferences

The Preferences… item in the Mode Setup submenu of the Alpha menu allows you to edit specific preferences for the Postscript mode. You can specify there:

Known problems

Please report any problem or bug you encounter to Alpha's Bug Tracker.

License and Disclaimer

Copyright (c) 2001-2020, the Alpha Community.
All rights reserved.
The Postscript Mode 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: 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 THE ALPHA COMMUNITY 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.