1

I installed Texmaker and Texlive in my Xubuntu (basically = Ubuntu).

I want to use the kbordermatrix package, but when I compile the document in Texmaker I get the following error:

! LaTeX Error: File `kbordermatrix.sty' not found.

Is that suppose to install .sty automatically by Texlive or I have to make some setup?

I'm new to Linux, just recently changed to Ubuntu from MS Windows. I stuck on this problem for a whole day now. I would very appreciate someone can help me.

Cheers Lee

SLN
  • 715
  • How did you install Texmaker and Texlive? Did you use apt-get install? It's been a long time since I've done latex on Linux. – Ryan Nov 11 '14 at 17:09
  • TeX Live cannot install packages on-the-fly. You must install them first. Further information depends on whether you are using your distro's packages or the upstream installer. – cfr Nov 11 '14 at 17:15
  • @Ryan Hi Ryan, since I'm new to linux, I Google it and yes I use apt-get install – SLN Nov 11 '14 at 19:27
  • @cfr Hi cfr do you know is there a solution for Linux that I could install packages on-the-fly? – SLN Nov 11 '14 at 19:28
  • @user3004698 did you try my answer/did it work? – Ryan Nov 11 '14 at 21:04
  • @Ryan Hi, Ryan I'm actually trying it now. I can find the path of texmf/ but I don't know how to make the sub directory of /tex/latex/commonstuff/ (tried by sudo mkdir) I'm very new to Linux. There are many staff I don't know well. – SLN Nov 11 '14 at 21:22
  • 3
    @user3004698 I'm not aware of any on-the-fly solution other than MiKTeX. For the directory: do not use sudo. As your normal user, do mkdir -p $(kpsewhich --var-value=TEXMFHOME)/tex/latex/kbordermatrix and then put the .sty file in the new directory. – cfr Nov 11 '14 at 21:53
  • What's the existing file structure inside texmf? If you cd to that folder, and list (ls the contents), what's in there? The subdirectories could already exist. Looks like @cfr replied while I typed, good answer – Ryan Nov 11 '14 at 22:00
  • @Ryan Specifying -p will create the parent directories only if they do not already exist. This is commonly used when you don't know the existing structure (e.g. in a script to run in various places or whatever). cd and ls is fine but cd will fail if no personal texmf tree exists at all. – cfr Nov 11 '14 at 22:02
  • @cfr that's a really elegant solution, I bow to your bash skills! – Ryan Nov 11 '14 at 22:06

1 Answers1

1

It looks like the .sty file is available here.

http://people.hss.caltech.edu/~kcb/LaTeX.shtml

If you run kpsewhich -var-value=TEXMFHOME In terminal, it should give you path to a folder called texmf/.

If you put the .sty file in a subdirectory of that file such as texmf/tex/latex/commonstuff/ then you should be able to run texhash [path to texmf folder] to have latex rescan the folder.

I took the installation instructions from here:

Where do I place my own .sty or .cls files, to make them available to all my .tex files?

Ryan
  • 2,914
  • 1
    You do not need to run texhash when installing into your personal texmf tree and doing so is pointless. That is, unless you have specified non-standard defaults for your installation. This is possible but there is no reason to think the OP has done this. By default, TeX searches the disk for your personal tree so just putting the files in place is sufficient. – cfr Nov 11 '14 at 22:21
  • @cfr he hadn't mentioned how he installed it so I included it for completenes' sake. – Ryan Nov 11 '14 at 23:28
  • 1
    Well you said to put the style file in the personal texmf tree. So texhash is not necessary unless the OP has changed the defaults. (It doesn't matter whether it is a distro package or upstream - no sane packaging would change this. It is completely standard for TeX Live.) – cfr Nov 11 '14 at 23:37