http://pandoc.org/MANUAL.html
https://rawgit.com/fletcher/human-markdown-reference/master/index.html
http://www.flutterbys.com.au/stats/tut/tut17.3.html
https://commonmark.org/
https://commonmark.org/help/
https://de.wikipedia.org/wiki/Markdown
https://daringfireball.net/projects/markdown/syntax#misc
https://spec.commonmark.org/0.28/

https://raw.githubusercontent.com/tonyblundell/pandoc-bootstrap-template/master/template.css
https://raw.githubusercontent.com/tonyblundell/pandoc-bootstrap-template/master/template.html

https://github.com/rtomayko/shocco/blob/master/Markdown.pl

https://www.freeformatter.com/html-entities.html
https://www.w3.org/TR/CSS2/box.html
https://www.w3schools.com/css/css_float.asp
https://www.w3schools.com/cssref/css_selectors.asp

https://wiki.selfhtml.org/wiki/CSS/Eigenschaften/Druckausgabe/page-break-after
http://www.w3.org/TR/css3-page/
http://www.w3.org/TR/css-gcpm-3/
https://www.smashingmagazine.com/2015/01/designing-for-print-with-css/
https://www.w3.org/Style/Examples/007/leaders.en.html
https://www.princexml.com/download/
https://drafts.csswg.org/css-page/#blank-pseudo

ul {
    list-style-image: url('sqpurple.gif');
}
@media print {
  footer {
    position: fixed;
    bottom: 0;
  }
}
-


+ header
   + via #
   + turn caption into anchor (id=)
   + via ===== or ------ in next line
x lf must not insert <br>
   - only when line ends with at least two spaces
+ lists
   + "*", "-"
   + multiple (pseudo-)paragraphs via hanging indents
      "- my list item"
      "  spans multiple lans"
      ""
      "  and even newlines"
+ ordered lists
   + "1."
   + "13534)"
   + ordered list start via "<ol start="13534">"
   + explicit item number via <li value="12345">"
      ! e.g. to skip sequence numbers
   + use ")" or "." to determine list level
      ! e.g. " 9) item 9"
             "10) item 10"
+ horizontal rules (* * *, ----)
+ links
   + direct link
      ! e.g. "[Link](http://a.com)"
   + direct link with title
      ! e.g. "[Link](http://a.com "optional title")"
      + show title as tooltip (via title attribute)
   + indirect link
      ! e.g. "[Link][1]"
             "[1]: http://b.org"
   + implicit link name
      ! e.g. "[Link][]"
             "[Link]: http://c.org"
   + automatic links
      ! e.g. "<http://d.org>
      + obfuscate email addresses (&#x6d; &#111; ..)
      + auto-add "mailto:" to addresses with "@" and without ":" in them
   + document internal links
      ! e.g. "[document internal link](#some-header-anchor)
   + redefined links
      + link_refs hash
      + resolve as soon as link is declared
+ images
   + direct image link
      ! e.g. "![Alt Text](http://a.com/img.png)"
   + direct image link with title
      ! e.g. "![Alt Text](http://a.com/img.png "optional title")"
   + indirect link
      ! e.g. "![Alt Text][1]"
             "[1]: http://b.org/img.png"
      ! e.g. "![Alt Text][2]"
             "[2]: http://c.org/img.png "optional title""
   + auto-link to original image when img is scaled
+ includes
   x >>somemarkdownfile.md<<
      - process in pre-process pass
   x <<somehtmlfile.html>>
      - process in emit pass
   + $(inc:somemarkdownfile.md)
   x $(inc:somemarkdownfile.md,myvar=bla,myothervar=42)
   + line-by-line preprocess pass
      ! e.g. change var, exec inc, change var again, exec inc, ..
   + $(inc!somehtmlfile.html)  (post process)
+ vars
   + $(var:myvar)
   + $(var:myvar=New content)
   + $(var:myvar=<inputfile.txt)
   + handle during pre-process pass
      + replace var reads by var content
      + replace var assignments by empty string
   + set via cmdline
      + '-Dmyvar=42', '-Dmyothervar="hello, world."'
      + '-Dmyvar=<somefile.md'
   + or set via $(inc:<file>)
+ nested, unescaped control chars. e.g. "3 * 4 * 5 + 3"
   + ignore when start char is followed by space ?
+ css
   + "-css" cmdline option
   + derive css filename from input (replace suffix)
   o element classes
                main body:  "body"
                paragraph:  "p"
                   header:  "h[1..9]"
          emphasized text:  "em"
    emphasized text via _:  "em2"
              strong text:  "strong"
       strong text via __:  "strong2"
       strikethrough text:  "s"
               fixed text:  "code"
   fixed text (double ``):  "code2"
           subscript text:  "sub"
         superscript text:  "sup"
                    image:  "img"
   link to original image:  "oimg"
      unordered root list:  "ulroot"
       unordered sub list:  "ulsub"
        ordered root list:  "olroot"
         ordered sub list:  "olsub"
           root list item:  "liroot"
            sub list item:  "lisub"
          horizontal rule:  "hr"
        preformatted text:  "pre"
           sub-titled div:  "subdiv"
                    table:  "table"
         table header row:  "thtr"
        table header cell:  "thtd"  
           table data row:  "tr"
          table data cell:  "td"
      (see test.md for complete list)
+ output cmdline option (-o myoutputfile.html)
   + derive default output filename from input (replace suffix)
+ usage (-h,--help)
+ partial (-p,--partial)
   + skip html header + body
+ HTML element class prefix (-cp)
+ HTML-only (-x,--html <template.html>)
   ! for complex templates
   + only do post-processing, e.g. $(inc!gen/header.html)
   + also process .md (e.g. to generate buffers, including toc)
      - store main div in buffer "main"
+ code block
   ! e.g "~~~" (three or more)
         "int main(void) { return 0; }"
         "~~~"
   + optional subtitle (string after closing ~~~)
      x e.g. "~~~ hello_world.c"
      + "] sub title"
+ tables
   + alignment via ":"
   + multi-line via "|+" continuation
   + cell widths
      + when line starts with "|cols="
      | e.g. "|cols=10,2,2"
+ toc
   x "-toc" cmdline option
   x "-toconly" cmdline option
   + store toc in buffer "toc"
      (and let user decide where to place it)
+ blockquotes
   ! e.g. "> > "
   + may contain nested elements (e.g. lists)
      ! or any paragraphs
+ foot notes
   + via link ids that starts with ^
   ! e.g. "To create a footnote[^note1]"
          "[^note1]: A footnote marker cannot contain any spaces."
   + emit to "footnote" buffer
      + set flag when footnote has been emitted
         (don't emit more than once)
   + local footnotes
      + emit via "[^^]" directly after last (local) footnote definition
? definition lists
   - e.g. "Term 1"
          " :  This is the definition of this term"
+ redirect block HTML output to buffer
   ! e.g. for complex layouts (tables within tables, lists within tables, tables within lists, ..)
   + e.g. ">>>mybuffer"
   + ends with next buffer redirect or "<<<"
   + skip block when buf_id is blank (can be used for comments)
? override div class prefix of last subtitle div
   x "]:myprefix:This is the optional subtitle"
   - "].myclass This is the optional subtitle"
+ asciidoc-like NOTE: IMPORTANT: TIP: CAUTION: WARNING: divs
    + NOTE: a single line note
    + NOTE:
      multi
      line
      note
      buffer
      ====
+ enumerate headers
   + add cmdline option to disable the feature (-ne,--no-enumeration)
   x or via $(var:enumerate_headers=1)
   + enumeration offset (cmdline) (-eo,--enumeration-offset)
x sqlite support
   ! e.g. for filtered tables
   ==> it probably makes more sense to generate the markdown for these with an external script
        (which may read the "database" from a text file, or an actual database)
+ document command line options
+ w3c validation
o additional special vars
   + "localdate"     (asciidoctor) 2019-02-17
   + "localtime"     (asciidoctor) 19:31:05
   + "localdatetime" (asciidoctor) 2019-02-17 19:31:05 
   + "localyear"     (asciidoctor) 
   + "localmonth"
   + "localmonthnameshort"
   + "localmonthnamelong"
   + "localdayofmonth"
   + "localdayofmonthname"
   + "localdayofweeknameshort"
   + "localdayofweeknamelong"
   - "docdate"       (asciidoctor) 2019-02-17
   - "doctime"       (asciidoctor) 19:31:05
   - "docdatetime"   (asciidoctor) 2019-02-17 19:31:05 
   - "docyear"       (asciidoctor) 
+ special case: image within div (remove bottom whitespace)
+ HTML entity chars (asciidoctor)
   (C) &#169;
   (R) &#174;
   (TM)&#8482;
   -- &#8212;
   ... &#8230;
   -> &#8594;
   => &#8658;
   <- &#8592;
   <= &#8656;
   Sam's Sam&#8217;s
+ HTML smiley entities e.g. %:)%
+ cite blockquote
    "> The secret of getting ahead is getting started. The secret of getting started is breaking your complex overwhelming tasks into small manageable tasks, and then starting on the first one."
    "> -- Mark Twain"
    ! https://developer.mozilla.org/en-US/docs/Web/HTML/Element/cite (<blockquote><footer></footer></blockquote>)
+ footnote-only links, e.g. "[-][^marktwain]"
+ "-ip" option for setting an alternative icon path prefix
- test HTML template mode
+ document header (title/author/date)
   + store in buffers "title", "author", "date"
   + var "header" (creates header table)
! wkhtmltopdf
+ PDF test
   ! Microsoft Print to PDF
   + "@media print { .h1 { page-break-before:always; } }"
   + "+++" for explicit pagebreaks
+ don't replace entities in  <pre> (e.g. --)
+ ordered list auto-enumeration (". ")
+ support column width in headerless tables
? "ibid." style (repeated) citations/footnotes
+ multi-column print layout
   + "+++col"
   + "+++/col"
+ single-file .html package with embedded base64 images and css
   + "-il,--inline-data" cmdline option
   ! https://www.abeautifulsite.net/convert-an-image-to-a-data-uri-with-your-browser
   + Buffer.base64Encode(), base64Decode()
+ small info divs
   x "*NOTE*:" for large note icon, "NOTE:" for small one ?
   + "NOTE:" for large note icon, "note:" for small one
+ add "TODO:", "*TODO*:" info divs
+ set (HTML) buffer via cmdline (similar to -D)
   - "-Bmybuf=<myfile.html"
+ preserve white space at beginning of <pre> line within info div
+ parametrized HTML templates
   ! e.g. for screenshot links (stł home)
+ fall back to builtin.css when css file cannot be read (is not available)
+ inlining fails when md is invoked from other dir
   + extract input dir from input file path
   + prefix source file with input dir
      + when source file uses relative path

- [](#internal_link)
   ! in addition to [][#internallink] and [Internal Link](#internal link)

+ explicit anchor ids
   ! id derived from header may not be unique
   ? "# header #explicit-id"
   ? "# header (#explicit-id)"
   + "# header {explicit-id}"

+ stdin
   ! used by app:org when converting org to html
   + '-stdin' switch


------------------------------------------------------------------------------------------ 23Jan2023
- iaWriter variable extension
  ---
  MyVar: Hello
  ---
  [%MyVar], world.

- iaWriter toc
  {{TOC}}

- iaWriter content blocks
    /Section.txt "Section"
    /images/Structure.jpg 'Data Flow'
    /Balance Sheet.csv
