This question is about organising files in a package for CTAN.

How can I load lua and tex helper files in the documentclass so that they are found when the package is installed in the TeXLive folders?

I would like to upload this package to CTAN: wallcalendar

Some of its functionality depends on running helper Lua functions which are collected in a helper script and used this way:


And there are helper tex files which define names of things for a given language, such as i18n/hungarian.tex

Used this way:

% Load internal translations
\InputIfFileExists{i18n/\@[email protected]}{}%
{\ClassError{wallcalendar}{File Not Found: i18n/\@[email protected]}{}}

These methods only work when the files are copied in the project folder (where the user's document such as mycalendar.tex is).


1 Answer 1


The simplest is to arrange that wallpaper.lua is in the same directory as the package file (actually anywhere in tex's input path but alongside the package is simplest for distributing and then)


any recent version of luatex will default the .lua extension and find the file via the usual tex input path search.


\InputIfFileExists{i18n/\@[email protected]}

should work as long as the i18n directory is in the standard places searched by kpathsea (although a simpler alternative would be to use


and put all the language files in the same directory as your class file in the installed version.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .