[Tex/LaTex] Errors using tikz-cd and TikZ

installingmiktexpackagestikz-pgf

I was trying to install the tikz-cd package into my miktex in order to draw commutative diagram. However, I encountered the following error and I don't know how to solve it.

The situation:

enter image description here

In the bottom, it says

"! Undefined control sequence.
l.19 \usetikzlibrary
                    {matrix}
? "

Could anyone please help?

Best Answer

Fleshing out what @Qrrbrbirlbel noticed from your screenshot (which, generally speaking, isn't enough to solve a problem here on TeX.SX), it looks like you don't actually have a full installation of LaTeX. You should download a standard TeX distribution:

MikTeX is a popular choice for Windows, with a very idiomatic installation procedure, and will get the job done. TeX Live has other advantages, which are laid out elsewhere.

Both of these provide mature package managers to let you install LaTeX packages with a click of a button (they'll even present you with a searchable, comprehensive list of all files from CTAN). Search for PGF and TikZ, and download all related packages.

Related Question