Path: Welcome > Welcome > Misc > Formatting htxt

Formatting htxt

Hints about the website structure

1. The basic syntax

    {space}&                line continuation if at EOL

 Block elements

    .-                      horizontal ruler
    .1-6                    header 1-6
    .*                      bullet list
    .#                      numbered list
    .>                      indent paragraphs
    .=                      break image floats
    .h                      enter direct html mode
    .p                      enter <pre> mode
    .r                      right-aligned paragraph
    .t                      enter table mode
    .||..||..||             full table row
    .!                      end last list, direct html, pre or table state
    <...>                   html (tag must be beginning of line)
    .map *#>                create map with bullet, number or indented style
    .index *#>              create index with bullet, number or indented style
    .file name              create output file (htxt name is used by default)
    .file <name>            create raw output file
    .endfile                end .file
    .include <name>         include file
    .define name value      define macro (expand with $(name))
    .block name             define block (expand with .X #name)
    .block execute          execute block of Idle code
    .endblock               end .block
    .tagindex               ???
    .X !code                execute Idle code and include returned output
    .X #name                expand defined block name
    .X <cmd                 execute cmd, include output if < given

 Inline elements
    _! !_ or _!! !_         execute Idle code and include returned output, first or last
    _$<src>|alt{class}$_    include img (~ in src expands to /images/section_name)
    _? ?_                   include SSI
    _* *_                   strong
    _/ /_                   em
    _^ ^_                   sup
    _% %_                   sub
    _{popup|text}_          pop-up
    __ __                   underline
    _( )_                   include span
    _(^a )_                 include span and references anchor #a
    _[url|text]_            include links
    _+                      <BR>

 Most tags accept {.class}, {#id} or {.class#id}

 Links are defined with _[url|name]_ with the |name part being optional:
    _[http://blabla.com]_ or _[http://blabla.com|Blabla]_
      (http://... opens in new tab; _[ittp://...]_ opens in same tab)
    _[AnotherPage]_ or _[anotherpage|Another Page]_ (supports graphics via _$...$_)
      (internal links open in same tab; _[^...]_ opens in new tab)
    _[#anchor|somewhere on this page]_ or _[otherpage#top|Other Page]
    The different link varieties can be combined.

 Automatic footnotes are defined with _[#]_ or _[#|...]_ for the link and _(#)_ or _(#...)_ for the target:
    _[#]_                   insert link as [1] and increment footnote link counter
    _[#|[Footnote %i]]_     insert link as [Footnote 1] and increment footnote link counter
    _(#)_                   insert target as [1] and increment footnote target counter
    _(#Footnote %i)_        insert target as Footnote 1 and increment footnote target counter

 Predefined macros:
    $(_) and $(|) and $($) expand to _ and | and $
    $(CSS_INLINE) stores inline CSS definitions

2. Sample code

  .p
  test test
  &&test test
  .!
  .* start bullet list (CLOSE WITH .!) or put single bullet item
  .# start numbered list (CLOSE WITH .!) or put single numbered item
  .> start indentation (CLOSE WITH .!) or indent single paragraph
  .1 Header 1
  .6 Header 6
  .define FOOTNOTE_LFORMAT <<%i>>
  .define FOOTNOTE_TFORMAT >>%i<<
  This points to a footnote _[#]_. This points to _[#|[Footnote %i]]_.
  .-
  .r right aligned paragraph
  .t

  ||table||_+||css {.standard} w/frames||
  ||test1||test2||test3||
  ||_+||test2||_+||
  .!
  .t{.frameless}
  ||table||_+||css {.frameless} w/o frames||
  ||test1||test2||test3||
  ||_+||test2||_+||
  .!
  .= breaks image floats
  inline formatting: _/italic/_ _*bold*_ _/_*both*_/_ A break_+in the line
  more: we also have _^super^_script and _%sub%_script plus __underline__
  _{This comes as a popup title|popups}_
  _!string.upper(`execute Idle`)!_
  <p><em>EM</em> for including direct html</p>
  images direct: _$</images/start/logo.gif>$_
  images shortcut: _$<logo.gif>$_
  spans: _(...{.class1})_ or _(...{#id1})_ or _(...{.class2#id2})_
  internal links: _[Welcome]_ or _[Welcome|Be my guest!]_ or _[^Welcome]_
  external links: http://www.oddmuse.org/ or _[http://www.oddmuse.org/|OddMuse]_ or _[http://www.oddmuse.org/|OddMuse]_
  far links: _[$(CONTACT)|Contact Me!]_ or _[$(MUSIC)|Music]_ or _[$(GOOGLE)Thomas+Lauer|Thomas]_
  _(#)_ First footnote
  _(# footnote #%i)_

3. The actual output

test test
&&test test
  1. start _/numbered/_ list (CLOSE WITH .!) or put single numbered item

Header 1

Header 6

This points to a footnote <<1>>. This points to [Footnote 2].


right aligned paragraph

table
css {.standard} w/frames
test1 test2 test3

test2
table
css {.frameless} w/o frames
test1 test2 test3

test2

breaks image floats

inline formatting: italic bold both A break
in the line

more: we also have superscript and subscript plus underline

popups

EXECUTE IDLE

EM for including direct html

images direct:

images shortcut:

spans: ... or ... or ...

internal links: Welcome or Be my guest! or Welcome

external links: http://www.oddmuse.org/ or OddMuse or OddMuse

far links: Contact Me! or Music or Thomas

>>1<< First footnote

footnote #2


$updated from: Formatting htxt.htxt Thu 27 Apr 2017 10:06:48 thomasl (By Thomas Lauer)$