The war of the words : syntax
This slashrun is based on a tolerant markup grammar. Basically, it means that tags don't need to be closed and attributes don't need to be always enclosed by quotes.
Tags:
camera |
term |
attack |
article |
title |
subtitle |
source |
image |
legend |
body |
heading
<camera>
When such a tag is defined, the slashrun operates in 3d manipulation mode instead of flying through indefinitely. The attributes are providing the settings for the initial point of view.
Attributes
fovy default: 45.0
Defines the field of view, in degrees. Values are usually between 30 (low perspective distortion) and 60 (higher distortion.)
quat default: '1.0 0.0 0.0 0.0'
Defines a unit quaternion, representing the orientation of the camera. The default values for the 4 parameters (w, x, y, z) correspond to a straight-from-the-top view.
These values can be modified interactively by manipulating the left mouse-button like a virtual trackball.
distance default: 500.0
Defines the distance from the center of rotation. Decreasing this value will zoom-in. Increasing it will zoom-out.
This value can be modified interactively by pressing the right mouse-button while dragging up and down.
center default: '0.0 0.0'
Defines the center of rotation. The default values for the 2 parameters (x, y) correspond to the top-left corner of the first article.
These coordinates can be modified interactively by pressing SPACE while dragging around.
Examples
<camera fovy=45 quat='0.97600055 -0.18351066 0.07763502 0.08786173' distance=564 center='-244.76694 -187.4577'>
<term>
Defines a term to be searched.
Attributes
group mandatory | min: 1 | max: 8
The number of the group associated with the term. Each group corresponds to a unique color. It's possible to associate several terms with the same group.
hits-per-char default: 5 | min: 1 | max: 10
Affects the number of missile-hits necessary for destroying a term. For example, a term like Atlantis with 8 characters and a hits-per-char value of 5 would require 40 hits.
Examples
<term group=1>Tehran
<term group=2 hits-per-char=10>Tel-Aviv
<attack>
Defines a missile attack.
Attributes
from mandatory
The number of the group from which the attack will be launched.
to mandatory
The number of the group targeted by the attack.
Examples
<attack from=1 to=2>
<attack from=2 to=1>
<article> mandatory
Marks the beginning of a newspaper article. Each article will be layed out on a single column.
<title> mandatory
The title of the article. It will be displayed at the very top of the column.
Examples
<title>WE'RE ON THE MOON
<subtitle>
The subtitle of the article. If defined, it will be displayed below the title.
Examples
<subtitle>Armstrong, Aldrin Take First Steps, Plant U.S. Flag
<source>
The source of the article. If defined, it will be displayed below the subtitle.
Examples
<source>
Pittsburgh Post-Gazette
Jul 21, 1969
<image>
Defines the image associated with the article. If defined, it will be displayed below the source. Images will be scaled and cropped consequently in order to reach a 16/9 format.
Attributes
src mandatory
The url (http based) of the image file (jpg | gif | png) to load.
shift-x default: 0.0 | min: -1.0 | max: 1.0
Provides control over horizontal cropping. The default value corresponds to the center of the horizontal axis.
shift-y default: 0.0 | min: -1.0 | max: 1.0
Provides control over vertical cropping. The default value corresponds to the center of the vertical axis.
Examples
<image shift-y=-1 src=http://farm4.static.flickr.com/3287/2873295400_b8dd5efdbc.jpg?v=0>
<legend>
The legend of the image. If defined, it will be displayed below the image.
Examples
<legend>Neil Armstrong & Buzz Aldrin at Madame Tussauds
<body> mandatory
The content of the article. All the remaining text will be included, from this point until the end of the code (or until a new article is defined.)
<heading>
Marks the beginning of a heading line within the content of the article. Headings automatically end at the end of the line (i.e. no need to close the tag.)