Questions tagged [luacode]

A package to simplify inclusion of lua code in a LaTeX document

Filter by
Sorted by
Tagged with
12
votes
3answers
677 views

LuaLaTeX: Change kerning around “1” to simulate proportional figures

I have the problem that both the original Helvetica and the Neue Helevetica font families by Linotype, in their OpenType versions, seem to not have proportional figures, only tabular figures, where ...
1
vote
2answers
101 views

Macro: compatibility of 1) Auto-colorization & 2) Auto-counter-and-title-to-label

This question is about asking to have the following 2 "workflows" (if you permit me to call them as such) to be able to coexist together in 1 Tex document: Workflow Auto-colorization (≅ User Mico's ...
1
vote
1answer
114 views

Nesting of functions not working in lualatex

Here is the code. It makes use of the file matrix.lua available at the following link. https://github.com/davidm/lua-matrix/blob/master/lua/matrix.lua \documentclass{article} \usepackage{luacode} \...
1
vote
1answer
99 views

Evaluating Mathematical Expressions in Lua

Here is the code. \documentclass{article} \begin{document} \directlua{tex.sprint(tostring(math.sin(math.pi)))} \\ \directlua{tex.sprint(tostring(math.tan(math.pi/2)))} \end{document} I am expecting ...
4
votes
1answer
345 views

Create a Table with Luatex

I want to make make a template table with parameters. I found different types of solutions but then I try to do some changes, it doesn't work anymore. I tried two different ways: First way \...
3
votes
2answers
204 views

LuaLaTeX parse PDF for unencoded small string DeviceCMYK?

EDIT: It turns out that Lua is not needed. Since I call my TeX from script, the necessary investigation can be done directly, using findstr in Windows batch, or the equivalent in BASH. But that's ...
2
votes
1answer
207 views

LuaLaTeX: fonts.handlers.otf.addfeature kerning pairs with unexpected behaviour

So I tried to adapt this answer: https://tex.stackexchange.com/a/370469/75284 to all problematic neighbors of the narrow 1 and added the second group of kerning pairs, the ones that specify the ...
0
votes
0answers
131 views

Issue with xparse and lualatex

I have the following code \documentclass{article} \usepackage{luacode,xparse,amsmath} \begin{luacode*} local matrix = require "matrix" local complex = require "complex" function add(m,n) m=...
0
votes
1answer
129 views

error: Font \TU/LatinModernRoman(0)/bx/n/10=LatinModernRoman

Everything was working fine in my main document before trying to embed this answer in my code. However, I don't quite understand the steps needed to resolve this according to this solution. The error ...