Menu
CTAN
Comprehensive TeX Archive Network
Cover Upload Browse Search

Direc­tory tex-archive/macros/luatex/latex/luacode

                    The luacode package for LuaLaTeX


Executing Lua code from within TeX with \directlua can sometimes be
tricky: there is no easy way to use the percent character, counting
backslashes may be hard, and Lua comments don't work the way you expect.
This package provides the \luaexec command and the luacode(*)
environments to help with these problems.

For an introduction to the most important gotchas of \directlua, see
lualatex-doc.pdf. Before you start using the tools in this package, let me
insist that the most robust way to manage a non-trivial piece of Lua code is
to use an external file and source it from Lua, as explained in the cited
document.


Installation
------------

Here are the recommended installation methods (preferred first).

1. If you are using TeX Live 2008 or later, use 'tlmgr install luacode'.
If your are using MiKTeX, use the MiKTeX Package Manager.
Alternatively, try you Linux distribution's package management system.

2. a. Grab luacode.tds.zip on the CTAN.
   b. Unzip it at the root of one or your TDS trees.
   c. You may need to update some filename database after this, see your TeX
      distribution's manual for details. (Hint: with TeX Live, run 'mktexlsr';
      with MikTeX, look for "Refresh FNDB" in the MikTeX menu.)

3. a. Grab the sources from CTAN or github.
   b. Run 'make install TEXMFROOT=/path/to/texmf'.
      (Warning: 'make install' without giving a TEXMFROOT will
       put files in './texmf', which is probably not what you want.)
   c. See 2c.


Licence
-------

This package is distributed under the terms of the LPPL v1.3c or later.
See the source file luacode.dtx for details.

Files

Name Size Date Notes
Makefile 2394 2012-01-23 21:49
News 321 2012-01-23 23:05
README 1663 2010-11-08 14:42
luacode.dtx 24152 2012-01-23 23:04
luacode.pdf 410840 2012-01-23 23:06

Down­load the con­tents of this pack­age in one zip archive (409.9k).

lu­a­code – Helper for ex­e­cut­ing lua code from within TeX

Ex­e­cut­ing Lua code from within TeX with di­rectlua can some­times be tricky: there is no easy way to use the per­cent char­ac­ter, count­ing back­slashes may be hard, and Lua com­ments don't work the way you ex­pect. The pack­age pro­vides the \lu­aexec com­mand and the lu­a­code(*) en­vi­ron­ments to help with these prob­lems.

Pack­age De­tailslu­a­code
Ver­sion1.2a
Li­censeThe LaTeX Project Public Li­cense 1.3
Main­tainerManuel Pé­gourié-Gon­nard
TDS archiveluacode.tds.zip
Con­tained inTeXlive as lu­a­code
MikTeX as lu­a­code
Topics sup­port for us­ing Lua code
Guest Book Sitemap Contact