aboutsummaryrefslogtreecommitdiff
path: root/demo-beamer.md
diff options
context:
space:
mode:
Diffstat (limited to 'demo-beamer.md')
-rw-r--r--demo-beamer.md34
1 files changed, 28 insertions, 6 deletions
diff --git a/demo-beamer.md b/demo-beamer.md
index db2efa7..0a8205e 100644
--- a/demo-beamer.md
+++ b/demo-beamer.md
@@ -62,13 +62,13 @@ A minimal, grid-based setup for Marp presentations:
The TF-IDF model for term weighting:
-$\text{tf-idf}(t, d, D) = \text{tf}(t, d) \times \text{idf}(t, D)$
+$\quad \text{tf-idf}(t, d, D) = \text{tf}(t, d) \times \text{idf}(t, D)$
Where term frequency is:
-$\text{tf}(t, d) = \frac{f_{t,d}}{\sum_{t'\in d} f_{t',d}}$
+$\quad \text{tf}(t, d) = \frac{f_{t,d}}{\sum_{t'\in d} f_{t',d}}$
And inverse document frequency:
-$\text{idf}(t, D) = \log \frac{|D|}{|\{d \in D : t \in d\}|}$
+$\quad \text{idf}(t, D) = \log \frac{|D|}{|\{d \in D : t \in d\}|}$
The 4:3 format provides better vertical space for multi-line equations.
@@ -76,9 +76,12 @@ The 4:3 format provides better vertical space for multi-line equations.
---
+<!-- _class: layout-2col -->
### Code Examples
-Python implementation:
+<div class="left-column">
+
+<div class="vspace-medium"></div>
```python
def tfidf(term, doc, corpus):
@@ -91,9 +94,24 @@ score = tfidf("grid", doc1, docs)
print(f"TF-IDF: {score:.3f}")
```
-![width:400px](figs/example.png)
+</div>
+
+<div class="right-column">
+
+<div class="vspace-medium"></div>
-*Top-right logo: university/conference branding*
+```bash
+# Build presentation
+marp --theme acarp-beamer demo.md
+
+# Watch for changes
+marp --theme acarp-beamer --watch demo.md
+
+# Export to PDF
+marp --theme acarp-beamer --pdf demo.md
+```
+
+</div>
---
@@ -169,12 +187,16 @@ Large vertical space (3em) - for major separations
## Spacing Examples
+<div style="max-width: 300px;">
+
```python
def calculate():
result = 42
return result
```
+</div>
+
<div class="vspace-medium"></div>
The function returns a simple value.