<div dir="ltr"><div class="gmail_default" style="font-family:courier new,monospace"><br clear="all"></div><div class="gmail_default" style="font-family:courier new,monospace;display:inline">Hi,<br><br></div><div class="gmail_default" style="font-family:courier new,monospace;display:inline">
Any LaTeX/Ubuntu users here? I have a stupid problem that I have spent way too much time researching, and all I see is that years ago there was at least one related bug open </div><div class="gmail_default" style="font-family:courier new,monospace;display:inline">
that was never resolved, apparently because people found workarounds in situations much simpler than mine, and the maintainers didn't bother.<br></div><br><div class="gmail_default" style="font-family:courier new,monospace;display:inline">
I have a bunch of fairly sophisticated LaTeX documents </div><div class="gmail_default" style="font-family:courier new,monospace;display:inline">that use quite a few things that come from texlive. They are built through latexmk, everything works perfectly fine on Red Hat systems, including CentOS and Fedora.<br>
<br></div><div class="gmail_default" style="font-family:courier new,monospace;display:inline">I have a target build platform that is <br><br></div><div class="gmail_default" style="font-family:courier new,monospace;display:inline">
U</div><span style="font-family:courier new,monospace">buntu 12.04.1 LTS (GNU/Linux 3.2.0-29-generic x86_64)</span><div class="gmail_default" style="font-family:courier new,monospace;display:inline">.</div><br><br><div class="gmail_default" style="font-family:courier new,monospace;display:inline">
Everything needed is installed (the various texlive packages, latexmk, all that it uses</div><div class="gmail_default" style="font-family:courier new,monospace;display:inline">, etc.). It will become obvious in a few moments what makes me so sure.<br>
<br></div><div class="gmail_default" style="font-family:courier new,monospace;display:inline">What does not work is that no cls or sty files are found. The first thing that throws an error is <br><br>! LaTeX Error: File `article.cls' not found.<br>
<br></div><div class="gmail_default" style="font-family:courier new,monospace;display:inline">(obviously, triggered by \documentclass{article}). Yes, the file exists in the expected place. The fact that it is not found without extra effort means that something is seriously wrong. If I add the directory where article.cls lives the same error is through by the first \usepackage{} statement, etc.<br>
<br></div><div class="gmail_default" style="font-family:courier new,monospace;display:inline">Oh, kpsewhich and kpsewhere do not find article.cls or anything else.<br></div><div class="gmail_default" style="font-family:courier new,monospace;display:inline">
<br></div><div class="gmail_default" style="font-family:courier new,monospace;display:inline">Obviously, I ran (as root/sudo) texhash, mktexlsr, update-texmf, and everything else I could think of. They all run fine. E.g., texhash creates ls-R, ls-R-TEXLIVE, ls-R-TEXMFMAIN, etc. under /var/lib/texmf, update-texmf regenerates /etc/texmf.cnf, and so on. No relief.<br>
<br></div><div class="gmail_default" style="font-family:courier new,monospace;display:inline">I purged and reinstalled texlive - nothing helped.<br><br></div><div class="gmail_default" style="font-family:courier new,monospace;display:inline">
I got desperate and ran<br><br>$ export TEXINPUTS=$(ls -R /usr/share/tex* | awk '/^\/.+:$/ {printf "%s",$0}').<br><br></div><div class="gmail_default" style="font-family:courier new,monospace;display:inline">
(including the final dot - for some reason pdflatex did not find files in the working directory, either). If you don't follow, this adds every single TeX package directory under /usr/share to the TEXINPUTS environment variable, which is the path where LaTeX looks for anything it needs.<br>
<br>After this, everything worked.<br><br></div><div class="gmail_default" style="font-family:courier new,monospace;display:inline">May I vent now? IT IS NOT SUPPOSED TO WORK LIKE THIS!!! Pheewww...<br><br></div><div class="gmail_default" style="font-family:courier new,monospace;display:inline">
I should not need to put every bloody package directory into my TEXINPUTS. There has got to be a better way.<br><br></div><div class="gmail_default" style="font-family:courier new,monospace;display:inline">Lots of Google hits on Ubuntu forums with complaints about similar problems, but no solution (at least none that worked for me).<br>
<br></div><div class="gmail_default" style="font-family:courier new,monospace;display:inline">Has anyone here encountered this problem? Solved it? Any ideas?<br></div><br>-- <br>Oleg Goldshmidt | <a href="mailto:pub@goldshmidt.org" target="_blank">pub@goldshmidt.org</a>
</div>