From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- macros/generic/markdown/examples/README.md | 7 ++ macros/generic/markdown/examples/context-mkii.pdf | Bin 0 -> 237090 bytes macros/generic/markdown/examples/context-mkiv.pdf | Bin 0 -> 67910 bytes macros/generic/markdown/examples/context.tex | 31 +++++ macros/generic/markdown/examples/example.md | 131 ++++++++++++++++++++++ macros/generic/markdown/examples/latex-luatex.pdf | Bin 0 -> 63088 bytes macros/generic/markdown/examples/latex-pdftex.pdf | Bin 0 -> 265094 bytes macros/generic/markdown/examples/latex-xetex.pdf | Bin 0 -> 60564 bytes macros/generic/markdown/examples/latex.tex | 42 +++++++ macros/generic/markdown/examples/scientists.csv | 4 + 10 files changed, 215 insertions(+) create mode 100644 macros/generic/markdown/examples/README.md create mode 100644 macros/generic/markdown/examples/context-mkii.pdf create mode 100644 macros/generic/markdown/examples/context-mkiv.pdf create mode 100644 macros/generic/markdown/examples/context.tex create mode 100644 macros/generic/markdown/examples/example.md create mode 100644 macros/generic/markdown/examples/latex-luatex.pdf create mode 100644 macros/generic/markdown/examples/latex-pdftex.pdf create mode 100644 macros/generic/markdown/examples/latex-xetex.pdf create mode 100644 macros/generic/markdown/examples/latex.tex create mode 100644 macros/generic/markdown/examples/scientists.csv (limited to 'macros/generic/markdown/examples') diff --git a/macros/generic/markdown/examples/README.md b/macros/generic/markdown/examples/README.md new file mode 100644 index 0000000000..0d32d16ec4 --- /dev/null +++ b/macros/generic/markdown/examples/README.md @@ -0,0 +1,7 @@ +This directory contains example LaTeX and ConTeXt documents. These documents +can be typeset by running the GNU `make` program in this directory. It is +expected that your TeX installation contains the `pdflatex`, `xelatex`, +`lualatex`, `texexec`, and `context` executables. + +The `markdown.dtx` file in the root directory contains documentation in the +markdown language and can also serve as an example LaTeX document. diff --git a/macros/generic/markdown/examples/context-mkii.pdf b/macros/generic/markdown/examples/context-mkii.pdf new file mode 100644 index 0000000000..a17e5fc469 Binary files /dev/null and b/macros/generic/markdown/examples/context-mkii.pdf differ diff --git a/macros/generic/markdown/examples/context-mkiv.pdf b/macros/generic/markdown/examples/context-mkiv.pdf new file mode 100644 index 0000000000..ad965f37fe Binary files /dev/null and b/macros/generic/markdown/examples/context-mkiv.pdf differ diff --git a/macros/generic/markdown/examples/context.tex b/macros/generic/markdown/examples/context.tex new file mode 100644 index 0000000000..7ed432344a --- /dev/null +++ b/macros/generic/markdown/examples/context.tex @@ -0,0 +1,31 @@ +\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} +\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: *|*. +\stopmarkdown +\stoptext diff --git a/macros/generic/markdown/examples/example.md b/macros/generic/markdown/examples/example.md new file mode 100644 index 0000000000..8aeb423a20 --- /dev/null +++ b/macros/generic/markdown/examples/example.md @@ -0,0 +1,131 @@ +This is an H1 +============= + +This is an H2 +------------- + +### This is an H3 +#### This is an H4 +##### This is an H5 +###### This is an H6 + +This is a text paragraph containing an ellipsis ... and followed by a horizontal rule. + +*** + +This is inline `code`. This is a [link](http://google.cz "Google"). _This is an *emphasized* span of text_. __This is a **strongly emphasized** span of text__. + + ![example image](example-image.pdf "An example image from Martin Scharrer's mwe package") + + /scientists.csv (The great minds of the 19th century rendered via a content block) + +This is a fenced code block: + +``` latex +\documentclass{article} +\begin{document} + Hello world! +\end{document} +``` + +This is a table: + +| Right | Left | Default | Center | +|------:|:-----|---------|:------:| +| 12 | 12 | 12 | 12 | +| 123 | 123 | 123 | 123 | +| 1 | 1 | 1 | 1 | + + : Demonstration of pipe table syntax. + +This is a bullet list: + + * The first item of a bullet list + + that spans several paragraphs, + * the second item of a bullet list, + * the third item of a bullet list. + +This is a compact bullet list: + + * The first item of a bullet list, + * the second item of a bullet list, + * the third item of a bullet list. + +This is an ordered list: + + 5. The first item of an ordered list + + that spans several paragraphs, + 6. the second item of an ordered list, + 7. the third item of an ordered list. + +This is an ordered list using hash enumerators: + + #. The first item of an ordered list + + that spans several paragraphs, + #. the second item of an ordered list, + #. the third item of an ordered list. + +This is a compact ordered list: + + 5. The first item of an ordered list, + 6. the second item of an ordered list, + 7. the third item of an ordered list. + +This is a compact ordered list using hash enumerators: + + #. The first item of an ordered list, + #. the second item of an ordered list, + #. the third item of an ordered list. + +This is a definition list: + +Term 1 + +: Definition 1 + +*Term 2* + +: Definition 2 + + Some code, part of Definition 2 + + Third paragraph of Definition 2. + +: Definition 3 + +This is a compact definition list: + +Term 1 +: Definition 1 +*Term 2* +: Definition 2 +: Definition 3 + +This is a block quote: + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + +Here is a footnote reference[^1] and another.[^longnote] +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.] + +[^1]: Here is the footnote. + +[^longnote]: Here's one with multiple blocks. + + Subsequent paragraphs are indented to show that they +belong to the previous footnote. + + Some code + + The whole paragraph can be indented, or just the first + line. In this way, multi-paragraph footnotes work like + multi-paragraph list items. diff --git a/macros/generic/markdown/examples/latex-luatex.pdf b/macros/generic/markdown/examples/latex-luatex.pdf new file mode 100644 index 0000000000..1ce6e43d49 Binary files /dev/null and b/macros/generic/markdown/examples/latex-luatex.pdf differ diff --git a/macros/generic/markdown/examples/latex-pdftex.pdf b/macros/generic/markdown/examples/latex-pdftex.pdf new file mode 100644 index 0000000000..f5eca2597a Binary files /dev/null and b/macros/generic/markdown/examples/latex-pdftex.pdf differ diff --git a/macros/generic/markdown/examples/latex-xetex.pdf b/macros/generic/markdown/examples/latex-xetex.pdf new file mode 100644 index 0000000000..3c9f0ff75d Binary files /dev/null and b/macros/generic/markdown/examples/latex-xetex.pdf differ diff --git a/macros/generic/markdown/examples/latex.tex b/macros/generic/markdown/examples/latex.tex new file mode 100644 index 0000000000..07ebe631f9 --- /dev/null +++ b/macros/generic/markdown/examples/latex.tex @@ -0,0 +1,42 @@ +\documentclass{book} +\usepackage{ifxetex,ifluatex} +\ifxetex + \usepackage{polyglossia} + \setmainlanguage{english} + \usepackage{fontspec} +\else\ifluatex + \usepackage{polyglossia} + \setmainlanguage{english} + \usepackage{fontspec} +\else + \usepackage[english]{babel} + \usepackage[utf8]{inputenc} + \usepackage[T1]{fontenc} + \usepackage{lmodern} +\fi\fi +\usepackage{booktabs} +\usepackage[ + hashEnumerators, + definitionLists, + footnotes, + inlineFootnotes, + smartEllipses, + fencedCode, + contentBlocks, + pipeTables, + tableCaptions, +]{markdown} +\begin{document} +% 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 of the Markdown package and that contains a +% plain TeX representation of the document `example.md`. +\InputIfFileExists{./example.tex}{}{} + +\begin{markdown} +Here are some non-ASCII characters: *ěščřžýáíé*. +\end{markdown} +\end{document} diff --git a/macros/generic/markdown/examples/scientists.csv b/macros/generic/markdown/examples/scientists.csv new file mode 100644 index 0000000000..dee7830edf --- /dev/null +++ b/macros/generic/markdown/examples/scientists.csv @@ -0,0 +1,4 @@ +Name,Surname,Born +Albert,Einstein,1879 +Marie,Curie,1867 +Thomas,Edison,1847 -- cgit v1.2.3