Skip to content

Instantly share code, notes, and snippets.

View michaelgruenewald's full-sized avatar

Michael Grünewald michaelgruenewald

  • Berlin
  • 13:58 (UTC +02:00)
View GitHub Profile
@michaelgruenewald
michaelgruenewald / gist:1584374
Created January 9, 2012 19:01
LaTeX emphasize shortcut
% 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}%