Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm not sure if this is a bug or I've done something wrong (or I simply don't know luatex well enough). This minimal example file test.tex

\documentclass{article}
\usepackage{luacode}

\begin{document}
A random number:
\begin{luacode}
  tex.print(math.random())
\end{luacode}
\end{document}

Should compile with lualatex test.tex but fails with:

! LaTeX Error: File `luacode.sty' not found.

It sounds like something was messed up in the installation of luatex. They look to be installed:

> dpkg --get-selections | grep luatex
luatex                  install
texlive-luatex          install

The file exists on my system:

> locate luacode.sty 
/usr/local/texlive/2011/texmf-dist/tex/lualatex/luacode/luacode.sty

so I'm not how to troubleshoot this. Is the package messed up or is it a problem on my end?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

The path /usr/local/texlive... indicates that you've mixed up Ubuntu packages and TeXLive from source (upstream).

Don't do this.

lualatex isn't looking for the file in that location. Install texlive-luatex now properly (possibly apt-get install --reinstall).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.