[PREVIOUS CHAPTER] [NEXT CHAPTER]

2 WIX Language

    "WIX" == "With Index and X-reference"

    2.1	WIX Language Introduction

    WIX is a language, which generates several types format documents.  It
    supports only Index and Xref (Cross Reference). It is not concerned
    with looks such as Capital, Bold, Italic. It supports minimum sets of
    a language.  It is similar to both nroff and texinfo. fwix.pl
    (bin/fwix.pl) translates a wix file or a set of *.wix to a text and a
    set of html documents. Roff and texinfo version is underway.

    Language statements is a half of nroff and texinfo. I would like to
    take fwix.pl to generate four kinds of formats but now fwix.pl
    supports text and html.

    doc/ is generated from .wix format files (fwix.pl translated).
    Html version can be seen in doc/html/ or http://www.fml.org/fml/.

    2.2	WIX Specifications

    A wix command is a line with the first character ".". The command
    ".key" syntax such as:

    [Structures]

    	.A	Appendix	Appendix

    The structure of WIX is similar to that of TeX.

    	.if	if
    	.fi	end of if

    	.return	return at this line

    [Index]

    WIX binds the keyword to the current Chapter.Section index.

    [Label]

    XRef corresponds this label to Chapter.Section.

    The keyword .xref is expanded to the following phrase.

    	see also 10.3

    If you use xref: in the middle of a line, you can use .ptr command.

    It is the same as ".xref" in essential, but without "see also".

    [Quotation]

    	.q	the beginning of quotation
    	.~q	the end of quotation

    In the quotation block, the indent is 3 spaces. If LaTeX, these
    correspond to

    	\begin{quote}
    	\end{quote}

    * Special statements, comments

    	.#		COMMENT
    	.comment	COMMENT

    and "include" command is to replace here contents of FILE.

    	.include	FILE

    2.3	Internationalization of WIX

    The current WIX supports both Japanese and English. You can write the
    simultaneous interpretation with the separator "=E". WIX prepares
    another statements apart from commands such as .C, .S, ...
    This simultaneous interpretation is for easy maintenance.

    * Statements

    Language context switch occurs when fwix encounters "=command" syntax.
    Language switch continues in the unit of blocks (paragraphs). That is
    that "empty line" (null line) is also a separator.  The block with a
    Japanese EUC code character appears in Japanese mode.  The block
    containing English characters appears both in Japanese and English.

    	=E

    	=E
    	declare the beginning of English block

    	empty line
    	empty line is the reset of Language mode.

    	=E
    	English

    	==

    	==
    	the end of English mode.

    	=S

    	=S
    	is a syntax sugar, which is translated to an empty line.
    	It is useful in some times though this is not essential.

    2.4	WIX and HTML Exceptions

    	.HTML_PRE
    	.~HTML_PRE

    which is translated to a <PRE> ... </PRE> block. fwix.pl ignore this
    block not in html mode.

[PREVIOUS CHAPTER] [NEXT CHAPTER]