Cognitionis
The little I know

Install style files (sty)


How to install LaTeX Style Files (.sty) on Ubuntu, using TeTeX (Deprecaded) or Tex Live (Current)

One thing that makes LaTeX so powerful is the enourmous amount of extensions available. Some extensions, usually with the .sty filename extension, do not come with an installation tutorial. I consider that they do not come with a tutorial because it is assumed it is an easy task. Another reason for having no installation instructions might be because it is platform dependent (i.e., different installation directories).

The directory for installing LaTeX files, on Ubuntu, depends on the distribution you are using. If you are using TeTeX, it is:

/usr/share/texmf-tetex/tex/latex

If you are using TeX Live, it is:

/usr/share/texmf-texlive/tex/latex

To install a style file you have to create a directory for it and copy the contents there (e.g., mkdir lingmacros, cp /x/lingmacros.sty .). Next you have to run the program mktexlsr as root.

This is an example on how to install the prooftree extension, using the TeTeX distribution:

  1. create a directory named prooftree on /usr/share/texmf-tetex/tex/latex
  2. copy the file prooftree.sty and the file prooftree.tex to the directory /usr/share/texmf-tetex/tex/latex/prooftree
  3. run sudo mktexlsr

Some Latex tricks.

Paquetes interesantes: longtable fancybox fancyhdr (headers and footers)

\usepackage{ragged2e}         % text justification in presentations

\usepackage{float}        % figue strict placement with H option (overrides h)
\usepackage{subfigure}        % allows to make figures (a) (b) in the same figure

\usepackage{lingmacros} % for enumsentence

Figures i taules: son objectes que apareixen en algun lloc del document que estan fora de la seqüència lineal del text. Son objectes flotants. S’identifiquen amb un peu o capcalera (numerat).

begin{table}[ubicació(tbph)]
cos de la taula
caption{llegenda}
label{etiqueta}
end{table}

Partir el document en varios fitxers. Es com un include de php (include{document1} o input{document1} %introduira document1.tex en include en una pagina nova i en input a continuació).

Graficos (con picture o un paquete adicional que es pictex) (o cualquier imagen en png (lo mejor, jpg…) con el paquete graphicx)

picture reserva espai, put (o multiput) posa objectes