Created
April 30, 2018 17:09
-
-
Save wtsnjp/26e6e7a764b512d64c5bf777b13b8807 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
| \documentclass{article} | |
| \usepackage{textcomp} | |
| \makeatletter | |
| \let\orgtexttt\texttt | |
| \edef\x@store{\the\catcode`\'} | |
| \catcode`\'=\active | |
| \def\texttt{% | |
| \bgroup | |
| \catcode`\'=\active | |
| \x@texttt} | |
| \def\x@texttt#1{% | |
| \def'{\textquotesingle}% | |
| \orgtexttt{#1}\egroup} | |
| \catcode`\'=\x@store | |
| \makeatother | |
| \begin{document} | |
| $a'$ said \texttt{'Hi'}. | |
| \end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment