Pantext is a proposed (i.e. half-baked) text markup subset of panscript. It is roughly equivalent to other text markup languages such as HTML, wikitext and markdown. However its aims are rather different. HTML tries to identify the semantics - the structure - of online page content. Early versions were human-friendly and included a great deal of styling markup but as time went by, strenuous attempts to make it more machine-friendly by exorcising this aspect to CSS was made, while some simple navigation features were left to javascript. Web pages today are a nigh-on unintelligible and somewhat dysfunctional code salad; not to put too fine a point on it, HTML5 sucks. Markdown is an example of the opposite extreme, as a minimal code vocabulary for banging down the basic formatting of text and adding images. Wikitext is closer to the idea of pantext, having a simplified syntax like markdown but offering fairly rich functionality, including integration with CSS. It also offers elegant transclusion functionality, for adding material from other wikitext pages. But it too is incomplete and idiosyncratic, relying on programmatic code extensions and even a little server magic to provide adequate functionality. The table below gives a comparison between these markup languages.

Pantext aims to offer full page layout and navigation, with some wordprocessor and DTP features not found even in HTML or wikitext, while being as easy to learn and fast to type as wikitext or markdown. The (X)HTML experience proved that this is not compatible with language design for efficient machine processing, so where needs conflict pantext does it the human way. For example pantext incorporates significant aspects of CSS (in much the samer way that the original HTML did), to save having to learn more languages or syntaxes than necessary. I also make no apology for using the Tab key for its original purpose; it was put there for a reason and too many developers forget what that is.

Since panscript is still only the germ of an idea and worked out in even less detail than here, pantext could change radically as (and if) the whole thing evolves. For example I am unsure how closely to stick to print-compatible markup and avoid interactive things like hyperlinks, navigation widgets and sortable tables. Equally, what about document sets, page breaks and other print-oriented features? Or smarts like TOC and index building? Should pantext invade TeX/LaTeX space? Are these for pantext or other dialects (as, say, maths is)?

The syntax comprises two broad sub-subsets; simple markup to apply everyday formatting text on-the-fly, comparable to Markdown, and slightly more involved code for the fancier stuff one needs to think about more and vary less often. At present, these are not as carefully distinguished as they might be.

One particular idea taken from Wikitext is that of multiple keypresses of an easily type-able symbol. Generally speaking, the more arcane the feature, the more repetitions you will need to type. On my pretty typical PC keyboard, non-alphanumeric characters that can be typed without even the shift key are: ` - = [ ] ; ' # \ , . / . The first, the backtick `, is visually close to the apostrophe ' and best avoided (though I may use it for smart quotes). The period has too many other uses, such as the ellipsis ... . Panscript leans heavily on most of the others, with the backslash \ reserved as the traditional escape character of regular expressions.

The general syntax for a line of pantext is:

    [line markup]: [content]

Where it is necessary to mark the end of a markup container, and only then, is a closing tag required:

    [line markup]: [content] [closing tag]

The content may also include inline markup.

If the code listed in the table below is a little baffling in places, that is entirely my fault - I just bashed it down in minimalist form and it would need some rearrangement to be presented properly. Still, at least it's there.

Stuff to be added to the table: non-breaking spaces and hyphens, soft hyphens, smart quotes and other non-keyboard characters. Arbitrary attributes. Page metadata and stylesheets. Fill in the gaps (currently just font specification). Notes. Colour coding for specific subsets.

Formatting Pantext HTML Wikitext Markdown Markdown (alt)
Text layout and positioning
Paragraph Blank line <p></p> Blank line Blank line
Line break Line break <br> HTML
>Align (L/C/R/J) ~L/C/R/J; CSS or align attribute CSS
Indent Tab CSS :
Horizontal Rule ---- <hr> ---- --- ***
Text blocks
Heading 1 #1; <h1> </h1> = = # (heading)
Heading 2 #2; <h2> </h2> == == ## (heading)
Tiitle #T;
Caption #C;
Bullet list ## * ## <ul><li> </li></ul> *
Numbered list ## # ## <ol><li> </li></ol> #
Description list ## || | ## <dl><dd> </dd><dt>
; :
Block quote #” “# <blockquote> </blockquote> HTML >  (Indent text)
Code block #[[ ]]# <pre> </pre>  (Indent text) ``` (3 backticks + new line)     (Indent 4 spaces)
Section #~ ~# <div> </div>
Table #[ |- | ]# <table><tr><td>
{| |- | |}
Comment (unseen) !!; ;!! <!-- --> HTML
Character formatting
Italic / / <i> </i> '' '' * * _ _
Bold * * <b> </b> ''' ''' ** ** __ __
Underline _ _ <u> </u>
Overscore (bar) ^ ^
Strike through - - <s> </s>
Double strike through = =
Inline code {{ }} <code> </code> HTML ` ` (i.e. backticks)  
Font CSS or <font> </font> CSS
Escape next character \ &XXX; character codes HTML
Backspace (overwrite) |<(n)
Hyperlink >>>(url); > <a href=” ”> </a> [ ] or [[ ]] [link text](url) [Link text][1]
Bookmark ~~(name); < <a name=””> </a>
Image <<<(url) #C; < <img src=” “> [[File: ]] ![Caption?](url) ![Caption?][1]
Transclusion <<<(url); < <iframe src=””> </iframe> {{ }}
Page/section layout
Line spacing ##L; (n) CSS
Columns ##C; (n) CSS (broken)
Frame ##F; (pos, size) <iframe> </iframe>
Styling ##PAGE; <style> </style>
Template ##PAGE <<<(url) <; <link rel=”stylesheet”...>

Updated 11 July 2022