[OS X TeX] using \usepackage with other .sty files
Bruno Voisin
bvoisin at mac.com
Tue Feb 14 05:40:48 EST 2006
Le 14 févr. 06 à 00:23, KL Tah a écrit :
> Is there then another command I can use to make existing packages
> work with documentstyle?
> If there isn't, it looks like the .sty file will need to be written
> in to a .cls format. is this correct?
Nope. In LaTeX 2e (the current version since 1994) a .sty file is a
package, to be called with \usepackage, and a .cls file is a class,
to be called with \documentclass. Each LaTeX document (with
either .tex or .ltx extension) much start with one and only one
\documentclass, and then can contain any arbitrary number of
\usepackage, all before \begin{document}. In any case, editing an
existing .sty file (like res.sty you're mentioning) is a very very
very bad idea.
Your document should begin with something like:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{res}
\begin{document}
Stuff to look at:
"LaTeX: A Document Preparation System (2nd Edition)" by Lamport
"The LaTeX Companion (2nd Edition)" by Mittelbach et al.
"A Guide to LaTeX" by Kopka & Daly
plus /Library/teTeX/share/texmf.tetex/doc/latex/base/usrguide.dvi,
and if you feel adventurous /Library/teTeX/share/texmf.tetex/doc/
latex/base/clsguide.dvi (which will tell you that a class or package
needs to use \RequirePackage to call another package, and a class
needs to use \LoadClass to call another class).
More generally, for pointers to documentation you can look at <http://
www.tug.org/begin.html> and <http://www.tug.org/interest.html>.
Hope this helps,
Bruno Voisin------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
More information about the MacOSX-TeX
mailing list