File tree Expand file tree Collapse file tree 4 files changed +31
-42
lines changed Expand file tree Collapse file tree 4 files changed +31
-42
lines changed Original file line number Diff line number Diff line change @@ -771,7 +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
+ --lua-filter=fix-latex-backticks .lua
775
775
--lua-filter=convert-diagrams.lua
776
776
--lua-filter=convert-images.lua
777
777
--lua-filter=center-images.lua
@@ -882,7 +882,6 @@ do_docx() {
882
882
cmd=(pandoc
883
883
--embed-resources
884
884
--standalone
885
- --lua-filter=render-helpers.lua
886
885
--lua-filter=convert-diagrams.lua
887
886
--lua-filter=convert-images.lua
888
887
--lua-filter=parse-html.lua
@@ -926,7 +925,6 @@ do_html() {
926
925
--standalone
927
926
--template=${TEMPLATE_HTML}
928
927
${HTML_STYLESHEET_ARGS}
929
- --lua-filter=render-helpers.lua
930
928
--lua-filter=convert-diagrams.lua
931
929
--lua-filter=parse-html.lua
932
930
--lua-filter=apply-classes-to-tables.lua
Original file line number Diff line number Diff line change
1
+ -- Correct backtick rendering in Latex. Without this, escaped backticks are displayed as curly open single quote marks.
2
+
3
+ function Str (el )
4
+ local new_inlines = {}
5
+ local current_text = " "
6
+
7
+ if FORMAT ~= " latex" or not el .text :match (" `" ) then
8
+ return el
9
+ end
10
+
11
+ for i = 1 , # el .text do
12
+ local char = el .text :sub (i , i )
13
+
14
+ if char == " `" then
15
+ if current_text ~= " " then
16
+ table.insert (new_inlines , pandoc .Str (current_text ))
17
+ current_text = " "
18
+ end
19
+ table.insert (new_inlines , pandoc .RawInline (' latex' , ' \\ textasciigrave{}' ))
20
+ else
21
+ current_text = current_text .. char
22
+ end
23
+ end
24
+
25
+ if current_text ~= " " then
26
+ table.insert (new_inlines , pandoc .Str (current_text ))
27
+ end
28
+
29
+ return new_inlines
30
+ end
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -1460,16 +1460,6 @@ 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
-
1473
1463
## TCG Storage Workgroup Customizations
1474
1464
1475
1465
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