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
|
---
marp: true
theme: acarp-beamer
style: |
:root {
--logo-image: url('acarp.png');
--logo-width: 120px;
--logo-height: 120px;
}
---
<!--
Classic LaTeX Beamer Style (4:3 aspect ratio)
This presentation uses the classic 4:3 aspect ratio (1280x960)
optimized for academic presentations with equations and detailed content.
-->
<!-- _class: title -->
# Academic Marp Theme
Beamer Style (4:3)
## Classic academic format
<div class="vspace-large"></div>

---
<!-- paginate: true -->
## Overview
A minimal, grid-based setup for Marp presentations:
- **Classic 4:3 aspect ratio** - Traditional academic format
- **Grid-only layouts** - No flexbox, no utility classes
- **Equation-friendly** - More vertical space for math
- **Academic focus** - Optimized for technical content
---
### Key Features
**Beamer-Style Design**
- 4:3 aspect ratio (1280x960)
- More vertical space
- Traditional academic format
- Perfect for equations
**Grid-Based Layouts**
- CSS Grid for all layouts
- Explicit grid contracts
- No hidden behaviors
- Maintainable structure
---
## Mathematical Content
The TF-IDF model for term weighting:
$\quad \text{tf-idf}(t, d, D) = \text{tf}(t, d) \times \text{idf}(t, D)$
Where term frequency is:
$\quad \text{tf}(t, d) = \frac{f_{t,d}}{\sum_{t'\in d} f_{t',d}}$
And inverse document frequency:
$\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.
<div class="cite">[Sparck Jones, 1972]</div>
---
<!-- _class: layout-2col -->
### Code Examples
<div class="left-column">
<div class="vspace-medium"></div>
```python
def tfidf(term, doc, corpus):
tf = term_frequency(term, doc)
idf = inverse_df(term, corpus)
return tf * idf
# Example usage
score = tfidf("grid", doc1, docs)
print(f"TF-IDF: {score:.3f}")
```
</div>
<div class="right-column">
<div class="vspace-medium"></div>
```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>
---
## Layout Patterns
**Default Layout** - Single column, ideal for equations
**Title Layout** - Classic academic opening
**Vertical Flow** - Natural reading order for academic content
The beamer style emphasizes vertical flow over side-by-side comparisons.
---
### Performance Analysis
Traditional approaches to presentation layouts:
- Complex positioning systems
- Flexbox with numerous overrides
- Utility classes with cascade issues
Our grid-only approach provides:
- Clear, predictable structure
- No positioning hacks
- Easy maintenance and debugging
<!-- ironically, non grid image (for demo, could be 2col layout) -->
<style>
img[alt~="bottom-right"] {
position: absolute;
bottom: 75px;
right: 75px;
z-index: 10;
}
</style>

---
## Getting Started with Beamer
1. Install dependencies: `npm install`
2. Create your markdown file
3. Add `theme: acarp-beamer` in frontmatter
4. Write your academic content
5. Build with: `marp --theme acarp-beamer file.md`
The beamer theme automatically applies the 4:3 aspect ratio.
---
## Vertical Spacing
Use spacing utilities for better content flow in the beamer format:
<div class="vspace-small"></div>
Small vertical space (1em)
<div class="vspace-medium"></div>
Medium vertical space (2em) - good for section breaks
<div class="vspace-large"></div>
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.
<div class="vspace-small"></div>

Images can have custom spacing too.
---
## Thank You
This theme provides a clean, academic-focused foundation in the traditional beamer format.
Perfect for:
- Conference presentations
- Academic lectures
- Technical seminars
- Research presentations
|