Debian Codegraph @

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

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