Skip to content

Instantly share code, notes, and snippets.

@khrome
Created December 19, 2011 18:22
Show Gist options
  • Save khrome/1498266 to your computer and use it in GitHub Desktop.
Save khrome/1498266 to your computer and use it in GitHub Desktop.
Code environment for XeLaTeX
\definecolor{altlinecolor} {rgb}{0.7,0.7,0.7}
\renewcommand{\FancyVerbFormatLine}[1]{%
\ifodd\value{FancyVerbLine}%
\colorbox{altlinecolor}{
\hspace{-0.04in}\makebox[\textwidth - 16pt][l]{#1}
}\else#1\fi}
\DefineVerbatimEnvironment{CleanCode}{Verbatim}
{
frame=single,
framesep=2mm,
labelposition=topline,
numbers=left,
formatcom=\vspace{0.2in}
}
\begin{CleanCode}
//your comments
var iables = and function(calls);
\end{CleanCode}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment