19 pages
English
Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres

# TEX, MATHML, AND TEX4HT: TOOLS FOR CREATING ACCESSIBLE DOCUMENTS

Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres
19 pages
English

Description

ALT X, MATHML, AND TEX4HT:E
TOOLS FOR CREATING ACCESSIBLE DOCUMENTS
(A BRIEF TUTORIAL)
JACEK POLEWCZAK
Note: This tutorial can be found at http://www.csun.edu/~hcmth008/mathml/acc_tutorial.pdf
( pdf format) or at http://www.csun.edu/~hcmth008/mathml/acc_tutorial.html (html format).
Contents
1. Accessible documents 2
A2. What is LT X? 2E
3. What is MathML? 2
3.1. Presentation and Content MathML 3
3.2. The important qualiﬁcations 3
4. What is TeX4ht? 3
5. How to do it? 4
A6. First steps with LT X 4E
A6.1. Mathematical typesetting in LT X 4E
A6.2. A typical command line session with LT X 6E
A6.3. Front-ends for LT X 6E
A6.4. Tutorials and books on LT X 7E
7. Adjusting your browser for MathML and for screen reader 7
7.1. Testing your browser 8
7.2. Enabling screen reader in Firefox 8
8. TeX4ht in action 9
9. Download and Installation instructions for Mac platform 11
9.1. Adjusting TeX4ht 11
9.2. Optional Installation items 12
10. Download and Installation instructions for Windows platform 13
10.1. Adjusting TeX4ht 14
10.2. Optional Installation items 15
11. Installation instructions for Linux platform 16
12. Final Remarks 18
References 19
1 2 JACEK POLEWCZAK
1. Accessible documents
The aim of this tutorial is to present a selection of already available tools for creating accessi-
ble documents. The term accessible is understood here in the way W3C Accessibility Initiative
vides a ...

Sujets

##### MathPlayer

Informations

 Publié par Nombre de lectures 488 Langue English

Exrait

1
2 JACEK POLEWCZAK 1. Accessible documents The aim of this tutorial is to present a selection of already available tools for creating accessi-ble documents. The term accessible is understood here in the way W3C Accessibility Initiative understands it (see also, [ 1 ] for more information on ADA/508 compliance). While L A TEX pro-vides a powerful desktop publishing tool for creating scientiﬁc documents, Mathematical Markup Language (MathML) facilitates the use of mathematical and scientiﬁc content on the Web. And TeX4ht is a tool for converting L A TEX input into hypertext document, including MathML. There is elegance and eﬃciency when the same L A TEX (ASCII) source ﬁle can produce diﬀerent outputs; dvi, postscript, and pdf for printing/viewing, or XML/MathML for accessible viewing in browsers. Note: This tutorial does not address a separate process of creating accessible personal webpages; at the same time, the techniques provided here produce hypertext documents that constitute stan-dalone accessible content on the Web. An accesible front webpage, without accessible documents (subject lessons, essays, tests, homeworks, etc), will reduce itself to perhaps stylish, though empty shell.
2. What is L A TEX? L A TEX is a document markup language (as groﬀ/troﬀ and html languages are) for representing structured documents. L A TEX, initially designed and implemented by Leslie Lamport [ 2 ] in 1994, is based on Donald E. Knuth’s work (1984) The TEXbook [ 3 ] and is essentially a collection of TEX macros. TEX is a high quality typesetting program oﬀering extensive desktop publishing features and automation, such as numbering and cross-referencing, tables and ﬁgures, detailed page layout, bibliographies,andindexing.Also,TEX/L A TEX is the only VIABLE tool for creating high quality documents that contain math/physics/chemistry/biology/engineering notations. In contrast to most word processors, where one sees the document more or less as it will look when printed, L A TEX focuses on the meaning of what is being written without distractions by the visual presentation of the information. Finally, Open Source TEX/L A TEX is a professional typesetting and publishing tool (used by major publishing houses) that is free to use and/or to modify.
3. What is MathML ? MathML is an application of XML for describing mathematical notations, and capturing both their structure and content. It aims at integrating mathematical notation into World Wide Web documents so they can be accessible to the visually impaired. As L A TEX, XML is a markup language for representing structured documents. However, in contrast to L A TEX, XML is NOT page layout language. Also, XML is an interchange and manipulation interface designed for machine, and not to be edited by humans.
3
FROM L A TEX TO MATHML 3.1. Presentation and Content MathML. From Wikipedia entry for MathML : MathML deals not only with the presentation but also the meaning of formula components (the latter part of MathML is known as “Content MathML”). Because the meaning of the equation is preserved separate from the presentation, how the content is communicated can be left up to the user. For example, web pages with MathML embedded in them can be viewed as normal web pages with many browsers but visually impaired users can also have the same MathML read to them through the use of screen readers (e.g. using the MathPlayer plugin for Internet Explorer, Opera 9.50 build 9656+ or the Fire Vox extension for Firefox). . . . Presentation MathML focuses on the display of an equation, and has about 30 ele-ments, and 50 attributes. The elements all begin with m and include token element: <mi>x</mi> -identiﬁers; <mo>+</mo> - operators; <mn>2</mn> - number. Tokens are combined using layout elements which include: <mrow> - a row; <msup> - su-perscripts; <mfrac> - fractions. The attributes mainly control ﬁne details of the presentation. A large number of entities are available which represent letters &pi ( π , my addition); symbols &RightArrow ; and some non-visible character such as &InvisibleTimes ; representing multiplication. This tutorial focuses only on Presentation MathML . (see, [ 4 ] for further information on MathML)
3.2. The important qualiﬁcations. TEX/L A TEX provides extremely detailed page layout. HTML/XML/MathML formats do not! They are functional mark-up languages and NOT page layout languages. Their exact rendering is not given by the document but decided by a browser, by a window’s size, resolution, and font selection. The results are good for browsing but not for printing. The only way to produce precise page layouts is to represent documents in a page layout languages such as PDF , Postscript , or DVI formats. By the way, these are all open ﬁle formats .
4. What is TeX4ht ? TeX4ht is a system that converts TEX/L A TEX inputs into various hypertext documents: HTML or XML/MathML: L A TEX input = TeX4ht = HTML/XML/MathML output TeX4ht has been designed and maintained by Eitan M. Gurari [ 5 ] and [ 6 ] (see also [ 7 ]). First, a L A TEX source code is compiled by TEX/L A TEX program together with loading of the additional macros for creating hooks in the output. Next, this output is post-processed by the program tex4ht to produce hypertext. Additional ﬁles, such as .css and, if needed, image ﬁles are created by the program t4ht .
4
JACEK POLEWCZAK 5. How to do it ? This tutorial is supplemented with ready to download and use complete TEX/L A TEX/TeX4ht pack-ages for Mac and Windows platforms (Sections 9 and 10 , respectively). Linux packages are not included since the vast majority of Linux users have them already installed on their systems; how-ever, just in case, I also provide Linux installation instructions (Section 11 ). In addition to the full TeX/LaTeX system, the packages also include additional tools like Ghostscript, Ghostview, dvips, image converters, as well as Firefox browser extensions: fonts package for better MathML rendering and Open Source Fire Vox screen reader (all platforms).
6. First steps with L A TEX L A TEX ﬁle contains both the text and the instructions (the markup commands). The instructions tell L A TEX how it is to appear. This ﬁle is usually created with system’s text editor; the name of the ﬁle should end with .tex to identify the ﬁle’s content. Let’s say we call it foo.tex . When L A TEX processes foo.tex , it creates a new ﬁle of typesetting commands, foo.dvi . dvi stands for Device Independent and foo.dvi is used to create output on printers; it is also used for viewing. Typographical design is a craft and it is here where L A TEX shines. In contrast to most WYSIWYG word processors, such as MS Word, L A TEX concentrates on the logical structure rather than on the appearance of the document. Document design should make the document easier to read, not prettier. A basic set of standard document classes comes with L A TEX: article , book , report , letter , and slides . These classes determine exactly how documents will be formatted: Additional document classes can be created by a user, although one should know basic principles of typographical design before starting to create a new document class. The following simple L A TEX ﬁle together with the interspersed comments, provides a good ﬁrst look at the structure of a L A TEX ﬁle (see also Figure 1 below). In Figure 1 there are a number of words that start with \ (for example, see lines 11 and 12). These are L A TEX commands that describe the structure of the document. All L A TEX commands start with \ followed by one or more characters. L A TEX commands are case sensitive: \Begin and \begin are not the same. There are also commands like \command{text} : e.g., \emph{this is emphasized} (line 26) or \textbf{this is bold} (line 27) in Figure 1 . The actual text of the document always starts with \begin{document} and ends with an \end{document} command (see lines 12 and 40). Any text that comes after \end{document} command is ignored. At least one command must appear in the preamble, \documentclass command. In Figure 1 , it is \documentclass{article} (line 11), which speciﬁes that article class is use in the document. As mentioned above, there are other document classes, as well as there are many options in each class. There are also diﬀerent environments, type styles, sectioning commands, tables of contents, tabular material, cross-referencing, citations, and indexing commands. For these and more, I refer the reader to a number of tutorials and books on how to start using L A TEX; they are listed in Section 6.4 . 6.1. Mathematical typesetting in L A TEX. Mathematical typesetting is diﬀerent from text typesetting. There are two modes for mathematical expressions: math mode and display math mode . Math mode commands are surrounded by $$...$$ or by $...$ , and thus $$a^2+b^2=c^2$$ or $a^2+b^2=c^2$ produce a 2 + b 2 = c 2 .
FROM L A TEX TO MATHML % This is a small sample LaTeX input file (Version of 10 April 1994) % % Use this file as a model for making your own LaTeX input file. % Everything to the right of a % is a remark to you and is ignored by LaTeX. % The Local Guide tells how to run LaTeX. % WARNING! Do not type any of the following 10 characters except as directed: % & $# % _ { } ^ ~ \ \documentclass{article} % Your input file must contain these two lines \begin{document} % plus the \end{document} command at the end. \section{Simple Text} % This command makes a section title. Words are separated by one or more spaces. Paragraphs are separated by one or more blank lines. The output is not affected by adding extra spaces or extra blank lines to the input file. Double quotes are typed like this: ‘‘quoted text’’. Single quotes are typed like this: ‘single-quoted text’. Long dashes are typed as three dash characters---like this. Emphasized text is typed like this: \emph{this is emphasized}. Bold text is typed like this: \textbf{this is bold}. \subsection{A Warning or Two} % This command makes a subsection title. If you get too much space after a mid-sentence period---abbreviations like etc.\ are the common culprits)---then type a backslash followed by a space after the period, as in this sentence. Remember, don’t type the 10 special characters (such as dollar sign and backslash) except as directed! The following seven are printed by typing a backslash in front of them: \$ \& \# \% \_ \{ and \}. The manual tells how to make other symbols. \end{document} % The input file ends with this command.
Figure 1. A sample L A TEX ﬁle
5
6 JACEK POLEWCZAK Display math mode commands are surrounded by $...$ ; and thus $a^2+b^2=c^2$ produces a displayed equation a 2 + b 2 = c 2 And here is another variant of display math mode that produces an equation number: f(x)=\sum_{n=0}^{\infty}\frac{f^{(n)}(x)}{n!}
generates
(1)
f ( x ) = X f ( n ) ( x ) n ! n =0 6.2. A typical command line session with L A TEX. latex foo.tex produces foo.dvi (dvi ﬁle) pdflatex foo.tex produces foo.pdf (pdf ﬁle) dvips -o foo.ps foo.dvi produces foo.ps (postscript ﬁle) There is another variant (sometimes preferred) for producing pdf ﬁle from L A TEX ﬁle: latex foo.tex dvips -o foo.ps foo.dvi ps2pdf foo.ps produces foo.pdf (pdf ﬁle) where ps2pdf is postscript to pdf converter included in most distributions of L A TEX. Here is a pdf ﬁle produced by typesetting sample L A TEX ﬁle shown in Figure 1 . The following L A TEX ﬁle is also worth looking into, if you are new to L A TEX. And here is its pdf output . 6.3. Front-ends for L A TEX. With the use of graphical front-ends there is no need to know many commands or technical details of L A TEX, or even type-in the above command lines. They also provide templates for most styles, macros for commands, and viewers for dvi ﬁles. Output pdf ﬁles can be viewed by standard pdf viewers, e.g., Acrobat Reader . Two Open Source front-ends, TeXnicCenter (Windows platform) and TeXShop (Mac platform) are included with the packages described in this tutorial (see Sections 9 and 10 ). Below, I provide the links to ﬁve Open Source front-ends examples and one shareware example that are easy to install and use. L A TEX distribution is required for typesetting L A TEX ﬁles with these editors. Kile – an integrated L A TEX editor for the KDE desktop environment. KDE is available for many architectures such as PC, PowerPC (Mac for example) and SPARC; Texmaker , available on all platforms; XEmacs , available for all platforms; GNU TeX , WYSIWYW (What You See Is What You Want, and not WYSIWYG) TeX-macs editor for scientists, available for all platforms; LyX - The Document Processor , available for all platforms; Winedit , a popular Windows only editor (shareware).