summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-05-18 19:50:21 +0000
committerKarl Berry <karl@freefriends.org>2022-05-18 19:50:21 +0000
commit7ce7341b5bebbf6b62b2ea39b4db2d8b7ab10f4d (patch)
tree2ba34e01c9f48a15224053983d3a7fae8be8781d
parent4960cbf54f16e4074db720dd313240cb94b9fe80 (diff)
markdown (18may22)
git-svn-id: svn://tug.org/texlive/trunk@63328 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/generic/markdown/README.md14
-rw-r--r--Master/texmf-dist/doc/generic/markdown/VERSION2
-rw-r--r--Master/texmf-dist/doc/generic/markdown/markdown.html4
-rw-r--r--Master/texmf-dist/doc/generic/markdown/markdown.pdfbin799016 -> 796056 bytes
-rw-r--r--Master/texmf-dist/scripts/markdown/markdown-cli.lua2
-rw-r--r--Master/texmf-dist/source/generic/markdown/markdown.dtx71
-rw-r--r--Master/texmf-dist/tex/generic/markdown/markdown.tex4
-rw-r--r--Master/texmf-dist/tex/latex/markdown/markdown.sty53
-rw-r--r--Master/texmf-dist/tex/latex/markdown/markdownthemewitiko_graphicx_http.sty1
-rw-r--r--Master/texmf-dist/tex/luatex/markdown/markdown.lua2
10 files changed, 108 insertions, 45 deletions
diff --git a/Master/texmf-dist/doc/generic/markdown/README.md b/Master/texmf-dist/doc/generic/markdown/README.md
index 8460bb5c899..2cc772807bb 100644
--- a/Master/texmf-dist/doc/generic/markdown/README.md
+++ b/Master/texmf-dist/doc/generic/markdown/README.md
@@ -181,8 +181,9 @@ For further information, consult one of the following:
4. My journal articles published by [TUGboat][]:
- [Using Markdown inside TeX documents][tb119],
- [Markdown 2.7.0: Towards lightweight markup in TeX][tb124],
- - [Making Markdown into a Microwave Meal][tb129], and
- - [Markdown 2.10.0: LaTeX Themes & Snippets, Two Flavors of Comments, and LuaMetaTeX][tb131].
+ - [Making Markdown into a Microwave Meal][tb129],
+ - [Markdown 2.10.0: LaTeX Themes & Snippets, Two Flavors of Comments, and LuaMetaTeX][tb131], and
+ - [Markdown 2.15.0: What's New?][tb133].
5. Journal articles of me and my students published by [CSTUG][] (in Czech and Slovak):
- [Rendering Markdown inside TeX Documents][10.5300/2016-1-4/78],
- [Markdown 2.8.1: Boldly Unto the Throne of Lightweight Markup in TeX][10.5300/2020-1-2/48],
@@ -199,10 +200,11 @@ For further information, consult one of the following:
[overleaf-5]: https://www.overleaf.com/latex/examples/writing-posters-with-markdown/jtbgmmgqrqmh "Writing Posters with Markdown"
[overleaf-6]: https://www.overleaf.com/latex/examples/using-markdown-in-latex-documents/whdrnpcpnwrm "Using Markdown in LaTeX documents"
- [tb119]: https://www.tug.org/TUGboat/tb38-2/tb119novotny.pdf "Using Markdown inside TeX documents"
- [tb124]: https://www.tug.org/TUGboat/tb40-1/tb124novotny-markdown.pdf "Markdown 2.7.0: Towards lightweight markup in TeX"
- [tb129]: https://www.tug.org/TUGboat/tb41-3/tb129novotny-frozen.pdf "Making Markdown into a Microwave Meal"
- [tb131]: https://tug.org/TUGboat/tb42-2/tb131novotny-markdown.pdf "Markdown 2.10.0: LaTeX Themes & Snippets, Two Flavors of Comments, and LuaMetaTeX"
+ [tb119]: https://www.tug.org/TUGboat/tb38-2/tb119novotny.pdf "Using Markdown inside TeX documents"
+ [tb124]: https://www.tug.org/TUGboat/tb40-1/tb124novotny-markdown.pdf "Markdown 2.7.0: Towards lightweight markup in TeX"
+ [tb129]: https://www.tug.org/TUGboat/tb41-3/tb129novotny-frozen.pdf "Making Markdown into a Microwave Meal"
+ [tb131]: https://www.tug.org/TUGboat/tb42-2/tb131novotny-markdown.pdf "Markdown 2.10.0: LaTeX Themes & Snippets, Two Flavors of Comments, and LuaMetaTeX"
+ [tb133]: https://www.overleaf.com/read/pshkckczmmjn "Markdown 2.15.0: What's New?"
[tb131-slides]: https://tug.org/tug2021/assets/pdf/tug2021-novotny-slides.pdf "Markdown 2.10.0: LaTeX Themes & Snippets, Two Flavors of Comments, and LuaMetaTeX"
[tb131-video]: https://youtu.be/i2GJMnLCZls "Markdown 2.10.0: LaTeX Themes & Snippets, Two Flavors of Comments, and LuaMetaTeX"
diff --git a/Master/texmf-dist/doc/generic/markdown/VERSION b/Master/texmf-dist/doc/generic/markdown/VERSION
index 58060d55094..927859fc310 100644
--- a/Master/texmf-dist/doc/generic/markdown/VERSION
+++ b/Master/texmf-dist/doc/generic/markdown/VERSION
@@ -1 +1 @@
-2.15.0-0-g9296cf1 (2022/03/31)
+2.15.1-0-g4b33c77 (2022/05/17)
diff --git a/Master/texmf-dist/doc/generic/markdown/markdown.html b/Master/texmf-dist/doc/generic/markdown/markdown.html
index 4ccaeb8bf13..1734c541b24 100644
--- a/Master/texmf-dist/doc/generic/markdown/markdown.html
+++ b/Master/texmf-dist/doc/generic/markdown/markdown.html
@@ -82,7 +82,7 @@
<header id="title-block-header">
<h1 class="title">Markdown Package User Manual</h1>
<p class="author">Vít Novotný</p>
-<p class="date">2.15.0-0-g9296cf1 (2022/03/31)</p>
+<p class="date">2.15.1-0-g4b33c77 (2022/05/17)</p>
</header>
<nav id="TOC" role="doc-toc">
<ul>
@@ -4831,7 +4831,7 @@ Thomas,Edison,1847</code></pre>
<blockquote>
<p><img src="https://tug.org/tugboat/noword.jpg" title="The Communications of the TeX Users Group" /></p>
</blockquote>
-<h4 data-number="2.3.1.11" id="texcontentblockrenderers"><span class="header-section-number">2.3.1.11</span> Content Block Rendere</h4>
+<h4 data-number="2.3.1.11" id="texcontentblockrenderers"><span class="header-section-number">2.3.1.11</span> Content Block Renderers</h4>
<p>The <code>\markdownRendererContentBlock</code> macro represents an iA Writer content block. It receives four arguments: the local file or online image filename extension cast to the lower case, the fully escaped <abbr>uri</abbr> that can be directly typeset, the raw <abbr>uri</abbr> that can be used outside typesetting, and the title of the content block.</p>
<p>The <code>\markdownRendererContentBlockOnlineImage</code> macro represents an iA Writer online image content block. The macro receives the same arguments as .</p>
<p>The <code>\markdownRendererContentBlockCode</code> macro represents an iA Writer content block that was recognized as a file in a known programming language by its filename extension <span class="math inline"><em>s</em></span>. If any <code>markdown-languages.json</code> file found by <strong><code>kpathsea</code></strong> contains a record <span class="math inline">(<em>k</em>, <em>v</em>)</span>, then a non-online-image content block with the filename extension <span class="math inline"><em>s</em>, <em>s</em></span><code>:lower()</code><span class="math inline"> = <em>k</em></span> is considered to be in a known programming language <span class="math inline"><em>v</em></span>. The macro receives five arguments: the local file name extension <span class="math inline"><em>s</em></span> cast to the lower case, the language <span class="math inline"><em>v</em></span>, the fully escaped <abbr>uri</abbr> that can be directly typeset, the raw <abbr>uri</abbr> that can be used outside typesetting, and the title of the content block.</p>
diff --git a/Master/texmf-dist/doc/generic/markdown/markdown.pdf b/Master/texmf-dist/doc/generic/markdown/markdown.pdf
index ecad79cd26f..5dec5088c90 100644
--- a/Master/texmf-dist/doc/generic/markdown/markdown.pdf
+++ b/Master/texmf-dist/doc/generic/markdown/markdown.pdf
Binary files differ
diff --git a/Master/texmf-dist/scripts/markdown/markdown-cli.lua b/Master/texmf-dist/scripts/markdown/markdown-cli.lua
index 6afe55ffd86..3fff4a76c66 100644
--- a/Master/texmf-dist/scripts/markdown/markdown-cli.lua
+++ b/Master/texmf-dist/scripts/markdown/markdown-cli.lua
@@ -58,7 +58,7 @@
-- those in the standard .ins files.
--
local metadata = {
- version = "2.15.0-0-g9296cf1",
+ version = "2.15.1-0-g4b33c77",
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",
diff --git a/Master/texmf-dist/source/generic/markdown/markdown.dtx b/Master/texmf-dist/source/generic/markdown/markdown.dtx
index d43c7ab3cd4..ef4641a5a7f 100644
--- a/Master/texmf-dist/source/generic/markdown/markdown.dtx
+++ b/Master/texmf-dist/source/generic/markdown/markdown.dtx
@@ -99,12 +99,14 @@
\newunicodechar{☒}{\markdownRendererTickedBox}
\newunicodechar{⌛}{\markdownRendererHalfTickedBox}
\newunicodechar{☐}{\markdownRendererUntickedBox}
-\IfFileExists{emoji.sty}{
+\makeatletter
+\@ifpackagelater{emoji}{2020/03/16}{
\usepackage{emoji}
\newunicodechar{😉}{\emoji{winking-face}}
}{
\newunicodechar{😉}{;-)}
}
+\makeatother
% Set up the catcodes.
\catcode`\_=12 % We won't be typesetting much math and Lua contains lots of `_`.
@@ -9943,7 +9945,7 @@ that the \TeX{} engine has shell access.
%
% \begin{markdown}
-#### Content Block Rendere {#texcontentblockrenderers}
+#### Content Block Renderers {#texcontentblockrenderers}
The \mdef{markdownRendererContentBlock} macro represents an iA\,Writer content
block. It receives four arguments: the local file or online image filename
@@ -22467,6 +22469,7 @@ end
% \begin{macrocode}
\markdownIfOption{frozenCache}{}{^^A
\immediate\write18{^^A
+ mkdir -p "\markdownOptionCacheDir";
if printf '%s' "#3" | grep -q -E '^https?:';
then
% \end{macrocode}
@@ -23139,31 +23142,63 @@ end
\endgroup
% \end{macrocode}
% \begin{markdown}
-% If the URL begins with a hash sign, then we assume that it is a relative
-% reference. Otherwise, we assume that it is an absolute URL.
+% If the label and the fully-escaped URI are equivalent and the title is
+% empty, assume that the link is an autolink. Otherwise, assume that the
+% link is either direct or indirect.
% \end{markdown}
% \begin{macrocode}
- \tl_set:Nx
- \l_tmpa_tl
- { \str_range:nnn { ##3 } { 1 } { 1 } }
- \str_if_eq:NNTF
- \l_tmpa_tl
- \c_hash_str
+ \tl_set:Nn \l_tmpa_tl { ##1 }
+ \tl_set:Nn \l_tmpb_tl { ##2 }
+ \bool_set:Nn
+ \l_tmpa_bool
+ {
+ \tl_if_eq_p:NN
+ \l_tmpa_tl
+ \l_tmpb_tl
+ }
+ \tl_set:Nn \l_tmpa_tl { ##4 }
+ \bool_set:Nn
+ \l_tmpb_bool
+ {
+ \tl_if_empty_p:N
+ \l_tmpa_tl
+ }
+ \bool_if:nTF
{
- \exp_args:No
- \markdownLaTeXRendererRelativeLink
- { \str_range:nnn { ##3 } { 2 } { -1 } }
+ \l_tmpa_bool && \l_tmpb_bool
+ }
+ {
+ \markdownLaTeXRendererAutolink { ##2 } { ##3 }
}{
- \markdownLaTeXRendererAbsoluteLink { ##1 } { ##2 } { ##3 } { ##4 }
+ \markdownLaTeXRendererDirectOrIndirectLink { ##1 } { ##2 } { ##3 } { ##4 }
}
}
\next
}
+\def\markdownLaTeXRendererAutolink#1#2{%
+% \end{macrocode}
+% \begin{markdown}
+% If the URL begins with a hash sign, then we assume that it is a relative
+% reference. Otherwise, we assume that it is an absolute URL.
+% \end{markdown}
+% \begin{macrocode}
+ \tl_set:Nx
+ \l_tmpa_tl
+ { \str_range:nnn { #2 } { 1 } { 1 } }
+ \str_if_eq:NNTF
+ \l_tmpa_tl
+ \c_hash_str
+ {
+ \exp_args:No
+ \ref
+ { \str_range:nnn { #2 } { 2 } { -1 } }
+ }{
+ \url { #2 }
+ }
+}
\ExplSyntaxOff
-\def\markdownLaTeXRendererAbsoluteLink#1#2#3#4{%
- #1\footnote{\ifx\empty#4\empty\else#4: \fi\texttt<\url{#3}\texttt>}}
-\def\markdownLaTeXRendererRelativeLink#1{%
- \ref{#1}}
+\def\markdownLaTeXRendererDirectOrIndirectLink#1#2#3#4{%
+ #1\footnote{\ifx\empty#4\empty\else#4: \fi\url{#3}}}
% \end{macrocode}
% \par
% \begin{markdown}
diff --git a/Master/texmf-dist/tex/generic/markdown/markdown.tex b/Master/texmf-dist/tex/generic/markdown/markdown.tex
index bd5c3664aec..fabde3c4b3f 100644
--- a/Master/texmf-dist/tex/generic/markdown/markdown.tex
+++ b/Master/texmf-dist/tex/generic/markdown/markdown.tex
@@ -471,8 +471,8 @@
{ underscores }
{ true }
\ExplSyntaxOff
-\def\markdownLastModified{2022/03/31}%
-\def\markdownVersion{2.15.0-0-g9296cf1}%
+\def\markdownLastModified{2022/05/17}%
+\def\markdownVersion{2.15.1-0-g4b33c77}%
\let\markdownBegin\relax
\let\markdownEnd\relax
\let\markdownInput\relax
diff --git a/Master/texmf-dist/tex/latex/markdown/markdown.sty b/Master/texmf-dist/tex/latex/markdown/markdown.sty
index a6c17ab3c2f..da080d33d5b 100644
--- a/Master/texmf-dist/tex/latex/markdown/markdown.sty
+++ b/Master/texmf-dist/tex/latex/markdown/markdown.sty
@@ -782,27 +782,52 @@
\catcode`\#=12
\def\next##1##2##3##4{
\endgroup
- \tl_set:Nx
- \l_tmpa_tl
- { \str_range:nnn { ##3 } { 1 } { 1 } }
- \str_if_eq:NNTF
- \l_tmpa_tl
- \c_hash_str
+ \tl_set:Nn \l_tmpa_tl { ##1 }
+ \tl_set:Nn \l_tmpb_tl { ##2 }
+ \bool_set:Nn
+ \l_tmpa_bool
+ {
+ \tl_if_eq_p:NN
+ \l_tmpa_tl
+ \l_tmpb_tl
+ }
+ \tl_set:Nn \l_tmpa_tl { ##4 }
+ \bool_set:Nn
+ \l_tmpb_bool
{
- \exp_args:No
- \markdownLaTeXRendererRelativeLink
- { \str_range:nnn { ##3 } { 2 } { -1 } }
+ \tl_if_empty_p:N
+ \l_tmpa_tl
+ }
+ \bool_if:nTF
+ {
+ \l_tmpa_bool && \l_tmpb_bool
+ }
+ {
+ \markdownLaTeXRendererAutolink { ##2 } { ##3 }
}{
- \markdownLaTeXRendererAbsoluteLink { ##1 } { ##2 } { ##3 } { ##4 }
+ \markdownLaTeXRendererDirectOrIndirectLink { ##1 } { ##2 } { ##3 } { ##4 }
}
}
\next
}
+\def\markdownLaTeXRendererAutolink#1#2{%
+ \tl_set:Nx
+ \l_tmpa_tl
+ { \str_range:nnn { #2 } { 1 } { 1 } }
+ \str_if_eq:NNTF
+ \l_tmpa_tl
+ \c_hash_str
+ {
+ \exp_args:No
+ \ref
+ { \str_range:nnn { #2 } { 2 } { -1 } }
+ }{
+ \url { #2 }
+ }
+}
\ExplSyntaxOff
-\def\markdownLaTeXRendererAbsoluteLink#1#2#3#4{%
- #1\footnote{\ifx\empty#4\empty\else#4: \fi\texttt<\url{#3}\texttt>}}
-\def\markdownLaTeXRendererRelativeLink#1{%
- \ref{#1}}
+\def\markdownLaTeXRendererDirectOrIndirectLink#1#2#3#4{%
+ #1\footnote{\ifx\empty#4\empty\else#4: \fi\url{#3}}}
\newcount\markdownLaTeXRowCounter
\newcount\markdownLaTeXRowTotal
\newcount\markdownLaTeXColumnCounter
diff --git a/Master/texmf-dist/tex/latex/markdown/markdownthemewitiko_graphicx_http.sty b/Master/texmf-dist/tex/latex/markdown/markdownthemewitiko_graphicx_http.sty
index 9717c70a537..04d35bba4e0 100644
--- a/Master/texmf-dist/tex/latex/markdown/markdownthemewitiko_graphicx_http.sty
+++ b/Master/texmf-dist/tex/latex/markdown/markdownthemewitiko_graphicx_http.sty
@@ -64,6 +64,7 @@
\edef\filename{\markdown@witiko@graphicx@http@filename}^^A
\markdownIfOption{frozenCache}{}{^^A
\immediate\write18{^^A
+ mkdir -p "\markdownOptionCacheDir";
if printf '%s' "#3" | grep -q -E '^https?:';
then
OUTPUT_PREFIX="\markdownOptionCacheDir";
diff --git a/Master/texmf-dist/tex/luatex/markdown/markdown.lua b/Master/texmf-dist/tex/luatex/markdown/markdown.lua
index 6955982c3f2..3764f5c5b44 100644
--- a/Master/texmf-dist/tex/luatex/markdown/markdown.lua
+++ b/Master/texmf-dist/tex/luatex/markdown/markdown.lua
@@ -58,7 +58,7 @@
-- those in the standard .ins files.
--
local metadata = {
- version = "2.15.0-0-g9296cf1",
+ version = "2.15.1-0-g4b33c77",
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",