samdark / yii2-cookbook

Yii 2.0 Community Cookbook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't build pdf: Listings Error

Hiisi5 opened this issue · comments

I'm trying to build the pdf as described in the README.md. When trying to run make I got the following error:

(/usr/share/texlive/texmf-dist/tex/latex/listings/lstlang1.sty)
(/usr/share/texlive/texmf-dist/tex/latex/listings/lstlang2.sty)
(/usr/share/texlive/texmf-dist/tex/latex/listings/lstlang3.sty)

! Package Listings Error: Couldn't load requested language.

See the Listings package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.1440 \lstset{language=js}
                           \begin{lstlisting}
!  ==> Fatal error occurred, no output PDF file produced!

So, it seems that Listings package doesn't know 'js' language. I've googled the package description and they don't mention js actually. So, what should I do? Where the error comes from?

As a workaround I had to manually edit /usr/share/texlive/texmf-dist/tex/latex/listings/lstlang1.sty file. I have copy&pasted the definition of Java language renaming it to 'js. Afterwards the book compiled with no errors.