Questions tagged [lua]

Lua is a powerful, fast, lightweight, embeddable scripting language.

21 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
50
votes
0answers
2k views

wxLua in LuaLaTeX

I have some problems using wxLua in LuaLateX. This works: lua simpleui.lua (print instead of tex.print) But if I try this: lualatex wx.tex it doesn't work. \documentclass{article} \directlua{...
9
votes
0answers
1k views

How to add/check missing punctuation marks (itemize/enumerate) automatically?

(An experiment) I'd like to present you one of the possible tasks (to be automated) I solve in my daily work: adding missing punctuation marks in the itemize and enumerate environments. I polish ...
6
votes
0answers
249 views

Convert all all-caps words to small caps #2

A question very similar to mine was asked before, but I assume that there are others with the same issue and that there are other solutions. I know several academic publishers that don't like ...
4
votes
0answers
655 views

How to get and process bitmap graphics at a pixel level on-the-fly?

We are trying to solve How to get intersection point(s) of two glyphs? and there are some interesting subtasks. In word cloud algorithms they are converting glyphs (a vector form) to a raster form and ...
3
votes
0answers
147 views

Bake LuaSQL into luatex binary on Windows

Further to this question, I want to build luatex on Windows with the LuaSQL library baked in, at least with the ODBC drivers. This post by Taco Hoekwater back in 2010 walks through the process for ...
3
votes
0answers
273 views

luatodonotes and tikz externalization won't mix

Consider the following code: documentclass[11pt]{report} \usepackage{pgfplots} \usepgfplotslibrary{external} \tikzexternalize %\usepackage{luatodonotes} \begin{document} \begin{tikzpicture} \...
2
votes
0answers
115 views

can one write tikz in lua code directly?

Sorry if this question sounds basic and naive for the experts, but something I wondered about for sometime. Since tikz itself is implemented in lua interviews/2015-till-tantau Then why can't one ...
2
votes
0answers
142 views

Lua Table or XML as Bibliography File in LuaLaTeX

According to the ConTeXt Wiki in ConTeXt you can use the bibtex format for bibliographies but are not limited to that filetype. Since lua and XML are a little more universal but i can‘t (yet) switch ...
2
votes
0answers
128 views

Set global non-ligature kerning with selnolig

Similar to this question I want to use selnolig but I don't like the fact that in words containing fl without ligature these two letters are too close together. Like in Mico's answer I want to use ...
2
votes
0answers
166 views

Filtering results of iterator from table in csv file

I am a Lua novice, and I would like to know if there is any way for an iterator to filter out or skip certain items in a table from a csv file. In particular, I would like for an iterator to be able ...
2
votes
0answers
500 views

pgfplotstable: typset csv with 2 or more header lines (eg. name, unit, comment)

I am exporting from Origin and get a Data.csv like this: Short_Name1; Short_Name2 Long_Name1; Long_Name2 Unit1; Unit2 Comment1; Comment2 1,1; 2,0 3,5; 4,3 When I try to ...
2
votes
0answers
427 views

How to parse BIB file to a known TeX structure?

I'm becoming a TeXist by profession these days. This is the first real challenge from my new employer: I was asked if I could take a look at this problem and improve the current state, if it's ...
1
vote
0answers
110 views

ConTeXt command list

How can I get a “machine readable” version of the ConTeXt command list? Ideally, I would like to get a Lua table in some reasonable format, listing all commands and their main attributes (like ...
1
vote
0answers
51 views

TeX Live: “(lua): Not Enough Memory” | Chinese Fonts

I have a freshly installed and updated TeX Live system. I want to compile a simple LuaLaTeX document containing Chinese characters (see below, not a MWE, just for illustration). During the compilation ...
1
vote
0answers
30 views

How can you change the appearance of a line (edge) with a tikz graph drawing algorithm written in Lua?

In my graph drawing algorithm (written in Lua for LuaLaTeX), I'd like to change a solid line to a dashed line. I use a Digraph with some vertices and arcs between them. On page 499 of the Tikz & ...
1
vote
0answers
93 views

Can't execute jar from directory with umlaut

Okay so this is quite an exotic question and I am unsure whether it really fits on this page. But as it involves LaTeX I'll post it here. I have written a Java program that I am calling from inside ...
1
vote
0answers
102 views

Custom Lua feature for CID-keyed font

fonts.handlers.otf.addfeature in luaotfload can be used to create custom features for fonts. The unicode values of glyphs can be used for CID fonts in the same way as for GID fonts, but some fonts ...
1
vote
0answers
89 views

Can't use SQL to format date in LuaLaTeX with LuaSQL & passing parameters to compiler

I am working on a LuaLaTeX example where date has to be transferred from my database using Lua and then compiled using LuaLaTeX. I am using LuaSQL to do all this and this is the minimal working ...
0
votes
0answers
49 views

Preparing a latex installer to ship the reporting system

I have prepared a simple report making system that uses Latex to prepare all the reports. It is a simple system that prepares a 15 page report by reading a CSV file. I want to ship the system. I don'...
0
votes
0answers
117 views

Getting cross references for the total pages correct the first time

In order to have a footer at each page that displays the current page number with the total number of pages (Eg.,4 of 12), I used lastpage package and placed the statement: \rfoot{\thepage\ of \...
0
votes
1answer
94 views

Saving all the latex to a file and then render reading from the file

I am rendering Latex that spawns ~2600 pages. The document is rendered from a JSON using Lua. It takes around 32 seconds to prepare the document of ~2600 pages. To verify, if there is a difference in ...