Skip to content

Commit 191837f

Browse files
committed
Rounded-rect emoji backgrounds, no-bg examples, poster README docs
- Change emoji-bg from border-radius: 50% (circle) to 4mm (rounded rect) - Add no-background emoji examples in Methods section of sample poster - Document poster authoring guide in README (front matter, ASCII grid layout, sections, section colors) - Add poster compile CLI reference to README - Add poster screenshot to README gallery - Link to examples/sample_poster.md from README
1 parent 38c766c commit 191837f

File tree

4 files changed

+128
-4
lines changed

4 files changed

+128
-4
lines changed

README.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ Compile Markdown files into beautiful CDL-themed [Marp](https://marp.app/) prese
2020
|:-----------------:|:------------:|:--------------:|
2121
| ![Two-Column](docs/screenshots/09-two-column.png) | ![Table](docs/screenshots/10-simple-table.png) | ![Formats](docs/screenshots/11-output-formats.png) |
2222

23+
| Academic Poster |
24+
|:---------------:|
25+
| ![Poster](docs/screenshots/poster-sample.png) |
26+
2327
## Table of contents
2428

2529
- [Features](#features)
@@ -39,6 +43,11 @@ Compile Markdown files into beautiful CDL-themed [Marp](https://marp.app/) prese
3943
- [Code blocks](#code-blocks)
4044
- [Tables](#tables)
4145
- [Arrow syntax](#arrow-syntax)
46+
- [Poster authoring guide](#poster-authoring-guide)
47+
- [Poster front matter](#poster-front-matter)
48+
- [ASCII grid layout](#ascii-grid-layout)
49+
- [Poster sections](#poster-sections)
50+
- [Section colors](#section-colors)
4251
- [Bundled fonts](#bundled-fonts)
4352
- [Development](#development)
4453
- [License](#license)
@@ -56,6 +65,7 @@ Compile Markdown files into beautiful CDL-themed [Marp](https://marp.app/) prese
5665
- **Syntax highlighting**: Code blocks with line numbers via Pygments
5766
- **Math support**: KaTeX for inline and display equations
5867
- **Callout boxes**: Note, tip, warning, definition, example, and important boxes
68+
- **Academic posters**: Compile poster markdown with ASCII grid layouts to HTML or PDF
5969

6070
## Installation
6171

@@ -206,6 +216,35 @@ Pre-download the Marp CLI standalone binary. This is optional — Marp CLI is au
206216
cdl-slides setup
207217
```
208218

219+
### `cdl-slides poster compile`
220+
221+
Compile a poster markdown file into HTML or PDF.
222+
223+
```
224+
Usage: cdl-slides poster compile [OPTIONS] INPUT_FILE
225+
226+
Options:
227+
-o, --output PATH Output file or directory (default: same dir as input)
228+
-f, --format TEXT Output format: html, pdf, both (default: both)
229+
--keep-temp Keep temporary processed files for debugging
230+
--help Show this message and exit.
231+
```
232+
233+
**Examples:**
234+
235+
```bash
236+
# Compile poster to HTML only
237+
cdl-slides poster compile poster.md --format html
238+
239+
# Compile poster to PDF only
240+
cdl-slides poster compile poster.md --format pdf
241+
242+
# Compile poster to both HTML and PDF
243+
cdl-slides poster compile poster.md
244+
```
245+
246+
> **Note:** Posters support HTML and PDF output only (no PPTX). Math equations automatically use Avenir font to match poster typography.
247+
209248
## Slide authoring guide
210249

211250
### Front Matter
@@ -475,6 +514,91 @@ A --[80]-> B --[lg]-> C
475514

476515
Options: `--[80]->` (pixel width), `--[lg]->` (named size: sm, md, lg, xl).
477516

517+
## Poster authoring guide
518+
519+
Create academic posters with ASCII grid layouts. See [examples/sample_poster.md](examples/sample_poster.md) for a complete example.
520+
521+
### Poster front matter
522+
523+
```yaml
524+
---
525+
marp: true
526+
theme: cdl-poster
527+
size: A0
528+
math: katex
529+
---
530+
```
531+
532+
Available sizes: `A0` (landscape, default), `A0-portrait`, `A1`, `48x36`, `36x48`, or any `WxH` pattern.
533+
534+
### ASCII grid layout
535+
536+
Define your poster layout with a `poster-layout` code block. Each letter represents a section, and its area on the grid determines its position and size:
537+
538+
````markdown
539+
```poster-layout
540+
TTTTTTTTTTTTTTTTTTTTTTTTTTTT
541+
IIIIIIIIRRRRRRRRRRRRDDDDDDDD
542+
IIIIIIIIRRRRRRRRRRRRDDDDDDDD
543+
MMMMMMMMRRRRRRRRRRRRDDDDDDDD
544+
MMMMMMMMRRRRRRRRRRRREEEEAAAA
545+
```
546+
````
547+
548+
Each letter maps to a `## X: Section Title` heading in your markdown. The number of rows and columns a letter spans determines the relative size of that section.
549+
550+
### Poster sections
551+
552+
Define sections with `## X: Title` syntax, where `X` matches a letter from the grid:
553+
554+
```markdown
555+
## T: Your poster title goes here
556+
557+
**Author One**¹, **Author Two**² | email@institution.edu
558+
559+
¹ Dartmouth College | ² Collaborating Institution
560+
561+
## I: Introduction [blue]
562+
563+
Content with **Markdown**, callout boxes, emoji figures, math, and tables.
564+
565+
## M: Methods [violet]
566+
567+
Use callout boxes, flow diagrams, and emoji figures inside sections.
568+
569+
## R: Results [green]
570+
571+
$$\hat{y} = \beta_0 + \beta_1 x_1 + \epsilon$$
572+
573+
## D: Discussion [teal]
574+
575+
Callout boxes work inside poster sections just like in slides.
576+
577+
## E: References [orange]
578+
579+
1. Author A, Author B (2023). *Journal* 1:1-10.
580+
581+
## A: Acknowledgments [spring]
582+
583+
Supported by **NSF** #1234567.
584+
```
585+
586+
The `T` section renders as the title bar. All other sections render as content panels with section headings. Use `<div class="scale-80">` wrappers to adjust font size within sections.
587+
588+
### Section colors
589+
590+
Add `[color]` after a section title to set its callout box color scheme:
591+
592+
```markdown
593+
## I: Introduction [blue]
594+
## M: Methods [violet]
595+
## R: Results [green]
596+
```
597+
598+
Available colors: `blue`, `green`, `violet`/`purple`, `orange`, `red`, `teal`, `spring`.
599+
600+
Colors affect the section heading border, callout box backgrounds, and callout box borders. Individual boxes can override with `data-color="..."` on the div.
601+
478602
## Bundled Fonts
479603

480604
The package includes these fonts for consistent rendering across platforms:

docs/screenshots/poster-sample.png

-11.3 KB
Loading

examples/sample_poster.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,15 @@ Describe the key statistical or computational methods. Prefer a **diagram** over
9898

9999
<div class="emoji-figure">
100100
<div class="emoji-col">
101-
<span class="emoji emoji-xl emoji-bg emoji-bg-blue">🐍</span>
101+
<span class="emoji emoji-xl">🐍</span>
102102
<span class="label">Python</span>
103103
</div>
104104
<div class="emoji-col">
105-
<span class="emoji emoji-xl emoji-bg emoji-bg-green">🧠</span>
105+
<span class="emoji emoji-xl">🧠</span>
106106
<span class="label">Neuroimaging</span>
107107
</div>
108108
<div class="emoji-col">
109-
<span class="emoji emoji-xl emoji-bg emoji-bg-orange">📊</span>
109+
<span class="emoji emoji-xl">📊</span>
110110
<span class="label">Visualization</span>
111111
</div>
112112
</div>

src/cdl_slides/assets/themes/cdl-poster-theme.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ p img[alt] {
414414

415415
.emoji-bg {
416416
padding: 8mm;
417-
border-radius: 50%;
417+
border-radius: 4mm;
418418
}
419419

420420
.emoji-bg-green { background-color: rgba(0, 105, 62, 0.15); }

0 commit comments

Comments
 (0)