aboutsummaryrefslogtreecommitdiff
path: root/tests/test-org-reveal-config-header-template.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-10-19 14:32:03 -0500
committerCraig Jennings <c@cjennings.net>2026-10-19 14:32:03 -0500
commit1197d5ed95e244e88dfa4cd6f15f662707707147 (patch)
tree295ef6bdde6126cfd0138db07e7d0072f4ae9723 /tests/test-org-reveal-config-header-template.el
parent8d4b3d226f5a8990cae7b3fe74deda6b5fd2c127 (diff)
downloaddotemacs-1197d5ed95e244e88dfa4cd6f15f662707707147.tar.gz
dotemacs-1197d5ed95e244e88dfa4cd6f15f662707707147.zip
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.
Diffstat (limited to 'tests/test-org-reveal-config-header-template.el')
-rw-r--r--tests/test-org-reveal-config-header-template.el6
1 files changed, 6 insertions, 0 deletions
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