PasHi Pascal Highlighter
User Guide

Contents

» Contents

Introduction

PasHi is a fully featured command line program that highlights Pascal source code. It reads the original source code from standard input, files or the clipboard and writes the highlighted code as HTML to standard output, a file, or the clipboard.

HTML 4 [deprecated], XHTML and HTML 5 are all supported. CSS is used for styling. Style sheets may be external or can be embedded in the HTML document. Several predefined style sheets can be installed with the program. You can also create your own.

PasHi can either generate complete HTML documents or just fragments of HTML code. HTML fragments make it easy to embed highlighted code in existing web pages. Web page authors simply need to ensure that the necessary CSS classes are available. The easiest way to do this is to use an external style sheet.

PasHiGUI, a GUI front end for PasHi, is optionally included in the release. This provides a point and click way of using PasHi. Most, but not all, command line options are supported. Files and text can be dragged and dropped onto the program's window to highlight them.

» Contents

Installation

Details of how to install PasHi and PasHiGUI are provided in the file ReadMe.txt that is included in the program download.

Using PasHi

Default behaviour

By default PasHi reads input from standard input and writes highlighted output to standard output. You can process a single file and write output to another file using shell redirection. For example, to highlight source.pas and output to source.html use:

PasHi <source.pas >source.html

If you do not redirect output the resulting HTML is displayed on the console. If you don't redirect input then you must enter the source code manually on the command line, a line at a time. When you have finished you must signal end-of-file by pressing Ctrl+Z on a line on its own, followed by Return.

Note that PasHi's default behaviour can be altered by using a configuration file. See Configuring PasHi for full details.

Command line

PasHi's behaviour can be modified by specifying one or more file names and / or commands on the command line.

File names and commands can be intermixed. Deprecated: a later major release may require file names to be specified before the first command.

If one or more file names are entered on the command line then input is taken from the files. Source code is read from each named file in turn and concatenated before being highlighted. Standard input is ignored. Specifying a single file name has the same effect as redirecting standard input from that file.

If you specify file names on the command line you should not use the --input-stdin or --input-clipboard commands. No error will be reported if you do so, but the behaviour may not be as expected.

Many commands have both a long and a short form, but some commands have only a long form. They are explained in the following table.

Command Description
Long form Short form
--input-stdin  

Reads source code from standard input. Since standard input is the default input source, this command is provided mainly to restore the default behaviour if it has been overridden in the config file.

This command should not be combined with --input-clipboard or used if file names are specified on the command line.

--input-clipboard -r

Reads source code from the clipboard.

This command should not be combined with --input-stdin or used if file names are specified on the command line.

--output-stdout  

Writes highlighted code to standard output. Since standard output is the default output destination, this command is provided mainly to restore the default behaviour if it has been overridden in the config file.

This command should not be combined with either --output-file or --output-clipboard.

--output-file -o

Writes highlighted code to the file specified by the following parameter. Using this command has exactly the same effect as redirecting standard output to a file.

This command should not be combined with either --output-stdout or --output-clipboard.

--output-clipboard -w

Writes highlighted code to the clipboard. All output is stored as Unicode text. Character set information is excluded from complete HTML documents.

Do not combine this command with either --output-stdout or --output-file.

--doc-type -d

Determines the type of document to be output. All but one of the document types are complete HTML documents. The required document type is specified in the following parameter which must be one of:

  • xhtml: Complete XHTML document (the default):
    Default deprecated – to change to html5.
  • html4: Complete HTML 4 document. [deprecated]
  • html5: Complete HTML 5 document.
  • fragment or frag: An HTML code fragment containing only the highlighted code wrapped in <div> ... </div> tags.
    Various commands that relate only to complete HTML documents are ignored when this option is used.
--branding -b

Switches on or off the inclusion of "branding" information in output documents. Branding means that the document contains code indicating that the document was generated by PasHi.

In the case of --branding, the following parameter determines whether branding is switched on or off. The parameter must be one of:

  • True, 1, Y, yes or on: Include branding (the default).
  • False, 0, N, no or off: Exclude branding.

The short form of the command, -b, acts as a switch: -b+ and -b1 include branding while -b- and -b0 exclude it.

--language -l

Specifies the language used in the output document. A language code recognised by HTML must be provided in the parameter that immediately follows this command. The code is not checked. If this command is not supplied then no language information is included in the output file.

This command has no effect if the --doc-type fragment command is used.

--language-neutral  

Indicates that no language information is to be included in output documents. Since this is the default behaviour this command is provided mainly to restore that behaviour if it has been overridden in the config file.

--title -t

Sets the title of the output document. The title text must be supplied in the parameter immediately following the command. Titles containing spaces must be enclosed in double quotes.

This command has no effect if the --doc-type fragment command is also used.

--title-default  

Indicates that the default title is to be used in the output document. Since this is the default behaviour this command is provided mainly to restore that behaviour if it has been overridden in the config file.

This command has no effect if the --doc-type fragment command is also used.

--embed-css -s

Creates an embedded CSS style sheet in the output document. The CSS is read from the file whose name is specified by the parameter immediately following the command. The CSS must define the styles described below.

If the file name includes no path information, e.g. delphi2006.css, then the file will be expected to be found in the %AppData%\DelphiDabbler\PasHi directory. To read a file from the working directory, prepend .\ to it, e.g. .\delphi2006.css.

Do not combine this command with --link-css or --default-css because the commands are mutually exclusive and the result will be unpredictable. --embed-css is ignored if the --doc-type fragment command is also used.

--link-css -k

Specifies the URL of an external CSS file to be linked from the generated HTML file. The URL must be given in the parameter immediately following this command. The URL can be relative or absolute. The linked CSS file must define the styles described below.

Since no CSS is embedded in the output file the --hide-css command does nothing if used with this command. Do not combine --link-css with --embed-css or --default-css because the commands are mutually exclusive and the result will be unpredicatble. --link-css is ignored if --doc-type fragment is also used.

--default-css  

Inidicates that the default style sheet is to be embedded in the output document. Since this is the default behaviour, this command is provided mainly to restore that behaviour if it has been overridden in the config file.

This command negates both the --embed-css and --link-css commands and should not be combined with them because the result will be unpredictable. --default-css is ignored if the --doc-type fragment command is also used.

--hide-css
[deprecated]
-c

Determines wheher embedded CSS code is wrapped in HTML comment tags (<!-- ... -->). This command is provided because some old browsers will render the CSS as text unless it is enclosed in comment tags.

In the case of --hide-css the parameter following the command determines whether the CSS is hidden in comments or not. This parameter must be one of the following:

  • True, 1, Y, yes or on: Hide the CSS in comments.
  • False, 0, N, no or off: Do not use comments (the default).

The short form of the command, -c, acts as a switch. -c+ and -c1 hide the CSS in comments while -c- and -c0 do not.

--hide-css is ignored when either the --doc-type fragment or --link-css commands are used.

--legacy-css
[deprecated]
 

Determines whether CSS classes in generated HTML documents revert to those used in PasHi v1 (legacy) or whether the new class names introduced in PasHi v2 are used. The next parameter must have one of the following values:

  • True, 1, Y, yes or on: Use legacy (PasHi v1) style class names.
  • False, 0, N, no or off: Use new CSS class names (the default).

This command is provided for when you have to maintain code that uses the old CSS style names. New code should use the new class names.

When using the --embed-css or --link-css commands you should be careful to ensure that the CSS file you are embedding or linking defines the correct class names. The CSS files that are optionally installed with PasHi define both legacy and new CSS classes. See below for information about the required CSS class names.

--inhibit-styling  

Enables styling for specified syntactic elements to be omitted from the HTML output. This is useful in reducing the size of HTML documents if you have elements that are not styled in any way.

This command must be followed by a parameter which is either the name of a syntactic element for which styling is to be prevented or a set of zero or more syntactic elements. A set is a comma delimited list of element names, enclosed in { and } characters. The list must not contain spaces. Valid element names are:

  • space: white space
  • comment: comments
  • kwd: keywords
  • ident: identifiers
  • sym: symbols
  • str: string literals
  • num: integers
  • float: floating point numbers
  • hex: hexadecimal numbers
  • preproc: pre-processor instructions
  • asm: assembler code
  • err: syntax errors

Use {} (an empty set) or - (a minus sign) to enable all elements to be highlighted (the default).

Examples: To suppress generation of styling for white space only, use --inhibit-styling space or --inhibit-styling {space}. To suppress both white space and syntax errors use --inhibit-styling {space,err}.

--encoding -e

Sets the character encoding used for output to that specified in the next parameter. HTML documents are marked with the chosen format and the resulting file may include byte order marks. Valid encoding parameters are:

  • utf-8 or utf8: Encodes in Unicode using UTF-8 format with byte order mark (the default).
  • utf-16, utf16 or unicode: Encodes in Unicode using UTF-16, little endian format with byte order mark.
  • windows-1252, windows1252, cp-1252 or cp1252: Encodes in Windows-1252 format.
  • iso-8859-1 or latin-1 or latin1: Encodes in ISO-8859-1 format.

This command is ignored if the --output-clipboard command is specified, because data is always written to the clipboard in Unicode.

--trim -m
[deprecated]

Determines if or how source code is trimmed of blank lines and spaces before highlighting. Multiple source files are trimmed individually before concatenation.

In the case of --trim the following parameter is used to specify the type of trimming to be performed:

  • -, none or nothing: do not trim anything.
  • lines: trim leading and trailing blank lines (the default)
    Default deprecated – to change to all..
  • spaces: trim trailing spaces from lines.
  • all or everything: trim leading and trailing blank lines and trim trailing spaces from lines.

--trim also supports the following Boolean values that were used with --trim in PasHi v2.2.1 and earlier.

  • True, 1, Y, yes or on all deprecated: Aliases for --trim lines.
  • False, 0, N, no or off all deprecated: Aliases for --trim none.

The short form of the command, -m, acted as a switch in PasHi v2.2.1 and earlier. The command is now interpreted as follows:

  • -m+ and -m1 both deprecated: Aliases for --trim lines.
  • -m- and -m0 both deprecated: Aliases for --trim none.
--separator-lines  

Specifies the number of blank lines to insert between the contents of each source file. The required number of lines is given in the following parameter and must be in the range 0..16. The default value is 1.

This command is ignored unless more than one file is specified on the command line.

--line-numbering -n

Determines whether line numbers are prepended to each line of source code in the output document.

In the case of --line-numbering the following parameter is used to switch line numbering on or off:

  • True, 1, Y, yes or on: Line numbers are enabled.
  • False, 0, N, no or off: Line numbers are disabled (the default).

The short form of the command, -n, acts as a switch: -n+ and -n1 enable line numbering on while -n- and -n0 disable it.

--line-number-width -i

Determines the minimum width, in characters, occupied by line numbers. Line numbers are padded to this width if necessary, but longer line numbers are not truncated. The required width is given in the following parameter and must be in the range 1..6. The default value is 3.

This command is ignored if line numbering is not enabled: see the --line-numbering command.

--line-number-padding -p

Determines the padding character to be used when the number of characters in a line number is less than the available width. The required character is specified in the following parameter, which must be one of:

  • space: Pads with space characters (the default).
  • zero or 0: Pads with zeros.
  • dash: Pads with dashes (-).
  • dot: Pads with dots (.).

This command is ignored if line numbering is not enabled: see the --line-numbering command.

--line-number-start -z

Determines the number of the first line in the listing, in the range 1..9999. The default value is 1.

This command is ignored if line numbering is not enabled: see the --line-numbering command.

--striping  

Determines whether alternate lines of source code in the output document are styled differently or appear the same. The next parameter must be one of the following values:

  • True, 1, Y, yes or on: Style alternate lines differently.
  • False, 0, N, no or off: All lines have the same appearance (the default).

Each line of output is enclosed in its own <pre> tag. When striping is disabled each <pre> tag has class line which can optionally be defined in CSS to style the line. When striping is enabled the line class is replaced by odd-line and even-line on alternate lines. These classes must be defined differently in CSS otherwise no difference between alternate lines will be visible. See below for more information about the necessary CSS classes.

--viewport  

Determines the type, if any, of viewport meta-data that is written to a HTML document head section. The type of meta-data depends on the value the next parameter, which must be one of:

  • none: No viewport meta data is written (the default)
    Default deprecated: to change to mobile.
  • mobile, tablet or phone (the default): Meta-data is written that sets viewport scaling suitable for use on smart phones and tablets.

This command has no effect if the --doc-type fragment command is also used.

--edge-compatibility  

Determines whether a Microsoft Edge IE compatibility meta tag is written to an HTML document head. The next parameter must be one of the following values:

  • True, 1, Y, yes or on: Write the meta data.
  • False, 0, N, no or off: Do not write the meta data (the default).

This command has no effect if the --doc-type fragment command is also used.

--verbosity  

Determines the amount of output PasHi writes to standard error while executing. The amount of output depends on the value of the next parameter, which must be one of:

  • normal: Normal screen output (the default). This causes the program to display sign-on information and to display a message when the program completes. All output goes to standard error so that it does not affect highlighted source code written to standard output. Any error and warning messages are also written to standard error. When --version is specified no sign on or completion messages are displayed: just the version number is output.
    Default deprecated: to change to a new option that displays only warnings and error messages.
  • no-warn. Suppress warnings. Displays just as when the normal parameter is specified, except that no warning messages are displayed.
  • quiet: Quiet mode. Displays no sign on, completion or warning messages. If the program detects errors or if the --help or --version commands are used then this option is ignored and the program acts as if the no-warn parameter had been specified.
--quiet -q

Alias for the --verbosity quiet command.

--help -h

Displays a help screen. The remainder of the command line is ignored.

--version -v

Displays the program's version number. The remainder of the command line is ignored, except for --help, which takes precendence.

There are some commands inherited from PasHi v1 that are not listed above. They have now been superseded by other commands but are still supported for compatibility reasons. However they are now deprecated.

They are:

Old command Purpose
-rc
[deprecated]

Alias for the --input-clipboard command.

-wc
[deprecated]

Alias for the --output-clipboard command.

-frag
[deprecated]

Alias for the --doc-type fragment command.

-hidecss
[deprecated]

Alias for -c+ or the --hide-css yes command.

Note: the --hide-css and -c commands are also [deprecated].

Input encoding

Normally PasHi takes text files as input, either via redirection to standard input or from files.

Byte order marks (BOM) are checked to determine the encoding of Unicode files. Supported encodings are: UTF-8, UTF-16 little endian and UTF-16 big endian. If there is no BOM then the file is assumed to be encoded in the user's default code page.

The exception to the above is when the --input-clipboard command is used. The source code is then expected to be in Unicode.

Exit codes

PasHi uses the following exit codes:

Usage example

Perhaps the most common usage of PasHi is to read source code from the clipboard and replace it with a highlighted fragment. Here's what I do when pasting highlighted source into a web page:

  1. Select the unformatted source in an editor and copy it to the clipboard.
  2. Switch to a command window and do
    PasHi --input-clipboard --output-clipboard --doc-type fragment
    Alternatively you can use short forms or v1 commands to shorten this:
    PasHi -r -w -d fragment
    or
    PasHi -rc -wc -frag [deprecated]
  3. Switch to the editor containing the web page and paste in the highlighted code.

If you mainly use PasHi in this way you can configure PasHi to use those parameters by default. See the example below for details.

» Contents

Configuring PasHi

If PasHi finds a file named config in the %AppData%\DelphiDabbler\PasHi directory when it starts up, it is read. Any commands found in that file are used to change the program's default state.

PasHi does not install a config file by default, so if you need one you must create your own. You can do this either by creating a new file or by copying and editing one of the sample scripts provided with PasHi (providing you installed them).

The format of the config file is as follows:

PasHi expects config to be a UTF-8 encoded text file. The UTF-8 byte order mark may be omitted from the start of the file if required. If your text editor does not support UTF-8, confine yourself to valid ASCII characters and all will be well.

Sample config scripts

Some example config scripts are optionally installed in the %AppData%\DelphiDabbler\PasHi directory. The sample scripts are:

config-template
This script does nothing, but is copiously commented with all possible commands. Used in conjunction with the command reference above it is a good starting point for your own config script.
config-v1 [deprecated]
Emulates, as far as possible, the functioning of PasHi v1. This script requires that the file v1-default.css (provided) is present in the same directory.

The example config files, where installed, will not appear in the %AppData%\DelphiDabbler\PasHi directory until after PasHi has been run once.

Examples

Example 1

As mentioned above, a common use for PasHi is to highlight source code from the clipboard as an HTML fragment and place the HTML back on the clipboard. Instead of using the necessary commands each time you run PasHi you can add the following to the config file:

input-clipboard
output-clipboard
doc-type fragment

Now all you need to do is enter:

PasHi

on its own on the command line and it will perform the required actions by default.

Be warned that if you do this, you will need to specify the --input-stdin, --output-stdout and --doc-type commands on the command line to revert to default behaviour.

Example 2

Another useful example is where you have a CSS file containing your desired highlighting style that you always want to embed in your highlighted document. To save you having to specify a --embed-css command each time you run PasHi, simply put the command in config, something like:

embed-css C:\CSS\my-style.css

Or, in the special case of the CSS files optionally installed with PasHi in %AppData%\DelphiDabbler\PasHi, omit the path information and use, for example:

embed-css twilight.css

If you prefer to link to your CSS file instead of embedding it, you can add a line to config like:

link-css https://example.com/css/my-style.css

Should you now need to revert PasHi to using its default CSS you will need to include --default-css on the command line.

CSS styles used by PasHi

Styles defined

All the highlighted HTML generated by PasHi is enclosed in a <div> block that is given the class .code-pascal. CSS may be defined for this class to provide any required background, padding, margin or border for the entire code listing.

Each line of source code is enclosed in its own <pre> block. This tag should have CSS associated with it to set the required (mono spaced) font family and size. It is also used to set the spacing between lines using the margin CSS property - usually set to 0.

There are further CSS classes that can be associated with each line. They are:

.line
Applied to each <pre> tag when all lines are to be rendered the same, i.e. when code striping is switched off (see the --striping command above). Provide CSS for this class if you want to style the line, for example to draw a border.
.even-line
.odd-line
These classes are applied to <pre> tags in place of the .line class in even and odd numbered lines respectively when code striping is switched on (see the --striping command above). .even-line and .odd-line must be styled differently otherwise striping will have no visible effect. It is usual to provide a different background colour for alternate lines – hence the name "striping".
.linenum
This class is applied to any line numbers that may be prepended to the start of a line (see --line-numbering and related commands above). .linenum can be used to set the font style and colour used for the line number, along with the margin between the line number and source code and any separating border. The font used should be mono spaced otherwise the numbers may not line up correctly.

PasHi encloses every syntactic element within each line's <pre> block in <span> tags. Each of these tags is given a class name relating to the type of the element. CSS defining the font style & weight, text decoration and colour for each class should be provided. These classes are:

.comment
Style for comments.
.kwd
Style for keywords and reserved words.
.ident
Style for non-keyword identifiers.
.sym
Style for symbols (e.g := and >).
.str
Style for string literals.
.num
Style for whole numbers (integers).
.float
Style for floating point numbers.
.hex
Style for hexadecimal numbers.
.preproc
Style for preprocessor directives.
.asm
Style for assembler.
.space
Style for whitespace.
.err
Style for any errors detected.

These CSS classes should be defined as children of .code-pascal to avoid potential clashes with other similarly named styles in an HTML document.

Whenever you need to define your own CSS style sheets to use with files generated by PasHi you must provide definitions for all the above styles. You will need your own CSS if you:

Default style

To help you get started in defining your own classes, here are the default definitions that are used by PasHi.

Note that this example also includes some additional class names [deprecated]. These relate to PasHi v1.x, as explained below the listing.

.code-pascal,
.pas-source {
  background-color: transparent;
}

.code-pascal pre,
.pas-source pre {
  font-family: "Courier New", monospace;
  font-size: 9pt;
  margin: 0;
}

.code-pascal pre.line,
.pas-source pre.line {
}

.code-pascal pre.odd-line,
.pas-source pre.odd-line {
}

.code-pascal pre.even-line,
.pas-source pre.even-line {
  background-color: #f0f0f0;
}

.code-pascal .linenum,
.pas-source .linenum {
  border-right: 1px silver solid;
  padding: 1px 4px 1px 2px;
  margin-right: 0.75em;
  color: gray;
  background-color: #f0f0f0;
}

.code-pascal .comment,
.pas-comment {
  color: green;
  font-weight: normal;
  font-style: italic;
  text-decoration: none;
}

.code-pascal .kwd,
.pas-kwd {
  color: navy;
  font-weight: bold;
  font-style: normal;
  text-decoration: none;
}

.code-pascal .ident,
.pas-ident {
  color: black;
  font-weight: normal;
  font-style: normal;
  text-decoration: none;
}

.code-pascal .sym,
.pas-sym {
  color: black;
  font-weight: normal;
  font-style: normal;
  text-decoration: none;
}

.code-pascal .str,
.pas-str {
  color: blue;
  font-weight: normal;
  font-style: normal;
  text-decoration: none;
}

.code-pascal .num,
.code-pascal .float,
.code-pascal .hex,
.pas-num,
.pas-float,
.pas-hex {
  color: maroon;
  font-weight: normal;
  font-style: normal;
  text-decoration: none;
}

.code-pascal .preproc,
.pas-preproc {
  color: teal;
  font-weight: normal;
  font-style: normal;
  text-decoration: none;
}

.code-pascal .asm,
.pas-asm {
  color: black;
  font-weight: normal;
  font-style: normal;
  text-decoration: none;
}

.code-pascal .space,
.pas-space {
}

.code-pascal .err,
.pas-err {
  color: black;
  background-color: yellow;
  font-weight: normal;
  font-style: normal;
  text-decoration: none;
}

Change the styles to suit your needs.

Note that PasHi v1.x and earlier used different CSS class names. code-pascal was named pas-source while the remaining classes had pas- prepended to the class name, for example .kwd was .pas-kwd. If you want PasHi to revert to using the old style names pass "--legacy-css on" [deprecated]on the command line or place "legacy-css on" [deprecated]in the config file if you want to use the old style names by default.

Predefined style sheets

PasHi provides several .css files that can be used to change the style of highlighted code. They are (optionally) installed into the %AppData%\DelphiDabbler\PasHi directory when PasHi is first run after installation. The files are:

delphi4.css
Emulates the default syntax highlighting used by Delphi 4.
delphi7.css
Emulates the default syntax highlighting used by Delphi 7.
delphi2010.css
Emulates the default syntax highlighting used by Delphi 2010.
classic.css
Emulates the "Classic" highlighting style provided by Delphi 2010.
ocean.css
Emulates the "Ocean" highlighting style provided by Delphi 2010.
twilight.css
Emulates the "Twilight" highlighting style provided by Delphi 2010.
visual-studio.css
Emulates the "Visual Studio™" highlighting style provided by Delphi 2010.
mono.css
A monochrome highlighter.
null.css
Renders all elements in plain text: no highlighting.
notebook.css
Adopts the appearance of lined pale yellow notepaper with monochrome highlighting.
v1-default.css
Replicates the highlighting style used by PasHi v1. There is also a custom config script that replicates v1 as far as possible, and that script requires this CSS file.

† All the Delphi 2010 related files attempt to emulate the IDE code editor's left hand gutter when line numbers are displayed.

You can embed these files using the --embed-css command, followed by the file name on its own with no path information. You can also configure PasHi to always use one of the files by including a suitable embed-css command in the config file. You may copy and edit these files freely, and may use them on any website.

All the sample files support both legacy and new CSS class names.

» Contents

Using PasHiGUI

PasHiGUI provides a GUI for PasHi and permits many of PasHi's features to be accessed via a point and click interface.

Main display

PasHiGUI's main window displays two tabs: Display View and HTML view. These tabs provide different views of the generated HTML, as follows:

Display View
Renders the HTML as it will appear in a browser. If the generated code is a complete document it is displayed as-is. If it is a fragment the code is displayed using PasHiGUI's built in style sheet.
HTML View
Displays the generated HTML source code.

Options side bar

PasHi's behaviour is customised using the Options Side Bar. This can be displayed on the right hand side of the main window when required. It is toggled on and off using the Options | Show / Hide Options Bar menu option or the "cog" button on the toolbar.

All PasHi options supported by PasHiGUI can be set from this side bar. Options are grouped under various collapsible sections. Each group relates to one or more PasHi commands. Select the required options and click the Apply button when ready. Any currently displayed document will then be regenerated using the new settings.

You can revert to PasHi's default settings, as modified by any config file. Click the Restore Defaults to do this. Clicking this button updates the options in the side bar but does not regenerate the current document. You need to click the Apply button to do this.

The options set in the side bar are recorded in a file when PasHiGUI closes. They are reloaded the next time the program is started. This means that you can keep a different set of "defaults" for PasHiGUI to those used for PasHi.

Main menu

PasHiGUI is controlled by a main menu along with a toolbar that replicates some of the functions accessed via the menus. The menus are described below:

File | Open
Opens one or more source files for highlighting.
File | Save
Saves highlighted code as HTML to a file. The file can be saved with either .html or .txt extensions.
File | Exit
Quits the program.
Edit | Copy
Copies highlighted code to the clipboard as HTML, in text format.
Edit | Paste
Attempts to highlight any text on the clipboard. The text is assumed to be source code.
Options | Show Options Bar
Options | Hide Options Bar
Displays or hides the Options Side Bar.
Help | PasHi & PasHiGUI User Guide
Displays the combined user guide for PasHi and PasHiGUI in the default web browser.
Help | About
Displays the program's About Box.

Drag and drop

PasHiGUI supports the following drag and drop operations as a means of inputing source code to be highlighted:

Dependencies

PasHiGUI will not work unless PasHi is installed in the same directory and is the correct version. Using the installer to install both programs is the best means of ensuring that everything is set up correctly.

Deprecated features

Commands, parameters, defaults, CSS styles and configuration files marked as deprecated are likely to removed in the next major release. In the main these are breaking changes: they won't be backwards compatible will the current version.