kyomato/tests/input_files/tables_code.md
Dzuchun 21e24db6de First kinda-working version
- added rest of the parsing tests
- reworked generation a bit
- added "integration tests" to uphold expected parsing and generation
2024-03-17 12:17:29 +02:00

36 lines
1.5 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Наступний тест. Тут протестуємо таблиці і блоки коду.
## Таблиці
Звичайні таблиці; Можуть всередині мати **формули** чи *посилання* на інші штуки
| Storage | Space | Number |
| :---------: | :-----------: | :------------------------: |
| 1 | 2 | $3 + e ^{\pi}$ |
| $e$[^euler] | $\cdot \pm 1$ | І тут ще *трохи* тексту \| |
{ref = example_1, caption = "Оце приклад таблиці. Як казав мій вчитель: **ВИКОРИСТОВУЙ БІЛЬШЕ ВИБУХІВКИ** (і \"лапок\")"}
Таблиця цілком собі може не мати ідентифікатора або опису:
| Кількість | Роль |
| :--------: | :-------: |
| 3 діоптрії | 7 галон |
| rust | #PANIC!!! |
{ref = table_2}
[^euler]: Це число Ейлера. Воно дуже корисне, ~~але не може бути записане~~ у вигляді *десяткового* дробу.
## Блоки коду
Наразі мають досить обмежену підтримку, адже у $\LaTeX$ немає нативного поняття блоків коду.
На щастя, у **markdown** таке поняття є[^code]:
```rust
let x = 5;
let y = x.powi(2);
let z = (y as f64).sqrt();
println!("x = {x}, y = {y}, z = {x}");
```
[^code]: Принаймні, *Obsidian* таке робить