From d88c12c479ddbadc494d4967e6c4777f1afeb537 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 30 Jan 2022 21:14:20 +0000 Subject: markdown (30jan22) git-svn-id: svn://tug.org/texlive/trunk@61807 c570f23f-e606-0410-a88d-b1316a301751 --- .../third/markdown/examples/context-mkii.tex | 53 + .../third/markdown/examples/context-mkiv.tex | 65 + .../context/third/markdown/examples/context.tex | 37 - Master/texmf-dist/doc/generic/markdown/README.md | 10 +- Master/texmf-dist/doc/generic/markdown/VERSION | 2 +- .../texmf-dist/doc/generic/markdown/markdown.html | 3227 ++++++++++---------- .../texmf-dist/doc/generic/markdown/markdown.pdf | Bin 738241 -> 743629 bytes .../texmf-dist/scripts/markdown/markdown-cli.lua | 2 +- .../source/generic/markdown/markdown.dtx | 244 +- .../texmf-dist/tex/generic/markdown/markdown.tex | 10 +- Master/texmf-dist/tex/latex/markdown/markdown.sty | 28 +- .../tex/luatex/markdown/markdown-tinyyaml.lua | 104 +- Master/texmf-dist/tex/luatex/markdown/markdown.lua | 12 +- 13 files changed, 2117 insertions(+), 1677 deletions(-) create mode 100644 Master/texmf-dist/doc/context/third/markdown/examples/context-mkii.tex create mode 100644 Master/texmf-dist/doc/context/third/markdown/examples/context-mkiv.tex delete mode 100644 Master/texmf-dist/doc/context/third/markdown/examples/context.tex (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/context/third/markdown/examples/context-mkii.tex b/Master/texmf-dist/doc/context/third/markdown/examples/context-mkii.tex new file mode 100644 index 00000000000..b5aaa0e04e8 --- /dev/null +++ b/Master/texmf-dist/doc/context/third/markdown/examples/context-mkii.tex @@ -0,0 +1,53 @@ +\enableregime[utf] +\usetypescript[modern][ec] +\setupbodyfont[10pt,rm] +\setupexternalfigures[location={local,global,default}] + +% Load the Markdown module. +\usemodule[t][markdown] + +% Set options of the Markdown module. +\def\markdownOptionHashEnumerators{true} +\def\markdownOptionDefinitionLists{true} +\def\markdownOptionSmartEllipses{true} +\def\markdownOptionFootnotes{true} +\def\markdownOptionInlineFootnotes{true} +\def\markdownOptionFencedCode{true} +\def\markdownOptionContentBlocks{true} +\def\markdownOptionPipeTables{true} +\def\markdownOptionTableCaptions{true} +\def\markdownOptionTaskLists{true} + +% Set renderers of the Markdown module. +\definetyping + [latex] + +\setuptyping + [latex] + [option=TEX] + +\starttext + +% Typeset the document `example.md` by letting the Markdown package handle +% the conversion internally. +\markdownInput{./example.md} + +% Typeset the document `example.tex` that we prepared separately using the +% Lua command-line interface and that contains a plain TeX representation +% of the document `example.md`. +\doiffileelse{./example.tex}{\input example}{} + +% Typeset inline markdown text. +\startmarkdown + +Here are some non-ASCII characters: *ěščřžýáíé* +and ConTeXt special characters: *|*. + +Here is a hard line break that we inserted directly from the TeX source +by typing two spaces at the end of a line. +This is stretching TeX's abilities and is only supported in ConTeXt MkIV +and later. + +\stopmarkdown + +\stoptext diff --git a/Master/texmf-dist/doc/context/third/markdown/examples/context-mkiv.tex b/Master/texmf-dist/doc/context/third/markdown/examples/context-mkiv.tex new file mode 100644 index 00000000000..65d1d054683 --- /dev/null +++ b/Master/texmf-dist/doc/context/third/markdown/examples/context-mkiv.tex @@ -0,0 +1,65 @@ +\enableregime[utf] +\usetypescript[modern][ec] +\setupbodyfont[10pt,rm] +\setupexternalfigures[location={local,global,default}] + +% Load the Markdown module. +\usemodule[t][markdown] + +% Set options of the Markdown module. +\def\markdownOptionHashEnumerators{true} +\def\markdownOptionDefinitionLists{true} +\def\markdownOptionSmartEllipses{true} +\def\markdownOptionFootnotes{true} +\def\markdownOptionInlineFootnotes{true} +\def\markdownOptionFencedCode{true} +\def\markdownOptionContentBlocks{true} +\def\markdownOptionPipeTables{true} +\def\markdownOptionTableCaptions{true} +\def\markdownOptionTaskLists{true} + +% Set renderers of the Markdown module. +\definehighlight + [markdownRendererEmphasis] + [style=\em] + +\definehighlight + [markdownRendererStrongEmphasis] + [style=bold] + +\definehighlight + [markdownRendererCodeSpan] + [style=mono] + +\definetyping + [latex] + +\setuptyping + [latex] + [option=TEX] + +\starttext + +% Typeset the document `example.md` by letting the Markdown package handle +% the conversion internally. +\markdownInput{./example.md} + +% Typeset the document `example.tex` that we prepared separately using the +% Lua command-line interface and that contains a plain TeX representation +% of the document `example.md`. +\doiffileelse{./example.tex}{\input example}{} + +% Typeset inline markdown text. +\startmarkdown + +Here are some non-ASCII characters: *ěščřžýáíé* +and ConTeXt special characters: *|*. + +Here is a hard line break that we inserted directly from the TeX source +by typing two spaces at the end of a line. +This is stretching TeX's abilities and is only supported in ConTeXt MkIV +and later. + +\stopmarkdown + +\stoptext diff --git a/Master/texmf-dist/doc/context/third/markdown/examples/context.tex b/Master/texmf-dist/doc/context/third/markdown/examples/context.tex deleted file mode 100644 index 85815149d16..00000000000 --- a/Master/texmf-dist/doc/context/third/markdown/examples/context.tex +++ /dev/null @@ -1,37 +0,0 @@ -\enableregime[utf] -\usetypescript[modern][ec] -\setupbodyfont[10pt,rm] -\setupexternalfigures[location={local,global,default}] -\usemodule[t][markdown] -\def\markdownOptionHashEnumerators{true} -\def\markdownOptionDefinitionLists{true} -\def\markdownOptionSmartEllipses{true} -\def\markdownOptionFootnotes{true} -\def\markdownOptionInlineFootnotes{true} -\def\markdownOptionFencedCode{true} -\def\markdownOptionContentBlocks{true} -\def\markdownOptionPipeTables{true} -\def\markdownOptionTableCaptions{true} -\def\markdownOptionTaskLists{true} -\definetyping [latex] -\setuptyping [latex] [option=TEX] -\starttext -% Typeset the document `example.md` by letting the Markdown package handle -% the conversion internally. -\markdownInput{./example.md} - -% Typeset the document `example.tex` that we prepared separately using the -% Lua command-line interface and that contains a plain TeX representation -% of the document `example.md`. -\doiffileelse{./example.tex}{\input example}{} - -\startmarkdown -Here are some non-ASCII characters: *ěščřžýáíé* -and ConTeXt special characters: *|*. - -Here is a hard line break that we inserted directly from the TeX source -by typing two spaces at the end of a line. -This is stretching TeX's abilities and is only supported in ConTeXt MkIV -and later. -\stopmarkdown -\stoptext diff --git a/Master/texmf-dist/doc/generic/markdown/README.md b/Master/texmf-dist/doc/generic/markdown/README.md index de007e36afc..38661d1c3a8 100644 --- a/Master/texmf-dist/doc/generic/markdown/README.md +++ b/Master/texmf-dist/doc/generic/markdown/README.md @@ -4,7 +4,7 @@ Markdown [![license](https://img.shields.io/github/license/witiko/markdown)](LICENSE) [![release](https://img.shields.io/github/release/witiko/markdown.svg)][release] [![docker pulls](https://img.shields.io/docker/pulls/witiko/markdown)][docker-witiko/markdown] -[![docker image size](https://img.shields.io/docker/image-size/witiko/markdown)][docker-witiko/markdown] +[![docker image size](https://img.shields.io/docker/image-size/witiko/markdown/latest)][docker-witiko/markdown] [![ci](https://github.com/witiko/markdown/actions/workflows/main.yml/badge.svg)][ci] [release]: https://github.com/Witiko/markdown/releases/latest "Releases · Witiko/markdown" @@ -130,8 +130,10 @@ We will receive the following output, where the markdown markup has been replaced by TeX commands: ``` tex +\markdownDocumentBegin Hello \markdownRendererEmphasis{Markdown}! -$a\markdownRendererEmphasis{x + b}x = c_x$\relax +$a\markdownRendererEmphasis{x + b}x = c_x$ +\markdownDocumentEnd ``` We can see right away that the Markdown package has incorrectly interpreted @@ -141,8 +143,10 @@ We can see right away that the Markdown package has incorrectly interpreted docker run --rm -i witiko/markdown markdown-cli hybrid=true underscores=false < document.md ``` tex +\markdownDocumentBegin Hello \markdownRendererEmphasis{Markdown}! -$a_x + b_x = c_x$\relax +$a_x + b_x = c_x$ +\markdownDocumentEnd ``` Much better! If the Markdown package ever surprises you, use the Lua CLI to diff --git a/Master/texmf-dist/doc/generic/markdown/VERSION b/Master/texmf-dist/doc/generic/markdown/VERSION index 737ea04a372..6e699bbb013 100644 --- a/Master/texmf-dist/doc/generic/markdown/VERSION +++ b/Master/texmf-dist/doc/generic/markdown/VERSION @@ -1 +1 @@ -2.12.0-1-g976f074 (2021/12/30) +2.13.0-0-g1f680a8 (2022/01/30) diff --git a/Master/texmf-dist/doc/generic/markdown/markdown.html b/Master/texmf-dist/doc/generic/markdown/markdown.html index 852e39a3b1e..3576b6edaf3 100644 --- a/Master/texmf-dist/doc/generic/markdown/markdown.html +++ b/Master/texmf-dist/doc/generic/markdown/markdown.html @@ -82,7 +82,7 @@

Markdown Package User Manual

Vít Novotný

-

2.12.0-1-g976f074 (2021/12/30)

+

2.13.0-0-g1f680a8 (2022/01/30)