Using Software on AI Center PCs
Michael A. Covington
Artificial Intelligence Center
The University of Georgia
Last revised 2009 July 6
Introduction
This document briefly introduces some of the software at the AI Center 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 AI Center 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 AI Center secretary (the "lend-out disc"). Be sure you get the current version of the CD and follow the instructions.
Notepad++
This is a versatile editor for ASCII text files of all kinds (the same files you'd edit with Notepad or Crimson Editor).
![]()
You can make numerous settings and there is an elaborate help system.
One particularly nice thing about Notepad++ is that you can "Edit with Notepad++" by right-clicking on any file, regardless of its type. (If the file does not contain text, you won't be able to do much, but the ability to view data with an editor can still be useful.) This is what you'll see:
![]()
Operation is basically self-explanatory.
In LaTeX, HTML, and most programming languages, Notepad++ 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 the editor guesses wrong, but that does not cause any problem with your file.
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:
- The official LaTeX manual is LaTeX: A Document Preparation System, by Leslie Lamport, available at the University Bookstore.
- A very good free manual by Oetiker is available here and other places. It is probably all you need, but read it!
- There is also a brief online manual under Start, Programs, MikTeX. Use it only to refresh your memory.
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.
- Make a folder and create your document (a .tex file) in it. (Use a folder because there will be other files.)
- Run LaTeX to turn the .tex file into a .dvi file.
- Run dvipdf to turn the .dvi file into a PDF file.
- Open the PDF file with Adobe Reader and view or print it.
- Optionally, you can use dvips to create a PostScript file and view it with GSview. We no longer recommend this, but the tools are still available.
Option 1: LaTeX by right-clicking
(This is a UGa AI Center 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:
- One way to do this is to choose Command Prompt on the Start Menu, and then change drive and directory to get to where you want. For instance, if your file is in U:\My Documents\Demo, you would do this:
![]()
- The other way to get to a command prompt in a particular directory is to right-click on the directory itself and choose "Command Prompt Here." (Note: This doesn't work with the "My Documents" folder, but it works with directories (folders) that are in it.)
![]()
Or you can right-click on the upper left corner of a directory that is already open, and do the same thing:
![]()
Hint: "Command Prompt Here" is not built into Windows. It is an add-on piece of software (DOSHERE.INF) on the CD that we lend out; it was originally part of the Windows NT 4.0 Resource Kit and is distributed free, but not supported, by Microsoft.
- In Windows Vista the procedure is similar, but "Open Command Window Here" is built into the operating system. Right-click on any folder to get to it. If you have not installed the AI Lab's Vista optimizations, you will have to hold down Shift while right-clicking. You can do this either on the icon representing the folder, or in the left panel of the Explorer.
![]()
![]()
The up-arrow key will call back previous commands so that you don't have to retype them.
- Run LaTeX by typing: latex myfile
- Run dviPDF by typing: dvipdfm -c myfile
- Open the PDF file by typing: start myfile.pdf
- Close the PDF viewer before running dviPDF again.
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 AI Center, 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.