sh2d / spelling

Support for spell-checking of LuaTeX documents
LaTeX Project Public License v1.3c
3 stars 0 forks source link

LuaTeX error cannot open spelling.lua: No such file or directory #14

Closed vbgl closed 11 years ago

vbgl commented 11 years ago

After installing spelling using TeXlive, the following minimal document produces the error: “LuaTeX error cannot open spelling.lua: No such file or directory”.

\documentclass{minimal} \usepackage{spelling} \begin{document} Helo. \end{document}

I guess require should be used instead of dofile in spelling.sty, line 25.

sh2d commented 11 years ago

Cannot reproduce the issue with a current TL2012.

How did you install the package? How did you compile the minimal document?

BTW, dofile should be OK, because file spelling.lua is actually not a module. The remaining files spelling-*.lua are indeed modules and are required by the former file. If there's any benefit in turning spelling.lua itself into a module, that can certainly be done.

sh2d commented 11 years ago

And watch out for issue #8. In your example, the word Helo would never be highlighted, because of the trailing punctuation.

vbgl commented 11 years ago

How did you install the package?

tlmgr update --all

This has automatically installed spelling, whose documentation tells: “v0.1, 30th November 2012”.

How did you compile the minimal document?

lualatex sp

where sp.tex is the file name.

BTW, dofile should be OK, because file spelling.lua is actually not a module. The remaining files spelling-*.lua are indeed modules and are required by the former file. If there's any benefit in turning spelling.lua itself into a module, that can certainly be done.

Ok. My apologies for suggesting a wrong solution. I’m no lua programmer. I’ve just read this thread: http://tex.stackexchange.com/questions/30438/lua-tree-analogue-of-texmf-tree and tried the patch and see it work; that’s why…

Regards,

sh2d commented 11 years ago

My fault, I've done the test in the working copy that contains file spelling.lua. Doing the test in another directory, I can reproduce the issue now. Will investigate.

As a work-around, you can copy file spelling.lua (just that file is enough) into the directory containing the document. You can find out the path to that file via command

kpsewhich spelling.lua

on the command-line.