[Tex/LaTex] How to use an external package

packages

I'm using Tex 2.9 and Texmaker, My supervisor send me the template file with this commands:

\usepackage{XThesis} %DAL Thesis Style
\usepackage{XTocinc} %Include Table of Contents as the first entry in TOC
%                     Faculty of Grad Studies insists on this!?

Normally I had error messages because I hadn't these packages installed on my system.

How can I get these packages and install them manually?

Best Answer

XThesis

As user gernot recommended, I looked for the package using Google. - The result is a GitHub project with the title Undergrad thesis at Reed College (link). - I downloaded the project as you can see in the screenshot.

enter image description here

  • Then you have a ZIP file that you just need to unzip.
  • Since the file XThesis.sty is in the same folder as the main file, laTeX automatically will find it.

enter image description here

XTocinc

  • Searching for XTocinc.sty lead me to website where my browser had some doubt about my personal security (link).
  • But there is also a GitHub result which looks less hostile :) (link).

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

Content of XTocinc.sty:

% -------------------------------------------------------------------
% Include Table of Contents in the Table of Contents
% Change spacing
% Modified by Alex, October 1994
% Bug Fix: TOC Page number when TOC spans over one page (November, 1999)
\newlength{\tclineskip}
\setlength{\tclineskip}{\baselineskip}
\def\@addcontentsline#1#2#3{\if@filesw \begingroup
\let\label\@gobble \let\index\@gobble \let\glossary\@gobble
\def\protect##1{\string\string\string##1\string\space
   \space}\@temptokena{\thepage}%
\edef\@tempa{\immediate\write
\@auxout{\string\@writefile{#1}{\protect
     \contentsline{#2}{#3}{\the\@temptokena}}}}\@tempa
   \if@nobreak \ifvmode\nobreak\fi\fi\endgroup\fi}
\def\tableofcontents{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
 \fi\chapter*{Table of Contents\@mkboth{CONTENTS}{CONTENTS}}
  \newlength{\@defbaselineskip}
  \setlength{\@defbaselineskip}{\baselineskip}
  \setlength{\baselineskip}{\tclineskip}
  %\addcontentsline{toc}{chapter}{Table of Contents}
  \@starttoc{toc}
  \setlength{\baselineskip}{\@defbaselineskip}
  \if@restonecol\twocolumn\fi
  \relax}
% -------------------------------------------------------------------
  • Download the file and place it in the same folder as the rest.

Finally...

Now you can start your document...

Related Question