This file contains hidden or 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
| --[[ | |
| Add support for a custom inline syntax. | |
| This pandoc Lua filter allows to add a custom markup syntax | |
| extension. It is designed to be adjustable; it should not be | |
| necessary to modify the code below the separator line. | |
| The example here allows to add highlighted text by enclosing the | |
| text with `==` on each side. Pandoc supports this for HTML output | |
| out of the box. Other outputs will need additional filters. |
This file contains hidden or 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
| local function sentence_lines (el) | |
| local inlines = el.content | |
| for i = 2, #inlines do | |
| if inlines[i].t == 'Space' and | |
| inlines[i-1].t == 'Str' and | |
| inlines[i-1].text:match '%.$' then | |
| inlines[i] = pandoc.SoftBreak() | |
| end | |
| end | |
| return el |
This file contains hidden or 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
| --- Lists the formats that support all the extensions given on the command line. | |
| -- | |
| -- Usage: | |
| -- | |
| -- pandoc lua list-formats.lua [extensions,...] | |
| -- | |
| -- Example: | |
| -- | |
| -- $ pandoc lua list-formats.lua native_numbering citations | |
| -- docx |
This file contains hidden or 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
| -- This filter numbers second-level headings as chapters, and treats | |
| -- first-level headings as "parts". | |
| --- Fix numbering when using parts | |
| -- | |
| -- This filter numbers second-level headings as chapters, and treats | |
| -- first-level headings as "parts". | |
| -- | |
| -- Copyright: © 2024 Albert Krewinkel <albert+pandoc@tarleb.com> | |
| -- License: MIT |
OlderNewer