File tree Expand file tree Collapse file tree 4 files changed +130
-3
lines changed
Expand file tree Collapse file tree 4 files changed +130
-3
lines changed Original file line number Diff line number Diff line change @@ -183,5 +183,21 @@ format:
183183 body-width : 900px
184184 margin-width : 300px
185185 gutter-width : 1.5rem
186+ revealjs :
187+ transition : slide
188+ margin : 0.2
189+ smaller : false
190+ subtitle : ' '
191+ output-ext : htm
192+ toc : true
193+ toc-depth : 1
194+ menu : true
186195
187196jupyter : python3
197+
198+ # Inherit some presentation defaults from the project slide template
199+ from : markdown+raw_attribute+raw_tex
200+ standalone : true
201+ self-contained : true
202+ slide-level : 2
203+ date-format : long
Original file line number Diff line number Diff line change @@ -16,11 +16,20 @@ format:
1616 history : true
1717 center : false
1818 mouse-wheel : true
19- transition : fade
19+ transition : slide
2020 background-transition : fade
2121 preview-links : auto
2222 footer : Applied Math Lab
2323 width : 1400
2424 height : 900
25- margin : 0.08
25+ margin : 0.2
2626 code-overflow : wrap
27+ scrollable : true
28+ # Increase default code block height to reduce inline scrollbars on slides
29+ code-block-height : " 650"
30+ # Template-provided options
31+ subtitle : ' '
32+ output-ext : htm
33+ toc : true
34+ toc-depth : 1
35+ menu : true
Original file line number Diff line number Diff line change @@ -381,3 +381,65 @@ img.figure-frame,
381381 font-size : 30px ;
382382 }
383383}
384+
385+ /* Responsive overflow rules: prevent slide content from spilling out
386+ Ensure vertical scrolling inside slides when content exceeds viewport
387+ and make images/code blocks scale and wrap appropriately. */
388+ .reveal .slides section {
389+ box-sizing : border-box;
390+ max-height : 100vh ;
391+ overflow : auto; /* enable internal scrolling rather than overflowing */
392+ }
393+
394+ .reveal .slides section * {
395+ /* allow grid/flex children to shrink below their content size on small screens */
396+ min-height : 0 ;
397+ }
398+
399+ .reveal p ,
400+ .reveal li ,
401+ .reveal h2 ,
402+ .reveal h3 {
403+ overflow-wrap : anywhere;
404+ word-break : break-word;
405+ -webkit-hyphens : auto;
406+ -ms-hyphens : auto;
407+ hyphens : auto;
408+ }
409+
410+ .reveal .columns ,
411+ .reveal .grid-2 ,
412+ .reveal .grid-3 ,
413+ .reveal .workflow-grid ,
414+ .reveal .metric-grid ,
415+ .reveal .link-grid {
416+ /* make sure nested grids can shrink on small viewports */
417+ min-height : 0 ;
418+ }
419+
420+ .reveal img ,
421+ .reveal .figure-frame img ,
422+ .reveal img .figure-frame ,
423+ .reveal .columns img {
424+ max-width : 100% ;
425+ height : auto;
426+ max-height : calc (100vh - 160px );
427+ object-fit : contain;
428+ }
429+
430+ .reveal pre ,
431+ .reveal pre code {
432+ overflow : auto;
433+ max-height : 55vh ;
434+ }
435+
436+ /* If a slide has exceptionally large content, let the entire deck scale down slightly
437+ on narrower screens to avoid overflow while preserving readability. */
438+ @media (max-width : 900px ) {
439+ .reveal {
440+ font-size : 26px ;
441+ }
442+ .reveal .title-slide .quarto-title-block {
443+ padding : 1.1rem 1.2rem ;
444+ }
445+ }
Original file line number Diff line number Diff line change 502502 min-height : 360px ;
503503 height : 360px ;
504504 }
505- }
505+ }
506+
507+ /* Prevent content spillover: enable internal scrolling on slides and
508+ ensure images/code wrap and scale responsively. */
509+ .reveal .slides section {
510+ box-sizing : border-box;
511+ max-height : 100vh ;
512+ overflow : auto;
513+ }
514+
515+ .reveal .slides section * {
516+ min-height : 0 ;
517+ }
518+
519+ .reveal p ,
520+ .reveal li ,
521+ .reveal h2 ,
522+ .reveal h3 {
523+ overflow-wrap : anywhere;
524+ word-break : break-word;
525+ hyphens : auto;
526+ }
527+
528+ .reveal img ,
529+ .reveal .columns img ,
530+ .reveal .mermaid svg {
531+ max-width : 100% ;
532+ height : auto;
533+ max-height : calc (100vh - 160px );
534+ object-fit : contain;
535+ }
536+
537+ .reveal pre ,
538+ .reveal pre code {
539+ overflow : auto;
540+ max-height : 55vh ;
541+ }
542+
543+ @media (max-width : 900px ) {
544+ .reveal { font-size : 28px ; }
545+ }
You can’t perform that action at this time.
0 commit comments