-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A new approach to preparing a lecture script #6
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
as of pandoc 2.3 (it seems), raw LaTeX in markdown is parsed differently. overlay_filter expected RawInline, type tex, but now it gets RawBlock, type latex. So let's check for that too.
Pandoc 2.7 giveth and taketh away. It is smarter about processing beamer overlay specifications (actually this improvement dates from 2.2.2), making overlay_filter superfluous. But it eliminates the slideshow feature which didn't create a slide for text after a first-level heading (when the slide level was 2). We need to work around this. @jgm himself [suggested](jgm/pandoc#5453) trying just putting the non-slide text inside a div with a special class and filtering those divs. This filter is in noslide.lua. Generating the lecture script just means omitting the filter. Instead of generating slide-like output with pandoc -t beamer, we can just generate ordinary article-like output (implicitly -t latex). We still need the beamerarticle template to deal with any special beamer commands (e.g. overlay specifications) inside slides. Haven't fully updated the content of the sample markdowns to reflect this new arrangement. Nor the README.
it would be better not to hard-code this particular choice, but as a starting point, there's this
some feature bloat for noslide.lua. If the output format is beamer, noslide Divs are removed. Otherwise, they are kept but surrounded on both sides by an element. By default this is a Null, but it can also be something else, e.g. a rule. The choice is controlled by metadata variable `noslide`.
first of all, make it possible to disable noslide-chomping even if the output format is beamer. This uses the hide_noslide metadata variable. second of all, some fixes to the parsing of the noslide delineator field.
Lots of changes and wafflings to get here. noslide.lua eliminates the elaborate "delineator" options and hard-codes the horizontal rules. But I add another filtering pass to collapse two HRs in a row into one. We still make the lecture script with output format beamer (and we set a metadata variable hide_noslide in the Makefile to modify what the lua filter does). The beamerarticle template now puts a rule at the start of each frame. Because the HRs are treated as slide delimiters in beamer output, what we end up with is rules where we want them, delimiting each slide and each section of script (which is technically a "slide" for article purposes). Updated script-sample.md to reflect the new workings.
in last commit. was fiddling with position of slide number on notes slide but it's not working yet
for the speaker version of slides from notes: better spacing for the slide counter on the notes page, and correct numbering in the tiny tiny little slide number on the reduced slide.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
pandoc 2.7 broke my previous way of handling lecture-script text. It also improved its handling of Beamer overlay filters, so my
overlay_filter
is no longer necessary.But a new filter is needed, to process script text. This is
noslide.lua
, included here, to be used in conjunction with pandoc native Divs with classnoslide
. I have updated all aspects of this setup to use this new approach.