Publish/MarkupSummary

From J Wiki
Jump to navigation Jump to search
Publish | Overview | Markup Summary Markup Detail | Styles | Images Tables | Examples


Markup Language

The markup language is much like HTML and XHTML.

All tags are lowercase.

Most tags are paired, e.g. <h1>header text</h1>, and for such tags, the trailing tag is required.

Some tags are not paired, and these have a trailing forward slash before the closing bracket, e.g. <br/> for a line break. Note that you must use <br/> and cannot use <br>.

Some tags take parameters that set formatting styles.

Since <> are used for tags, and ~ for hypenation control, these characters must be entered as < , > and ˜. However, the characters can be entered normally within <pre> (preformatted) tags.

Any text that is not tagged is treated like ordinary paragraphs. The <para> tag can be used to set a style.

Within text paragraphs, extra blanks and linefeeds are ignored. To make an explicit blank, use &nbsp; and to make an explicit linefeed, use <br/>.

Any line beginning NB. is ignored. This is useful for editing text files in the J session.

The tag list and behaviour is kept as simple as possible for the first report, and this should help get this thoroughly tested and debugged. Once it is working, we can add to the definitions as required.

Standard Tags

Each of the standard tags can appear at the top level. This list does not include tags specific to particular elements, such as tables.

Properties

<title><author>

These tags are for the properties section of the PDF file, and are shown by selecting File|Document Properties in Adobe Reader.

Sections

<h1> ... <h6><para>

<h1>...<h6> are section headers. The <h1> header begins a new top-level section, on a new page.

<para> defines one or more text paragraphs. Use this only when setting a style, e.g. <para align=center>.

Styles

<b><i><pre>

<b>, <i> are bold and italic

<pre> is preformatted (i.e. fixed-font), as for code. No other markup is recognized in <pre>, so the <> characters should be used instead of their html equivalents.

Special Formats

<comment><h0><image><link><list><skip><table><toc>

<comment> any comment text is ignored.

<h0> is a special font style, typically used for the front page.

<image> specifies a bitmap, jpeg or J plot file.

<link> is an external URL, such as a web page.

<list> is a list (bulleted, numbered. etc).

<skip> is a vertical space

<table> is a table.

<toc> builds a Table of Contents. This is generated automatically from the <h1>, <h2> ... headers, up to a given level.

Layout

<br/><newpage/>

<br/> is a line break, i.e. start a new line, but not a new paragraph.

<group> tries to fit all output within the group on a single page.

<newpage/> starts a new page.

External

<include><j>

<include> includes another file (text, style or script). For example, this allows a report to be built from several text files. Note that files called master.sty or master.ijs are included automatically.

<j> executes a J expression, and inserts the result in the text file.

Tag Lists

All tags

<author><b><br/><comment><h1>...<h6><h0><i><image><include>
<j><link><list><newpage/><para><pre><skip><table><title><toc>

Unpaired Tags

<br/><newpage/>

Tags with no parameters

<author><b><br/><comment><i><include><j><link><newpage/><pre><title>