This manual is made for people who want to use Reader on-line or off-line
(collective readings in physical spaces). TRML let's you scrolling text
automatically by defining the speed of each character, word, sententence,
etc. Almost one hour is needed to get in touch with this language and
use it perfectly. TRML is made for non-programmor people.
TRML language
TRML means "Temporized Reader Markup Language". The
specifications of this language has been realized by Teleferique collective
during 2002-2003, initiated by Etienne Cliquet (conception), Robin Fercoq
(C and Javascript programmation) and Erational (Flash and PHP programmation).
For that reason, TRML could also mean "Teleferique Reader Markup
Language".
Temporized Reader Markup Language
TRML define the speed of scrolling text in milliseconds for each
character, word, line, sentence, bloc, paragraph and so on...
Parser
TRML is part of parser language like HTML (Hyper Text Markup Language).
If HTML manage the aspect of text (color, size, font), TRML only
touch to the speed of scrolling. For that, TRML insert Tags [ and
] (square brackets) into text that fixe the modality of scrolling.
For exemple [c100] will format a pause of 100 milliseconds between
each characters. Afterward, it will be possible to make little effects
like acceleration, random speed, etc...
XML version of TRML
It exists two forms of TRML languages. This manual is studying the
mere simple form, more concise recognizable by the use of square
brackets ( [ and ] ). Another version of TRML is available more
verbose but conform to SGML specification (XMLschema).
This XML version is recommanded to make TRML files. Moreover, TRMLconvertor
is a little tool to translate the first form to XML version of the
language. If all of this seem complicated for you, don't consider
it for the moment (it's a detail).
TRML files
Programming in TRML
Programming in TRML language is very easy because there's not plenty
of different options. You don't need specific skills and particuler
software. A text editor like notepad, simpletext or emacs is enough
to make your own Reader text and TRML files.
Special characters
Characters [ and ] (square brackets) are
used to implement TRML tag. For that reason, it is impossible to
use these characters in the text itself.
Convert raw text to TRML files
We suggest to use the Editor
to program in TRML which include the save as TRML files
function.
Modes:
There is six different modes to define the speed for character, word,
line, sentence, punctuation bloc and pause. All of them could be associated
in the same tag. Here's a first example:
[c100w500b1000l2000] Mister Raven, perched on a tree,
"c100" define 100 milliseconds of pause between characters.
"w500" define 500 milliseconds between words, "b1000"
define 1 second after each punctuation sign and "l2000" 2
seconds after each carriage return.
Change of modes
To change the rythm of the text scrolling, just insert a new tag
with a new tempo. Your text can contain as many tags as you want.
On the other hand, the order of different modes inside the tag are
not important. You can write also write:
[l2000c100b1000w500] Held a cheese in his beak.
Persistance of modes
Modes are persistants. If don't change the value of a mode from
one tag to another (for example character mode), this remains active.
So a tag just actualized what has changed from the previous tag
and keep in mind the rest of modes values.
[c200] Mister Fox, [c100]enticed by the smell,
Character
The character mode is represented by a c followed by
a value in milliseconds.
[c230] Addressed him in language like this:
Word
The word mode is represented by a w followed by a value
in milliseconds.
[w400] « Oh! Good morning, Mr. Raven.
Line
The line mode is represented by a l followed by a value
in milliseconds.
[l400] How pretty you are! How beautiful you seem to me!
Blocs
The bloc value is represented by a b followed by a value
in milliseconds. This mode is sensitive to the following cases:
point (.), the colon (:), question mark (?) and exclamation mark
(!).
[b400] In truth, if your song
Signs
The signs modes is represented by a s followed by a
value in milliseconds. Close to the bloc mode, the signs mode include
further cases in addition to bloc mode: comma (,), point comma (;)
and the brackets )(.
[s400] is like your plumage,
Pause
The pause is represented by a p followed by a value
in milliseconds. The pause mode is active at its current position
only. The pause is where is the tag.
[p400] You are the phoenix of the hosts of this wood.»
Functions, frequency and modulations of modes:
Functions are differents to modes. Functions are always written in upper-case.
If not, you will encounter bugs. Functions are made to modulate modes
in sequencies. There are special effects of modes in a sense. 3 different
functions are availables for the moment.
Enveloppe
Enveloppe is represented by a E (upper-case required).
This function includes as many arguments as you want to define a
temporal pattern for a single mode with a succession of value in
milliseconds separated by a slash (/). Imagine you want 100 milliseconds
then 354 milliseconds then 20 milliseconds after each characters
and back again, you will code the function like this:
[c10E100/10/500] At these words the raven becomes overjoyed;
A function modulates a single mode that has to be included before
the functions as the example above.
Sinusoide
The sunusoide produce a deccelaration or acceleration of a mode.
It is a temporal sinusoide. It takes two arguments: First of all,
the amplitude of speed in milliseconds then
the frequency of that amplitude. The two arguments are separated
by a slash (/). Here's an example:
[c500S499/2000] And, to show off his beautiful voice,
Here, character mode is defined at 500. The S represents
sinusoide function. Its amplitude is 499 millisseconds. Amplitude
can not exceed the mode value because negative speed doesn't exist.
Moreover, the duration is fixed at 2 seconds for that sinusoide
amplitude.
Random
Random function is represented by a R. One argument
is required for this function: the margin of random between the
default value of the mode and this argument.
[w400R399] He opens his beak wide and lets his prey fall.
The tag above will determine a random number after each character
between 1 and 400 milliseconds.
Conclusion
Average speed
Althought everyone reads at a different speed, the international
average is around 200 words per minute. Here is the TRML conversion:
200 words per minute = [w300] = [c60] = [c30w150]
Credits
The examples used in this tutorial are part of the french writer
Jean de La Fontaine fable Le corbeau et le renard (1668-1694).
Translation to English by David Jonathan Justman.