I have the code for a transition matrix that compiles fine with a desktop editor like TeXstudio, however fails to compile in cloud-based LaTeX editors like ShareLaTeX or Overleaf:

\date{June 2015}


    & S_1 & S_2    & S_3    & S_4 \\
S_1 & a_{11} & a_{12} & a_{13} & a_{14} \\
S_2 & a_{21} & a_{22} & a_{23} & a_{24} \\
S_3 & a_{31} & a_{32} & a_{33} & a_{34} \\
S_4 & a_{41} & a_{42} & a_{43} & a_{44} \\


ShareLaTeX fails to compile this document and reports the error LaTeX Error: File 'kbordermatrix.sty' not found. Click here to see for yourself:


Why does TeXstudio have no problem compiling this code, while Overleaf & ShareLaTeX fail to compile the very same code?

The strange thing is, I get this error even though I have loaded the kbordermatrix package with the command \usepackage{kbordermatrix}. What can I add to my code to make this compile? (Preferably, since this is cloud-based, I would rather simply add some code to my document instead of uploading a file.)

Thank you for your help!

Edit: For reference, here are some other tex.SE answers regarding kbordermatrix:

Array with labeling columns

Labeling the columns of matrices

Matrix with rows and columns labeled

Where is the \matrix command?

  • Where did you get kbordermatrix.sty from? If you need that package, you'll have to upload it as it is not part of TeX Live. That message means what it says: it can't find the file.
    – cfr
    Jun 10, 2015 at 0:36
  • 1
    I think you need to download the kbordermatrix package. Jun 10, 2015 at 2:14
  • Aha, do cloud editors like Overleaf and ShareLaTeX only have access to TeX Live packages? If so, then that might explain why it doesn't recognize \usepackage{kbordermatrix}. But it's still strange that my MiKTeX/TeXstudio setup can compile the same exact code without any error... Jun 10, 2015 at 3:09
  • 4
    @EthanAlvaree Overleaf and ShareLaTeX, like everybody, must be careful about software licenses. The license of kbordermatrix.sty (lack of licensing information, to be precise) allows it to be on CTAN, but not in free software distributions. Both Overleaf and ShareLaTeX rely on TeX Live, that cannot include kbordermatrix.sty.
    – egreg
    Jun 10, 2015 at 7:16
  • 4
    I'm voting to close this question as off-topic because Online LaTeX document sources does not fall within the scope of TeX-SX
    – percusse
    Feb 2, 2016 at 13:37


Browse other questions tagged .