Warning, /education/cantor/thirdparty/discount-2.2.6-patched/mkd-extensions.7 is written in an unsupported language. File is not indexed.

0001 .\"
0002 .Dd Dec 22, 2007
0003 .Dt MKD-EXTENSIONS 7
0004 .Os MASTODON
0005 .Sh NAME
0006 .Nm mkd-extensions
0007 .Nd Extensions to the Markdown text formatting syntax
0008 .Sh DESCRIPTION
0009 This version of markdown has been extended in a few ways by
0010 extending existing markup, creating new markup from scratch,
0011 and borrowing markup from other markup languages.
0012 .Ss Image dimensions
0013 Markdown embedded images have been extended to allow specifying
0014 the dimensions of the image by adding a new argument
0015 .Em =/height/x/width/
0016 to the link description.
0017 .Pp
0018 The new image syntax is
0019 .nf
0020         ![alt text](image =/height/x/width/ "title")
0021 .fi
0022 .Ss pseudo-protocols
0023 Five pseudo-protocols have been added to links
0024 .Bl -tag -width XXXXX
0025 .It Ar id:
0026 The 
0027 .Ar "alt text"
0028 is marked up and written to the output, wrapped with
0029 .Em "<a id=id>"
0030 and
0031 .Em "</a>" .
0032 .It Ar class:
0033 The
0034 .Ar "alt text"
0035 is marked up and written to the output, wrapped with
0036 .Em "<span class=class>"
0037 and
0038 .Em "</span>" .
0039 .It Ar raw:
0040 The
0041 .Ar title
0042 is written
0043 .Em -- with no further processing --
0044 to the output.  The 
0045 .Ar "alt text"
0046 is discarded.
0047 .It Ar abbr:
0048 The
0049 .Ar "alt text"
0050 is marked up and written to the output, wrapped with
0051 .Em "<abbr title=abbr>"
0052 and
0053 .Em "</abbr>" .
0054 .It Ar lang:
0055 The
0056 .Ar "alt text"
0057 s marked up and written to the output, wrapped with
0058 .Em "<span lang=lang>"
0059 and
0060 .Em "</span>" .
0061 .El
0062 .Ss Pandoc headers
0063 The markdown source document can have a 3-line 
0064 .Xr Pandoc
0065 header in the format of
0066 .nf
0067     % title
0068     % author(s)
0069     % date
0070 .fi
0071 which will be made available to the
0072 .Fn mkd_doc_title ,
0073 .Fn mkd_doc_author ,
0074 and
0075 .Fn mkd_doc_date
0076 functions.
0077 .Ss Definition lists
0078 A definition list item
0079 is defined as
0080 .nf
0081 =tag=
0082     description
0083 .fi
0084 (that is a
0085 .Ar = ,
0086 followed by text, another
0087 .Ar = ,
0088 a newline, 4 spaces of intent, and then more text.)
0089 .Pp
0090 Alternatively, definition list items are defined as
0091 .nf
0092 tag
0093 : description
0094 .fi
0095 (This is the format that
0096 .Ar "PHP Markdown Extra"
0097 uses.)
0098 .Pp
0099 .Ss embedded stylesheets
0100 Stylesheets may be defined and modified in a
0101 .Em <style>
0102 block.   A style block is parsed like any other
0103 block level html;  
0104 .Em <style>
0105 starting on column 1, raw html (or, in this case, css) following
0106 it, and either ending with a 
0107 .Em </style>
0108 at the end of the line or a
0109 .Em </style>
0110 at the beginning of a subsequent line.
0111 .Pp
0112 Be warned that style blocks work like footnote links -- no matter
0113 where you define them they are valid for the entire document.
0114 .Ss alpha lists
0115 Alphabetic lists (like regular numeric lists, but with alphabetic
0116 items) are supported.    So:
0117 .nf
0118     a. this
0119     b. is
0120     c. an alphabetic
0121     d. list
0122 .fi
0123 will produce:
0124 .nf
0125     <ol type=a>
0126     <li>this</li>
0127     <li>is</li>
0128     <li>an alphabetic</li>
0129     <li>list</li>
0130     </ol>
0131 .fi
0132 .Ss tables
0133 .Ar "PHP Markdown Extra"
0134 tables are supported;  input of the form
0135 .nf
0136     header|header
0137     ------|------
0138      text | text
0139 .fi
0140 will produce:
0141 .nf
0142     <table>
0143     <thead>
0144     <tr>
0145     <th>header</th>
0146     <th>header</th>
0147     </tr>
0148     </thead>
0149     <tbody>
0150     <tr>
0151     <td>text</td>
0152     <td>text</td>
0153     </tr>
0154     </tbody>
0155     </table>
0156 .fi
0157 The dashed line can also contain
0158 .Em :
0159 characters for formatting;  if a 
0160 .Em :
0161 is at the start of a column, it tells
0162 .Nm discount
0163 to align the cell contents to the left;  if it's at the end, it
0164 aligns right, and if there's one at the start and at the
0165 end, it centers.
0166 .Ss strikethrough
0167 A strikethrough syntax is supported in much the same way that
0168 .Ar `
0169 is used to define a section of code.   If you enclose text with
0170 two or more tildes, such as
0171 .Em ~~erased text~~
0172 it will be written as
0173 .Em "<del>erased text</del>" .
0174 Like code sections, you may use as many 
0175 .Ar ~
0176 as you want, but there must be as many starting tildes as closing
0177 tildes.
0178 .Ss markdown extra-style footnotes
0179 .Ar "PHP Markdown Extra"
0180 footnotes are supported.   If a footnote link begins with a 
0181 .Ar ^ ,
0182 the first use of that footnote will generate a link down to the 
0183 bottom of the rendered document, which will contain a numbered footnote
0184 with a link back to where the footnote was called.
0185 .Sh AUTHOR
0186 David Parsons
0187 .%T http://www.pell.portland.or.us/~orc/
0188 .Sh SEE ALSO
0189 .Xr markdown 1 ,
0190 .Xr markdown 3 ,
0191 .Xr mkd-callbacks 3 ,
0192 .Xr mkd-functions 3 ,
0193 .Xr mkd-line 3 .
0194 .Pp
0195 .%T http://daringfireball.net/projects/markdown
0196 .Pp
0197 .%T http://michelf.com/projects/php-markdown