Debian Codegraph @

texmf-dist/doc/latex/markdown/examples/latex-luatex.tex

raw
1 \documentclass{book}
2 \usepackage{polyglossia}
3 \setmainlanguage{english}
4 \usepackage{fontspec}
5 \usepackage{booktabs}
6 % Load the Markdown package and set its options.
7 \usepackage[
8 contentBlocks,
9 debugExtensions,
10 definitionLists,
11 fancy_lists,
12 fencedCode,
13 hashEnumerators,
14 inlineNotes,
15 lineBlocks,
16 notes,
17 pipeTables,
18 rawAttribute,
19 smartEllipses,
20 strikeThrough,
21 subscripts,
22 superscripts,
23 tableCaptions,
24 taskLists,
25 texMathDollars,
26 texMathDoubleBackslash,
27 texMathSingleBackslash,
28 ]{markdown}
29 % Set the document metadata using a YAML metadata block.
30 \begin{yaml}
31 title: An Example *Markdown* Document
32 author: Vít Starý Novotný
33 date: `\today`{=tex}
34 \end{yaml}
35 \begin{document}
36 % Typeset the document `example.md` by letting the Markdown package handle
37 % the conversion internally.
38 \markdownInput{./example.md}
39
40 % Typeset the document `example.tex` that we prepared separately using the
41 % Lua command-line interface of the Markdown package and that contains a
42 % plain TeX representation of the document `example.md`.
43 \catcode`\%=12\relax
44 \catcode`\#=12\relax
45 \InputIfFileExists{./example.tex}{}{}
46 \catcode`\%=14\relax
47 \catcode`\#=6\relax
48
49 % Besides inputting external files, Markdown text can we written directly
50 % into a LaTeX document. Markdown text and LaTeX code can be freely combined.
51 \begin{markdown}
52 This is a paragraph of *Markdown text* with inline `\LaTeX`{=tex} code.
53
54 ``` {=tex}
55 This is a paragraph of \LaTeX{} code with inline \markinline{*Markdown text*}.
56 ```
57 \end{markdown}
58
59 % Besides YAML, LaTeX, and Markdown, you can also type HTML in your documents.
60 \begin{markdown}
61 Here is some <b>HTML code</b> mixed *with Markdown*. In `\TeX`{=tex}, the HTML
62 code will be silently ignored, whereas in `\TeX`{=tex}4ht, the HTML code will
63 be passed through to the output:
64
65 <table border="1">
66 <tr>
67 <td>Emil</td>
68 <td>Tobias</td>
69 <td>Linus</td>
70 </tr>
71 <tr>
72 <td>16</td>
73 <td>14</td>
74 <td>10</td>
75 </tr>
76 </table>
77 \end{markdown}
78 \end{document}