astronasrin wrote:So I installed Texlive
How did you install texlive?
I (as a LaTeX package maintainer) strongly recommend not using the version from the repository but using the version from TUG instead:
https://www.tug.org/texlive/quickinstall.html
(Prerequisites for CentOS 7: yum install perl-Tk perl-Digest-MD5 )
Yes, I recommend not using the CentOS repository here, which is clearly an exception since usually it's a very bad idea not using the repository. Why I do this:
- The version from the repository is outdated. When it comes to LaTeX this can lead to problems: First of all package maintainers usually only support the recent version. And when asking questions on
https://tex.stackexchange.com/ they recommend to update your TeXlive first, but you cannot using the version from repository. When installing LaTeX packages manually you can get easily into dependency hell - The recent version of the package you try to install does not work with older versions of other packages, so you get strange error messages. If you install updated versions of LaTeX packages manually to solve this issue, they depend on newer versions of other packages as well, and so on... In the end you lost 2 days just for updating half of the packages manually and resolving all the issues caused by incompatible versions of LaTeX packages.
- There are some LaTeX packages missing when using the repository version.
- You get no tlmgr for installing/removing/updating TeX packages.
- TeXlive is a TeX distribution which uses a mixture of "stable release" and "rolling release" paradigms.The core components (for example TeX itself) has been tested by the TeXlive team, but very nearly everything else and especially all the LaTeX packages are just the very recent version. So the version of TeXlive in the CentOS repository is not a very good or stable or tested version. It's just a snapshot of a rolling release TeX distribution which was done when TeXlive was packaged for CentOS. So in this case you get no benefit in using the version from the CentOS repository, just the opposite.
I am having a hard time to install all the new packages.
Unfortunately the procedure for installing LaTeX package is not always the same. There is a recommended way but not all package maintainers follow this route. Usually there is a file with the extension ".ins" (e.g. packagename.ins), compiling this file with TeX will extract the package and will print a small instruction which files should now be copied to the corresponding location. For some packages there are "just unzip and use it" archives located at
http://mirror.ctan.org/install/macros/latex/contrib/ .
But when doing a full install of the TUG version of TeXlive you should have most of the package (if not all the packages) you need. If there is a specific package missing please name it so we can help.
I tried to find and install a latex package manager. From my search I found something called tlmgr but seems that there is no Centos version of it available.
This sounds as if you had installed TeXlive from the CentOS repositories.
how should I install a package manually?
As already mentioned above this depends on the package, so we need to know what packages you are missing.