From 0289f1e978eb4e6e1c0b025309fdcfe3eb43e5c9 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 8 Dec 2016 23:00:36 +0000 Subject: markdown (8dec16) git-svn-id: svn://tug.org/texlive/trunk@42652 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/generic/markdown/markdown.dtx | 250 ++++++++++++--------- 1 file changed, 145 insertions(+), 105 deletions(-) (limited to 'Master/texmf-dist/source/generic/markdown') diff --git a/Master/texmf-dist/source/generic/markdown/markdown.dtx b/Master/texmf-dist/source/generic/markdown/markdown.dtx index 894d6063472..5b3f8f65963 100644 --- a/Master/texmf-dist/source/generic/markdown/markdown.dtx +++ b/Master/texmf-dist/source/generic/markdown/markdown.dtx @@ -74,10 +74,10 @@ \begin{filecontents}{markdown.bib} @book{luatex16, author = {{Lua\TeX{} development team}}, - title = {Lua\TeX{} reference manual (0.98.3)}, - date = {2016-08-23}, + title = {Lua\TeX{} reference manual}, + date = {2016-09-27}, url = {http://www.luatex.org/svn/trunk/manual/luatex.pdf}, - urldate = {2016-08-30}} + urldate = {2016-11-27}} @book{latex16, author = {Braams, Johannes and Carlisle, David and Jeffrey, Alan and Lamport, Leslie and Mittelbach, Frank and Rowley, Chris and @@ -85,7 +85,7 @@ title = {The \Hologo{LaTeX2e} Sources}, date = {2016-03-31}, url = {http://mirrors.ctan.org/macros/latex/base/source2e.pdf}, - urldate = {2016-06-02}} + urldate = {2016-09-27}} @book{ierusalimschy13, author = {Ierusalimschy, Roberto}, year = {2013}, @@ -137,7 +137,7 @@ % packages that enable the direct inclusion of markdown documents inside \TeX{} % documents. % -% Architecturally, the package consists of the \pkg{Lunamark} v1.4.0 Lua module +% Architecturally, the package consists of the \pkg{Lunamark} v0.5.0 Lua module % by John MacFarlane, which was slimmed down and rewritten for the needs of the % package. On top of \pkg{Lunamark} sits code for the plain \TeX{}, \LaTeX{}, % and \Hologo{ConTeXt} formats by Vít Novotný. @@ -147,7 +147,7 @@ % \fi % \begin{macrocode} local metadata = { - version = "2.1.3", + version = "2.2.1", comment = "A module for the conversion from markdown to plain TeX", author = "John MacFarlane, Hans Hagen, Vít Novotný", copyright = "2009-2016 John MacFarlane, Hans Hagen; 2016 Vít Novotný", @@ -530,6 +530,20 @@ defaultOptions.fencedCode = false defaultOptions.footnotes = false % \end{macrocode} % +% \Optitem[false]{inlineFootnotes}{\opt{true}, \opt{false}} +% \begin{valuelist} +% \item[true] Enable the pandoc inline footnote syntax extension: +% \begin{Verbatim} +% Here is an inline note.^[Inlines notes are easier to +% write, since you don't have to pick an identifier and +% move down to type the note.] +% \end{Verbatim} +% \item[false] Disable the pandoc inline footnote syntax extension. +% \end{valuelist} +% \begin{macrocode} +defaultOptions.inlineFootnotes = false +% \end{macrocode} +% % \Optitem[false]{preserveTabs}{\opt{true}, \opt{false}} % \begin{valuelist} % \item[true] Preserve all tabs in the input. @@ -586,8 +600,8 @@ defaultOptions.tightLists = true % \ref{sec:luaoptions}) used during the conversion from markdown to plain % \TeX{}, and for changing the way markdown the tokens are rendered. % \begin{macrocode} -\def\markdownLastModified{2016/09/15}% -\def\markdownVersion{2.1.3}% +\def\markdownLastModified{2016/12/07}% +\def\markdownVersion{2.2.1}% % \end{macrocode} % % The plain \TeX{} interface is implemented by the \t`markdown.tex` file that @@ -732,6 +746,7 @@ defaultOptions.tightLists = true \let\markdownOptionFencedCode\undefined \let\markdownOptionHashEnumerators\undefined \let\markdownOptionHybrid\undefined +\let\markdownOptionInlineFootnotes\undefined \let\markdownOptionPreserveTabs\undefined \let\markdownOptionSmartEllipses\undefined \let\markdownOptionStartNumber\undefined @@ -1449,6 +1464,8 @@ defaultOptions.tightLists = true \def\markdownOptionHashEnumerators{#1}}% \define@key{markdownOptions}{hybrid}[true]{% \def\markdownOptionHybrid{#1}}% +\define@key{markdownOptions}{inlineFotnotes}[true]{% + \def\markdownOptionInlineFootnotes{#1}}% \define@key{markdownOptions}{preserveTabs}[true]{% \def\markdownOptionPreserveTabs{#1}}% \define@key{markdownOptions}{smartEllipses}[true]{% @@ -2424,6 +2441,100 @@ function M.writer.new(options) return self end % \end{macrocode} +% \subsubsection{Generic \acro{peg} Patterns} +% These \acro{peg} patterns have been temporarily moved outside the +% \luam{reader.new} method, which is currently hitting the limit of 200 local +% variables. To resolve this issue, all the \acro{peg} patterns local to +% \luam{reader.new} will be moved to a static hash table at some point in the +% future. +% \begin{macrocode} +local percent = P("%") +local at = P("@") +local comma = P(",") +local asterisk = P("*") +local dash = P("-") +local plus = P("+") +local underscore = P("_") +local period = P(".") +local hash = P("#") +local ampersand = P("&") +local backtick = P("`") +local less = P("<") +local more = P(">") +local space = P(" ") +local squote = P("'") +local dquote = P('"') +local lparent = P("(") +local rparent = P(")") +local lbracket = P("[") +local rbracket = P("]") +local circumflex = P("^") +local slash = P("/") +local equal = P("=") +local colon = P(":") +local semicolon = P(";") +local exclamation = P("!") +local tilde = P("~") + +local digit = R("09") +local hexdigit = R("09","af","AF") +local letter = R("AZ","az") +local alphanumeric = R("AZ","az","09") +local keyword = letter * alphanumeric^0 +local internal_punctuation = S(":;,.#$%&-+?<>~/") + +local doubleasterisks = P("**") +local doubleunderscores = P("__") +local fourspaces = P(" ") + +local any = P(1) +local fail = any - 1 +local always = P("") + +local escapable = S("\\`*_{}[]()+_.!<>#-~:^@;") + +local anyescaped = P("\\") / "" * escapable + + any + +local tab = P("\t") +local spacechar = S("\t ") +local spacing = S(" \n\r\t") +local newline = P("\n") +local nonspacechar = any - spacing +local tightblocksep = P("\001") + +local specialchar = S("*_`&[]") - local space = P(" ") - local squote = P("'") - local dquote = P('"') - local lparent = P("(") - local rparent = P(")") - local lbracket = P("[") - local rbracket = P("]") - local circumflex = P("^") - local slash = P("/") - local equal = P("=") - local colon = P(":") - local semicolon = P(";") - local exclamation = P("!") - local tilde = P("~") - - local digit = R("09") - local hexdigit = R("09","af","AF") - local letter = R("AZ","az") - local alphanumeric = R("AZ","az","09") - local keyword = letter * alphanumeric^0 - local internal_punctuation = S(":;,.#$%&-+?<>~/") - - local doubleasterisks = P("**") - local doubleunderscores = P("__") - local fourspaces = P(" ") - - local any = P(1) - local fail = any - 1 - local always = P("") - - local escapable = S("\\`*_{}[]()+_.!<>#-~:^@;") - - local anyescaped = P("\\") / "" * escapable - + any - - local tab = P("\t") - local spacechar = S("\t ") - local spacing = S(" \n\r\t") - local newline = P("\n") - local nonspacechar = any - spacing - local tightblocksep = P("\001") - - local specialchar = S("*_`&[]