\usepackage{calc}
\usepackage{titletoc}
\usepackage{ifthen}

%% \pretolerance 1000
%% \tolerance 2000
%% \exhyphenpenalty 0
%% \clubpenalty 5000
%% \widowpenalty 5000
%% \displaywidowpenalty 5000

\setlength{\hoffset}{-1in}
\setlength{\voffset}{-1in}

\ifthenelse{\equal{\documenttwocolumn}{true}} {
\setlength{\columnsep}{24pt}
}

\setlength{\topmargin}{16pt}
\setlength{\textwidth}{\paperwidth - 2in}
\setlength{\oddsidemargin}{(\paperwidth - \textwidth) / 2}
\setlength{\evensidemargin}{\oddsidemargin}
\setlength{\headheight}{10mm}
\setlength{\footskip}{.33in}

\ifthenelse{\equal{\documentlandscape}{true}}
           {\setlength{\textheight}{6.5in}\setlength{\headsep}{4mm}}
           {\setlength{\textheight}{10.0in}\setlength{\headsep}{6mm}}

\setlength{\parindent}{0em}
\setlength{\parskip}{.7em}

%% \setlength{\voffset}{ % Adjust to for vertical centering
%%   ((\paperheight - \headheight - \headsep - \textheight - \footskip)  / 2)
%%   - (1.25in + \topmargin)}

%% \newcommand{\arcbullet}{\raisebox{1.5pt}{\small$\bullet$}}
%% \renewcommand{\labelitemi}{\arcbullet}
%% \renewcommand{\labelitemii}{\arcbullet}
%% \renewcommand{\labelitemiii}{\arcbullet}
%% \renewcommand{\labelitemiv}{\arcbullet}

\setlength{\labelsep}{4pt}
\setlength{\fboxsep}{0pt}

% In non-book structures, \cleardoublepage is unnecessary (oneside layout).
% In book structure, preserve the real \cleardoublepage for recto chapter starts.
\ifthenelse{\equal{\documentisbook}{true}}{}{\renewcommand{\cleardoublepage}{\newpage}}
\newcommand{\vstrut}[1]{\rule[0pt]{0pt}{#1}}

\makeatletter\gdef\ttl^@savemark{}\makeatother

\newcommand{\figureref}[2]{\hyperlink{#1}{#2}}

%% \newcounter{currentpage}
%% \newcommand{\wfigureref}[2]{%
%% \refstepcounter{currentpage}{\label{current\thecurrentpage}}%
%% \ifthenelse{\equal{\pageref{Label-#1}}{\pageref{current\thecurrentpage}}}%
%% {\hyperlink{#1}{nopage #2}}%
%% {\hyperlink{#1}{#2} (page~\pageref{Label-#1})}}

%% \newcommand{\xfigureref}[2]{%
%% \ifthenelse{\equal{\pageref*{Label-#1}}{\thepage}}%
%% {\hyperlink{#1}{nopage #2}}%
%% {\hyperlink{#1}{#2} (page~\pageref*{Label-#1})}}

%% \newcommand{\yfigureref}[2]{%
%% \ifthenelse{\equal{\pageref{Label-#1}}{\thepage}}%
%% {\hyperlink{#1}{nopage #2}}%
%% {\hyperlink{#1}{#2} (page~\pageref{#1})}}

