<reponame>StevenLRichardson/ThinkJava2Trinket<gh_stars>1-10
\usepackage{makeidx}
\makeindex

\newcommand{\adjustpage}[1]{}

\newcommand{\clearemptydoublepage}{}
\newcommand{\blankpage}{}

\newcommand{\spacing}{}
\newcommand{\endspacing}{}

\newcommand{\frontmatter}{}
\newcommand{\mainmatter}{}
\newcommand{\backmatter}{}

\newcommand{\theoremstyle}[1]{}
\newcommand{\newtheoremstyle}[1]{}

\newcommand{\vfill}{}

\newcommand{\href}{\ahref}

%commented out slr 5/24/19 in an effort to get header and footer stuff out of rendered html
%\htmlhead{\rawhtmlinput{hevea/header.html}}

%\htmlfoot{\rawhtmlinput{hevea/footer.html}}

% these styles get translated into CSS
\newstyle{p+p}{margin-top:1em; margin-bottom:1em;}
\newstyle{img}{border: 0px;}
\newstyle{.theorem em}{font-style: normal;}

% change the arrows
\setlinkstext
  {\imgsrc[ALT="Previous"]{back.png}}
  {\imgsrc[ALT="Up"]{up.png}}
  {\imgsrc[ALT="Next"]{next.png}}

% colors for code listings and output
\usepackage{color}
\definecolor{bgcolor}{rgb}{0.982, 0.982, 0.982}
\definecolor{comment}{rgb}{0.000, 0.488, 0.000}
\definecolor{keyword}{rgb}{0.000, 0.000, 1.000}
\definecolor{strings}{rgb}{0.700, 0.000, 0.000}

% syntax highlighting in code listings
\usepackage{listings}
\lstset{
    language=java,
    basicstyle=\ttfamily,
    backgroundcolor=\color{bgcolor},
    commentstyle=\color{comment},
    keywordstyle=\color{keyword},
    stringstyle=\color{strings},
    columns=fullflexible,
    emph={label},  % keyword?
    keepspaces=true,
    showstringspaces=false
}

% code listing environments
\lstnewenvironment{code}
{\lstset{numbers=left}\minipage{\linewidth}}
{\endminipage}
{}
\lstnewenvironment{stdout}
{\lstset{commentstyle=\relax,keywordstyle=\relax,stringstyle=\relax}}
{}

% interactive code listing
\lstnewenvironment{trinket}[2][400]
{}
{}

% inline syntax formatting
\newcommand{\java}{\lstinline}%}

% CSS for code listings
\newstyle{.lstframe}{margin: 1em; width: calc(100\% - 1em);}
\newstyle{.lstlisting}{padding: 3pt;}

% make urls hyperlinks in html
\input{urlhref.hva}
