.\"
|
|
.Dd Dec 22, 2007
|
|
.Dt MKD-EXTENSIONS 7
|
|
.Os MASTODON
|
|
.Sh NAME
|
|
.Nm mkd-extensions
|
|
.Nd Extensions to the Markdown text formatting syntax
|
|
.Sh DESCRIPTION
|
|
This version of markdown has been extended in a few ways by
|
|
extending existing markup, creating new markup from scratch,
|
|
and borrowing markup from other markup languages.
|
|
.Ss Image dimensions
|
|
Markdown embedded images have been extended to allow specifying
|
|
the dimensions of the image by adding a new argument
|
|
.Em =/height/x/width/
|
|
to the link description.
|
|
.Pp
|
|
The new image syntax is
|
|
.nf
|
|
![alt text](image =/height/x/width/ "title")
|
|
.fi
|
|
.Ss pseudo-protocols
|
|
Three pseudo-protocols have been added to links
|
|
.Bl -tag -width XXXXX
|
|
.It Ar id:
|
|
The
|
|
.Ar "alt text"
|
|
is marked up and written to the output, wrapped with
|
|
.Em "<a id=id>"
|
|
and
|
|
.Em "</a>" .
|
|
.It Ar class:
|
|
The
|
|
.Ar "alt text"
|
|
is marked up and written to the output, wrapped with
|
|
.Em "<span class=class>"
|
|
and
|
|
.Em "</span>" .
|
|
.It Ar raw:
|
|
The
|
|
.Ar title
|
|
is written
|
|
.Em -- with no further processing --
|
|
to the output. The
|
|
.Ar "alt text"
|
|
is discarded.
|
|
.El
|
|
.Ss Pandoc headers
|
|
If markdown was configured with
|
|
.Ar --enable-pandoc-header ,
|
|
the markdown source document can have a 3-line
|
|
.Xr Pandoc
|
|
header in the format of
|
|
.nf
|
|
% title
|
|
% author(s)
|
|
% date
|
|
.fi
|
|
which will be made available to the
|
|
.Fn mkd_doc_title ,
|
|
.Fn mkd_doc_author ,
|
|
and
|
|
.Fn mkd_doc_date
|
|
functions.
|
|
.Ss Definition lists
|
|
If markdown was configured with
|
|
.Ar --enable-dl-tag ,
|
|
markup for definition lists is enabled. A definition list item
|
|
is defined as
|
|
.nf
|
|
=tag=
|
|
description
|
|
.fi
|
|
(that is a
|
|
.Ar = ,
|
|
followed by text, another
|
|
.Ar = ,
|
|
a newline, 4 spaces of intent, and then more text.)
|
|
.Pp
|
|
.Ss embedded stylesheets
|
|
Stylesheets may be defined and modified in a
|
|
.Em <style>
|
|
block. A style block is parsed like any other
|
|
block level html;
|
|
.Em <style>
|
|
starting on column 1, raw html (or, in this case, css) following
|
|
it, and either ending with a
|
|
.Em </style>
|
|
at the end of the line or a
|
|
.Em </style>
|
|
at the beginning of a subsequent line.
|
|
.Pp
|
|
Be warned that style blocks work like footnote links -- no matter
|
|
where you define them they are valid for the entire document.
|
|
.Ss relaxed emphasis
|
|
If markdown was configured with
|
|
.Ar --relaxed-emphasis ,
|
|
the rules for emphasis are changed so that a single
|
|
.Ar _
|
|
will
|
|
.Em not
|
|
count as a emphasis character if it's in the middle of a word.
|
|
This is primarily for documenting code, if you don't wish to
|
|
have to backquote all code references.
|
|
.Ss alpha lists
|
|
If markdown was configured with
|
|
.Ar --enable-alpha-list ,
|
|
alphabetic lists (like regular numeric lists, but with alphabetic
|
|
items) are supported. So:
|
|
.nf
|
|
a. this
|
|
b. is
|
|
c. an alphabetic
|
|
d. list
|
|
.fi
|
|
will produce:
|
|
.nf
|
|
<ol type=a>
|
|
<li>this</li>
|
|
<li>is</li>
|
|
<li>an alphabetic</li>
|
|
<li>list</li>
|
|
</ol>
|
|
.fi
|
|
.Sh AUTHOR
|
|
David Parsons
|
|
.%T http://www.pell.portland.or.us/~orc/
|
|
.Sh SEE ALSO
|
|
.Xr markdown 1 ,
|
|
.Xr markdown 3 ,
|
|
.Xr mkd-functions 3 ,
|
|
.Xr mkd-extensions 7 .
|
|
.Pp
|
|
.%T http://daringfireball.net/projects/markdown
|