-
Notifications
You must be signed in to change notification settings - Fork 0
/
mls40Sweave.sty
executable file
·68 lines (56 loc) · 2.75 KB
/
mls40Sweave.sty
1
\NeedsTeXFormat{LaTeX2e}\ProvidesPackage{Sweave}{}\RequirePackage{ifthen}\newboolean{Sweave@gin}\setboolean{Sweave@gin}{true}\DeclareOption{nogin}{\setboolean{Sweave@gin}{false}}\ProcessOptions\RequirePackage[T1]{fontenc}\RequirePackage{graphicx,ae,fancyvrb}\IfFileExists{upquote.sty}{\RequirePackage{upquote}}{}\ifthenelse{\boolean{Sweave@gin}}{\setkeys{Gin}{width=1.0\textwidth}}{}%%\DefineVerbatimEnvironment{Sinput}{Verbatim}{fontshape=sl, fontsize=\small}%\DefineVerbatimEnvironment{Soutput}{Verbatim}{}\DefineVerbatimEnvironment{Scode}{Verbatim}{fontshape=sl}\newenvironment{Schunk}{}{}\usepackage{color}\usepackage{listings} \definecolor{gris90}{gray}{0.90} \lstloadlanguages{R} \lstnewenvironment{Sinput}[1][]{ \lstset{% language={R}, numbers=left, basicstyle=\footnotesize\ttfamily, % print whole listing small keywordstyle=\color{black}\bfseries, % style for keyword emph={in}, % define a list of word to emphasis emphstyle=\color{black}\bfseries, % define the way to emphase % emph={[2]out}, % define a second list of word to emphasis % emphstyle=[2]\color{red}\bfseries, % define the way to emphase the list 2 frame=single, % box arround the code backgroundcolor=\color{gris90}, % background color % commentstyle=\color{gris10}, % define the style of the comments showspaces=false, % show the space in code, or not stringstyle=\ttfamily, % style of the string (like "hello word") showstringspaces=false, % show the space in string, on not #1 } }{} \lstnewenvironment{Soutput}[1][]{ \lstset{% language={R}, basicstyle=\footnotesize\ttfamily, % print whole listing small keywordstyle=\color{black}\bfseries, % style for keyword emph={in}, % define a list of word to emphasis emphstyle=\color{black}\bfseries, % define the way to emphase % emph={[2]out}, % define a second list of word to emphasis % emphstyle=[2]\color{red}\bfseries, % define the way to emphase the list 2 frame=none, % box arround the code %backgroundcolor=\color{gris90}, % background color % commentstyle=\color{gris10}, % define the style of the comments showspaces=false, % show the space in code, or not stringstyle=\ttfamily, % style of the string (like "hello word") showstringspaces=false, % show the space in string, on not #1 } }{}