$Id: SYNTAX,v 1.3 1998/02/13 07:47:49 itojun Exp $

#
	comment lines

%size <size>
	<size> :: size of fonts

%fore "color"
	"color" :: color of foreground

%back "color"
	"color" :: color of background

%bgrad <xsize> <ysize> <nuncolor> <dir> <zoomflag> <colorlist...>
	<xsize> :: width of generated image(0-100%)
			0 means physical display size
	<ysize> :: height of generated image(0-100%)
			0 means physical display size
	<numcolor> :: number of colors, 0 means no reduction.
			default 256 colors(8bit)
	<dir> :: gradation direction (0-360 degree) 
		 0 :Top to Bottom   90 :Left to Right
		180:Bottoom to Top 270 :Right to Left
			default 0
		negative value means "non-liner gradatin"
	<zoomflag> :: zoom to max size
		0 nozoom, 1 zoom
			default 0
	<colorlist> :: colors in the gradation image

%left
	left justify

%leftfill
	left justify, with folding long line
	no english wordwrapping/hypenation yet.

%center
	centering

%right
	right justify

%shrink

%lcutin
	appear afrom the left

%rcutin
	appear afrom the right

%cont
	draw without line break

%nodefault
	disable effect of default directive

%xfont "font"
	<font> :: use X's <font> to draw ASCII characters.

%vfont "font"
	<font> :: use VFlib's <font> to draw Kanji characters.

%bar <color> <width> <start> <length>
	<color> :: color of bar, foreground color will be used as default.
	<width> :: permill of display height. default 10.
	<start> :: start position percent of display width. default 0.
	<length> :: length percent of display width. default 100.

%image "imagefile" <numcolor> <xzoomrate> <yzoomrate> <zoomflag>
%image "imagefile" [<numcolor>] <screensize>
	"imagefile" :: name of image file
	<numcolor> :: number of colors, 0 means no reduction.
	<xzoomrate> :: height percentage against physical display or original
			size, 0 means the original height.
	<yzoomrate> :: width percentage against physical display or original
			size, 0 means the original width.
	<zoomflag> :: 0 means zoomrate is against physial display
			others mean zoomrate is against original size	

	<screensize> :: auto resizing.
			specify the original screen size by WIDTHxHEIGHT.
			unless screensize is the same size of the physical
			display, zoomrate is calculated automagically.

	Note that if the image is a binary image, current foreground
	and background colors are applied to the drawn image.

%prefix "string"
	Place "string" at the beginning of line.
	"string" should be a set of blank characters (\040).

	the effect of %prefix command in %tab command is local to
	tab-indented line.

	can't use japanese text in string (yet).

%icon <arc|box|delta1|delta2|delta3|delta4|dia> <color> <size>
%icon <imagefile> <color> <size>
	add an icon for itemizing lines.
	for example,
		%tab 1 size 5, icon box green 50
	gives you an green box on the leftmost column of line.
	size is the percentage against the current character size.

%bimage "imagefile"
	specify the name of background image file

%default <linenum> <list-of-directives>
	Unless nodefault directive is specified, the directives in the
	argument is prepended to the directives of the linenum'th line
	in every page. The syntax of <list-of-directives> is a comma
	separated directives.
	This directive has to be placed in the preamble.

%tab <tabnum> <list-of-directives>
	Apply list of directives, if any of the lines start with tabnum
	tabs.
	This directive has to be placed in the preamble.

%page
	A new page starts

%vgap <gapsize>
	specify vertical gap size of each line
	<gapsize>:: percentage againt current charcter size
		vertical gap = vertical font size * gapsize / 100

%hgap <gapsize>
	specify horizontal gap size of each line
	<gapsize>:: percentage againt current charcter size
		horizontal gap = vertical font size * gapsize / 100
	NOTE: horizontal gap is calcurated based on vertical size,
	because fonts are propotional (horizontal size varies by code point).

%pause
	stop drawing until foreward key or button is pressed

%mark
	mark the current position on the screen, so that we can come back
	later by %again.
	NOTE: mark is local to a page.  mark will be cleared at the page
	boundary.

%again
	move current position to the location marked by %mark.

%system "command"
	fork&exec the specified program.
	NOTE: the program will be invoked every time the page is redrawn.
	It sometimes annoy you.  it needs some rework.

	Special translation for presentation-window-relative geometry:
		Argument that starts with "%" will be translated as if
		it was interpreted relative to presentation window.

		"xeyes -geometry %50x50+25+25"  will be translated
		so that eyes appear on the center of the presentation window.

	the command has to be placed on a line alone.
	do not use commas.

	process will be killed when you leave the page.

%system "command" <page>
	almost same as above.
	process will be killed when you leave the specified <page>.
	if you set <page> to -1, the process will be killed when MagicPoint
	is terminated. (of course, you can terminate the child process alone
	by yourself)

%filter "command"
TEXT
%endfilter
	fork&exec the specified program, feed TEXT into that process
	from standard input.  use the standard output from the process
	as presentation input.
	do not forget to place %endfilter.

	the command has to be placed on a line alone.
	do not use commas.
