Spaces:
Running
Running
File size: 12,943 Bytes
6b70860 ad5fa41 a4b9560 6b70860 a4b9560 8c7d8bb a4b9560 8c7d8bb 6b70860 8c7d8bb 6b70860 597c2dc a4b9560 597c2dc a4b9560 6b70860 a4b9560 597c2dc a4b9560 4f3bb9d a4b9560 4f3bb9d 4ec15bc e0e09d3 4ec15bc e0e09d3 4ec15bc a4b9560 597c2dc a4b9560 4f3bb9d a4b9560 597c2dc a4b9560 f9074bc a4b9560 f9074bc a4b9560 597c2dc a4b9560 597c2dc a4b9560 e0e09d3 f9074bc a4b9560 f9074bc a4b9560 f9074bc a4b9560 f9074bc a4b9560 597c2dc a4b9560 f9074bc a4b9560 f9074bc dac17a7 f9074bc ad5fa41 f9074bc ad5fa41 f9074bc ad5fa41 f9074bc a4b9560 597c2dc a4b9560 597c2dc a4b9560 597c2dc a4b9560 597c2dc a4b9560 597c2dc a4b9560 597c2dc a4b9560 ad5fa41 597c2dc ad5fa41 a4b9560 597c2dc a4b9560 ad5fa41 a4b9560 597c2dc a4b9560 597c2dc a4b9560 597c2dc a4b9560 597c2dc a4b9560 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 |
import placeholder from '../../assets/image/placeholder.png';
import audioDemo from '../../assets/audio/audio-example.wav';
import HtmlEmbed from '../../../components/HtmlEmbed.astro';
import Sidenote from '../../../components/Sidenote.astro';
import Wide from '../../../components/Wide.astro';
import Note from '../../../components/Note.astro';
import FullWidth from '../../../components/FullWidth.astro';
import Accordion from '../../../components/Accordion.astro';
import Image from '../../../components/Image.astro';
## Markdown
All the following **markdown features** are available **natively** in the `article.mdx` file. No imports needed, just write markdown directly:
**Text formatting** β `**Bold**` β **Bold**, `*italic*` β *italic*, `~~strikethrough~~` β ~~strikethrough~~
**Code** β `` `inline code` `` β `inline code`, triple backticks for code blocks
**Lists** β `- Item` for bullets, `1. Item` for numbered lists with nesting support
**Links** β `[text](url)` β [External links](https://example.com) and internal navigation
**Highlight** β `<mark>text</mark>` β <mark>Highlighted text</mark> for emphasis
See also the complete [**Markdown documentation**](https://www.markdownguide.org/basic-syntax/).
**Advanced features** β Explore specialized content types:
<div className="feature-grid">
<a href="#math" className="feature-card">
<strong>Math</strong>
<span>LaTeX equations</span>
</a>
<a href="#code-blocks" className="feature-card">
<strong>Code</strong>
<span>Syntax highlighting</span>
</a>
<a href="#citation-and-notes" className="feature-card">
<strong>Citation</strong>
<span>Academic references</span>
</a>
<a href="#footnote" className="feature-card">
<strong>Footnote</strong>
<span>Additional context</span>
</a>
<a href="#mermaid-diagrams" className="feature-card">
<strong>Mermaid</strong>
<span>Diagrams & flowcharts</span>
</a>
<a href="#separator" className="feature-card">
<strong>Separator</strong>
<span>Visual breaks</span>
</a>
<a href="#table" className="feature-card">
<strong>Table</strong>
<span>Data presentation</span>
</a>
<a href="#audio" className="feature-card">
<strong>Audio</strong>
<span>Sound embeds</span>
</a>
</div>
### Math
**KaTeX** provides full LaTeX math support with two simple syntaxes:
**Inline math** β Use `$...$` for equations within text: $x^2 + y^2 = z^2$
**Block math** β Use `$$...$$` for centered equations:
$$
\mathrm{Attention}(Q,K,V)=\mathrm{softmax}\!\left(\frac{QK^\top}{\sqrt{d_k}}\right) V
$$
**Advanced features** β Aligned equations with IDs for cross-referencing:
```math
\htmlId{trajectory_definition}{\begin{align}
\log p_\theta(\mathcal D) &= \log \sum_{i=0}^N p_\theta ((o,a)_i) \\
&= \log \sum_{i=0}^N \int_{\text{supp}({Z})} p_\theta((o,a)_i \vert z) p(z) \\
&= \log \sum_{i=0}^N \int_{\text{supp}({Z})} \frac{q_\theta(z \vert (o,a)_i)}{q_\theta(z \vert (o,a)_i)} \cdot p_\theta((o,a)_i \vert z) p(z) \\
&= \log \sum_{i=0}^N \mathbb E_{z \sim p_\theta(\bullet \vert (o,a)_i)} [\frac{p(z)}{q_\theta(z \vert (o,a)_i)} \cdot p_\theta((o,a)_i \vert z)],
\end{align}}
```
You can reference equations with links like [this equation](#trajectory_definition).
<Accordion title="Code example">
```mdx
$x^2 + y^2 = z^2$
$$
\mathrm{Attention}(Q,K,V)=\mathrm{softmax}\!\left(\frac{QK^\top}{\sqrt{d_k}}\right) V
$$
$$
\htmlId{trajectory_definition}{\begin{align}
\log p_\theta(\mathcal D) &= \log \sum_{i=0}^N p_\theta ((o,a)_i) \\
&= \log \sum_{i=0}^N \int_{\text{supp}({Z})} p_\theta((o,a)_i \vert z) p(z) \\
&= \log \sum_{i=0}^N \int_{\text{supp}({Z})} \frac{q_\theta(z \vert (o,a)_i)}{q_\theta(z \vert (o,a)_i)} \cdot p_\theta((o,a)_i \vert z) p(z) \\
&= \log \sum_{i=0}^N \mathbb E_{z \sim p_\theta(\bullet \vert (o,a)_i)} [\frac{p(z)}{q_\theta(z \vert (o,a)_i)} \cdot p_\theta((o,a)_i \vert z)],
\end{align}}
$$
```
</Accordion>
### Code
Use inline code with backticks \`...\` or \`\`\` fenced code blocks \`\`\` with a language for syntax highlighting (e.g., \`python\`).
As an example, here is inline code: `greet("Astro")` and below is a block.
```python
def greet(name: str) -> None:
print(f"Hello, {name}!")
```
<Accordion title="Code example">
````mdx
`greet("Astro")`
```python
def greet(name: str) -> None:
print(f"Hello, {name}!")
```
````
</Accordion>
### Code output
If you want to display the output of a code block, you can use the `:::output` directive. If it's directly below the code block, it will adapt to the code block's styling.
```python
def greet(name: str) -> None:
print(f"Hello, {name}!")
greet("Astro")
```
:::output
Hello, Astro!
:::
Or it can also be used at a standalone block.
:::output
Hello i'm a standalone output block.
:::
<Accordion title="It also works in an accordion">
```python
print("This script prints a very very long line to check overflow behavior.")
```
:::output
This script prints a very very long line to check overflow behavior.
:::
</Accordion>
<Accordion title="Code example">
````mdx
```python
def greet(name: str) -> None:
print(f"Hello, {name}!")
greet("Astro")
```
:::output
Hello, Astro!
:::
Or you can also use it at a standalone block.
:::output
Hello i'm a standalone outputs block.
:::
````
</Accordion>
### Citation
The **citation keys** come from `app/src/content/bibliography.bib`.
**Citation** use the `@` syntax (e.g., `[@vaswani2017attention]` or `@vaswani2017attention` in narrative form) and are **automatically** collected to render the **bibliography** at the end of the article.
1) In-text citation with brackets: [@vaswani2017attention].
2) Narrative citation: As shown by @kingma2015adam, stochastic optimization is widely used.
3) Multiple citations and a footnote together: see [@mckinney2017python; @he2016resnet] for related work.
4) All citations in one group: [@vaswani2017attention; @mckinney2017python; @he2016resnet; @silver2017mastering; @openai2023gpt4; @doe2020thesis; @cover2006entropy; @zenodo2021dataset; @sklearn2024; @smith2024privacy; @kingma2015adam; @raffel2020t5].
<Accordion title="Code example">
```mdx
1) In-text citation with brackets: [@vaswani2017attention].
2) Narrative citation: As shown by @kingma2015adam, stochastic optimization is widely used.
3) Multiple citations and a footnote together: see [@mckinney2017python; @he2016resnet] for related work.
4) All citations in one group: [@vaswani2017attention; @mckinney2017python; @he2016resnet; @silver2017mastering; @openai2023gpt4; @doe2020thesis; @cover2006entropy; @zenodo2021dataset; @sklearn2024; @smith2024privacy; @kingma2015adam; @raffel2020t5].
```
</Accordion>
<Note variant="info" emoji="π‘">You can change the citation style in the `astro.config.mjs` file. There are several styles available: `apa`, `vancouver`, `harvard1`, `chicago`, `mla`. Default is `apa`.</Note>
### Footnote
**Footnote** use an identifier like `[^f1]` and a definition anywhere in the document, e.g., `[^f1]: Your explanation`. They are **numbered** and **listed automatically** at the end of the article.
1) Footnote attached to the sentence above[^f1].
[^f1]: Footnote attached to the sentence above.
2) Multi-paragraph footnote example[^f2].
[^f2]: Multi-paragraph footnote. First paragraph.
Second paragraph with a link to [Astro](https://astro.build).
2) Footnote containing a list[^f3].
[^f3]: Footnote with a list:
- First item
- Second item
3) Footnote with an inline code and an indented code block[^f4].
[^f4]: Footnote with code snippet:
```ts
function add(a: number, b: number) {
return a + b;
}
```
Result: `add(2, 3) === 5`.
4) Footnote that includes citation inside[^f5] and another footnote[^f1].
[^f5]: Footnote containing citation [@vaswani2017attention] and [@kingma2015adam].
<Accordion title="Code example">
```mdx
1) Footnote attached to the sentence above[^f1].
2) Multi-paragraph footnote example[^f2].
2) Footnote containing a list[^f3].
3) Footnote with an inline code and an indented code block[^f4].
4) Footnote that includes citation inside[^f5].
[^f1]: Footnote attached to the sentence above.
[^f2]: Multi-paragraph footnote. First paragraph.
Second paragraph with a link to [Astro](https://astro.build).
[^f3]: Footnote with a list:
- First item
- Second item
[^f4]: Footnote with code snippet:
function add(a: number, b: number) {
return a + b;
}
Result: `add(2, 3) === 5`.
[^f5]: Footnote containing citation [@vaswani2017attention] and [@kingma2015adam].
```
</Accordion>
### Referencing
In research articles, you may have to make references to anything. They are basically html anchors. They can be used internally in the article or externally in other articles.
1. **Title**<br/>
Each title is automatically generated with a slugged version from the citation key. ( slugged title from the citation key )
like for example, the id `#mermaid-diagrams` is generated from the `Mermaid diagrams` title.
<br/><br/>**Example** [Mermaid diagrams](#mermaid-diagram)
2. **Image and chart**<br/>
You can make a link to an image or a chart by adding an ID on it.<br/>`<HtmlEmbed id="neural-network-mnist-like"/>` then you can link to it with a link like `<a href="#neural-network-mnist-like">Fig 1</a>`.
<br/><br/>**Example** [Chart 1](#neural-network-mnist-like) or [Fig 1](#placeholder-image)
<Note emoji="π‘" variant="info">
**Available with:** `Reference`, `Image`, and `HtmlEmbed` components all support the `id` prop for creating referenceable anchors.
</Note>
<Accordion title="Code example">
```mdx
#### Mermaid diagrams
[Mermaid diagrams](#mermaid-diagrams)
<HtmlEmbed id="neural-network-mnist-like"/>
[Chart 1](#neural-network-mnist-like)
<Image id="placeholder-image" src="..."/>
[Fig 1](#placeholder-image)
```
</Accordion>
### Mermaid diagram
Native mermaid diagrams are supported (use a \`\`\`mermaid\`\`\` code fence). You can use the <a target="_blank" href="https://mermaid.live/edit#pako:eNpVjUFPg0AQhf_KZk6a0AYsCywHE0u1lyZ66EnoYQMDSyy7ZFlSK_DfXWiMOqd58773ZoBcFQgxlGd1yQXXhhx3mSR2ntJE6LozDe9OZLV6HPdoSKMkXkeyvdsr0gnVtrWs7m_8doZIMhxmDIkRtfyYblay5F8ljmSXHnhrVHv66xwvaiTPaf0mbP1_R2i0qZe05HHJVznXJOF6QcCBStcFxEb36ECDuuGzhGF2MzACG8wgtmuBJe_PJoNMTjbWcvmuVPOT1KqvBNj6c2dV3xbc4K7mlea_CMoCdaJ6aSCm3lIB8QCfED94dM2o77ssjFzK3MiBq2WCNWUeiza-H26YvU8OfC0_3XVII9eLQuYFIaVBGEzfyTJ22g"> live editor</a> to create your diagram and copy the code to your article.
```mermaid
erDiagram
DATASET ||--o{ SAMPLE : contains
RUN }o--o{ SAMPLE : uses
RUN ||--|| MODEL : trains
RUN ||--o{ METRIC : logs
DATASET {
string id
string name
}
SAMPLE {
string id
string uri
}
MODEL {
string id
string framework
}
RUN {
string id
date startedAt
}
METRIC {
string name
float value
}
```
<Accordion title="Code example">
````mdx
```mermaid
erDiagram
DATASET ||--o{ SAMPLE : contains
RUN }o--o{ SAMPLE : uses
RUN ||--|| MODEL : trains
RUN ||--o{ METRIC : logs
DATASET {
string id
string name
}
SAMPLE {
string id
string uri
}
MODEL {
string id
string framework
}
RUN {
string id
date startedAt
}
METRIC {
string name
float value
}
```
````
</Accordion>
### Separator
Use `---` on its own line to insert a horizontal separator between sections. This is a standard Markdown βthematic breakβ. Donβt confuse it with the `---` used at the very top of the file to delimit the frontmatter.
---
<Accordion title="Code example">
```mdx
Intro paragraph.
---
Next section begins here.
```
</Accordion>
### Table
Use pipe tables like `| Column |` with header separator `| --- |`. You can control alignment with `:---` (left), `:---:` (center), and `---:` (right).
| Model | Accuracy | F1-Score | Training Time | Status |
|:---|:---:|:---:|---:|:---:|
| **BERT-base** | 0.89 | 0.89 | 2.5h | β
|
| **RoBERTa-large** | 0.92 | 0.92 | 4.2h | β
|
| **DeBERTa-v3** | 0.94 | 0.94 | 5.8h | β
|
| **GPT-3.5-turbo** | 0.91 | 0.91 | 0.1h | β
|
<Accordion title="Code example">
```mdx
| Model | Accuracy | F1-Score | Training Time | Status |
|:---|:---:|:---:|---:|:---:|
| **BERT-base** | 0.89 | 0.89 | 2.5h | β
|
| **RoBERTa-large** | 0.92 | 0.92 | 4.2h | β
|
| **DeBERTa-v3** | 0.94 | 0.94 | 5.8h | β
|
| **GPT-3.5-turbo** | 0.91 | 0.91 | 0.1h | β
|
```
</Accordion>
### Audio
Embed audio using `<audio controls src={...} />`.
<audio controls src={audioDemo}/>
<br/>
<Accordion title="Code example">
```mdx
import audioDemo from './assets/audio/audio-example.wav'
<audio controls src={audioDemo}/>
```
</Accordion>
|