Skip to content

Commit 415d449

Browse files
committed
escape backslash
1 parent ff873dd commit 415d449

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

FAQ.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,3 +207,43 @@ Display of the rendered diff code block:
207207

208208
noraj
209209
```
210+
211+
## Error generating PDF with backslash
212+
213+
Related to [this issue](https://github.com/noraj/OSCP-Exam-Report-Template-Markdown/issues/58).
214+
215+
Due to using Pandoc and a LaTeX template for formating the report, raw backslash (`\`) are interpreted as a control sequence for LaTeX commands.
216+
217+
So if your markdown report contains some plain backslash, you'll get an error like below:
218+
219+
```md
220+
NT AUTHORITY\SYSTEM
221+
```
222+
223+
```
224+
➜ pandoc test.md -o test.pdf --from markdown+yaml_metadata_block+raw_html --template eisvogel
225+
Error producing PDF.
226+
! Undefined control sequence.
227+
l.314 I am NT AUTHORITY\SYSTEM
228+
```
229+
230+
There are two solutions:
231+
232+
1. Put it in markdown code
233+
2. Escape it
234+
235+
### Solution n°1: Markdown code
236+
237+
~~~md
238+
`AUTHORITY\SYSTEM`
239+
240+
```
241+
AUTHORITY\SYSTEM
242+
```
243+
~~~
244+
245+
### Solution n°2: Escaping
246+
247+
```md
248+
NT AUTHORITY\\SYSTEM
249+
```

0 commit comments

Comments
 (0)