Last active
February 25, 2023 19:33
-
-
Save tyleransom/078b045584ad537e85d2a6846ff31f65 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Dodging local macros (backtick) | |
* works | |
file open tb using "test1.tex", write replace | |
file write tb "These are backticks: " "`" "`" "air quotes''. "_n | |
file close tb | |
* works | |
!echo "These are backticks:" "`=char(92)'`=char(96)'""`=char(92)'`=char(96)'""air quotes''." > test2.tex | |
* doesn’t work | |
file open tb using "test1-bad.tex", write replace | |
file write tb "These are backticks: ``air quotes''. "_n | |
file close tb | |
* doesn't work | |
!echo "These are backticks:" "\`\`air quotes''." > test2-bad.tex | |
* also doesn't work | |
!echo "These are backticks:" "\" "`" "\" "`" "air quotes''." > test2-bad2.tex | |
* Dodging global macros (dollar sign) | |
* works | |
file open tb using "test3.tex", write replace | |
file write tb "The shirt costs " "$" "USD 15. "_n | |
file close tb | |
* works | |
!echo "The shirt costs" "`=char(92)'`=char(36)'""USD 15." > test4.tex | |
* doesn’t work | |
file open tb using "test3-bad.tex", write replace | |
file write tb "The shirt costs $USD 15. "_n | |
file close tb | |
* doesn't work | |
!echo "The shirt costs $USD 15." > test4-bad.tex | |
* also doesn't work | |
!echo "The shrit costs " "\" "$USD " "15." > test4-bad2.tex |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment