diff options
Diffstat (limited to 'macros/generic/markdown')
-rw-r--r-- | macros/generic/markdown/CHANGES.md | 35 | ||||
-rw-r--r-- | macros/generic/markdown/DEPENDS.txt | 21 | ||||
-rw-r--r-- | macros/generic/markdown/README.md | 2 | ||||
-rw-r--r-- | macros/generic/markdown/VERSION | 2 | ||||
-rw-r--r-- | macros/generic/markdown/docstrip.cfg | 4 | ||||
-rw-r--r-- | macros/generic/markdown/libraries/markdown-tinyyaml.lua | 4 | ||||
-rw-r--r-- | macros/generic/markdown/markdown.dtx | 330 | ||||
-rw-r--r-- | macros/generic/markdown/markdown.html | 57 | ||||
-rw-r--r-- | macros/generic/markdown/markdown.ins | 1 | ||||
-rw-r--r-- | macros/generic/markdown/markdown.pdf | bin | 1124699 -> 1114115 bytes |
10 files changed, 330 insertions, 126 deletions
diff --git a/macros/generic/markdown/CHANGES.md b/macros/generic/markdown/CHANGES.md index 550989a936..922aadff91 100644 --- a/macros/generic/markdown/CHANGES.md +++ b/macros/generic/markdown/CHANGES.md @@ -1,5 +1,34 @@ # Changes +## 3.6.2 (2024-07-14) + +Fixes: + +- Fix the interplay between inline notes and square brackets. + (#453, #456, reported by @nopria, contributed by @lostenderman) +- Fix the interplay between lists and citations. + (witiko/expltools#3, #460, #461, contributed by @lostenderman) +- Do not override the `outputDir` option if if has been defined + before loading the package and pass it to lt3luabridge library. + (#457, #459) + +Documentation: + +- Fix various typos. (#454, contributed by @mbertucci47) +- Add file `DEPENDS.txt`. (#462, #463, 93bb7e18) + +Continuous Integration: + +- Only test latest TeX Live in pull requests. (81927ca1) + +Unit Tests: + +- Test the `outputDir` plain TeX option. (#457, #459) + +Libraries: + +- Update `tinyyaml` to v0.4.4-1-g197632c. (1e83ac94) + ## 3.6.1 (2024-06-20) Fixes: @@ -704,7 +733,7 @@ Development: - Add support for strike-throughs, fenced divs, subscripts, superscripts, and fancy lists. (#149, #160, #162, #168, #170) -- Add facade in front of expl3 inferface for YAML metadata. (#118, #175) +- Add facade in front of expl3 interface for YAML metadata. (#118, #175) - Add `\setupmarkdown` and `\inputmarkdown` commands to ConTeXt. (#17, #176) Fixes: @@ -784,7 +813,7 @@ Docker: Documentation: -- Remove disfunctional badges for Docker from `README.md`. (ad00b58, 707cad9) +- Remove dysfunctional badges for Docker from `README.md`. (ad00b58, 707cad9) - Link to TUG's version of the TUG 2021 video in `README.md`. (1462411) Miscellaneous: @@ -1045,7 +1074,7 @@ Fixes: Fixes: - String text and parenthetical citations. (e6026c1) -- Escape autolink labels even when hybrid mode is enabled. (repored by @iwelch, +- Escape autolink labels even when hybrid mode is enabled. (reported by @iwelch, 693e134) - Protect LaTeX strong emphasis renderer prototype and make it detect font. (reported by @iwelch, 89a031a) diff --git a/macros/generic/markdown/DEPENDS.txt b/macros/generic/markdown/DEPENDS.txt new file mode 100644 index 0000000000..3f73ad3431 --- /dev/null +++ b/macros/generic/markdown/DEPENDS.txt @@ -0,0 +1,21 @@ +hard l3kernel +hard lt3luabridge +hard lua-uni-algos +soft amsfonts +soft amsmath +soft catchfile +soft csvsimple +soft epstopdf-pkg +soft etoolbox +soft fancyvrb +soft gobble +soft graphics +soft grffile +soft latex +soft ltxcmds +soft paralist +soft pgf +soft soul +soft tools +soft url +soft verse diff --git a/macros/generic/markdown/README.md b/macros/generic/markdown/README.md index 1aaa42ed9e..2a02ee9736 100644 --- a/macros/generic/markdown/README.md +++ b/macros/generic/markdown/README.md @@ -18,7 +18,7 @@ Markdown The Markdown package converts [CommonMark][] markup to TeX commands. The functionality is provided both as a Lua module, and as plain TeX, LaTeX, and ConTeXt macro packages that can be used to directly typeset TeX documents -containing markdown markup. Unlike other convertors, the Markdown package does +containing markdown markup. Unlike other converters, the Markdown package does not require any external programs, and makes it easy to redefine how each and every markdown element is rendered. Creative abuse of the markdown syntax is encouraged. đ diff --git a/macros/generic/markdown/VERSION b/macros/generic/markdown/VERSION index e15dd6a469..c2b2c7e0ab 100644 --- a/macros/generic/markdown/VERSION +++ b/macros/generic/markdown/VERSION @@ -1 +1 @@ -3.6.1-0-g5a45a922 (2024-06-20) +3.6.2-0-g6c30af7e (2024-07-14) diff --git a/macros/generic/markdown/docstrip.cfg b/macros/generic/markdown/docstrip.cfg index 9dc5f65230..959a3a21c3 100644 --- a/macros/generic/markdown/docstrip.cfg +++ b/macros/generic/markdown/docstrip.cfg @@ -22,7 +22,7 @@ -- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE^^J% -- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.^^J% --^^J% --- Copyright (C) 2016-2024 VĂt StarĂ˝ NovotnĂ˝^^J% +-- Copyright (C) 2016-2024 VĂt StarĂ˝ NovotnĂ˝, Andrej GenÄur^^J% --^^J% -- This work may be distributed and/or modified under the^^J% -- conditions of the LaTeX Project Public License, either version 1.3^^J% @@ -62,7 +62,7 @@ \let\luapostamble\empty \declarepreamble\texpreamble -Copyright (C) 2016-2024 VĂt StarĂ˝ NovotnĂ˝ +Copyright (C) 2016-2024 VĂt StarĂ˝ NovotnĂ˝, Andrej GenÄur This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c diff --git a/macros/generic/markdown/libraries/markdown-tinyyaml.lua b/macros/generic/markdown/libraries/markdown-tinyyaml.lua index 36cef293ed..25b351f7e4 100644 --- a/macros/generic/markdown/libraries/markdown-tinyyaml.lua +++ b/macros/generic/markdown/libraries/markdown-tinyyaml.lua @@ -253,7 +253,9 @@ function Parser:parsestring(line, stopper) end line = ssub(line, 2) end - return rtrim(buf), line + buf = rtrim(buf) + local val = tonumber(buf) or buf + return val, line end local function isemptyline(line) diff --git a/macros/generic/markdown/markdown.dtx b/macros/generic/markdown/markdown.dtx index 4685ed3ee6..97fa8d6b56 100644 --- a/macros/generic/markdown/markdown.dtx +++ b/macros/generic/markdown/markdown.dtx @@ -122,7 +122,7 @@ --- title: A Markdown Interpreter for \TeX url: https://github.com/witiko/markdown -authors: [VĂt StarĂ˝ NovotnĂ˝] +authors: [VĂt StarĂ˝ NovotnĂ˝, Andrej GenÄur] email: witiko@mail.muni.cz revision: \markdownVersion date: \markdownLastModified @@ -796,6 +796,7 @@ abbr { %<*themes-witiko-markdown-techdoc> \ProvidesPackage{markdownthemewitiko_markdown_techdoc}[2022/12/13] \RequirePackage{etoolbox} +\gdef\ltd@title@author{\@gobble}% \markdownSetup{ renderers = { head*Four = {\paragraph{#1}\leavevmode}, @@ -804,6 +805,7 @@ abbr { codeSpan = {\inline{#1}}, jekyllData(End) = {% \AfterEndPreamble{% + \hypersetup{pdfauthor=\ltd@title@author}% \printtitlepage \tableofcontents {\def\addcontentsline##1##2##3{}\listoffigures}% @@ -812,8 +814,7 @@ abbr { }, jekyllDataRenderers = { /authors/* = {% - \gdef\ltd@title@author{#1}% - \hypersetup{pdfauthor={#1}}% + \expandafter\gdef\expandafter\ltd@title@author\expandafter{\ltd@title@author, #1}% }, title = {% \gdef\ltd@title@title{#1}% @@ -875,7 +876,7 @@ abbr { --- title: Markdown Package User Manual -author: VĂt StarĂ˝ NovotnĂ˝ +author: VĂt StarĂ˝ NovotnĂ˝, Andrej GenÄur date: \markdownVersion{} \markdownLastModified{} --- @@ -890,7 +891,7 @@ Introduction The [Markdown package][pkg] converts [CommonMark][] markup to \TeX{} commands. The functionality is provided both as a Lua module and as plain \TeX{}, \LaTeX{}, and \Hologo{ConTeXt} macro packages that can be used to directly typeset \TeX{} documents -containing markdown markup. Unlike other convertors, the Markdown package +containing markdown markup. Unlike other converters, the Markdown package does not require any external programs, and makes it easy to redefine how each and every markdown element is rendered. Creative abuse of the markdown syntax is encouraged. đ @@ -928,9 +929,9 @@ documentation][techdoc]. local metadata = { version = "(((VERSION)))", comment = "A module for the conversion from markdown to plain TeX", - author = "John MacFarlane, Hans Hagen, VĂt StarĂ˝ NovotnĂ˝", + author = "John MacFarlane, Hans Hagen, VĂt StarĂ˝ NovotnĂ˝, Andrej GenÄur", copyright = {"2009-2016 John MacFarlane, Hans Hagen", - "2016-2023 VĂt StarĂ˝ NovotnĂ˝"}, + "2016-2024 VĂt StarĂ˝ NovotnĂ˝, Andrej GenÄur"}, license = "LPPL 1.3c" } @@ -1148,6 +1149,17 @@ end)() %: A package that implements Unicode case-folding in \TeX{} Live${}\geq{}2020$. % % \end{markdown} +% \iffalse +%</lua> +%<*depends> +% \fi +% \begin{macrocode} +hard lua-uni-algos +% \end{macrocode} +% \iffalse +%</depends> +%<*lua> +% \fi % \begin{macrocode} local uni_algos = require("lua-uni-algos") % \end{macrocode} @@ -1166,6 +1178,13 @@ local uni_algos = require("lua-uni-algos") % \end{markdown} % \iffalse %</lua> +%<*depends> +% \fi +% \begin{macrocode} +# hard lua-tinyyaml # TODO: Uncomment after TeX Live 2022 has been deprecated. +% \end{macrocode} +% \iffalse +%</depends> %<*tex> % \fi % \par @@ -1185,18 +1204,33 @@ local uni_algos = require("lua-uni-algos") % such as options, renderers, and renderer prototypes. % % \end{markdown} -% \begin{macrocode} +% \iffalse %</tex> +%<*depends> +% \fi +% \begin{macrocode} +hard l3kernel +% \end{macrocode} +% \iffalse +%</depends> %<*context> +% \fi +% \begin{macrocode} \unprotect +% \end{macrocode} +% \iffalse %</context> %<*context,tex> +% \fi +% \begin{macrocode} \ifx\ExplSyntaxOn\undefined \input expl3-generic \fi +% \end{macrocode} +% \iffalse %</context,tex> %<*tex> -% \end{macrocode} +% \fi % \begin{markdown} % % \pkg{lt3luabridge} @@ -1205,6 +1239,20 @@ local uni_algos = require("lua-uni-algos") % with other TeX engines that provide the *shell escape* capability, % which allows them to execute code with the system's shell. % +% \end{markdown} +% \iffalse +%</tex> +%<*depends> +% \fi +% \begin{macrocode} +hard lt3luabridge +% \end{macrocode} +% \iffalse +%</depends> +%<*tex> +% \fi +% \begin{markdown} +% % The plain \TeX{} part of the package also requires the following Lua module: % % \pkg{Lua File System} @@ -1249,10 +1297,13 @@ local uni_algos = require("lua-uni-algos") %<*themes-witiko-dot,latex-themes-witiko-graphicx-http> % \fi % \begin{macrocode} -\NeedsTeXFormat{LaTeX2e}% +\NeedsTeXFormat{LaTeX2e} +\RequirePackage{expl3} % \end{macrocode} % \iffalse %</themes-witiko-dot,latex-themes-witiko-graphicx-http> +%</latex> +%<*depends> % \fi % \begin{markdown} % a \TeX{} engine that extends \Hologo{eTeX}, and all the plain \TeX{} @@ -1269,10 +1320,23 @@ local uni_algos = require("lua-uni-algos") % %: A package that provides the `\url` macro for the typesetting of links. % +% \end{markdown} +% \begin{macrocode} +soft url +% \end{macrocode} +% \begin{markdown} +% % \pkg{graphicx} % %: A package that provides the `\includegraphics` macro for the typesetting -% of images. +% of images.Furthermore, it also provides a key-value interface that is +% used in the default renderer prototypes for image attribute contexts. +% +% \end{markdown} +% \begin{macrocode} +soft graphics +% \end{macrocode} +% \begin{markdown} % % \pkg{paralist} % @@ -1281,45 +1345,85 @@ local uni_algos = require("lua-uni-algos") % ordered lists, and definition lists as well as the rendering of % fancy lists. % +% \end{markdown} +% \begin{macrocode} +soft paralist +% \end{macrocode} +% \begin{markdown} +% % \pkg{ifthen} % %: A package that provides a concise syntax for the inspection of macro % values. It is used in the `witiko/dot` \LaTeX{} theme (see Section % <#sec:latexthemes>). % +% \end{markdown} +% \begin{macrocode} +soft latex +soft epstopdf-pkg # required by `latex` +% \end{macrocode} +% \begin{markdown} +% % \pkg{fancyvrb} % %: A package that provides the `\VerbatimInput` macros for the verbatim % inclusion of files containing code. % +% \end{markdown} +% \begin{macrocode} +soft fancyvrb +% \end{macrocode} +% \begin{markdown} +% % \pkg{csvsimple} % %: A package that provides the `\csvautotabular` macro for typesetting % \acro{csv} files in the default renderer prototypes for iA\\,Writer % content blocks. % +% \end{markdown} +% \begin{macrocode} +soft csvsimple +soft pgf # required by `csvsimple`, which loads `pgfkeys.sty` +soft tools # required by `csvsimple`, which loads `shellesc.sty` +% \end{macrocode} +% \begin{markdown} +% % \pkg{gobble} % %: A package that provides the `\@gobblethree` \TeX{} command that % is used in the default renderer prototype for citations. The package % is included in \TeX Live${}\geq{}2016$. % +% \end{markdown} +% \begin{macrocode} +soft gobble +% \end{macrocode} +% \begin{markdown} +% % \pkg{amsmath} and \pkg{amssymb} % %: Packages that provide symbols used for drawing ticked and unticked % boxes. % +% \end{markdown} +% \begin{macrocode} +soft amsmath +soft amsfonts +% \end{macrocode} +% \begin{markdown} +% % \pkg{catchfile} % %: A package that catches the contents of a file and puts it in a macro. It % is used in the `witiko/graphicx/http` \LaTeX{} theme, see Section % <#sec:latexthemes>. % -% \pkg{graphicx} -% -%: A package that builds upon the \pkg{graphics} package, which is part of -% the \LaTeXe{} kernel. It provides a key-value interface that is used in -% the default renderer prototypes for image attribute contexts. +% \end{markdown} +% \begin{macrocode} +soft catchfile +% \end{macrocode} +% \begin{markdown} % % \pkg{grffile} % @@ -1330,6 +1434,12 @@ local uni_algos = require("lua-uni-algos") % the `witiko/dot` and `witiko/graphicx/http` \LaTeX{} themes, see Section % <#sec:latexthemes>. % +% \end{markdown} +% \begin{macrocode} +soft grffile +% \end{macrocode} +% \begin{markdown} +% % \pkg{etoolbox} % %: A package that is used to polyfill the general hook management system in @@ -1337,10 +1447,23 @@ local uni_algos = require("lua-uni-algos") % <#sec:latex-yaml-metadata>, and also in the default renderer prototype % for identifier attributes. % +% \end{markdown} +% \begin{macrocode} +soft etoolbox +% \end{macrocode} +% \begin{markdown} +% % \pkg{soulutf8} % %: A package that is used in the default renderer prototype for % strike-throughs and marked text. +% <!-- TODO: 1,$s/soulutf8/soul/g in TeX Live 2023. --> +% +% \end{markdown} +% \begin{macrocode} +soft soul +% \end{macrocode} +% \begin{markdown} % % \pkg{ltxcmds} % @@ -1348,6 +1471,12 @@ local uni_algos = require("lua-uni-algos") % \pkg{listings} packages are loaded in the default renderer prototype % for fenced code blocks. % +% \end{markdown} +% \begin{macrocode} +soft ltxcmds +% \end{macrocode} +% \begin{markdown} +% % \pkg{verse} % %: A package that is used in the default renderer prototypes for @@ -1355,10 +1484,13 @@ local uni_algos = require("lua-uni-algos") % % \end{markdown} % \begin{macrocode} -\RequirePackage{expl3} +soft verse % \end{macrocode} +% \begin{markdown} +% +% \end{markdown} % \iffalse -%</latex> +%</depends> %<*context> % \fi % \par @@ -7237,7 +7369,7 @@ defaultOptions.html = true : false : Enable the escaping of special plain \TeX{} characters outside verbatim - environments, so that they are not interpretted by \TeX{}. This is + environments, so that they are not interpreted by \TeX{}. This is encouraged when typesetting automatically generated content or markdown documents that were not prepared with this package in mind. @@ -11322,7 +11454,7 @@ for i = 1, #arg do end % \end{macrocode} % \begin{markdown} -% The first argument that matches none of the above patters is assumed to be +% The first argument that matches none of the above patterns is assumed to be % the input filename. The input filename should correspond to the Markdown % document that is going to be converted to a \TeX{} document. % \end{markdown} @@ -11331,7 +11463,7 @@ for i = 1, #arg do input_filename = arg[i] % \end{macrocode} % \begin{markdown} -% The first argument that matches none of the above patters is assumed to be +% The first argument that matches none of the above patterns is assumed to be % the output filename. The output filename should correspond to the \TeX{} % document that will result from the conversion. % \end{markdown} @@ -11856,47 +11988,10 @@ For more information, see the examples for the \Opt{finalizeCache} option. % % \end{markdown} % \begin{macrocode} -\cs_generate_variant:Nn - \@@_add_plain_tex_option:nnn - { nnV } -% \end{macrocode} -% \begin{markdown} -% -% Use the \pkg{lt3luabridge} library to determine the default value of the -% \mref{markdownOptionOutputDir} macro by using the environmental variable -% `TEXMF_OUTPUT_DIRECTORY` that is available since TeX~Live 2024. -% -% \end{markdown} -% \begin{macrocode} -\ExplSyntaxOff -\input lt3luabridge.tex -\ExplSyntaxOn -\bool_if:nTF - { - \cs_if_exist_p:N - \luabridge_tl_set:Nn && - ( - \int_compare_p:nNn - { \g_luabridge_method_int } - = - { \c_luabridge_method_directlua_int } || - \sys_if_shell_unrestricted_p: - ) - } - { - \luabridge_tl_set:Nn - \l_tmpa_tl - { print(os.getenv("TEXMF_OUTPUT_DIRECTORY") or ".") } - } - { - \tl_set:Nn - \l_tmpa_tl - { . } - } -\@@_add_plain_tex_option:nnV +\@@_add_plain_tex_option:nnn { outputDir } { path } - \l_tmpa_tl + { . } % \end{macrocode} % \iffalse %</tex> @@ -12172,22 +12267,73 @@ A PDF document named `document.pdf` should be produced and contain the text % \end{macrocode} % \begin{markdown} % -% Do not override options defined before loading the package. +% Use the \pkg{lt3luabridge} library to determine the default value of the +% \mref{markdownOptionOutputDir} macro by using the environmental variable +% `TEXMF_OUTPUT_DIRECTORY` that is available since TeX~Live 2024. % % \end{markdown} % \begin{macrocode} - \@@_option_tl_to_csname:nN + \str_if_eq:nnTF { #1 } - \l_tmpa_tl - \cs_if_exist:cF - { \l_tmpa_tl } + { outputDir } + { \@@_define_option_command_output_dir: } { - \@@_get_default_option_value:nN - { #1 } - \l_tmpa_tl - \@@_set_option_value:nV +% \end{macrocode} +% \begin{markdown} +% +% Do not override options defined before loading the package. +% +% \end{markdown} +% \begin{macrocode} + \@@_option_tl_to_csname:nN { #1 } \l_tmpa_tl + \cs_if_exist:cF + { \l_tmpa_tl } + { + \@@_get_default_option_value:nN + { #1 } + \l_tmpa_tl + \@@_set_option_value:nV + { #1 } + \l_tmpa_tl + } + } + } +\ExplSyntaxOff +\input lt3luabridge.tex +\ExplSyntaxOn +\cs_new:Nn + \@@_define_option_command_output_dir: + { + \cs_if_free:NT + \markdownOptionOutputDir + { + \bool_if:nTF + { + \cs_if_exist_p:N + \luabridge_tl_set:Nn && + ( + \int_compare_p:nNn + { \g_luabridge_method_int } + = + { \c_luabridge_method_directlua_int } || + \sys_if_shell_unrestricted_p: + ) + } + { + \luabridge_tl_set:Nn + \l_tmpa_tl + { print(os.getenv("TEXMF_OUTPUT_DIRECTORY") or ".") } + \tl_gset:NV + \markdownOptionOutputDir + \l_tmpa_tl + } + { + \tl_gset:Nn + \markdownOptionOutputDir + { . } + } } } \cs_new:Nn @@ -14039,7 +14185,7 @@ following text: #### Code Block Renderers The \mdef{markdownRendererInputVerbatim} macro represents a code block. The macro receives a single argument that corresponds to the -filename of a file contaning the code block contents. +filename of a file containing the code block contents. % \end{markdown} % @@ -14073,7 +14219,7 @@ filename of a file contaning the code block contents. The \mdef{markdownRendererInputFencedCode} macro represents a fenced code block. This macro will only be produced, when the \Opt{fencedCode} option is enabled. The macro receives three arguments that correspond to the filename of -a file contaning the code block contents, the fully escaped code fence infostring +a file containing the code block contents, the fully escaped code fence infostring that can be directly typeset, and the raw code fence infostring that can be used outside typesetting. @@ -15289,7 +15435,7 @@ following text: % \begin{markdown} #### Ellipsis Renderer -The \mdef{markdownRendererEllipsis} macro replaces any occurance of ASCII +The \mdef{markdownRendererEllipsis} macro replaces any occurrence of ASCII ellipses in the input text. This macro will only be produced, when the \Opt{smartEllipses} option is enabled. The macro receives no arguments. @@ -18435,7 +18581,7 @@ following text: #### Raw Content Renderers The \mdef{markdownRendererInputRawInline} macro represents an inline raw span. -The macro receives two arguments: the filename of a file contaning the inline +The macro receives two arguments: the filename of a file containing the inline raw span contents and the raw attribute that designates the format of the inline raw span. This macro will only be produced, when the \Opt{rawAttribute} option is enabled. @@ -18470,7 +18616,7 @@ option is enabled. % \begin{markdown} The \mdef{markdownRendererInputRawBlock} macro represents a raw block. The -macro receives two arguments: the filename of a file contaning the raw block +macro receives two arguments: the filename of a file containing the raw block and the raw attribute that designates the format of the raw block. This macro will only be produced, when the \Opt{rawAttribute} and \Opt{fencedCode} options are enabled. @@ -19368,7 +19514,7 @@ following content: \markdownSetup{ renderers = { table = {% - This is a table with caption \emph{#1} that is #3 colums wide + This is a table with caption \emph{#1} that is #3 columns wide and #2 rows long. \rowCounter=0% \def\rowTotal{#2}% @@ -19397,7 +19543,7 @@ A PDF document named `document.pdf` should be produced and contain the following text: > This is a table with caption *Demonstration of pipe table syntax* that is 4 -> colums wide and 4 rows long. As for the alignment, column number 1 is +> columns wide and 4 rows long. As for the alignment, column number 1 is > right-aligned, column number 2 is left-aligned, column number 3 has default > alignment, and column number 4 is centered. In row 1, column number 1 says > *Right*, column number 2 says *Left*, column number 3 says *Default*, and @@ -20256,7 +20402,7 @@ following text: %#### Generating Plain \TeX{} Token Renderer Macros and Key-Values {#plain-tex-renderers} % % We define the command \mdef{@@_define_renderers:} that defines plain \TeX{} -% macros for token renderers. Futhermore, the `\markdownSetup` macro also accepts +% macros for token renderers. Furthermore, the `\markdownSetup` macro also accepts % the `renderers` key, whose value must be a list of key-values, where the keys % correspond to the markdown token renderer macros and the values are new % definitions of these token renderers. @@ -20974,7 +21120,7 @@ following text: %#### Generating Plain \TeX{} Token Renderer Prototype Macros and Key-Values {#plain-tex-renderer-prototypes} % % We define the command \mdef{@@_define_renderer_prototypes:} that defines plain \TeX{} -% macros for token renderer prototypes. Futhermore, the `\markdownSetup` macro also accepts +% macros for token renderer prototypes. Furthermore, the `\markdownSetup` macro also accepts % the `rendererPrototype` key, whose value must be a list of key-values, where the keys % correspond to the markdown token renderer prototype macros and the values are new % definitions of these token renderer prototypes. @@ -21600,7 +21746,7 @@ following code in our \LaTeX{} document: We can also set all plain \TeX{} options directly from \LaTeX{}. For example, to set the `\markdownOptionInputTempFileName` plain \TeX{} option to -`helper-script.lua`, we would inclde the following code in our \LaTeX{} +`helper-script.lua`, we would include the following code in our \LaTeX{} document: ``` tex @@ -22559,7 +22705,7 @@ end % Given a table `char_escapes` mapping escapable characters to escaped % strings and optionally a table `string_escapes` mapping escapable strings % to escaped strings, the \luamdef{util.escaper} method returns an escaper -% function that escapes all occurances of escapable strings and characters (in +% function that escapes all occurrences of escapable strings and characters (in % this order). % % The method uses \pkg{LPeg}, which is faster than the Lua `string.gsub` @@ -22588,7 +22734,7 @@ function util.escaper(char_escapes, string_escapes) % \begin{markdown} % If `string_escapes` is provided, turn `escapable` into the % $$\sum^^B{(`k`, `v`)\in`string_escapes`}`P(k) / v` + `escapable`$$ -% capture that replaces any occurance of the string `k` with the string +% capture that replaces any occurrence of the string `k` with the string % `v` for each $(`k`, `v`)\in`string_escapes`$. Note that the pattern % summation is not commutative and its operands are inspected in the % summation order during the matching. As a corrolary, the strings always @@ -28687,7 +28833,7 @@ function M.reader.new(writer, options) + #parsers.link_text * Cg(Cc("link_text"), "link_type") - parsers.note_opening = #(parsers.circumflex * parsers.shortcut_link) + parsers.note_opening = #(parsers.circumflex * parsers.link_text) * Cg(Cc("note_inline"), "link_type") parsers.raw_note_opening = #( parsers.lbracket @@ -29137,9 +29283,10 @@ function M.reader.new(writer, options) end for i,value in ipairs(t) do - if not value.is_closing or - value.type ~= "delimiter" or - not (value.element == "link" or value.element == "image" or value.element == "note") then + if not value.is_closing + or value.type ~= "delimiter" + or not (value.element == "link" or value.element == "image" or value.element == "note") + or value.removed then goto continue end @@ -30446,7 +30593,7 @@ M.extensions.citations = function(citation_nbsps) ) * citation_name * (parsers.internal_punctuation - parsers.semicolon)^-1 - * ( parsers.spnlc + * ( parsers.spnlc / function(_) return end * citation_body_postnote + Cc("") * parsers.spnlc @@ -33217,7 +33364,7 @@ end %### Themes {#themes-implementation} % % This section implements the theme-loading mechanism and the built-in themes -% provided with the Markdown package. Futhermore, this section also implements +% provided with the Markdown package. Furthermore, this section also implements % the built-in plain \TeX{} themes provided with the Markdown package. % % \end{markdown} @@ -34161,6 +34308,9 @@ end } } } + \str_gset:NV + \g_luabridge_output_dirname_str + \markdownOptionOutputDir \luabridge_now:e { #1 } } @@ -34456,7 +34606,7 @@ end % \LaTeX{} Implementation {#lateximplementation} %------------------------- % -% The \LaTeX{} implemenation makes use of the fact that, apart from some subtle +% The \LaTeX{} implementation makes use of the fact that, apart from some subtle % differences, \LaTeX{} implements the majority of the plain \TeX{} % format~[@latex17, Section 9]. As a consequence, we can directly reuse the % existing plain \TeX{} implementation. @@ -34685,7 +34835,7 @@ end %### Themes {#latex-themes-implementation} % % This section overrides the plain \TeX{} implementation of the theme-loading -% mechanism from Section <#sec:themes-implementation>. Futhermore, this section +% mechanism from Section <#sec:themes-implementation>. Furthermore, this section % also implements the built-in \LaTeX{} themes provided with the Markdown package. % % \end{markdown} @@ -36412,7 +36562,7 @@ end %### Themes {#context-themes-implementation} % % This section overrides the plain \TeX{} implementation of the theme-loading -% mechanism from Section <#sec:themes-implementation>. Futhermore, this section +% mechanism from Section <#sec:themes-implementation>. Furthermore, this section % also implements the built-in \Hologo{ConTeXt} themes provided with the % Markdown package. % diff --git a/macros/generic/markdown/markdown.html b/macros/generic/markdown/markdown.html index f16477d948..81e62b2044 100644 --- a/macros/generic/markdown/markdown.html +++ b/macros/generic/markdown/markdown.html @@ -4,7 +4,7 @@ <meta charset="utf-8" /> <meta name="generator" content="pandoc" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> - <meta name="author" content="VĂt StarĂ˝ NovotnĂ˝" /> + <meta name="author" content="VĂt StarĂ˝ NovotnĂ˝, Andrej GenÄur" /> <title>Markdown Package User Manual</title> <style> code{white-space: pre-wrap;} @@ -92,8 +92,8 @@ <body> <header id="title-block-header"> <h1 class="title">Markdown Package User Manual</h1> -<p class="author">VĂt StarĂ˝ NovotnĂ˝</p> -<p class="date">3.6.1-0-g5a45a922 2024-06-20</p> +<p class="author">VĂt StarĂ˝ NovotnĂ˝, Andrej GenÄur</p> +<p class="date">3.6.2-0-g6c30af7e 2024-07-14</p> </header> <nav id="TOC" role="doc-toc"> <ul> @@ -191,7 +191,7 @@ class="tex">T<sub>e</sub>X</span>, <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span>, and Con<span class="tex">T<sub>e</sub>X</span>t macro packages that can be used to directly typeset <span class="tex">T<sub>e</sub>X</span> documents -containing markdown markup. Unlike other convertors, the Markdown +containing markdown markup. Unlike other converters, the Markdown package does not require any external programs, and makes it easy to redefine how each and every markdown element is rendered. Creative abuse of the markdown syntax is encouraged. <i class="em em-wink"></i></p> @@ -227,10 +227,10 @@ class="tex">T<sub>e</sub>X</span> distribution, you will need to install it.</p> <p>From <a href="https://github.com/witiko/markdown/releases" title="Releases - witiko/markdown">Releases</a>, download <a -href="https://github.com/witiko/markdown/releases/download/3.6.1/markdown.zip" -title="Release 3.6.1 - witiko/markdown">an archive +href="https://github.com/witiko/markdown/releases/download/3.6.2/markdown.zip" +title="Release 3.6.2 - witiko/markdown">an archive <code>markdown.zip</code> for this version of the Markdown package -(3.6.1)</a> or a different version that you wish to install. Then, unzip +(3.6.2)</a> or a different version that you wish to install. Then, unzip the archive. If you downloaded an archive for a different version of the Markdown package, you should now locate a file named <code>markdown.html</code> with the user manual for that version, open @@ -4720,7 +4720,7 @@ markdown markup freely.</p> <dd> <p>Enable the escaping of special plain <span class="tex">T<sub>e</sub>X</span> characters outside verbatim -environments, so that they are not interpretted by <span +environments, so that they are not interpreted by <span class="tex">T<sub>e</sub>X</span>. This is encouraged when typesetting automatically generated content or markdown documents that were not prepared with this package in mind.</p> @@ -8288,7 +8288,7 @@ options directly from <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span>. For example, to set the <code>\markdownOptionInputTempFileName</code> plain <span class="tex">T<sub>e</sub>X</span> option to -<code>helper-script.lua</code>, we would inclde the following code in +<code>helper-script.lua</code>, we would include the following code in our <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> document:</p> <div class="sourceCode" id="cb477"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb477-1"><a href="#cb477-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> @@ -9077,12 +9077,12 @@ contain the following text:</p> class="header-section-number">2.3.1.6</span> Code Block Renderers</h4> <p>The <code>\markdownRendererInputVerbatim</code> macro represents a code block. The macro receives a single argument that corresponds to the -filename of a file contaning the code block contents.</p> +filename of a file containing the code block contents.</p> <p>The <code>\markdownRendererInputFencedCode</code> macro represents a fenced code block. This macro will only be produced, when the <strong><code>fencedCode</code></strong> option is enabled. The macro receives three arguments that correspond to the filename of a file -contaning the code block contents, the fully escaped code fence +containing the code block contents, the fully escaped code fence infostring that can be directly typeset, and the raw code fence infostring that can be used outside typesetting.</p> <h5 class="unnumbered" id="latex-example-62"><span @@ -9841,7 +9841,7 @@ nutrient-rich, and produced on an industrial scale.</p> <h4 data-number="2.3.1.11" id="ellipsis-renderer"><span class="header-section-number">2.3.1.11</span> Ellipsis Renderer</h4> <p>The <code>\markdownRendererEllipsis</code> macro replaces any -occurance of ASCII ellipses in the input text. This macro will only be +occurrence of ASCII ellipses in the input text. This macro will only be produced, when the <strong><code>smartEllipses</code></strong> option is enabled. The macro receives no arguments.</p> <h5 class="unnumbered" id="plain-tex-example-30">Plain <span @@ -11581,14 +11581,14 @@ item).</p> class="header-section-number">2.3.1.31</span> Raw Content Renderers</h4> <p>The <code>\markdownRendererInputRawInline</code> macro represents an inline raw span. The macro receives two arguments: the filename of a -file contaning the inline raw span contents and the raw attribute that +file containing the inline raw span contents and the raw attribute that designates the format of the inline raw span. This macro will only be produced, when the <strong><code>rawAttribute</code></strong> option is enabled.</p> <p>The <code>\markdownRendererInputRawBlock</code> macro represents a raw block. The macro receives two arguments: the filename of a file -contaning the raw block and the raw attribute that designates the format -of the raw block. This macro will only be produced, when the +containing the raw block and the raw attribute that designates the +format of the raw block. This macro will only be produced, when the <strong><code>rawAttribute</code></strong> and <strong><code>fencedCode</code></strong> options are enabled.</p> <h5 class="unnumbered" id="latex-example-89"><span @@ -12140,7 +12140,7 @@ class="sourceCode tex"><code class="sourceCode latex"><span id="cb646-1"><a href <span id="cb646-35"><a href="#cb646-35" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> <span id="cb646-36"><a href="#cb646-36" aria-hidden="true" tabindex="-1"></a> renderers = {</span> <span id="cb646-37"><a href="#cb646-37" aria-hidden="true" tabindex="-1"></a> table = {<span class="co">%</span></span> -<span id="cb646-38"><a href="#cb646-38" aria-hidden="true" tabindex="-1"></a> This is a table with caption <span class="fu">\emph</span>{#1} that is #3 colums wide</span> +<span id="cb646-38"><a href="#cb646-38" aria-hidden="true" tabindex="-1"></a> This is a table with caption <span class="fu">\emph</span>{#1} that is #3 columns wide</span> <span id="cb646-39"><a href="#cb646-39" aria-hidden="true" tabindex="-1"></a> and #2 rows long.</span> <span id="cb646-40"><a href="#cb646-40" aria-hidden="true" tabindex="-1"></a> <span class="fu">\rowCounter</span>=0<span class="co">%</span></span> <span id="cb646-41"><a href="#cb646-41" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\rowTotal</span>{#2}<span class="co">%</span></span> @@ -12167,18 +12167,19 @@ class="sourceCode sh"><code class="sourceCode bash"><span id="cb647-1"><a href=" contain the following text:</p> <blockquote> <p>This is a table with caption <em>Demonstration of pipe table -syntax</em> that is 4 colums wide and 4 rows long. As for the alignment, -column number 1 is right-aligned, column number 2 is left-aligned, -column number 3 has default alignment, and column number 4 is centered. -In row 1, column number 1 says <em>Right</em>, column number 2 says -<em>Left</em>, column number 3 says <em>Default</em>, and column number -4 says <em>Center</em>. In row 2, column number 1 says <em>12</em>, -column number 2 says <em>12</em>, column number 3 says <em>12</em>, and -column number 4 says <em>12</em>. In row 3, column number 1 says -<em>123</em>, column number 2 says <em>123</em>, column number 3 says -<em>123</em>, and column number 4 says <em>123</em>. In row 4, column -number 1 says <em>1</em>, column number 2 says <em>1</em>, column number -3 says <em>1</em>, and column number 4 says <em>1</em>.</p> +syntax</em> that is 4 columns wide and 4 rows long. As for the +alignment, column number 1 is right-aligned, column number 2 is +left-aligned, column number 3 has default alignment, and column number 4 +is centered. In row 1, column number 1 says <em>Right</em>, column +number 2 says <em>Left</em>, column number 3 says <em>Default</em>, and +column number 4 says <em>Center</em>. In row 2, column number 1 says +<em>12</em>, column number 2 says <em>12</em>, column number 3 says +<em>12</em>, and column number 4 says <em>12</em>. In row 3, column +number 1 says <em>123</em>, column number 2 says <em>123</em>, column +number 3 says <em>123</em>, and column number 4 says <em>123</em>. In +row 4, column number 1 says <em>1</em>, column number 2 says <em>1</em>, +column number 3 says <em>1</em>, and column number 4 says +<em>1</em>.</p> </blockquote> <h4 data-number="2.3.1.40" id="tex-math-renderers"><span class="header-section-number">2.3.1.40</span> <span diff --git a/macros/generic/markdown/markdown.ins b/macros/generic/markdown/markdown.ins index 8e777f4217..4261ddfdd4 100644 --- a/macros/generic/markdown/markdown.ins +++ b/macros/generic/markdown/markdown.ins @@ -25,5 +25,6 @@ \file{markdown.css}{\from{markdown.dtx}{manual-css}} \file{markdown-figure-block-diagram.tex}{\from{markdown.dtx}{techdoc-block-diagram}} \file{markdown.bib}{\from{markdown.dtx}{techdoc-bibliography}} + \file{DEPENDS.txt}{\from{markdown.dtx}{depends}} } \endbatchfile diff --git a/macros/generic/markdown/markdown.pdf b/macros/generic/markdown/markdown.pdf Binary files differindex 40adf14658..3787cdbe80 100644 --- a/macros/generic/markdown/markdown.pdf +++ b/macros/generic/markdown/markdown.pdf |