Questions tagged [luatex]

LuaTeX is a Unicode-capable extension of TeX which integrates the scripting language Lua. Use this tag if your question is about LuaTeX or LuaLaTeX specific problems and is not related to standard (La)TeX. For ConTeXt related questions use {context-mkiv}.

LuaTeX is an extension of TeX which integrates Lua (a scripting language) into TeX. LuaTeX is an extension of pdfTeX, which means that both DVI and PDF output are possible. LuaTeX makes it possible to access the internals of the TeX process 'as they happen', allowing effects that are difficult to achieve otherwise. It is also Unicode-capable and can also use OpenType and TrueType fonts.

Use this tag if your question is about LuaTeX or LuaLaTeX specific problems and is not related to general (La)TeX or Xe(La)TeX issues. ConTeXt Mark IV uses LuaTeX as its engine: if the question is about ConTeXt and LuaTeX, use instead.

4223 questions
50
votes
1 answer

Which Lua environment should I use with LuaTeX (LuaLaTeX)?

Lua code environment I moved on to XeTeX (XeLaTeX) a while ago. I was using pdfLaTeX before that, but now I'm quite comfortable with XeLaTeX. Now, I'd like to use LuaLaTeX to embed Lua in some LaTeX documents. The doc states several ways to embed…
polemon
  • 3,555
  • 4
  • 32
  • 42
27
votes
2 answers

Placing live Stack Exchange reputation in a document

I want to be able to place my current reputation into a document, such that, when I rebuild the document, the displayed reputation is updated. For example, I might write My current reputation on {\tt tex.se} is \texrep. and get (assuming \texrep is…
26
votes
2 answers

\documentclass: undefined control sequence

There's probably a ton of questions about this already but I've been spending all day feeling overwhelmed with the TeX learning curve. I'm trying to learn LuaTeX (by the way, if you know of a good tutorial I'd love to know about it). I have…
glifchits
  • 527
20
votes
3 answers

Can the Lua part of LuaTeX know about tokens?

Using \directlua and tex.print, it is possible to send strings of characters back and forth between TeX and Lua. Let's take an example: starting with a macro \A, I pass its replacement text to Lua and back, defining \B \edef\A{ab\string…
19
votes
3 answers

"Lua tree" (analogue of texmf tree)

I have a lua file that I would use in many of my TeX's documents, loading it with dofile(). I thought it was ok if I simply put it in the (local) texmf tree*, but this doesn't work. Instead I have the following error message : LuaTeX error cannot…
PHL
  • 7,555
18
votes
1 answer

How to use lua code from external file in lualatex?

I am learning lualatex because of its abilities to use lua and make it easier for more sophisticated documents. I am using this document for running some introductory examples.…
18
votes
1 answer

How to access LaTeX lengths in LuaTex?

I know I can access raw TeX dimens with Lua using tex.dimen[key], but how do I access a LaTeX length in Lua? MWE: \documentclass{article} % This is TeX \newdimen\boxwidth \boxwidth=3.4ex % end of…
17
votes
1 answer

When to use LuaJitTeX in favour of LuaTeX?

Since a few weeks LuaJitTeX is available ¹, which is LuaTeX with Lua replaced by LuaJIT. Binaries are available for various platforms. It is already included in the ConTeXt standalone distribution. I wonder which sort of documents benefit from using…
Marco
  • 26,055
17
votes
3 answers

Would you consider Luatex to be ready for a production environment

I'm setting up a number of document with dynamic texts. Basically LaTeX is view mechanism to dynamically present the results of ongoing statistical analysis on a database. So I have numerous \ifnums and \newifs that are fed by Sweave with the values…
FvD
  • 688
16
votes
1 answer

What exactly is luatex's node.free deleting?

The LuaTeX manual doesn't give much information on the precise details other than saying that one needs to ensure that there aren't any dangling pointers still referencing the node (location). For simple nodes that might be the case but already an…
15
votes
1 answer

\show for Lua commands

TeX (and all newer engines) has the primitive \show which helps me probe macros, and most of the time is enough to understand/remember the implementation (rather than having to go back to the source code). Is there something similar for Lua…
15
votes
1 answer

luatex and starting TeX macros which handle new line characters

This here is actually some kind of isolated follow-up question to Workaround for open lualatex bug in \scantokens? . I tried to use tex.print("{}") and expected it to work as if I would have typed the…
13
votes
2 answers

luatex85: New definition of \pdfcreationdate is problematic

The package "datetime2" scanned the macro \pdfcreationdate. This failed with the changed definition in "luatex85.sty" and LuaTeX 0.95. See the following…
rolfn
  • 939
  • 4
  • 13
13
votes
5 answers

Printing LaTeX code in LuaTeX

A calculation is done in Lua, and according to the result a certain type of cell must display the data. This works: \multicolumn{3}{p{11cm}}{Test}&-10\\[0.4cm] But this…
Klaus
  • 805
  • 1
  • 7
  • 12
12
votes
2 answers

How to access LaTeX counters in luatex?

In the same vein as this question, I know I can access raw TeX counts with Lua using tex.count[key], but how do I access a LaTeX counters in Lua? MWE: \documentclass{article} % This is TeX \newcount\mycount \mycount 4\relax % end of…
1
2 3
18 19