Open somelinguist opened 9 months ago
It looks like maybe the frame attribute classes are getting removed from first level headings at line 219
:
I don't know enough about Lua to suggest a fix, but I think any solution would probably need to take into account lines 230-238 as well:
The change in my fork seems to work? Again, I don't know much Lua, but the changes I made:
The removal code is based on the example for minted here:
Running on the modified filter on my example maintains the beamer frame attributes, and I tried it with a few examples from the readme here that didn't seem to break anything. But, again, I don't know much about Lua. :)
I just realized I probably broke the intent of tracking the headers by accidental removing the check for "restart". :)
I did some further tests, and I guess I didn't actually seem to break it. But something doesn't seem quite right about skipping the check.
Ok. I figured out the reason it still worked was because only the first level headers were being converted to divs.
The second commit in my fork (https://github.com/somelinguist/pandoc-ling/commit/4e4da4eeccdc5ce5b63814057397ab2308b730a6) adds back the check and is probably more efficient than my first attempt. It just inserts the "restart" class at index 1 so that it's easy to check later and remove.
Hello,
Thanks for this wonderful filter.
I was trying to create a slide show with Beamer using the pandoc-ling filter. However, I discovered that when using the filter, Beamer frame attributes don't always get passed through.
For example, given the following input:
If I run pandoc without the filter, for example
pandoc -t beamer beamer-ling.md --pdf-engine=xelatex -o beamer.tex
, I get the following tex output. Note the[t]
option passed to the frame environments:However, when running pandoc with the filter (
pandoc -t beamer beamer-ling.md --pdf-engine=xelatex --lua-filter ./pandoc-ling.lua -o beamer-ling.tex
), even when not including and kinds of numbered/glossed examples, the[t]
option is not included in the tex output for the frames:Any ideas?
Thanks again for this great filter!