samdark / yii2-cookbook

Yii 2.0 Community Cookbook
1.45k stars 296 forks source link

Can't build pdf: Listings Error #193

Open Hiisi5 opened 6 years ago

Hiisi5 commented 6 years ago

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?

Hiisi5 commented 6 years ago

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.

bubifengyun commented 6 years ago

https://tex.stackexchange.com/questions/89574/language-option-supported-in-listings can be OK?