From 007f67a693e4d031fd3d792df8e4d5f43e2cb2e7 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 9 Jan 2006 00:49:07 +0000 Subject: doc/latex git-svn-id: svn://tug.org/texlive/trunk@84 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/braille/README.braille | 11 + Master/texmf-dist/doc/latex/braille/braille.html | 109 ++++ .../texmf-dist/doc/latex/braille/braillegif1.gif | Bin 0 -> 63189 bytes .../texmf-dist/doc/latex/braille/braillegif2.gif | Bin 0 -> 53008 bytes Master/texmf-dist/doc/latex/braille/summary.tex | 683 +++++++++++++++++++++ 5 files changed, 803 insertions(+) create mode 100644 Master/texmf-dist/doc/latex/braille/README.braille create mode 100644 Master/texmf-dist/doc/latex/braille/braille.html create mode 100644 Master/texmf-dist/doc/latex/braille/braillegif1.gif create mode 100644 Master/texmf-dist/doc/latex/braille/braillegif2.gif create mode 100644 Master/texmf-dist/doc/latex/braille/summary.tex (limited to 'Master/texmf-dist/doc/latex/braille') diff --git a/Master/texmf-dist/doc/latex/braille/README.braille b/Master/texmf-dist/doc/latex/braille/README.braille new file mode 100644 index 00000000000..abb8cb6d9c3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/braille/README.braille @@ -0,0 +1,11 @@ +braille.html -- short description of braille.sty, grade[12].py +braillegif1.gif -- transparent image +braillegif2.gif -- transparent image +braille.sty -- LaTeX2e package for typesetting Braille +grade1.py -- Python script to convert text to Grade 1 Braille +grade2.py -- Python script to convert text to Grade 2 Braille +summary.tex -- list of TeX macros and Braille symbols +summary.ps -- postscript of summary.tex + +William Park +April 1999 diff --git a/Master/texmf-dist/doc/latex/braille/braille.html b/Master/texmf-dist/doc/latex/braille/braille.html new file mode 100644 index 00000000000..6f0db66f902 --- /dev/null +++ b/Master/texmf-dist/doc/latex/braille/braille.html @@ -0,0 +1,109 @@ + +LaTeX2e package for typesetting Braille + +
+

LaTeX2e package for typesetting Braille

+

William Park

+

April 1999

+
+

1    Introduction

+

This package allows user to produce Braille documents on +paper for the blind without knowing Braille which can take years to +learn. Essentially, Python scripts grade1.py and +grade2.py convert ordinary text to grade 1 and 2 braille tags; +then, LaTeX2e package braille.sty takes the tags and prints out +corresponding braille symbols. +

2    braille.sty

+LaTeX2e package braille.sty defines macros, commands, +and fonts to typeset 6-dot braille symbols. Both Grade 1 and 2 +Braille are supported. All 189 grade 2 contractions are defined; +however, some puctuation symbols are missing simply because I couldn't +find them. List of TeX macros and braille symbols can be found in +summary.tex and summary.ps. +The full usage is +\usepackage[puttinydots,useemptybox]{braille} +where puttinydots puts {\tiny.} at all dot positions +for visual check, and useemptybox uses empty braille box +instead of \hskip. In addition, 4 macros are available to +the user: +
    +
  • \braillebox{} -- LaTeX picture box used as braille font +
  • \brailleunit -- \unitlength for \braillebox{} +
  • \brailledot{} -- actual dot printed in \braillebox{} +
  • \braille{} -- main user command +
+The command \braille{} is used to print braille +"text" or tags which are made up of +
    +
  • single characters, such as a, b, 1, +?, ! +
  • string enclosed in {}, such as {this}, {every}, +{his}, {''} +
+For example, given input text of I {like} {com}put{er}, it +will print braille symbols for I, like, com, +p, u, t, er, along with the 2 spaces. +Therefore, you can type braille paragraph just as you would +type normal text paragraph. To print single character, type that +character. To print multi-character contraction, type that string +enclosed in {}. Because of the way TeX processes macro arguments, if +the argument is more than one line, then put at least one space after +newline (\n). Spaces at the end of line, and tabs and +newlines everywhere are ignored; but, multiple spaces in between words +collapse to single space. +

For example, if you want to insult someone, +

+\usepackage{braille}
+\braille{May you live in an interesting time.}
+
+will print grade 1 braille, +

+

and +

\braille{May {you} live {in} an {in}t{er}e{st}{ing} {time}.}
+will print grade 2 braille, +

+

Now, if you can read and write Braille, then you can type +the braille tags manually. But, since my knowledge of Braille is +limited and recent, I wrote Python scripts to generate the braille +tags automatically. +

3    grade1.py, grade2.py

+

Grade 1 Braille is simple character-by-character +translation of text. Most braille tags are the same as text +characters. However, some puctuation markups, such as double and +single quotations, are made up of multi-character string which must be +enclosed in {} in order to be understood by LaTeX. +

Grade 2 Braille defines translation of 189 common strings +and where they can be used. Since braille tags here are the same +multi-character string as the text, they must be enclosed in {}. The +complexity of grade 2 is not so much in the replacement of strings, +words, or part of words, but it is in figuring out whether the +replacement can take place. The rules for applying grade 2 +contractions are complicated with many exceptions; sometimes you can +replace it, sometimes you can't. +

The Python scripts grade1.py and grade2.py +take ordinary text and generate grade 1 and 2 braille tags as defined +by braille.sty. Since the output is returned all in one line, +the scripts are originally designed to be used from text editor which +can format a long line into multi-line paragraph. The command line +usages are +

+
python grade1.py < text_file > tag_file +
python grade2.py < text_file > tag_file +
+or their usage as python module are +
+
string = grade1.convert(string) +
string = grade2.convert(string) +
+

4    Table of Contents

+ +


+This file was generated using HTMLtag package.
+William Park parkw@better.net
+April 1999 + diff --git a/Master/texmf-dist/doc/latex/braille/braillegif1.gif b/Master/texmf-dist/doc/latex/braille/braillegif1.gif new file mode 100644 index 00000000000..2ab7345bced Binary files /dev/null and b/Master/texmf-dist/doc/latex/braille/braillegif1.gif differ diff --git a/Master/texmf-dist/doc/latex/braille/braillegif2.gif b/Master/texmf-dist/doc/latex/braille/braillegif2.gif new file mode 100644 index 00000000000..5f49902dc97 Binary files /dev/null and b/Master/texmf-dist/doc/latex/braille/braillegif2.gif differ diff --git a/Master/texmf-dist/doc/latex/braille/summary.tex b/Master/texmf-dist/doc/latex/braille/summary.tex new file mode 100644 index 00000000000..fd3be518d92 --- /dev/null +++ b/Master/texmf-dist/doc/latex/braille/summary.tex @@ -0,0 +1,683 @@ +\documentclass[draft]{article} +\usepackage{fullpage} +\usepackage[puttinydots]{braille} + +\newcommand{\mytable}[1]{% + \enskip\begin{tabular}[t]{r|l} + \hline #1 \hline + \end{tabular}\enskip} + +\newcommand{\mytablewith}[2]{% + \enskip\begin{tabular}[t]{r|l} + \multicolumn{2}{c}{#1} \\ + \hline #2 \hline + \end{tabular}\enskip} + +\newcommand{\mytaglist}[1]{% + \enskip\begin{tabular}[t]{@{}l@{}} + #1 + \end{tabular}\enskip} + + +\begin{document} + +\title{Summary of Grade 1 and 2 Braille} +\author{William Park} +\date{September 1998, April 1999} +\maketitle + + +\section{Braille Alphabets} + +The following is list of \TeX\ macros and Braille symbols contained in +{\tt braille.sty}. The user command \verb+\braille{}+ converts +sequence of tags to Braille symbols. A tag can be one character which +appears as is, or multi characters which must be enclosed with \{\}. +For each tag, a predefined TeX macro is called to print out the +Braille symbols. For example, \verb+\braille{a{the}b}+ prints out +Braille symbols for {\em a}, {\em the}, and {\em b}. + +As usual, \TeX\ collapses multiple spaces to single space, and ignores +spaces at the end of line, and tabs and newlines everywhere. This means +that for multi-line paragraph, there must be at least one space after +newline (\verb+\n+). + +\begin{center} +\mytable{ +\braille{a} & a 1 \\ +\braille{b} & b 2 \\ +\braille{c} & c 3 \\ +\braille{d} & d 4 \\ +\braille{e} & e 5 \\ +\braille{f} & f 6 \\ +\braille{g} & g 7 \\ +\braille{h} & h 8 \\ +\braille{i} & i 9 \\ +\braille{j} & j 0 \\ +\braille{k} & k \\ +\braille{l} & l \\ +\braille{m} & m \\ +\braille{n} & n \\ +\braille{o} & o \\ +} +\mytable{ +\braille{p} & p \\ +\braille{q} & q \\ +\braille{r} & r \\ +\braille{s} & s \\ +\braille{t} & t \\ +\braille{u} & u \\ +\braille{v} & v \\ +\braille{w} & w \\ +\braille{x} & x \\ +\braille{y} & y \\ +\braille{z} & z \\ +\braille{{and}} & \{and\} \\ +\braille{{ar}} & \{ar\} \\ +\braille{{ble}} & \{ble\} \\ +\braille{{ch}} & \{ch\} \\ +} +\mytable{ +\braille{{ed}} & \{ed\} \\ +\braille{{en}} & \{en\} \\ +\braille{{er}} & \{er\} \\ +\braille{{for}} & \{for\} \\ +\braille{{gh}} & \{gh\} \\ +\braille{{in}} & \{in\} \\ +\braille{{ing}} & \{ing\} \\ +\braille{{into}} & \{into\} \\ +\braille{{of}} & \{of\} \\ +\braille{{ou}} & \{ou\} \\ +\braille{{ow}} & \{ow\} \\ +\braille{{sh}} & \{sh\} \\ +\braille{{th}} & \{th\} \\ +\braille{{the}} & \{the\} \\ +\braille{{wh}} & \{wh\} \\ +\braille{{with}} & \{with\} \\ +} +\mytable{ +\braille{,} & , \{ea\} \\ +\braille{;} & ; \{bb\} \{be\} \\ +\braille{:} & : \{cc\} \{con\} \\ +\braille{.} & . \$ \{dd\} \{dis\} \\ +\braille{!} & ! \{ff\} \{to\} \\ +\braille{(} & ( ) \{gg\} \{were\} \\ +\braille{{``}} & \{`\,`\} ? \{his\} \\ +\braille{*} & * \\ +\braille{{''}} & \{'\,'\} \{by\} \{was\} \\ +\braille{'} & ' \\ +\braille{-} & - \{com\} \\ +\braille{/} & / \{st\} \\ +\braille{[} & [ \\ +\braille{]} & ] \\ +\braille{{.`}} & \{.`\} \\ % open single quote (`) +\braille{{'.}} & \{'.\} \\ % close single quote (') +\braille{{percent}} & \{percent\} \\ +} +\end{center} + +Double quotes are specified by the usual \TeX\ notation of 2 +consecutive single quotes (\verb+{``}...{''}+). Single quotes are +specified by 2 character notation (\verb+{.`}...{'.}+) similar to +actual Braille code. This is because apostrophe (') and closing +single quote (') are identical in print and in ASCII text. Also, \% +must be spelled out, because it is an escape character for comment in +\TeX. + + +\section{Prefix Indicator} + +\begin{center} +\mytable{ +\braille{{Capital}} & \{Capital\} \\ +\braille{{Upper}} & \{Upper\} \\ +\braille{{Italic}} & \{Italic\} \\ +} +\mytable{ +\braille{{Number}} & \{Number\} \\ +\braille{{Letter}} & \{Letter\} \\ +} +\end{center} + + +\section{Contraction for Part of Word} + +\begin{center} +\mytablewith{Anywhere}{ +\{and\}&and \\ +\{ar\}&ar \\ +\{ch\}&ch \\ +\{ed\}&ed \\ +\{en\}&en \\ +\{er\}&er \\ +\{for\}&for \\ +\{gh\}&gh \\ +\{in\}&in \\ +} +\mytablewith{Anywhere}{ +\{of\}&of \\ +\{ou\}&ou \\ +\{ow\}&ow \\ +\{sh\}&sh \\ +\{st\}&st \\ +\{th\}&th \\ +\{the\}&the \\ +\{wh\}&wh \\ +\{with\}&with \\ +} +\mytablewith{Beginning}{ +\{be\}&be \\ +\{com\}&com \\ +\{con\}&con \\ +\{dis\}&dis \\ +} +\mytablewith{Middle}{ +\{bb\}&bb \\ +\{ble\}&ble \\ +\{cc\}&cc \\ +\{dd\}&dd \\ +\{ea\}&ea \\ +\{ff\}&ff \\ +\{gg\}&gg \\ +\{ing\}&ing \\ +} +\mytablewith{End}{ +\{ble\}&ble \\ +\{ing\}&ing \\ +} +\end{center} + + +\section{Final Letter Contraction for Middle or End of Word} + +\begin{center} +\mytablewith{Prefix \braillebox{46}}{ +d&ound \\ +e&ance \\ +n&sion \\ +s&less \\ +t&ount \\ +} +\mytablewith{Prefix \braillebox{56}}{ +e&ence \\ +g&ong \\ +l&ful \\ +n&tion \\ +s&ness \\ +t&ment \\ +y&ity \\ +} +\mytablewith{Prefix \braillebox{6}}{ +n&ation \\ +y&ally \\ +} +\end{center} + + +\section{Initial Letter Contraction for Whole or Part of Word} + +\begin{center} +\mytablewith{Prefix \braillebox{45}}{ +\{the\}&these \\ +\{th\}&those \\ +u&upon \\ +\{wh\}&whose \\ +w&word \\ +} +\mytablewith{Prefix \braillebox{456}}{ +c&cannot \\ +h&had \\ +m&many \\ +s&spirit \\ +\{the\}&their \\ +w&world \\ +} +\mytablewith{Prefix \braillebox{5}}{ +\{ch\}&character \\ +d&day \\ +e&ever \\ +f&father \\ +h&here \\ +k&know \\ +l&lord \\ +m&mother \\ +n&name \\ +o&one \\ +\{ou\}&ought \\ +} +\mytablewith{Prefix \braillebox{5}}{ +p&part \\ +q&question \\ +r&right \\ +s&some \\ +\{the\}&there \\ +\{th\}&through \\ +t&time \\ +u&under \\ +\{wh\}&where \\ +w&work \\ +y&young \\ +} +\end{center} + + +\section{Abbreviation for Whole Word} + +\begin{center} +\mytable{ +ab&about \\ +abv&above \\ +ac&according \\ +acr&across \\ +af&after \\ +afn&afternoon \\ +afw&afterward \\ +ag&again \\ +ag\{st\}&against \\ +alm&almost \\ +alr&already \\ +al&also \\ +al\{th\}&although \\ +alt&altogether \\ +alw&always \\ +\{and\}&and \\ +z&as \\ +\{be\}&be \\ +\{be\}c&because \\ +\{be\}f&before \\ +\{be\}h&behind \\ +\{be\}l&below \\ +\{be\}n&beneath \\ +\{be\}s&beside \\ +\{be\}t&between \\ +\{be\}y&beyond \\ +bl&blind \\ +brl&braille \\ +b&but \\ +\{by\}&by \\ +} +\mytable{ +c&can \\ +\{ch\}&child \\ +\{ch\}n&children \\ +\{con\}cv&conceive \\ +\{con\}cvg&conceiving \\ +cd&could \\ +dcv&deceive \\ +dcvg&deceiving \\ +dcl&declare \\ +dclg&declaring \\ +d&do \\ +ei&either \\ +\{en\}&enough \\ +e&every \\ +f\{st\}&first \\ +\{for\}&for \\ +fr&friend \\ +f&from \\ +g&go \\ +gd&good \\ +grt&great \\ +h&have \\ +h\{er\}f&herself \\ +hm&him \\ +hmf&himself \\ +\{his\}&his \\ +imm&immediate \\ +\{in\}&in \\ +\{into\}&into \\ +x&it \\ +} +\mytable{ +xs&its \\ +xf&itself \\ +j&just \\ +k&knowledge \\ +lr&letter \\ +l&like \\ +ll&little \\ +m&more \\ +m\{ch\}&much \\ +m\{st\}&must \\ +myf&myself \\ +nec&necessary \\ +nei&neither \\ +n¬ \\ +o'c&o'clock \\ +\{of\}&of \\ +\{one\}f&oneself \\ +\{ou\}rvs&ourselves \\ +\{ou\}&out \\ +pd&paid \\ +p&people \\ +p\{er\}cv&perceive \\ +p\{er\}cvg&perceiving \\ +p\{er\}h&perhaps \\ +qk&quick \\ +q&quite \\ +r&rather \\ +rcv&receive \\ +rcvg&receiving \\ +rjc&rejoice \\ +} +\mytable{ +rjcg&rejoicing \\ +sd&said \\ +\{sh\}&shall \\ +\{sh\}d&should \\ +s&so \\ +\{st\}&still \\ +s\{ch\}&such \\ +t&that \\ +\{the\}&the \\ +\{the\}mvs&themselves \\ +\{th\}&this \\ +\{th\}yf&thyself \\ +\{to\}&to \\ +td&today \\ +tgr&together \\ +tm&tomorrow \\ +tn&tonight \\ +u&us \\ +v&very \\ +\{was\}&was \\ +\{were\}&were \\ +\{wh\}&which \\ +w&will \\ +\{with\}&with \\ +wd&would \\ +y&you \\ +yr&your \\ +yrf&yourself \\ +yrvs&yourselves \\ +} +\end{center} + +Abbreviation \verb+{in}+ cannot touch any other word or punctuation. +And, abbreviations \verb+{be}+, \verb+{enough}+, \verb+{his}+ +\verb+{was}+, and \verb+{were}+ cannot touch punctuations. + +Abbreviations \verb+{by}+, \verb+{into}+, and \verb+{to}+ must adjoin +next word without a space. But, abbreviations \verb+{and}+, +\verb+{for}+, \verb+{of}+, \verb+{the}+, \verb+{with}+, and letter +\verb+{a}+ can join one another if they occur as consecutive words. + + +\section{List of All Tags} + +\begin{center} +\mytaglist{ +about \\ +above \\ +according \\ +across \\ +after \\ +afternoon \\ +afterward \\ +again \\ +against \\ +ally \\ +almost \\ +already \\ +also \\ +although \\ +altogether \\ +always \\ +ance \\ +and \\ +ar \\ +as \\ +ation \\ +bb \\ +be \\ +because \\ +} +\mytaglist{ +before \\ +behind \\ +below \\ +beneath \\ +beside \\ +between \\ +beyond \\ +ble \\ +blind \\ +braille \\ +but \\ +by \\ +can \\ +cannot \\ +cc \\ +ch \\ +character \\ +child \\ +children \\ +com \\ +con \\ +conceive \\ +conceiving \\ +could \\ +} +\mytaglist{ +day \\ +dd \\ +deceive \\ +deceiving \\ +declare \\ +declaring \\ +dis \\ +do \\ +ea \\ +ed \\ +either \\ +en \\ +ence \\ +enough \\ +er \\ +ever \\ +every \\ +father \\ +ff \\ +first \\ +for \\ +friend \\ +from \\ +ful \\ +} +\mytaglist{ +gg \\ +gh \\ +go \\ +good \\ +great \\ +had \\ +have \\ +here \\ +herself \\ +him \\ +himself \\ +his \\ +immediate \\ +in \\ +ing \\ +into \\ +it \\ +its \\ +itself \\ +ity \\ +just \\ +know \\ +knowledge \\ +less \\ +} +\mytaglist{ +letter \\ +like \\ +little \\ +lord \\ +many \\ +ment \\ +more \\ +mother \\ +much \\ +must \\ +myself \\ +name \\ +necessary \\ +neither \\ +ness \\ +not \\ +o'clock \\ +of \\ +one \\ +oneself \\ +ong \\ +ou \\ +ought \\ +ound \\ +} +\mytaglist{ +ount \\ +ourselves \\ +out \\ +ow \\ +paid \\ +part \\ +people \\ +perceive \\ +perceiving \\ +perhaps \\ +question \\ +quick \\ +quite \\ +rather \\ +receive \\ +receiving \\ +rejoice \\ +rejoicing \\ +right \\ +said \\ +sh \\ +shall \\ +should \\ +sion \\ +} +\mytaglist{ +so \\ +some \\ +spirit \\ +st \\ +still \\ +such \\ +th \\ +that \\ +the \\ +their \\ +themselves \\ +there \\ +these \\ +this \\ +those \\ +through \\ +thyself \\ +time \\ +tion \\ +to \\ +today \\ +together \\ +tomorrow \\ +tonight \\ +} +\mytaglist{ +under \\ +upon \\ +us \\ +very \\ +was \\ +were \\ +wh \\ +where \\ +which \\ +whose \\ +will \\ +with \\ +word \\ +work \\ +world \\ +would \\ +you \\ +young \\ +your \\ +yourself \\ +yourselves \\ +} +\end{center} + + +\section{Examples} + +\sloppy +\begin{itemize} +\item I like computer + + {\bf Grade 1:} I like computer \\ + \braille{I like computer} + + {\bf Grade 2:} I \{like\} \{com\}put\{er\} \\ + \braille{I {like} {com}put{er}} + +\item This document was created with LaTeX running on Linux + + {\bf Grade 1:} + This document was created with LaTeX running on Linux + \\ + \braille{This document was created with LaTeX running on Linux} + + {\bf Grade 2:} + \{Capital\}\{this\} docu\{ment\} \{was\} cr\{ea\}t\{ed\} \{with\} + LaTeX runn\{ing\} on L\{in\}ux + \\ + \braille{{Capital}{this} docu{ment} {was} cr{ea}t{ed} {with} LaTeX + runn{ing} on L{in}ux} + +\item Summary of grade 1 and 2 braille + + {\bf Grade 2:} + Summ\{ar\}y \{of\} grade \{Number\}1 \{and\} \{Number\}2 \{braille\} + \\ + \braille{Summ{ar}y {of} grade {Number}1 {and} {Number}2 {braille}} + +\item William Park + + {\bf Grade 1:} William Park \\ + \braille{William Park} + +\item September 1998 + + {\bf Grade 1:} September \{Number\}1998 \\ + \braille{September {Number}1998} + +\item I do not have to know how to read braille in order to produce + beautifully typeset braille documents. All I have to do is parse + ordinary text into tags for which TeX macros exist. TeX will, + then, print out predefined symbols associated with each tags. + + {\bf Grade 2:} + I \{do\} \{not\} \{have\} \{to\}\{know\} h\{ow\} \{to\}r\{ea\}d + \{braille\} \{in\} ord\{er\} \{to\}produce b\{ea\}uti\{ful\}ly + typeset \{braille\} docu\{ment\}s. All I \{have\} \{to\}\{do\} is + p\{ar\}se ord\{in\}\{ar\}y text \{into\}tags \{for\} \{which\} TeX + macros exist. TeX \{will\}, \{the\}n, pr\{in\}t \{out\} + pr\{ed\}ef\{in\}\{ed\} symbols associat\{ed\} \{with\} ea\{ch\} + tags. + \\ + \braille{I {do} {not} {have} {to}{know} h{ow} {to}r{ea}d {braille} + {in} ord{er} {to}produce b{ea}uti{ful}ly typeset {braille} + docu{ment}s. All I {have} {to}{do} is p{ar}se ord{in}{ar}y text + {into}tags {for} {which} TeX macros exi{st}. TeX {will}, {the}n, + pr{in}t {out} pr{ed}ef{in}{ed} symbols associat{ed} {with} ea{ch} + tags.} + +\end{itemize} + +\end{document} -- cgit v1.2.3