texlive[43737] Master/texmf-dist: markdown (10apr17)

commits+karl at tug.org commits+karl at tug.org
Mon Apr 10 23:55:22 CEST 2017


Revision: 43737
          http://tug.org/svn/texlive?view=revision&revision=43737
Author:   karl
Date:     2017-04-10 23:55:22 +0200 (Mon, 10 Apr 2017)
Log Message:
-----------
markdown (10apr17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/markdown/markdown.pdf
    trunk/Master/texmf-dist/source/generic/markdown/markdown.dtx
    trunk/Master/texmf-dist/tex/generic/markdown/markdown.tex
    trunk/Master/texmf-dist/tex/latex/markdown/markdown.sty
    trunk/Master/texmf-dist/tex/luatex/markdown/markdown.lua

Modified: trunk/Master/texmf-dist/doc/generic/markdown/markdown.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/generic/markdown/markdown.dtx
===================================================================
--- trunk/Master/texmf-dist/source/generic/markdown/markdown.dtx	2017-04-10 21:55:09 UTC (rev 43736)
+++ trunk/Master/texmf-dist/source/generic/markdown/markdown.dtx	2017-04-10 21:55:22 UTC (rev 43737)
@@ -156,7 +156,7 @@
 % \fi
 %  \begin{macrocode}
 local metadata = {
-    version   = "2.4.0",
+    version   = "2.5.0",
     comment   = "A module for the conversion from markdown to plain TeX",
     author    = "John MacFarlane, Hans Hagen, Vít Novotný",
     copyright = "2009-2017 John MacFarlane, Hans Hagen; " ..
@@ -459,6 +459,24 @@
 defaultOptions.citations = false
 %    \end{macrocode}
 %
+%   \Optitem[true]{codeSpans}{\opt{true}, \opt{false}}
+%     \begin{valuelist}
+%       \item[true] Enable the code span syntax:
+%         \begin{Verbatim}
+% Use the `printf()` function.
+% ``There is a literal backtick (`) here.``
+%         \end{Verbatim}
+%       \item[false] Disable the code span syntax. This allows you to easily
+%         use the quotation mark ligatures in texts that do not contain code
+%         spans:
+%         \begin{Verbatim}
+% ``This is a quote.''
+%         \end{Verbatim}
+%     \end{valuelist}
+%  \begin{macrocode}
+defaultOptions.codeSpans = true
+%    \end{macrocode}
+%
 %   \Optitem[false]{contentBlocks}{\opt{true}, \opt{false}}
 %     \begin{valuelist}
 %       \item[true] Enable the iA\,Writer content blocks syntax
@@ -506,58 +524,7 @@
 %  \begin{macrocode}
 defaultOptions.definitionLists = false
 %    \end{macrocode}
-% 
-%   \Optitem[false]{hashEnumerators}{\opt{true}, \opt{false}}
-%     \begin{valuelist}
-%       \item[true] Enable the use of hash symbols (\t`\#`) as ordered item
-%         list markers:
-%         \begin{Verbatim}
-% #.  Bird
-% #.  McHale
-% #.  Parish
-%         \end{Verbatim}
-%       \item[false] Disable the use of hash symbols (\t`\#`) as ordered item
-%         list markers.
-%     \end{valuelist}
-%  \begin{macrocode}
-defaultOptions.hashEnumerators = false
-%    \end{macrocode}
-% 
-%   \Optitem[false]{html}{\opt{true}, \opt{false}}
-%     \begin{valuelist}
-%       \item[true]  Enable the recognition of \textsc{html} tags, block
-%                    elements, comments, \textsc{html} instructions, and
-%                    entities in the input. Tags, block elements (along with
-%                    contents), \textsc{html} instructions, and comments will
-%                    be ignored and \textsc{html} entities will be replaced
-%                    with the corresponding Unicode codepoints.
 %
-%       \item[false] Disable the recognition of \textsc{html} markup. Any
-%                    \textsc{html} markup in the input will be rendered as
-%                    plain text.
-%     \end{valuelist}
-%  \begin{macrocode}
-defaultOptions.html = false
-%    \end{macrocode}
-%
-%   \Optitem[false]{hybrid}{\opt{true}, \opt{false}}
-%     \begin{valuelist}
-%       \item[true] Disable the escaping of special plain \TeX{} characters,
-%         which makes it possible to intersperse your markdown markup with
-%         \TeX{} code. The intended usage is in documents prepared manually by
-%         a human author.  In such documents, it can often be desirable to mix
-%         \TeX{} and markdown markup freely.
-%
-%       \item[false] Enable the escaping of special plain \TeX{} characters
-%         outside verbatim environments, so that they are not interpretted by
-%         \TeX{}. This is encouraged when typesetting automatically generated
-%         content or markdown documents that were not prepared with this
-%         package in mind.
-%     \end{valuelist}
-%  \begin{macrocode}
-defaultOptions.hybrid = false
-%    \end{macrocode}
-%
 %   \Optitem[false]{fencedCode}{\opt{true}, \opt{false}}
 %     \begin{valuelist}
 %       \item[true] Enable the commonmark fenced code block extension:
@@ -612,7 +579,58 @@
 %  \begin{macrocode}
 defaultOptions.footnotes = false
 %    \end{macrocode}
+% 
+%   \Optitem[false]{hashEnumerators}{\opt{true}, \opt{false}}
+%     \begin{valuelist}
+%       \item[true] Enable the use of hash symbols (\t`\#`) as ordered item
+%         list markers:
+%         \begin{Verbatim}
+% #.  Bird
+% #.  McHale
+% #.  Parish
+%         \end{Verbatim}
+%       \item[false] Disable the use of hash symbols (\t`\#`) as ordered item
+%         list markers.
+%     \end{valuelist}
+%  \begin{macrocode}
+defaultOptions.hashEnumerators = false
+%    \end{macrocode}
+% 
+%   \Optitem[false]{html}{\opt{true}, \opt{false}}
+%     \begin{valuelist}
+%       \item[true]  Enable the recognition of \textsc{html} tags, block
+%                    elements, comments, \textsc{html} instructions, and
+%                    entities in the input. Tags, block elements (along with
+%                    contents), \textsc{html} instructions, and comments will
+%                    be ignored and \textsc{html} entities will be replaced
+%                    with the corresponding Unicode codepoints.
 %
+%       \item[false] Disable the recognition of \textsc{html} markup. Any
+%                    \textsc{html} markup in the input will be rendered as
+%                    plain text.
+%     \end{valuelist}
+%  \begin{macrocode}
+defaultOptions.html = false
+%    \end{macrocode}
+%
+%   \Optitem[false]{hybrid}{\opt{true}, \opt{false}}
+%     \begin{valuelist}
+%       \item[true] Disable the escaping of special plain \TeX{} characters,
+%         which makes it possible to intersperse your markdown markup with
+%         \TeX{} code. The intended usage is in documents prepared manually by
+%         a human author.  In such documents, it can often be desirable to mix
+%         \TeX{} and markdown markup freely.
+%
+%       \item[false] Enable the escaping of special plain \TeX{} characters
+%         outside verbatim environments, so that they are not interpretted by
+%         \TeX{}. This is encouraged when typesetting automatically generated
+%         content or markdown documents that were not prepared with this
+%         package in mind.
+%     \end{valuelist}
+%  \begin{macrocode}
+defaultOptions.hybrid = false
+%    \end{macrocode}
+%
 %   \Optitem[false]{inlineFootnotes}{\opt{true}, \opt{false}}
 %     \begin{valuelist}
 %       \item[true] Enable the pandoc inline footnote syntax extension:
@@ -672,6 +690,24 @@
 %  \begin{macrocode}
 defaultOptions.tightLists = true
 %    \end{macrocode}
+%
+%   \Optitem[true]{underscores}{\opt{true}, \opt{false}}
+%     \begin{valuelist}
+%       \item[true]  Both underscores and asterisks can be used to denote
+%         emphasis and strong emphasis:
+%         \begin{Verbatim}
+% *single asterisks*
+% _single underscores_
+% **double asterisks**
+% __double underscores__
+%         \end{Verbatim}
+%       \item[false] Only asterisks can be used to denote emphasis and strong
+%         emphasis. This makes it easy to write math with the \t`hybrid` option
+%         without the need to constantly escape subscripts.
+%     \end{valuelist}
+%  \begin{macrocode}
+defaultOptions.underscores = true
+%    \end{macrocode}
 % \end{optionlist}
 % 
 % \iffalse
@@ -683,8 +719,8 @@
 % \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{2017/03/27}%
-\def\markdownVersion{2.4.0}%
+\def\markdownLastModified{2017/04/10}%
+\def\markdownVersion{2.5.0}%
 %    \end{macrocode}
 %
 % The plain \TeX{} interface is implemented by the \t`markdown.tex` file that
@@ -1573,14 +1609,16 @@
   \def\markdownOptionBlankBeforeHeading{#1}}%
 \define at key{markdownOptions}{breakableBlockquotes}[true]{%
   \def\markdownOptionBreakableBlockquotes{#1}}%
+\define at key{markdownOptions}{cacheDir}{%
+  \def\markdownOptionCacheDir{#1}}%
 \define at key{markdownOptions}{citations}[true]{%
   \def\markdownOptionCitations{#1}}%
 \define at key{markdownOptions}{citationNbsps}[true]{%
   \def\markdownOptionCitationNbsps{#1}}%
-\define at key{markdownOptions}{cacheDir}{%
-  \def\markdownOptionCacheDir{#1}}%
 \define at key{markdownOptions}{contentBlocks}[true]{%
   \def\markdownOptionContentBlocks{#1}}%
+\define at key{markdownOptions}{codeSpans}[true]{%
+  \def\markdownOptionCodeSpans{#1}}%
 \define at key{markdownOptions}{contentBlocksLanguageMap}{%
   \def\markdownOptionContentBlocksLanguageMap{#1}}%
 \define at key{markdownOptions}{definitionLists}[true]{%
@@ -1605,6 +1643,8 @@
   \def\markdownOptionStartNumber{#1}}%
 \define at key{markdownOptions}{tightLists}[true]{%
   \def\markdownOptionTightLists{#1}}%
+\define at key{markdownOptions}{underscores}[true]{%
+  \def\markdownOptionUnderscores{#1}}%
 %    \end{macrocode}
 %
 % The following example \LaTeX{} code showcases a possible configuration of
@@ -3830,18 +3870,28 @@
                   + parsers.spacechar^1 * larsers.Endline^-1
                                         * parsers.optionalspace / writer.nbsp
 
-  larsers.Strong = ( parsers.between(parsers.Inline, parsers.doubleasterisks,
-                                     parsers.doubleasterisks)
-                   + parsers.between(parsers.Inline, parsers.doubleunderscores,
-                                     parsers.doubleunderscores)
-                   ) / writer.strong
+  if options.underscores then
+    larsers.Strong = ( parsers.between(parsers.Inline, parsers.doubleasterisks,
+                                       parsers.doubleasterisks)
+                     + parsers.between(parsers.Inline, parsers.doubleunderscores,
+                                       parsers.doubleunderscores)
+                     ) / writer.strong
 
-  larsers.Emph   = ( parsers.between(parsers.Inline, parsers.asterisk,
-                                     parsers.asterisk)
-                   + parsers.between(parsers.Inline, parsers.underscore,
-                                     parsers.underscore)
-                   ) / writer.emphasis
+    larsers.Emph   = ( parsers.between(parsers.Inline, parsers.asterisk,
+                                       parsers.asterisk)
+                     + parsers.between(parsers.Inline, parsers.underscore,
+                                       parsers.underscore)
+                     ) / writer.emphasis
+  else
+    larsers.Strong = ( parsers.between(parsers.Inline, parsers.doubleasterisks,
+                                       parsers.doubleasterisks)
+                     ) / writer.strong
 
+    larsers.Emph   = ( parsers.between(parsers.Inline, parsers.asterisk,
+                                       parsers.asterisk)
+                     ) / writer.emphasis
+  end
+
   larsers.AutoLinkUrl    = parsers.less
                          * C(parsers.alphanumeric^1 * P("://") * parsers.urlchar^1)
                          * parsers.more
@@ -4156,6 +4206,18 @@
       Symbol                = larsers.Symbol,
     }
 
+  if not options.citations then
+    syntax.Citations = parsers.fail
+  end
+
+  if not options.contentBlocks then
+    syntax.ContentBlock = parsers.fail
+  end
+
+  if not options.codeSpans then
+    syntax.Code = parsers.fail
+  end
+
   if not options.definitionLists then
     syntax.DefinitionList = parsers.fail
   end
@@ -4164,18 +4226,16 @@
     syntax.FencedCode = parsers.fail
   end
 
-  if not options.citations then
-    syntax.Citations = parsers.fail
+  if not options.footnotes then
+    syntax.NoteRef = parsers.fail
   end
 
-  if not options.contentBlocks then
-    syntax.ContentBlock = parsers.fail
+  if not options.html then
+    syntax.DisplayHtml = parsers.fail
+    syntax.InlineHtml = parsers.fail
+    syntax.HtmlEntity  = parsers.fail
   end
 
-  if not options.footnotes then
-    syntax.NoteRef = parsers.fail
-  end
-
   if not options.inlineFootnotes then
     syntax.InlineNote = parsers.fail
   end
@@ -4184,12 +4244,6 @@
     syntax.Smart = parsers.fail
   end
 
-  if not options.html then
-    syntax.DisplayHtml = parsers.fail
-    syntax.InlineHtml = parsers.fail
-    syntax.HtmlEntity  = parsers.fail
-  end
-
   local blocks_toplevel_t = util.table_copy(syntax)
   blocks_toplevel_t.Paragraph = larsers.ToplevelParagraph
   larsers.blocks_toplevel = Ct(blocks_toplevel_t)
@@ -4379,6 +4433,9 @@
 \ifx\markdownOptionCitationNbsps\undefined\else
   citationNbsps = \markdownOptionCitationNbsps,
 \fi
+\ifx\markdownOptionCodeSpans\undefined\else
+  codeSpans = \markdownOptionCodeSpans,
+\fi
 \ifx\markdownOptionContentBlocks\undefined\else
   contentBlocks = \markdownOptionContentBlocks,
 \fi
@@ -4418,6 +4475,9 @@
 \fi
 \ifx\markdownOptionTightLists\undefined\else
   tightLists = \markdownOptionTightLists,
+\fi
+\ifx\markdownOptionUnderscores\undefined\else
+  underscores = \markdownOptionUnderscores,
 \fi}
 }%
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/tex/generic/markdown/markdown.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/markdown/markdown.tex	2017-04-10 21:55:09 UTC (rev 43736)
+++ trunk/Master/texmf-dist/tex/generic/markdown/markdown.tex	2017-04-10 21:55:22 UTC (rev 43737)
@@ -45,8 +45,8 @@
 %% 
 %% The names of the source files used are shown above.
 %% 
-\def\markdownLastModified{2017/03/27}%
-\def\markdownVersion{2.4.0}%
+\def\markdownLastModified{2017/04/10}%
+\def\markdownVersion{2.5.0}%
 \let\markdownBegin\relax
 \let\markdownEnd\relax
 \let\markdownInput\relax
@@ -359,6 +359,9 @@
 \ifx\markdownOptionCitationNbsps\undefined\else
   citationNbsps = \markdownOptionCitationNbsps,
 \fi
+\ifx\markdownOptionCodeSpans\undefined\else
+  codeSpans = \markdownOptionCodeSpans,
+\fi
 \ifx\markdownOptionContentBlocks\undefined\else
   contentBlocks = \markdownOptionContentBlocks,
 \fi
@@ -398,6 +401,9 @@
 \fi
 \ifx\markdownOptionTightLists\undefined\else
   tightLists = \markdownOptionTightLists,
+\fi
+\ifx\markdownOptionUnderscores\undefined\else
+  underscores = \markdownOptionUnderscores,
 \fi}
 }%
 \def\markdownPrepare{%

Modified: trunk/Master/texmf-dist/tex/latex/markdown/markdown.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/markdown/markdown.sty	2017-04-10 21:55:09 UTC (rev 43736)
+++ trunk/Master/texmf-dist/tex/latex/markdown/markdown.sty	2017-04-10 21:55:22 UTC (rev 43737)
@@ -65,14 +65,16 @@
   \def\markdownOptionBlankBeforeHeading{#1}}%
 \define at key{markdownOptions}{breakableBlockquotes}[true]{%
   \def\markdownOptionBreakableBlockquotes{#1}}%
+\define at key{markdownOptions}{cacheDir}{%
+  \def\markdownOptionCacheDir{#1}}%
 \define at key{markdownOptions}{citations}[true]{%
   \def\markdownOptionCitations{#1}}%
 \define at key{markdownOptions}{citationNbsps}[true]{%
   \def\markdownOptionCitationNbsps{#1}}%
-\define at key{markdownOptions}{cacheDir}{%
-  \def\markdownOptionCacheDir{#1}}%
 \define at key{markdownOptions}{contentBlocks}[true]{%
   \def\markdownOptionContentBlocks{#1}}%
+\define at key{markdownOptions}{codeSpans}[true]{%
+  \def\markdownOptionCodeSpans{#1}}%
 \define at key{markdownOptions}{contentBlocksLanguageMap}{%
   \def\markdownOptionContentBlocksLanguageMap{#1}}%
 \define at key{markdownOptions}{definitionLists}[true]{%
@@ -97,6 +99,8 @@
   \def\markdownOptionStartNumber{#1}}%
 \define at key{markdownOptions}{tightLists}[true]{%
   \def\markdownOptionTightLists{#1}}%
+\define at key{markdownOptions}{underscores}[true]{%
+  \def\markdownOptionUnderscores{#1}}%
 \define at key{markdownRenderers}{interblockSeparator}{%
   \renewcommand\markdownRendererInterblockSeparator{#1}}%
 \define at key{markdownRenderers}{lineBreak}{%

Modified: trunk/Master/texmf-dist/tex/luatex/markdown/markdown.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/markdown/markdown.lua	2017-04-10 21:55:09 UTC (rev 43736)
+++ trunk/Master/texmf-dist/tex/luatex/markdown/markdown.lua	2017-04-10 21:55:22 UTC (rev 43737)
@@ -58,7 +58,7 @@
 -- those in the standard .ins files.
 -- 
 local metadata = {
-    version   = "2.4.0",
+    version   = "2.5.0",
     comment   = "A module for the conversion from markdown to plain TeX",
     author    = "John MacFarlane, Hans Hagen, Vít Novotný",
     copyright = "2009-2017 John MacFarlane, Hans Hagen; " ..
@@ -79,19 +79,21 @@
 defaultOptions.cacheDir = "."
 defaultOptions.citationNbsps = true
 defaultOptions.citations = false
+defaultOptions.codeSpans = true
 defaultOptions.contentBlocks = false
 defaultOptions.contentBlocksLanguageMap = "markdown-languages.json"
 defaultOptions.definitionLists = false
+defaultOptions.fencedCode = false
+defaultOptions.footnotes = false
 defaultOptions.hashEnumerators = false
 defaultOptions.html = false
 defaultOptions.hybrid = false
-defaultOptions.fencedCode = false
-defaultOptions.footnotes = false
 defaultOptions.inlineFootnotes = false
 defaultOptions.preserveTabs = false
 defaultOptions.smartEllipses = false
 defaultOptions.startNumber = true
 defaultOptions.tightLists = true
+defaultOptions.underscores = true
 local upper, gsub, format, length =
   string.upper, string.gsub, string.format, string.len
 local concat = table.concat
@@ -1495,18 +1497,28 @@
                   + parsers.spacechar^1 * larsers.Endline^-1
                                         * parsers.optionalspace / writer.nbsp
 
-  larsers.Strong = ( parsers.between(parsers.Inline, parsers.doubleasterisks,
-                                     parsers.doubleasterisks)
-                   + parsers.between(parsers.Inline, parsers.doubleunderscores,
-                                     parsers.doubleunderscores)
-                   ) / writer.strong
+  if options.underscores then
+    larsers.Strong = ( parsers.between(parsers.Inline, parsers.doubleasterisks,
+                                       parsers.doubleasterisks)
+                     + parsers.between(parsers.Inline, parsers.doubleunderscores,
+                                       parsers.doubleunderscores)
+                     ) / writer.strong
 
-  larsers.Emph   = ( parsers.between(parsers.Inline, parsers.asterisk,
-                                     parsers.asterisk)
-                   + parsers.between(parsers.Inline, parsers.underscore,
-                                     parsers.underscore)
-                   ) / writer.emphasis
+    larsers.Emph   = ( parsers.between(parsers.Inline, parsers.asterisk,
+                                       parsers.asterisk)
+                     + parsers.between(parsers.Inline, parsers.underscore,
+                                       parsers.underscore)
+                     ) / writer.emphasis
+  else
+    larsers.Strong = ( parsers.between(parsers.Inline, parsers.doubleasterisks,
+                                       parsers.doubleasterisks)
+                     ) / writer.strong
 
+    larsers.Emph   = ( parsers.between(parsers.Inline, parsers.asterisk,
+                                       parsers.asterisk)
+                     ) / writer.emphasis
+  end
+
   larsers.AutoLinkUrl    = parsers.less
                          * C(parsers.alphanumeric^1 * P("://") * parsers.urlchar^1)
                          * parsers.more
@@ -1806,6 +1818,18 @@
       Symbol                = larsers.Symbol,
     }
 
+  if not options.citations then
+    syntax.Citations = parsers.fail
+  end
+
+  if not options.contentBlocks then
+    syntax.ContentBlock = parsers.fail
+  end
+
+  if not options.codeSpans then
+    syntax.Code = parsers.fail
+  end
+
   if not options.definitionLists then
     syntax.DefinitionList = parsers.fail
   end
@@ -1814,18 +1838,16 @@
     syntax.FencedCode = parsers.fail
   end
 
-  if not options.citations then
-    syntax.Citations = parsers.fail
+  if not options.footnotes then
+    syntax.NoteRef = parsers.fail
   end
 
-  if not options.contentBlocks then
-    syntax.ContentBlock = parsers.fail
+  if not options.html then
+    syntax.DisplayHtml = parsers.fail
+    syntax.InlineHtml = parsers.fail
+    syntax.HtmlEntity  = parsers.fail
   end
 
-  if not options.footnotes then
-    syntax.NoteRef = parsers.fail
-  end
-
   if not options.inlineFootnotes then
     syntax.InlineNote = parsers.fail
   end
@@ -1834,12 +1856,6 @@
     syntax.Smart = parsers.fail
   end
 
-  if not options.html then
-    syntax.DisplayHtml = parsers.fail
-    syntax.InlineHtml = parsers.fail
-    syntax.HtmlEntity  = parsers.fail
-  end
-
   local blocks_toplevel_t = util.table_copy(syntax)
   blocks_toplevel_t.Paragraph = larsers.ToplevelParagraph
   larsers.blocks_toplevel = Ct(blocks_toplevel_t)



More information about the tex-live-commits mailing list