Skip to end of metadata
Go to start of metadata

Markup

 

Escaping

Backslash \

Line handling rules

Each line is read in and cleaned:

  • Leading and trailing space removed
  • [\t ]+ -> ' '

 

WhatMarkupImplementedRulesExamples
Section headers!, !!, !!!, ...YesFor level 1, 2, 3, ... Start of line. Spaces following last ! discarded. Maximum level 6, all follow ! treated as text

! This is a section header

Bullet list item*- ...YesThe * must be first non-whitespace on line. ** is level 2, single NL terminates line, list are terminated with PARA. Maximum level 10 and afterwards treated as text. White space following is discarded.

* This is a bullet point

Numbered list item# ...YesSame as for bullet list 
Bold==asdf==Yes  
Highlight%%asdf%% Yes  
Italics''asdf''Yes   
Mono::asdf:: Yes  
Subscript--asdf-- Yes  
Superscript++asdf++ Yes  
Strikethough~~asdf~~ Yes St
Underline__asdf__ Yes  
Links[link|text] Yes  
Indent> YesAt start of line 
Term/def  Not sure 
Horizontal line----+ Not sure 
Tables    
Table Header|| asdfYes   
Table Cell| asadfYes   

Handling

Termination rules

Blocks (Paragraphs only?) are terminated by

  • NL, NL
  • Different Paragraph style
    • Exceptionish: Bullet list does not terminate a numbered (or other list type) 

Paragraph/Block types

Paragraph styles

  • Default (no) style
  • Levelled
    • (Section) heading
    • List
      • Bulleted
      • Numbered
      • NamedListStyle (todo)
    • Indented

Block

  • Table
  • ...

 

Exceptions
  • Section heading Paragraph

Styles

A default Stylesheet for the site is provided. The Document may override the defaults with a Document Stylesheet.

Blocks may then have a Block style defined for it it that are valid for that Block: think Paragraph styles like indented or bulleted.

Character styles are embedded in the character stream that makes up the document. Oddly they ignore paragraph boundaries and do not follow any nesting rules.

Hierarchy:

  • Default Document Stylesheet (Stylesheets contains Block and character styles)
  • Document Stylesheet
  • Block style
  • Character style

Character styles

Character styles are embedded in the character stream that makes up the document. Oddly they ignore paragraph boundaries and do not follow any nesting rules.

Cleanup

Document Oak markup should always follow canonical formatting.

Character style rules

  • Whitespace neighbors:
    • This is valid (BoldOn)and this is(BoldOff) with white space
      • Style on should follow white space and style off should preceed white space
  • Paragraph breaks
    • (BoldOn)Paragraph 1(BoldOff)(ItalicsOn)Paragraph 2(ItalicsBoldOff)
      • Start style markers moved to beginning of Paragraph and end style markers to end of Paragraph when possible
    • Note that this is dificult to do serieally 
  • Consecutive cancelling
    • Remove (BoldOn)(BoldOff)from stream
    • (BoldOn)Remove (BoldOff)(BoldOn)from stream

 

 

Document markup

Labels: