Exporting annotated documents

JGloss supports the exporting of annotated documents in several formats, described below. You can select one of the formats from the Export submenu in the File menu.

A common option for all formats is the character encoding of the generated file. What format you use depends mainly on what application you want to use the exported file with. Modern web browsers should support all of the encodings. For other applications, if you are working on Windows, you should try Shift-JIS and on Unix EUC-JP. If the document or your annotations contain characters not in ASCII or the Japanese character set ( e. g. umlauts), you should use UTF-8, which takes more disk space but can represent all characters.

With the write "hidden" annotations switch you can control how to treat annotations which are marked as hidden in the annotation editor. If it is unchecked, the annotations for hidden words will not be written to the generated document.

HTML

If you export the document in HTML format, the document can viewed in any web browser that supports display of Japanese characters. The document title set in JGloss will be used as the title of the HTML document. The markup defined in the Ruby Annotation specification is used to embed the annotations, browsers which support it will render the annotations above/below the annotated words.

If the backwards compatible switch is not selected, the generated HTML will use all options of the Ruby Annotation to embed both readings and translations. The generated document will only render correctly on browsers which fully support the specification (I don't know of a browser which currently does). Otherwise, the subset of the specification which the Internet Explorer 5.5 understands will be used for reading annotations. Translations are shown using JavaScript in a floating window and the status bar of the browser when the user moves the mouse over an annotated word. In Netscape 6/Mozilla and other browsers which don't support ruby annotations but support the neccessary JavaScript functions, reading annotations will be shown in a floating window above the annotated word and in the status bar. In other browsers, the reading annotations will be shown in the document after the annotated word, the translations are not available.

Plain Text

The plain text export function will generate a text document similar to the originally imported document. Annotations will be written after the annotated word, enclosed in brackets.

LaTeX

The LaTeX export function will generate a text document in LaTeX format. There are several document style variants you can choose from by selecting the corresponding template from the template chooser. A description of the currently selected template is shown below the template chooser. You can add new or modified templates by selecting Add... from the template chooser menu. A file selector dialog will be shown where you can select the new template file. See Appendix B, LaTeX export template format for the template format description. You can choose the document font size from the Font size menu.

Standard LaTeX can't handle Japanese documents. There are two ways of adding support for Japanese: using pLaTeX, a LaTeX variant modified to handle Japanese, or the CJK macro package, which adds support for far eastern scripts to standard LaTeX. JGloss has templates for generating input files for both variants. Choose whatever option is easier for you to install and set up.

pTeX/pLaTeX is a modification of TeX/LaTeX, which can handle Japanese typesetting. To process a Japanese LaTeX document, you have to run the platex program instead of the normal latex command. pTeX is part of a standard TeTeX installation on Red Hat Linux, and may be available with other TeX distributions. You will also need some Japanese fonts for displaying the generated file. Ghostscript can supply fonts to TeX, Japanese fonts for Ghostscript are available at http://www.enel.ucalgary.ca/People/far/howto/gs-ttf.html . dvips will also have to be configured to know about the Japanese fonts if you want to convert the generated dvi file to Postscript. To display ruby for reading anntations, the macro ruby-annotation.sty (in the folder latex of the JGloss distribution) must be installed.

CJK is a macro package for adding Chinese/Japanese/Korean script support to standard LaTeX. In order to use it, you will have to download and install the macro package and the corresponding font package. Once the package is installed, you can process the files generated from JGloss with the LaTeX-CJK templates with the commands latex or pdflatex .

Annotation List

The annotation list export function will write a text file listing all annotations in the document. The dictionary form and the selected translation of the annotated word is used. Annotations will only be written once, duplicate entries will be skipped. You can use the generated text as a basis for a vocabulary list.

XML

Export the JGloss document as XML document. Reading and translation annotations will be embedded in special tags. You can transform the XML document to other formats using XSL/XSLT stylesheets.