Short answer: You can't produce DjVu output from LaTeX code directly, just DVI or PDF. You would need a LaTeX compiler which is DjVu capable which doesn't .
Can someone explain what Djvu .djvu files) is, and I notice there are Also, can you recommend a text that introduces how to use Latex in.
It is unlikely that there are tools for doing this, since the main use of djvu is for scanned documents: pdf is fine for documents that are generated.
Deploy LaTeX (and Markdown) Documents as PDF (and DjVu) via GitHub and TravisCI - SimonWaldherr/HowTo-Deploy-LaTeX-Documents.
djvu2pdf should fit the bill, it's a small script that makes use of the djvulibre toolset . If not, there are other methods that require multiple command-line tools.