martes, 2 de julio de 2013

Linux - Instalar un paquete LaTeX manualmente

Nota: Probado en Manjaro Linux.

Normalmente en una distribución basada en Debian utilizaba el comando

$ sudo apt-get install texlive-full

El cual me instalaba todos los paquetes disponibles para Linux.

Desgraciadamente, no puedo hacer lo mismo en Manjaro (usando pacman ni yaourt), por lo que opté por la opción hard: instalación manual de los paquetes LaTeX.

El siguiente procedimiento me ha funcionado hasta ahora.

1. Digamos que queremos el paquete algorithms (http://www.ctan.org/tex-archive/macros/latex/contrib/algorithms/). Nos descargamos el archivo zip.

2. Si el paquete que queremos viene con un archivo .sty entonces el trabajo ya está hecho, solo tenemos que copiar la carpeta descargada en la ruta /usr/share/texmf-dist/tex/latex/

2. Sin embargo, en el caso del paquete algorithms, no tenemos el archivo .sty por lo que necesitaremos compilar el archivo .ins, el cual creará el archivo .sty. Luego de compilar y generar el archivo .sty sólo nos quedará copiar la carpeta en la ruta /usr/share/texmf-dist/tex/latex/

$ latex algorithms.ins 

This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Arch Linux)
 restricted \write18 enabled.
entering extended mode
(./algorithms.ins
LaTeX2e <2011>
Babel  and hyphenation patterns for english, dumylang, nohyphenation, ge
rman-x-2012-05-30, ngerman-x-2012-05-30, afrikaans, ancientgreek, ibycus, arabi
c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis
h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis
h, french, friulan, galician, german, ngerman, swissgerman, monogreek, greek, h
ungarian, icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, ma
rathi, oriya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian, 
kurmanji, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk,
 polish, portuguese, romanian, romansh, russian, sanskrit, serbian, serbianc, s
lovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, uppersorbian, 
welsh, loaded.
(/usr/share/texmf-dist/tex/latex/base/docstrip.tex
Utility: `docstrip' 2.5d <2005>
English documentation    <1999>

**********************************************************
* This program converts documented macro-files into fast *
* loadable files by stripping off (nearly) all comments! *
**********************************************************

********************************************************
* No Configuration file found, using default settings. *
********************************************************

)

Generating file(s) ./algorithm.sty 

Processing file algorithms.dtx (algorithm) -> algorithm.sty
Lines  processed: 1272
Comments removed: 984
Comments  passed: 0
Codelines passed: 14


Generating file(s) ./algorithmic.sty 

Processing file algorithms.dtx (algorithmic) -> algorithmic.sty
Lines  processed: 1272
Comments removed: 984
Comments  passed: 0
Codelines passed: 14

*********************************************************
*
* To finish the installation you have to move the
* following files into a directory searched by LaTeX:
*
*   algorithm.sty
*   algorithmic.sty
*
* To produce the documentation run the file
* `algorithms.dtx' through LaTeX.
*
* Happy TeXing!
*********************************************************
Overall statistics:
Files  processed: 2
Lines  processed: 2544
Comments removed: 1968
Comments  passed: 0
Codelines passed: 28
 )
No pages of output.
Transcript written on algorithms.log.

3. Finalmente sólo debemos actualizar la base de datos de latex.

$ mktexlsr

mktexlsr: Updating /etc/texmf/ls-R... 
mktexlsr: Updating /usr/share/texmf/ls-R... 
mktexlsr: Updating /usr/share/texmf-dist/ls-R... 
mktexlsr: Updating /var/lib/texmf/ls-R... 
mktexlsr: Done.

4 comentarios:

  1. Muy útil la información que escribes tanto en el caso de distribuciones basadas en Debian como para usuarios de otras distribuciones. En ambos casos me fue de mucha ayuda. Muchas gracias!!!

    ResponderEliminar
  2. Lucky Club Casino Site – Play Online Slots For Real Money
    Lucky Club casino is a new gaming destination. Come and experience the excitement of Las Vegas online slots and table games. Play at Lucky Club luckyclub Casino!

    ResponderEliminar