Using Software on IAI PCs

Michael A. Covington

Institute for Artificial Intelligence

The University of Georgia

Last revised 2007 August 8



Introduction

This document briefly introduces some of the software at the IAI that you may not be familiar with, namely:



Obtaining this software for your home PC

All of this software runs under Windows XP and Vista.

LPA Win-Prolog is commercial software, but has been available under an IAI site license since September 1, 2005, so there is no need to purchase a license.

The other software is freeware and is on a CD-ROM that can be borrowed from the IAI secretary (the "lend-out disc"). Be sure you get the current version of the CD and follow the instructions.

The other free recommended software for IAI students can be obtained here.



Crimson Editor

This is a versatile editor for ASCII text files of all kinds (the same files you'd edit with Notepad or Programmer's File Editor).

The first time you run Crimson Editor, it will look like this:

We suggest you click on the two "X" symbols (marked with orange arrows here) to get rid of windows you'll probably never use. You only need to do this once. Then Crimson Editor will look like this:

Operation is basically self-explanatory.

In LaTeX, HTML, and most programming languages, Crimson Editor uses colors to show the syntax of what you're typing (strings, keywords, comments, and the like). It also helps you balance parentheses and brackets. The colors and bracket-balancing are helpful but not infallible. Sometimes Crimson Editor guesses wrong, but that does not cause any problem with your file.

Crimson Editor includes word wrap and a spelling checker:

It's not as sophisticated as the checker included with MS Word, but it will often help you catch errors.

Note also that if you choose "File, Open Template," Crimson Editor will automatically create a minimal LaTeX document, C program, or several other things depending on what you choose.

Crimson Editor is not designed for multi-user systems. Please do not save preferences because you will affect other users. We hope the preferences that we've set for you are reasonable.



Programmer's Notepad

Programmer's Notepad is offered as an alternative to Crimson Editor. It is truly multiuser — allowing you to set your own preferences, which roam with you in your profile — and is much faster at saving files through a network. It includes syntax highlighting for numerous languages (note the menu circled above). At the Institute for Artificial Intelligence we have added a Prolog syntax template.

Programmer's Notepad does not include a spelling checker or a macro facility, nor is it fully documented. But it does have handy features such as a reference chart of HTML characters.

When you install Programmer's Notepad from the AI lend-out disc, you are given a choice whether to make it the default editor for text, LaTeX, Prolog, and HTML files (in place of Crimson Editor).



LaTeX text formatter

LaTeX (pronounced LAY-tekh, LAH-tekh, or la-TEKH) is the most widely used text formatting program in the mathematical sciences. Using it for your thesis is strongly recommended because LaTeX will automatically follow the University of Georgia's layout requirements. If you use any other word processor, you have to measure margins, count lines, etc., on your own.

We are actually using LaTeX 2e, which has been the current version for a long time. It was preceded by only one other publicly released version, LaTeX 2.09.

Note: For a spelling checker, use Crimson Editor, which works with LaTeX. LaTeX itself does not check spelling.


How to learn LaTeX:


How to use LaTeX:

To use LaTeX, you'll go through these steps:

There are two ways to carry out the process. Choose an option below.


Option 1: LaTeX by right-clicking

(This is a UGa Institute for Artificial Intelligence specialty, deployed starting in 2004, revised in 2007 to include dvipdf. You can't get it anywhere except from our lend-out disc.)

The key idea here is that you will run LaTeX and DVIPDF by just right-clicking on the files and choosing the appropriate options:

   

Steps:

(1) Make a folder for your files. This can be in My Documents or elsewhere.

(2) Create your document as an ASCII text file whose name ends with .tex.
If you wish, you can use File, New, LaTeX Document to create an empty document, then give it a more appropriate name, open it, and edit it (with Crimson Editor or Programmer's File Editor).

(3) To run LaTeX, right-click on the .tex file and choose LaTeX or TeXify. (The latter is better; it runs LaTeX more than once if needed for cross-references.)

LaTeX runs in a window like this:

As soon as you've looked at it, you can close it.

(4) To convert the output to PDF, right-click on the .dvi file and choose dviPDF.

dviPDF runs in a window like this:

As soon as you've looked at it, you can close it.

Caution: dviPDF will not run if you have the PDF file already open in Adobe Reader or Acrobat.

(5) Open the resulting PDF file with Adobe Reader or Acrobat, and view or print it.


Option 2: LaTeX at the command prompt

Experienced workers often prefer to run LaTeX from the command line as described in most LaTeX manuals. Here's how to do that.

(1) You must get to a command prompt in the directory in which your files reside.

Now that you're at a command prompt in the right directory, suppose your file is named myfile.tex. Then: The up-arrow key will call back previous commands so that you don't have to retype them.



LPA Win-Prolog

LPA Win-Prolog is the leading commercially supported Prolog compiler for Windows. It does not comply entirely with the new ISO standard, but for access to the Windows operating system, it is unsurpassed.

Operation is more or less self-explanatory. Get a file open with Open or New, then compile it with Compile All and type queries in the console window.

Most of our PCs are set up so that files with names ending in .pl will open with LPA Win-Prolog.

There is a good help system, and in addition, documentation is online under Start, Programs, WIN-PROLOG, Documentation.

Starting September 1st 2005, LPA Win-Prolog is site-licensed to the Institute for Artificial Intelligence, and will be available for use by AI students and affiliates. There is no longer any need for students to purchase a special version.



SWI-Prolog

SWI-Prolog is an excellent freeware Prolog compiler for Windows and UNIX. It conforms completely to the ISO Prolog standard and is a good replacement for the older SICStus and Quintus compilers. But it does not provide direct access to the Windows user interface.

To run SWI-Prolog, go to the Start Menu and choose SWI-Prolog. You can then either consult a file that already exists, or use the Notepad editor from within this environment. On most of our PCs, you can also open SWI-Prolog by double-clicking on a file whose name ends in '.pl'.

File paths: If your Prolog program does any file handling (see, tell, ensure_loaded, etc.), you'll need to either make sure SWI-Prolog is running in the directory where the files are, or else give full paths to the files When writing a path, be sure to double the backslashes, e.g., see('u:\\My Documents\\Prolog\\myfile.txt'). Alternatively, you can use single forward slashes, UNIX-style, as in see('u:/My Documents/Prolog/myfile.txt').

You can find out where SWI-Prolog is running with the pwd built-in predicate, and change it with cd, like this:

If you launch SWI-Prolog by double-clicking a .pl file, it will start up in the directory where that file resides. Otherwise, beginning with version 5.6.39, SWI-Prolog normally starts up in My Documents\Prolog (or Documents\Prolog under Vista). Other versions may be somewhat unpredictable, but if you wish, you can create an initialization file (under Settings) and put an appropriate cd command in it. You can also configure SWI-Prolog to use editors other than Notepad.