Juli 27, 2012

Install User Level Tex Live Package - fncychap

Tex Live provide a big comprehensive TeX system which is very useful for document production. Although Tex Live provide complete but still there are lots of packages which are available at CTAN and can be installed to suit our need. Here I will explain a bit about how to install a package, specifically at user level, not global level. The package which will be installed is fncychap. This package is used to manage our "Chapter" display.

Directory Location

Packages in Tex Live installed in and /usr/share/texmf-dist. Those packages are available for all of users in the system. To check whether a package is installed, we can test it by asking kpsewhich to the system:

$ kpsewhich fancyhdr.sty
/usr/share/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty
$

We may see the pattern. All of the package's file reside in /usr/share/texmf-dist/tex/latex/package-name/. If we want to install the package, actually we can do that easily by just copy all of the distribution according to this pattern, but this practice is discouraged and considered a bad practice since it can be confusing whenever we want to uninstall or whenever Tex Live is upgraded. If it can not find the package, it will says like this:

$ kpsewhich wuthesis
$

Well, nothing, huh? Yes. It says nothing. How polite :). In my Linux box, all of the user level packages should be installed by copy them to $HOME/texmf/tex/latex/, so whenever we want to install package, just copy them to that directory:

$ ls -la ~/texmf/tex/latex/
total 12
drwxr-xr-x 3 bpdp users 4096 Jul 28 10:05 .
drwxr-xr-x 3 bpdp users 4096 Jul 28 09:18 ..
drwxr-xr-x 2 bpdp users 4096 Jul 28 09:18 fncychap
[bpdp@bpdp-arch submitted]$

Enter fncychap

fncychap package is a package, created by Ulf. A. Lindgren, to alter chapter headings appearance. To install this package, just copy them to $HOME/texmf/tex/latex/ as written above. To use this package, just use it:

...
\usepackage[Sonny]{fncychap}
...

You may other style then Sonny, for example Bjarne, Lenny, Bjornstrup, Glenn, Conny, and Rejne. The result is like this:


Beautiful :)

0 comments:

Posting Komentar