## Jskad Documentation

- Latest Changes
- Running Jskad
- Getting Started
- Typing Tibetan
- Typing English
- Copying and Pasting
- Converting Wylie to Tibetan
- Converting Tibetan to Wylie
- Converting Tibetan to Tibetan
- GUI Converter
- External Viewers
- Changing Keyboards
- Preferences
- Thanks
- Troubleshooting
- More on Keyboards
- Jskad on the Web

### Latest Changes

Jskad now has first-class support for converting entire documents. You can convert ACIP to Unicode, ACIP to Tibetan Machine Web (or TMW, or simply "Tibetan" in the menus), Tibetan Machine to TMW and vice versa, TMW to ACIP, TMW to Unicode, and TMW to Wylie (i.e., EWTS). Try it from the Tools menu. Full documentation is online.

Be on the lookout for formatting changes; Java's RTF support is currently poor.

Back to top

### Running Jskad

Jskad is launched via Java Web Start. Java Web Start is a technology from Sun which allows users to launch Java applications directly from a web browser. Java Web Start is supported by Windows, Linux, Solaris, and Mac OS X 10.1, and so Jskad should work on all of these platforms. (You don't need Java Web Start, but it does make upgrades much easier.)

Note that after you've run Jskad twice, it will ask you whether or not you want to create a shortcut to Jskad on your desktop. If you say yes, then you can launch Jskad from your desktop in future, without having to visit our web site. Every time Jskad runs, it will automatically check our site for updates - unless you're offline, in which case Jskad will just run the version which is cached on your computer.

Note that to run Jskad you no longer need to have the Tibetan Machine Web family of fonts installed; they are now embedded in Jskad itself along with the Tibetan Machine family of fonts. But if you wish to copy and paste into another application, then you do need the Tibetan Machine Web family of fonts installed.

Note also that due to a bug in earlier versions of Java, you should run Jskad under Java Runtime v. 1.4. If you are running Windows, Linux, or Solaris and you have an earlier version installed, please uninstall it, and then install Java Runtime v. 1.4.

Back to top

### Getting Started

When you fire up Jskad, a glitz-free window will pop up in the center of your screen. Start typing and you'll get Tibetan.

A menu bar appears at the top of the window. If you are running Jskad as an application, you'll see four menus: File, Edit, Tools, and Help. If you're running Jskad as an applet, you'll only see Edit, Tools, and Help.

'File' provides basic options for opening, closing, saving, and printing Rich Text Format (RTF) documents. To start a new document, choose 'New'. To open an already existing document, choose 'Open...' or select from the list of recently opened documents. In any case, if there is any text in the current Jskad window, a new window will be opened up. To close a Jskad window, choose 'Close' or press the 'X' button. To close all Jskad windows, choose 'Exit'. You will be prompted to save if you haven't already done so.

To save in Rich Text Format, choose 'Save' or 'Save As...'. Like other applications, 'Save' saves under the current name, while 'Save As...' lets you save under a new name.

The 'Edit' menu lets you cut, copy, and paste Tibetan text and set document preferences. These topics are covered elsewhere, in Copying and Pasting, Typing Tibetan, Typing English, and Preferences.

The 'Tools' menu provides options to help users who are converting Tibetan from one form to another and who wish to view the current document in an external viewer, such as Microsoft Word.

Back to top

## Typing Tibetan

Jskad lets you input Tibetan text according to several popular keyboard input methods. The default keyboard is the Extended Wylie keyboard. Other supported keyboards include Tibetan Computer Company Keyboard #1, Tibetan Computer Company Keyboard #2 , and Nitharta's Sambhota Keymap One. There is an ACIP keyboard also, but it is pre-alpha; there are various known bugs with it.

Jskad automatically opens up in Tibetan-entry mode upon starting it for the first time, so all you have to do to get Tibetan is start typing. Jskad subsequently remembers the keyboard you were using when you last exited Jskad. If you are in Roman-entry mode, then you will need to first switch to Tibetan-entry mode. Do this by selecting "Tibetan" from the "Input mode:" selection. The default point size for Tibetan text is 36. To change this go to 'Preferences' in the 'Edit' menu.

Back to top

## Typing English

With Jskad you are not restricted to just typing Tibetan. You can also type English or other European languages. If you are in Tibetan-entry mode, you can switch to Roman entry-mode by selection "Roman" from the "Input mode:" drop-down box. (If this doesn't get you into Roman-entry mode, then Roman entry-mode has been disabled by your alterations to your `my_thdl_preferences.txt` file and you should use 'Edit->Clear Preferences'.)

You can change the font and/or point size of Roman-based text entry by selecting 'Preferences' from the 'Edit' menu.

Back to top

### Copying and Pasting

Jskad supports RTF copy and paste. That means, among other things, that you can copy Tibetan back and forth between Microsoft Word and Jskad. To do so, you can use standard keyboard shortcuts (Ctrl-A for select all, Ctrl-X for cut, Ctrl-C for copy, and Ctrl-V for paste). Note that you must have the Tibetan Machine Web family of fonts installed on your computer for applications besides Jskad to be aware of them.

Note that not all applications support RTF copy and paste. Therefore, you cannot, for example, copy from Jskad and paste into Microsoft Excel. You can, though, copy into Word, select the snippet of Tibetan again, copy again, and then paste into Excel.

Back to top

### Converting Wylie to Tibetan

One of the most useful features of Jskad is its ability to convert from Extended Wylie to Tibetan. Note that there are several known bugs with this conversion, so study your output. There are three ways to do this:

1. Copy and Paste from Another Application
   Copy a block of Wylie text from Microsoft Word, and then paste it in Jskad.

2. Select Text and Convert to Tibetan
   Select the block of text you want to convert, and then choose 'Tools - Convert Selection - Convert Wylie to Tibetan' from the menu bar. Note that if you try to convert a chunk of text in which Tibetan text is surrounded by Wylie, the Wylie will convert, and the Tibetan will remain unchanged.

3. Import Wylie and Save as RTF
   Choose 'Tools - Import Wylie as Tibetan' from the menu bar. You will be prompted to 'Import Wylie'. Use the file chooser to select a .txt (text) file which contains nothing but Extended Wylie. Then you'll be prompted to 'Save as Tibetan'. Type a new name for your document. If the Wylie is valid, it will be converted and saved as RTF. This document can then be opened in Jskad.

All three of these options are suitable for most situations. However, if you are converting a lengthy document, you are advised to use the 'Import' option.

In all cases, Wylie can only be converted to Tibetan if it is valid Extended Wylie. If there is any invalidity, the entire conversion will halt. An informational message will appear, with a guess as to what the problem is. Take special note of the fact that Microsoft Word's 'smart quotes' cannot be converted. If you are copying from Microsoft Word, please turn off smart quotes (see Troubleshooting). Remember also that Jskad does not know the difference between Wylie and English. Just because you can see that a string of text is Wylie doesn't mean that a computer knows that it is!

Back to top

### Converting Tibetan to Wylie

Another useful feature of Jskad is its ability to convert from Tibetan to Extended Wylie. Simply select the Tibetan you want to convert, and then choose 'Tools - Convert Selection - Convert Tibetan to Wylie' from the menu bar. The text will be converted, and will appear (if you are using 'Tools - Convert Selection - Convert Tibetan to Wylie') as Wylie in the default Roman font and point size (see Typing English). Alternatively, launch the Converter and use it to convert whole documents with ease.

Jskad is very smart about determining which Tibetan letter is the root letter when there is ambiguity. (It compares against a hard-coded list of words for the ambiguous three-consonant cases, such as '-g-s). Jskad always produces 100% unambiguous Wylie, which you can feel certain will be read back in later as the very same Tibetan you started with. (Although, at this time, the Wylie-to-Tibetan side of the equation is not nearly as well tested, and in fact has known bugs.)

Remember that Jskad only works fully with the TibetanMachineWeb family of fonts. (It can open TibetanMachine documents for viewing and for converting to TibetanMachineWeb, but you cannot type in new TibetanMachine.) Therefore, it will only recognize TibetanMachineWeb as Tibetan. Any other Tibetan fonts will be assumed to be non-Tibetan. Note that you can convert TibetanMachine to TibetanMachineWeb and then convert that to Wylie if need be.

Back to top

### Converting Tibetan to Tibetan

Jskad also has the ability to convert from one digital form of Tibetan to another, with perfect results (as far as we know). You can convert Tibetan Machine Web to Tibetan Machine (use 'Tools - Convert All - Convert Tibetan to TM') and vice versa (use 'Tools - Convert All - Convert TM to Tibetan'). You can also convert Tibetan Machine Web to Unicode (using 'Tools - Convert All - Convert Tibetan to Unicode'). To convert Tibetan Machine to Unicode, simply convert from Tibetan Machine to Tibetan Machine Web and then convert from Tibetan Machine Web to Unicode.

To convert whole documents the easy way, just launch the converter.

Back to top

### GUI Converter

Jskad features a built-in converter with a user-friendly graphical user interface. This converter does not show you the documents as it is converting, though it allows you to view documents in an external RTF file viewer using the 'Open With...' button.

The converter handles all exceptional cases well. Thus, if the converter says that it succeeded, it really did succeed perfectly. You can rest assured that at least one character was converted (it being a common error to open a Tibetan Machine file and select a TMW->Wylie conversion), and that each character in the original document was correctly converted to a character in the new document. Even uncommon errors like running out of memory are skillfully handled.

The TM->TMW and TMW->TM conversions have been hand-verified using a document that lists each TMW glyph and its TM equivalent, and two bugs in Java's RTF support have been worked around. Moreover, the TM<->TMW tables were input by two separate teams and results compared. JUnit tests are used to verify that bugs do not sneak into future revisions. Ask David Chandler to elaborate on the verification and validation for the conversions, but the bottom line is that there are no known bugs in the TM->TMW, TMW->TM, TMW->Wylie, or TMW->Unicode conversions.

The user interface is fairly straightforward, except for the 'Find Some/All' options, which are used to create a list of the characters that are not in the desired font. These options are for those who want to be sure that they are converting a document that really is wholly in Tibetan Machine or Tibetan Machine Web.

At present, the TMW->Unicode conversion converts to the Ximalaya font. If users ask for it, the converter can easily be extended to convert to the font of the user's choice.

Back to top

### External Viewers

Jskad allows you to view an RTF document with an external viewer, such as Microsoft Word. To use this feature, just select the menu item 'Tools - Open With External Viewer...'. The first time you use this command, it will ask you to locate a program to view RTF files. Navigate to the program of your choice, such as "C:\Program Files\Microsoft Office\Office10\WINWORD.EXE". This program must be set up to accept the path of the RTF file as the sole command-line argument.

On subsequent invocations of the 'Tools - Open With External Viewer...' menu item, you will not be asked to choose the program again. If you wish to change programs, you must either manually edit your `my_thdl_preferences.txt` file or use 'Edit - Clear Preferences'.

Back to top

### Changing Keyboards

As already mentioned, Jskad supports four different keyboard input methods:

1. Extended Wylie
2. Tibetan Computer Company Keyboard #1
3. Tibetan Computer Company Keyboard #2
4. Sambhota Keymap One

The default keyboard is Extended Wylie. To change to another keyboard, choose 'Tools - Keyboards' and then select the keyboard you want to use.

Back to top

### Preferences

Jskad remembers your preferences for a few things, such as the working directory, the keyboard to use, the font size, etc. Your preferences are saved automatically at program exit. If you want to reset your preferences, you must use 'Clear Preferences' from the 'Edit' menu.

Jskad has a multi-level preferences mechanism available, which means that system administrators can configure Jskad as desired for all users on a certain computer, and then the users can have their overriding preferences. Further, power users can override their preferences' files using Java system properties. Contact Jskad's maintainers for more information about these advanced options if any of them interest you.

Back to top

### Thanks

Portions of this software are copyright Andrew Moulden. Our thanks go to him. Without his hard work, our users wouldn't be able to browse this very document with the ease they can.

Back to top

### Troubleshooting

The following are some common problems:

- I can't open a document I converted using Jskad. It opens fine in Microsoft Word, but not in Jskad itself.
  Java's RTF support is poor, so when Jskad converts a document, e.g. from Tibetan Machine to Tibetan Machine Web, sometimes Jskad cannot open the Tibetan Machine Web output. Microsoft Word can open it, though. The solution is to do any further work on the hard-to-handle document from within Jskad's converter (i.e., the converter that comes up when you choose 'Tools - Launch Converter...'). You might have luck with opening the hard-to-handle document in MS Word and saving as RTF.

- When I paste Tibetan into another application, it shows up as garbage like `0C-<m=-0+{;-{`.
  Either you haven't installed the Tibetan Machine Web family of fonts, or the application you're pasting into doesn't support RTF copying and pasting. To work around this latter problem, try pasting into an application that does support RTF copy and paste (such as Microsoft Word), and then select the Tibetan from there, copy it again, and paste into the third application.

- The vowels don't look right.
  Due to Java Bug Id 4498203, Tibetan vowels do not display properly in some versions of Java. Problematic versions include 1.3.0-02, 1.3.1, and the 1.4 beta 2. Uninstall Java, and reinstall Java 1.4. The vowels should look better.

- I can't convert from Wylie to Tibetan.
  Make sure the Wylie you are using is valid Extended Wylie. Also, check to make sure you aren't using any illegal characters such as Microsoft Word's 'smart quotes'. If smart quotes occur in your Microsoft Word document, you can eliminate them by choosing the 'Save As Text Only' option under 'Save'. Be warned that 'Save As Text Only With Line Breaks' does not remove smart quotes. Finally, be aware that there are known bugs with the Wylie-to-Tibetan conversions; you may have run into a bug.

- I opened up an RTF document in Jskad and some of the formatting was lost.
  Java's RTF support has some problems. Therefore not all formatting information will be retained when an RTF file is opened in Jskad.

- Jskad runs slow or is error-prone on my Mac.
  We are aware of this problem, and hope that things will get better as both Jskad and Apple's implementation of Java improve.

- I get garbage when I type Tibetan.
  This shouldn't happen now that the fonts are bundled inside Jskad's JAR. But if it does, make sure the TibetanMachineWeb fonts are installed. See Running Jskad.

If all else fails, remove Java and Jskad from your computer, and then reinstall both.

Back to top

### More on Keyboards

If you are brave, you can create your own keyboards. A keyboard file has five parts:

1. Comments
2. A list of parameters
3. A list of characters
4. A list of vowels
5. A list of punctuation

Sections (c)-(e) are structured in exactly the same way. A line consists of a value, an equals sign, and another value, for example "k=K". This means that to get the Tibetan character associated with Wylie 'k', you must press 'K'. If there is no right part of the equation, then there is no way in this keyboard to get the relevant character. For example, if you see "k=", that means that there is no way in this keyboard to get the Tibetan character associated with Wylie 'k'. Be careful with whitespace, which is not ignored: for example, " = " means [space bar] = [space bar].

Although the three additional production-quality keyboards included in this installation always define only one keystroke per character/vowel, it is possible to define a keyboard in which multiple keystrokes correspond to single characters/vowels, as in the Extended Wylie keyboard. However, punctuation is only ever allowed to correspond to a single keystroke. Below is a sample (partial) keyboard, with key parts explained, and much omitted:

Sambhota keyboard //Everything before <?parameters?> is taken to be a comment.

<?parameters?> //describes the logic of the keyboard
has sanskrit stacking=true //is there a stack key for sanskrit stacks?
has tibetan stacking=true //is there a stack key for tibetan stacks?
is stacking medial=false //is the stack key medial, ie like '+' in g+y, or not, as in +gy
stack key=f //what is the stack key? must be single character
has disambiguating key=false //is there a key to distinguish between Wylie gy and g.y?
disambiguating key= //if so, what is it?
needs a chen before vowels=true //for a-chen plus vowel, must you type a-chen first?
has 'a' vowel=false //is there a dummy 'a' vowel?
is achung consonant=true //can achung take part in consonantal stacks?

<?characters?> //characters include consonants and numerals
k=k
kh=K //left value is Extended Wylie & right is equivalent in Sambhota
g=g
ng=G
f= //no equivalent of 'f' in Sambhota

<?vowels?>
a=a
i=i
u=u
e=e
o=o

<?punctuation?>
= //read as [Space] = [Space]
/=,