From 1197d5ed95e244e88dfa4cd6f15f662707707147 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 19 Oct 2026 14:32:03 -0500 Subject: feat(reveal): fit dense slides to the canvas instead of clipping them reveal.js lays each slide out on a fixed canvas and clips whatever runs past the bottom. At the stock 42px font a slide held about six lines. Anything past that vanished with no sign it was missing. I made three changes in org-reveal-config.el. The canvas is now 16:9 (1280x720), so lines wrap later. The head preamble sets a 30px base font and smaller headings through the theme's CSS variables, so any reveal 4+ theme picks them up. A script spliced in after Reveal.initialize measures every slide once reveal is ready and shrinks any that still overflows, down to a floor of half size. A slide that overflows even there gets a console warning. A slide that fits stays at full size. The script stays out of overview and print view, where reveal lays slides out differently and a measurement means nothing. The header template now emits the same init options as the global default and turns off ^ markup, so snake_case identifiers in slide text stop exporting as subscripts. A file that already carries its own #+REVEAL_INIT_OPTIONS keeps them. The preamble and the fit script apply to every export. --- tests/test-org-reveal-config-header-template.el | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/test-org-reveal-config-header-template.el') diff --git a/tests/test-org-reveal-config-header-template.el b/tests/test-org-reveal-config-header-template.el index 9bda10db..b7ceff53 100644 --- a/tests/test-org-reveal-config-header-template.el +++ b/tests/test-org-reveal-config-header-template.el @@ -144,5 +144,11 @@ "Nil title should signal an error rather than silently producing garbage." (should-error (test-reveal--header nil) :type 'user-error)) +(ert-deftest test-org-reveal-config-header-template-normal-keeps-underscores-literal () + "Normal: #+OPTIONS: turns off ^ markup so snake_case identifiers in slide text stay literal. +Without it a heading like event_payloads_ais exports as event with a subscript." + (let ((result (cj/--reveal-header-template "My Talk"))) + (should (string-match-p "^#\\+OPTIONS:.*\\^:nil" result)))) + (provide 'test-org-reveal-config-header-template) ;;; test-org-reveal-config-header-template.el ends here -- cgit v1.2.3