When I hit "typeset & view", what I got is something like this
However, if I do "pdflatex abc.tex" from the command line, everything works fine.! LaTeX Error: File `xy.sty' not found.
From the information provided by PDFLaTeX, I noticed that the only .sty files my editor can find is in
/usr/local/texlive/2012/texmf-dist/tex/latex/base/,
while the other packages are in places like /usr/local/texlive/2012/texmf-dist/tex/generic/
That seems to cause me the problem. I don't want to shuffle .sty files among folders. Can I make things work by change some settings? Like let the compiler know to look for some .sty files in some other folders under /usr/local/texlive/2012/texmf-dist