File tree Expand file tree Collapse file tree 3 files changed +49
-0
lines changed Expand file tree Collapse file tree 3 files changed +49
-0
lines changed Original file line number Diff line number Diff line change @@ -771,6 +771,7 @@ do_latex() {
771
771
--standalone
772
772
--highlight-style=${SYNTAX_HIGHLIGHT_STYLE}
773
773
--template=${TEMPLATE_PDF}
774
+ --lua-filter=render-helpers.lua
774
775
--lua-filter=convert-diagrams.lua
775
776
--lua-filter=convert-aasvg.lua
776
777
--lua-filter=convert-images.lua
@@ -882,6 +883,7 @@ do_docx() {
882
883
cmd=(pandoc
883
884
--embed-resources
884
885
--standalone
886
+ --lua-filter=render-helpers.lua
885
887
--lua-filter=convert-diagrams.lua
886
888
--lua-filter=convert-aasvg.lua
887
889
--lua-filter=convert-images.lua
@@ -926,6 +928,7 @@ do_html() {
926
928
--standalone
927
929
--template=${TEMPLATE_HTML}
928
930
${HTML_STYLESHEET_ARGS}
931
+ --lua-filter=render-helpers.lua
929
932
--lua-filter=convert-diagrams.lua
930
933
--lua-filter=convert-aasvg.lua
931
934
--lua-filter=parse-html.lua
Original file line number Diff line number Diff line change
1
+ -- Turn [text]{.btick} into `text`, rendered without changing the font.
2
+ -- Turn [text]{.sup} into superscripted text.
3
+ -- Turn [text]{.sub} into subscripted text.
4
+
5
+ backtick_chars =
6
+ {
7
+ [" latex" ] = " \\ textasciigrave{}" ,
8
+ [" default" ] = " `"
9
+ }
10
+
11
+ function backtick (el )
12
+ local backtick_char = backtick_chars [FORMAT ] or backtick_chars [" default" ]
13
+
14
+ local new_inlines = {}
15
+
16
+ table.insert (new_inlines , pandoc .RawInline (FORMAT , backtick_char ))
17
+ for _ , inline_el in ipairs (el .content ) do
18
+ table.insert (new_inlines , inline_el )
19
+ end
20
+ table.insert (new_inlines , pandoc .RawInline (FORMAT , backtick_char ))
21
+
22
+ return new_inlines
23
+ end
24
+
25
+ function Span (el )
26
+ if el .classes :includes (' btick' ) then
27
+ return backtick (el )
28
+ elseif el .classes :includes (' sup' ) then
29
+ return pandoc .Superscript (el .content )
30
+ elseif el .classes :includes (' sub' ) then
31
+ return pandoc .Subscript (el .content )
32
+ else
33
+ return el
34
+ end
35
+ end
Original file line number Diff line number Diff line change @@ -1460,6 +1460,17 @@ Carl->>Bob: Goodbye
1460
1460
Bob->>Alice: Goodbye
1461
1461
```
1462
1462
1463
+ ## Helper classes
1464
+
1465
+ Several helper classes are available.
1466
+
1467
+ ```md
1468
+ [These words]{.btick} are wrapped backticks in normal font.
1469
+ [Here's]{.sup} a superscript, and [here's]{.sub} a subscript.
1470
+ ```
1471
+
1472
+ [These words]{.btick} are wrapped backticks in normal font. [Here's]{.sup} a superscript, and [here's]{.sub} a subscript.
1473
+
1463
1474
## TCG Storage Workgroup Customizations
1464
1475
1465
1476
TCG Storage committee uses command `MethodsOrUID` to render Names of methods and UIDs in \MethodsOrUID{Courier New font}.
You can’t perform that action at this time.
0 commit comments