File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Expand file tree Collapse file tree 3 files changed +42
-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-images.lua
776
777
--lua-filter=center-images.lua
@@ -881,6 +882,7 @@ do_docx() {
881
882
cmd=(pandoc
882
883
--embed-resources
883
884
--standalone
885
+ --lua-filter=render-helpers.lua
884
886
--lua-filter=convert-diagrams.lua
885
887
--lua-filter=convert-images.lua
886
888
--lua-filter=parse-html.lua
@@ -924,6 +926,7 @@ do_html() {
924
926
--standalone
925
927
--template=${TEMPLATE_HTML}
926
928
${HTML_STYLESHEET_ARGS}
929
+ --lua-filter=render-helpers.lua
927
930
--lua-filter=convert-diagrams.lua
928
931
--lua-filter=parse-html.lua
929
932
--lua-filter=apply-classes-to-tables.lua
Original file line number Diff line number Diff line change
1
+ -- Turn [text]{.btick} into `text`, rendered without changing the font.
2
+
3
+ backtick_chars =
4
+ {
5
+ [" latex" ] = " \\ textasciigrave{}" ,
6
+ [" default" ] = " `"
7
+ }
8
+
9
+ function backtick (el )
10
+ local backtick_char = backtick_chars [FORMAT ] or backtick_chars [" default" ]
11
+
12
+ local new_inlines = {}
13
+
14
+ table.insert (new_inlines , pandoc .RawInline (FORMAT , backtick_char ))
15
+ for _ , inline_el in ipairs (el .content ) do
16
+ table.insert (new_inlines , inline_el )
17
+ end
18
+ table.insert (new_inlines , pandoc .RawInline (FORMAT , backtick_char ))
19
+
20
+ return new_inlines
21
+ end
22
+
23
+ function Span (el )
24
+ if el .classes :includes (' btick' ) then
25
+ return backtick (el )
26
+ else
27
+ return el
28
+ end
29
+ end
Original file line number Diff line number Diff line change @@ -1460,6 +1460,16 @@ Carl->>Bob: Goodbye
1460
1460
Bob->>Alice: Goodbye
1461
1461
```
1462
1462
1463
+ ## Helper classes
1464
+
1465
+ To wrap a word in backticks that render as normal text, you can use the following syntax:
1466
+
1467
+ ```md
1468
+ [These words]{.btick} are in backticks.
1469
+ ```
1470
+
1471
+ [These words]{.btick} are in backticks.
1472
+
1463
1473
## TCG Storage Workgroup Customizations
1464
1474
1465
1475
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