Newer
Older
LaTeX / infosciletterhead / infosciletterhead.cls
\def\filedate{28 January 2014}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Document class for official Information Science letterhead.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Version History
% v1.0   Initial version.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\NeedsTeXFormat{LaTeX2e}[2001/06/01]
\ProvidesClass{infosciletterhead}%
         [2020/01/29 Information Science letterhead, v.1.0]


\LoadClassWithOptions{letter}


% Load required packages.
\RequirePackage{geometry}
\geometry{a4paper,margin={1in,1in}}

% Stamp the letterhead onto the page.
\RequirePackage{graphicx}
\RequirePackage{eso-pic}
\AddToShipoutPicture{\includegraphics{infosciletterhead}}

% Xe(La)TeX?
\RequirePackage{ifxetex}
\ifxetex

\RequirePackage[no-math]{fontspec}
\RequirePackage{mathspec}
\RequirePackage{xunicode}
\RequirePackage{xltxtra}

% The following line is equivalent to:
%   \setmainfont{Minion Pro}
%   \setmathsfont(Latin,Digits){Minion Pro}
%   \setmathrm{Minion Pro}
\setprimaryfont[Mapping=tex-text]{Minion Pro}
\setsansfont[Mapping=tex-text, Scale=MatchUppercase, BoldFont={Open Sans}]{Open Sans Light}
% Explicitly specify Mapping=tex-text only for the primary and sans fonts,
% otherwise curly quotes will automatically appear in the mono font. Since
% this is pretty much exclusively used for code listings, this is a bad thing.
\setmonofont[Scale=MatchLowercase]{Letter Gothic 12 Pitch}

% Hack to prevent digits in hyperlinks from being set in the main font instead of the mono font.
% From http://tex.stackexchange.com/questions/99770/problem-with-digits-in-urls-when-using-mathspec-and-hyperref
% Note: doesn't matter if this is executed multiple times.
\makeatletter
     \DeclareMathSymbol{0}{\mathalpha}{\eu@DigitsArabic@symfont}{`0}
     \DeclareMathSymbol{1}{\mathalpha}{\eu@DigitsArabic@symfont}{`1}
     \DeclareMathSymbol{2}{\mathalpha}{\eu@DigitsArabic@symfont}{`2}
     \DeclareMathSymbol{3}{\mathalpha}{\eu@DigitsArabic@symfont}{`3}
     \DeclareMathSymbol{4}{\mathalpha}{\eu@DigitsArabic@symfont}{`4}
     \DeclareMathSymbol{5}{\mathalpha}{\eu@DigitsArabic@symfont}{`5}
     \DeclareMathSymbol{6}{\mathalpha}{\eu@DigitsArabic@symfont}{`6}
     \DeclareMathSymbol{7}{\mathalpha}{\eu@DigitsArabic@symfont}{`7}
     \DeclareMathSymbol{8}{\mathalpha}{\eu@DigitsArabic@symfont}{`8}
     \DeclareMathSymbol{9}{\mathalpha}{\eu@DigitsArabic@symfont}{`9}
\makeatother

\else % assume PDFLaTeX otherwise

\RequirePackage[T1]{fontenc}
\RequirePackage{textcomp}
\RequirePackage{lmodern}
\RequirePackage{mathpazo}

% Gill Sans to come...
% \renewcommand{\sfdefault}{}
\renewcommand{\ttdefault}{blg}

\fi

% Ensure that the closing is left justified.
% (from https://www.reddit.com/r/LaTeX/comments/1ameyw/formatting_letter_closing_to_the_left/)
\longindentation=0pt


\endinput