|
| 1 | +# Articulate by Coders' Compass |
| 2 | + |
| 3 | +## Introduction |
| 4 | + |
| 5 | +This is a demonstration of the template that supports combining markdown with Typst through cmarker. The integration allows for seamless academic writing with proper citations and cross-references. Sample reference [@texbook]. |
| 6 | + |
| 7 | +You can reference headings using their auto-generated labels. For example, see [Introduction](#introduction). Generally, it is the heading in lowercase with the words joined together with dashes. A longer example in [Citations and Bibliography](#citations-and-bibliography). |
| 8 | + |
| 9 | +## Headings and Cross-References |
| 10 | + |
| 11 | +## Citations and Bibliography |
| 12 | + |
| 13 | +### Academic Citations |
| 14 | + |
| 15 | +The concept of literate programming was introduced by Knuth [@knuth:1984]. This revolutionary approach changed how we think about code documentation. The foundational work on TeX [@texbook] laid the groundwork for modern typesetting systems. |
| 16 | + |
| 17 | +For comprehensive LaTeX documentation, see [@latex:companion] and [@latex2e]. Early work on computer typesetting can be found in [@lesk:1977]. |
| 18 | + |
| 19 | +### Multiple Citations |
| 20 | + |
| 21 | +Several authors have contributed to this field [@texbook] [@latex:companion] [@knuth:1984]. |
| 22 | + |
| 23 | +> **Note**: You need to have spaces betwen consecutive citations: |
| 24 | +> |
| 25 | +> `[@texbook] [@latex:companion] [@knuth:1984]` |
| 26 | +
|
| 27 | +# H1 Heading |
| 28 | +## H2 Heading |
| 29 | +### H3 Heading |
| 30 | +#### H4 Heading |
| 31 | +##### H5 Heading |
| 32 | +###### H6 Heading |
| 33 | + |
| 34 | +## Paragraphs and Text Styles |
| 35 | + |
| 36 | +This is a normal paragraph with various text formatting options. |
| 37 | +This is **bold text**, this is *italic text*, and this is ***bold italic***. |
| 38 | +You can also use `inline code` in a sentence, and even ~strikethrough text~. |
| 39 | + |
| 40 | +Hard line break example: |
| 41 | +This line has two spaces at the end |
| 42 | +So this appears on a new line without a paragraph break. |
| 43 | + |
| 44 | +## Lists with References |
| 45 | + |
| 46 | +### Unordered List |
| 47 | +- Item one referencing [@texbook] |
| 48 | +- Item two with a footnote[^important-note] |
| 49 | + - Subitem two-point-one[^sub-note] |
| 50 | + - Subitem two-point-two |
| 51 | +- Item three citing multiple sources [@latex:companion] [@knuth:1984] |
| 52 | + |
| 53 | +[^important-note]: This footnote references [@latex2e] to demonstrate footnotes with citations. |
| 54 | +[^sub-note]: A simple footnote without citations. |
| 55 | + |
| 56 | +### Ordered List with Cross-References |
| 57 | +1. First item - see [Introduction](#introduction) |
| 58 | +2. Second item - refer to |
| 59 | + 1. Subitem 2.1 citing [@lesk:1977] |
| 60 | + 2. Subitem 2.2 |
| 61 | +3. A third item |
| 62 | + |
| 63 | +## Links and References |
| 64 | + |
| 65 | +- [Coders' Compass](https://coderscompass.org) - External link |
| 66 | +- [Typst Documentation](https://typst.app/docs) - Another external link |
| 67 | +- [Go to Introduction](#introduction) - Internal link to section |
| 68 | + |
| 69 | +## Enhanced Blockquotes |
| 70 | + |
| 71 | +> This is a standard blockquote citing [@texbook]. |
| 72 | +> It can span multiple lines and include citations. |
| 73 | +> |
| 74 | +> **Note:** This is important information from [@knuth:1984]. |
| 75 | +
|
| 76 | +> **Tip:** For best results with LaTeX, consult [@latex:companion]. |
| 77 | +
|
| 78 | +## Code Blocks with Enhanced Features |
| 79 | + |
| 80 | +### Python Example |
| 81 | +```python |
| 82 | +# Python example |
| 83 | +def greet(name: str) -> str: |
| 84 | + """ |
| 85 | + A simple greeting function |
| 86 | + """ |
| 87 | + return f"Hello, {name}! Welcome to Python." |
| 88 | + |
| 89 | +# Usage |
| 90 | +print(greet("Typst")) |
| 91 | +``` |
| 92 | + |
| 93 | +### Rust Example with Syntax Highlighting |
| 94 | +```rust |
| 95 | +// Rust implementation |
| 96 | +fn fibonacci(n: usize) -> usize { |
| 97 | + match n { |
| 98 | + 0 => 0, |
| 99 | + 1 => 1, |
| 100 | + _ => fibonacci(n - 1) + fibonacci(n - 2), |
| 101 | + } |
| 102 | +} |
| 103 | + |
| 104 | +fn main() { |
| 105 | + println!("The 10th Fibonacci number is: {}", fibonacci(10)); |
| 106 | +} |
| 107 | +``` |
| 108 | + |
| 109 | +### Bash Example |
| 110 | +```bash |
| 111 | +#!/bin/bash |
| 112 | +echo "Processing document with modern tools..." |
| 113 | +typst compile document.typ |
| 114 | +echo "Document compiled successfully!" |
| 115 | +``` |
| 116 | + |
| 117 | +--- |
| 118 | + |
| 119 | +## Horizontal Rules and Separators |
| 120 | + |
| 121 | +Above and below this line are horizontal rules. |
| 122 | + |
| 123 | +--- |
| 124 | + |
| 125 | +## Tables Section |
| 126 | + |
| 127 | +### Basic Table |
| 128 | +| Author | Work | Year | Citation | |
| 129 | +| ------ | ---- | ---- | -------- | |
| 130 | +| Donald Knuth | The TeXbook | 1986 | [@texbook] | |
| 131 | +| Leslie Lamport | LaTeX Manual | 1994 | [@latex2e] | |
| 132 | +| Mittelbach et al. | LaTeX Companion | 2004 | [@latex:companion] | |
| 133 | + |
| 134 | +### Advanced Table with References |
| 135 | +| Concept | Description | Reference | |
| 136 | +| ------- | ----------- | --------- | |
| 137 | +| Literate Programming | Code as literature | [@knuth:1984] | |
| 138 | +| Computer Typesetting | Early digital publishing | [@lesk:1977] | |
| 139 | +| Document Preparation | Systematic approach | [@latex2e] | |
| 140 | + |
| 141 | +As shown in the [Tables Section](#tables-section), we can reference tables and their content. |
| 142 | + |
| 143 | +## Footnotes with Citations |
| 144 | + |
| 145 | +Here is a sentence with a regular footnote[^regular] and another with a citation footnote[^citation-note]. |
| 146 | + |
| 147 | +Complex footnotes can contain multiple citations[^complex-footnote]. |
| 148 | + |
| 149 | +[^regular]: This is a simple footnote without citations. |
| 150 | +[^citation-note]: This footnote references the fundamental work by [@texbook]. |
| 151 | +[^complex-footnote]: This footnote discusses multiple works [@knuth:1984] [@latex:companion] and their impact on modern typesetting. |
| 152 | + |
| 153 | +## Mathematics Integration |
| 154 | + |
| 155 | +### Inline Math |
| 156 | +The famous equation $E = mc^2$ demonstrates mass-energy equivalence. Integration can be expressed as $\int_{0}^{\infty} e^{-x^2} dx = \frac{\sqrt{\pi}}{2}$. |
| 157 | + |
| 158 | +### Block Math |
| 159 | +Mathematical typesetting, as described in [@texbook], allows for complex expressions: |
| 160 | + |
| 161 | +$$ |
| 162 | +\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6} |
| 163 | +$$ |
| 164 | + |
| 165 | +The Fibonacci sequence can be expressed mathematically as: |
| 166 | + |
| 167 | +$$ |
| 168 | +F_n = \begin{cases} |
| 169 | +0 & \text{if } n = 0 \\ |
| 170 | +1 & \text{if } n = 1 \\ |
| 171 | +F_{n-1} + F_{n-2} & \text{if } n > 1 |
| 172 | +\end{cases} |
| 173 | +$$ |
| 174 | + |
| 175 | +## HTML Elements and Styling |
| 176 | + |
| 177 | +### Text Styling with HTML |
| 178 | +This text contains <sub>subscript</sub> and <sup>superscript</sup> elements. |
| 179 | +You can also <mark>highlight important text</mark> using HTML tags. |
| 180 | + |
| 181 | +### Definition Lists |
| 182 | +<dl> |
| 183 | +<dt>Literate Programming</dt> |
| 184 | +<dd>A programming paradigm introduced by Donald Knuth</dd> |
| 185 | + |
| 186 | +<dt>TeX</dt> |
| 187 | +<dd>A typesetting system created by Knuth</dd> |
| 188 | + |
| 189 | +<dt>LaTeX</dt> |
| 190 | +<dd>A document preparation system built on TeX</dd> |
| 191 | +</dl> |
| 192 | + |
| 193 | + |
| 194 | +## Combined References and Citations |
| 195 | +The work presented in [Introduction](#introduction) builds upon foundational research [@texbook] [@knuth:1984]. |
| 196 | + |
| 197 | + |
| 198 | +## Summary and Conclusions |
| 199 | + |
| 200 | +This document has demonstrated the comprehensive integration of Markdown with Typst through cmarker, showcasing: |
| 201 | + |
| 202 | +1. **Citations**: Proper academic citations using [@texbook] [@latex:companion] [@knuth:1984] [@latex2e] [@lesk:1977] |
| 203 | +2. **Cross-references**: Internal linking to sections like [Introduction](#introduction). |
| 204 | +3. **Advanced formatting**: Tables, footnotes, and mathematical expressions |
| 205 | +4. **Code integration**: Syntax-highlighted code blocks in multiple languages |
| 206 | +5. **HTML support**: Enhanced styling with HTML elements |
| 207 | + |
| 208 | +The combination of Markdown's simplicity with Typst's power, enhanced by proper citation management, provides an excellent foundation for academic and technical writing [@knuth:1984]. |
| 209 | + |
| 210 | +For the complete bibliography of sources referenced in this document, see the Bibliography section below. |
0 commit comments