This document is a set of instructions as to how to install custom packages such as custom classes (.cls) and stylesheet (.sty files).
- Create a custom folder anywhere. This file will be used to add all custom packages. Let's say we call it
packagesand we store it in the directoryC:\textbackslashpackages} - Inside this custom folder, create {another} folder specifically called
tex. So, now we haveC:\packages\tex. - Inside the
texdirectory, create another folder specifically calledlatex. So, now we haveC:\packages\tex\latex. - Now, inside this directory, you can dump the folders of the custom packages. That is, the new directory is now
C:\packages\tex\latex\[customPackage], where the stylesheets and classes live inside the[customPackage]folder. - Open MikTex and update the packages.
- To update a package, after updating it, open the command window and type
texhash. - Run the command
mktexlsr.
Checkout https://tex.stackexchange.com/questions/2063/how-can-i-manually-install-a-package-on-miktex-windows for reference.
The install.sh script can be used to install the TeX classes and stylesheets into the latex search path.
To use it, run the following from anywhere on the system
wget -c https://raw.githubusercontent.com/aalbaali/latex_classes/master/install.sh?token=GHSAT0AAAAAABRI2OOT3SC4C7IOHDIQJ5K4YQRPABA -O install_tex.sh
chmod +x install_tex.sh
./install_tex.sh
rm install_tex.shI followed the instructions from this link.
Here are the summarized instructions
- Type
kpsewhich -var-value TEXMFHOMEto get the latex search path. It looks something like/hom/aalbaali/texmf. Note that this directory may not exist (may not be created). - Add your folders (
.clsand.sty) into/home/aalbaali/texmf/tex/latex/[package-name]/. Create the necessary directories if necessary. - From within that directory, run
texhash .(or from anywhere typetexhassh /home/aalbaali/texmf/tex/latex).
To verify the installation, run the following command from anywhere on the system
kpsewhich <filename-with-extension>
# Example:
# kpsewhich amro-common.sty