Electronic Text Creation: Two-Day Workshop
on the TEI
Setting up your very own TEI encoding system that's free and has a friendly
interface
Last updated
October 21, 2003 10:34 AM
CDT
This may look complicated, but it's really not so bad. The price of using free
software is that you have to get your hands a little dirty, but it's quite rewarding
when you get it to work! If you have questions or problems, please email Kevin.
You may want to print these instructions to make your life easier, but you'll
need this page for the links to download.
- Connect to the Internet.
- Setup a JVM for your computer platform:
- Windows: You can skip this step if you already
have a Java Virtual Machine of version 1.4.2 or higher. If you're not
sure, go ahead and do this. Go to Sun's
download page, scroll down to Download J2SE v 1.4.2_02,
and choose the JRE for Windows installation.
You have to accept the license agreement. Choose to save the file to a
temporary location and then open it. Accept the license again and choose
the Typical installation. Once the installation finishes, you can
delete the shortcut icon it places on the desktop and the installation
file (j2re-1_4_2_02-windows-i586-iftw.exe) from the temporary
location.
- Mac OS X: Per the jEdit installation instructions,
you will need to run java 1.3 instead of java 1.4 (1.4 is currently the
default java is on most Macs. Java 1.3 is already installed—you just
have to make it the default.
- Launch a terminal application. Apple's default
terminal application is /Applications/Utilities/Terminal/.
- In the terminal window enter sudo /usr/local/bin/jsettestjdk
1.3.1. Ignore the alarming message about changing your JDK—this
is exactly what we're doing. (Note that in order to use sudo,
which is the commandline equivalent of the dialog box asking you for
your administrator's password, you will need to enter your administrator
user and password. If you have forgotten your password read Apple's instructions
on resetting it.) If you don't have this
command, you need to download it. It can be put anywhere, but the expected
place is in /usr/local/bin/. It's possible this directory
does not yet exist. To create it issue sudo mkdir /usr/local/bin.
To move the file there, presuming you download the file to your desktop,
use sudo mv ~/Desktop/jsettestjdk /usr/local/bin/.
- Next you need to download and install jEdit:
- Windows: Save the
jEdit installation file, jedit41install.jar to a temporary
location and then open it. Accept the license agreement, install it in
the default directory/folder, but when it asks you which components you
want to install, uncheck API documentation. Once installation
finishes, you can delete the shortcut icon it places on the desktop (if
you'd like) and the installation file (jedit42install.jar)
from the temporary location.
- Mac OS X: Download the
jEdit installation file, jedit41.dmg. Save it to a temporary
location and double-click it. Disk Copy will mount the jEdit disk.
Double-click the ReadMe, read it, and close it. Copy the jEdit folder
from the jEdit disk to wherever you'd like. Most people use /Applications/,
but there is something to be said for keeping all the applications that
were installed with your system (which are in /Applications/)
separate from those you install later, in which case you may want to put
it in /Users/Shared/applications/ or elsewhere.
- Close any extra windows that are open on your desktop (except these directions).
- Open the jEdit program for the first time. The first time you run the program,
it opens the help window so you can read about the program. Read as much as
you desire and close the window. In the future when you open jEdit, the Tip
of the Day. This will appear every time you start the program unless you disable
it by unchecking the checkbox.
- In the main jEdit window, go to Plugins -> Plugin
Manager... Click Install Plugins. Check the following
plugins (category names given before the colon):
- File Management: BufferTabs
- HTML and XML: XML
- HTML and XML: XmlIndenter
- HTML and XML: XSLT
- Support: ErrorList
- Support: SideKick
Click Install. When the plugin download process finishes, click
OK. Then click Close.
- Exit jEdit.
- Download and extract our zip file of things you'll need
for working in TEI:
- Windows: Choose to save the file to a temporary
location. Find the file (tei.zip) in this temporary location,
right-click on it, and choose Extract All Files. When it asks where
to extract the files to, type in c:\Program Files\jEdit 4.1\
instead of the default. Uncheck the box for viewing the extracted files.
(Note: If you have WinZip installed, you will want to choose Extract
to... when right-clicking on tei.zip.) Once you've
extracted the files, you can delete the original zip file (tei.zip)
from the temporary location.
- Mac OS X: Click on the link and save the file
to the desktop. If your browser hasn't already done so, unzip the file.
There are three different ways that you can do it:
- Double-clicking on it in Finder.
- Drag-and-dropping it to StuffIt Expander (usually
found in a location such as /Applications/Utilities/Stuffit Standard
7.0.1/).
- Opening a terminal window and enter these
two commands in sequence:
- cd ~/Desktop/
- unzip tei.zip
Regardless of which of the three methods you used
to unzip the file, in a terminal window, enter these three commands in sequence:
- sudo mkdir /usr/local/sgml/ (If you
get "File exists" error, ignore it.)
- cd /usr/local/sgml/
- sudo mv ~/Desktop/tei/ ./
- cd tei
- sudo mv ./hellotei.xml [path to jEdit folder]
(Note: <-- The path will be /Applications/ or /Users/Shared/applications/
-- however you decided it in step 3.)
- You may now disconnect from the Internet and close any extra windows that
are open.
- Open the jEdit program.
- Go to File -> Open... and open catalog.tei:
- Windows: The file is in c:\Program Files\jEdit
4.1\tei\p4\.
- Mac OS X: The file is in /usr/local/sgml/tei/p4/.
- Go to File -> Open... and open hellotei.xml:
- Windows: The file is in c:\Program Files\jEdit
4.1\tei\
- Mac OS X: The file is in the jEdit folder (wherever
you put it in step 3).
- Go to Search -> Find... In Search
for, type &DTDpath; (including the ampersand and semicolon
and the same capitalization), and then choose the appropriate one of the following:
- Windows: In Replace with, type
/Program Files/jEdit 4.1/tei/p4/ . (Be sure to capitalize the
same way.)
- Mac OS X: In Replace with, type
/usr/local/sgml/tei/p4/ .
Choose the radio button for searching in All buffers. Remove
*.xml from the Filter. Click Replace All and
then Close. Go to File -> Save All.... Click
Yes. Then go to File -> Close All.
- Go to Utilities -> Global Options...
(still inside jEdit).
- In the left-hand pane, choose jEdit -> Docking.
In the right-hand pane, scroll down to Structure Browser,
and to the right of it choose right from the drop-down
box. Do the same for XML Insert, just below Structure
Browser. Mac OS X users may want to choose left
for both of these instead of right so they don't interfere with
your Mac OS docks.
- In the left-hand pane, choose jEdit -> Editing.
In the right-hand pane, next to Change settings for mode (not
Default edit mode), open the drop-down box. Scroll down
to xsl. Uncheck Use default settings.
Set Indent width to 2. Do the same for the xml
mode (next to Change settings for mode just below xsl).
- In the left-hand pane, choose jEdit -> Loading & Saving.
In the right-hand pane, next to Default character encoding, choose
UTF8.
- In the left-hand pane, choose Plugins -> Buffer Tabs.
Check Enable Buffer Tabs by default.
- In the left-hand pane, choose Plugins -> Sidekick.
In the right-hand pane, check Parse on keystroke.
- In the left-hand pane, choose Plugins -> XML
(you have to double-click this) -> Catalogs. In the
right-hand pane, click the +. Find catalog.tei in the
p4 folder (/Program Files/jEdit
4.1/tei/p4/ in Windows and /usr/local/sgml/tei/p4/
in Mac OS X) and click Open.
- Click OK to save these changes to the global settings.
- Click once on the buttons Structure Browser and XML Insert
allong the right-hand side of the text editing area.
- Exit jEdit and open the jEdit program again.
- Open hellotei.xml (our test file). If no text in the file is
underlined, you've done it! This is a sample TEI-conformant file that you
can use as a template for other files.
Back to Introduction to TEI: Information
for Participants
Kevin Hawkins
October 21, 2003 10:34 AM
CDT