Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 7bc541248e
Fetching contributors…

Cannot retrieve contributors at this time

file 123 lines (108 sloc) 3.454 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
%
% JBY: ownstyles.sty
%

% Short commands
\newcommand{\code}[1]{\texttt{#1}}
\newcommand{\be}{\begin{equation}}
\newcommand{\ee}{\end{equation}}
\newcommand{\andd}{\wedge}
\newcommand{\orr}{\vee}
\def\naive{na\"{\i}ve}
\def\Naive{Na\"{\i}ve}
\def\naively{na\"{\i}vely}
\def\Naively{Na\"{\i}vely}
\newcommand{\ta}{\hspace*{2em}} % like a tab?

% Refs and labels
\newcommand{\figlabel}[1]{\label{fig:#1}}
\newcommand{\figref}[1]{Figure~\ref{fig:#1}}
\newcommand{\seclabel}[1]{\label{sec:#1}}
\newcommand{\secref}[1]{Section~\ref{sec:#1}}
\newcommand{\tablabel}[1]{\label{tab:#1}}
\newcommand{\tabref}[1]{Table~\ref{tab:#1}}

% figgy - Simple centered figure
\newcommand{\figgy}[2]{
\begin{center}
\vspace*{0.2cm}
\includegraphics[width=#2\textwidth]{#1}
\end{center}
}

% figvarp - More full featured figure
\newcommand{\figvarp}[4][thp]{
  \begin{figure}[#1]
  \begin{center}

  \includegraphics[width=#3\columnwidth]{#2}

  \caption{#4}
  \label{fig:#2}
  \end{center}
  \end{figure}
}

\newcommand{\acmFig}[4][0]{
  \begin{figure}[tb]
  \centering
  \hspace*{#1\linewidth}
  %\epsfig{file=#2.eps, width=#3\linewidth}
  \includegraphics[width=#3\linewidth]{#2}
  \caption{#4}
  \label{fig:#2}
  \end{figure}
}

\newcommand{\acmFigg}[5][0]{
  \begin{figure}
  \centering
  %\epsfig{file=#2.eps, width=#4\linewidth}
  \includegraphics[width=#4\linewidth]{#2}
  \includegraphics[width=#4\linewidth]{#3}
  \caption{#5}
  \label{fig:#2}
  \end{figure}
}

\newcommand{\acmFiggggg}[9][0]{
  \begin{figure}
  \centering
  %\epsfig{file=#2.eps, width=#7\linewidth}
  \includegraphics[width=#7\linewidth,height=#8\linewidth]{#2}
  \includegraphics[width=#7\linewidth,height=#8\linewidth]{#3}
  \includegraphics[width=#7\linewidth,height=#8\linewidth]{#4}
  \includegraphics[width=#7\linewidth,height=#8\linewidth]{#5}
  \includegraphics[width=#7\linewidth,height=#8\linewidth]{#6}
  \caption{#9}
  \label{fig:#2}
  \end{figure}
}

\newcommand{\acmFigDouble}[4][0]{
  \begin{figure*}
  \centering
  \hspace*{#1\linewidth}
  %\epsfig{file=#2.eps, width=#3\linewidth}
  \includegraphics[width=#3\linewidth]{#2}
  \caption{#4}
  \label{fig:#2}
  \end{figure*}
}

% codebox
%\definecolor{codecolor}{rgb}{0.87,0.87,0.87}
%\definecolor{codecolor}{rgb}{0.7,0.7,0.7}
\definecolor{codecolor}{rgb}{0.9,0.9,0.9}
\makeatletter\newenvironment{codeboxx}[1][.95]
{\begin{lrbox}{\@tempboxa}\begin{minipage}{#1\linewidth}\vspace{1ex}}
{\vspace{0ex}\end{minipage}\end{lrbox}\vspace{1ex}\fcolorbox{black}{codecolor}{\usebox{\@tempboxa}}\vspace{1ex}}
\makeatother
\newcommand{\codebox}[1]{ \begin{codeboxx} \texttt{#1} \end{codeboxx} \newline}

% edit boxes
\definecolor{editcolor}{rgb}{1,0.87,0.87}
\makeatletter\newenvironment{editboxx}[1][.95]
{\begin{lrbox}{\@tempboxa}\begin{minipage}{#1\linewidth}\vspace{1ex}}
{\vspace{0ex}\end{minipage}\end{lrbox}\vspace{1ex}\fcolorbox{black}{editcolor}{\usebox{\@tempboxa}}\vspace{1ex}}
\makeatother
\newcommand{\editbox}[1]{ \begin{editboxx} \textbf{\textit{Edit:}} \\ #1 \end{editboxx} \newline}
\newcommand{\edit}[1]{ \fcolorbox{black}{editcolor}{\textbf{\textit{Edit:}} #1}}

% graycode
% JBY: Modified from http://tex.stackexchange.com/questions/53941/verbatim-environment-with-background-color-pdflatex-and-tex4ht
\usepackage{listings}

\definecolor{verbgray}{gray}{0.9}

\lstnewenvironment{graycode}{%
  \lstset{backgroundcolor=\color{verbgray},
  frame=single,
  framerule=0pt,
  basicstyle=\ttfamily,
  columns=fullflexible}}{}
Something went wrong with that request. Please try again.