-
-
Save Teino1978-Corp/a191eccf883fd2ade0f6 to your computer and use it in GitHub Desktop.
LaTeX emphasize shortcut
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
% Use /important/ for emphasized text and // for a single slash. | |
\makeatletter | |
\newtoggle{inSlashEmph} | |
\togglefalse{inSlashEmph} | |
\let\emphslash=/ | |
\catcode`\/=\active | |
\protected\def/{% | |
\@ifnextchar/{\emphslash\@gobble}{% | |
\iftoggle{inSlashEmph}{% | |
\global\togglefalse{inSlashEmph}% | |
\egroup\xspace% | |
}{% | |
\global\toggletrue{inSlashEmph}% | |
\bgroup\em% | |
}% | |
}% | |
} | |
%\protected\def/{\@ifnextchar/{\emphslash\@gobble}{\startStopEmph}} | |
\makeatother |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment