Skip to main content

Questions tagged [callback]

Filter by
Sorted by
Tagged with
4 votes
2 answers
176 views

Using TeXlive 2025/Linux, up-to-date: I expect that when I use luatexbase.add_to_callback then whatever is already in the callback should remain in effect, with my own code added. But apparently that ...
rallg's user avatar
  • 1,561
3 votes
1 answer
113 views

I tried to replace " with french quotes and add unbreakable spaces ("mot" to «~mot~»). Unfortunately I do not understand why the nodes between the two spaces disappear with the ...
Maxime Chupin's user avatar
3 votes
1 answer
91 views

I am trying to reproduce the TeX following example (Paul Isambert, TUGboat,https://tug.org/TUGboat/tb32-1/tb100isambert.pdf): \directlua{ local GLYF = node.id("glyph") function show_nodes (...
Maxime Chupin's user avatar
1 vote
1 answer
156 views

I would like to make a command which, like some environments for equations, has a vertical space at the start of it which depends on whether the length of the line in the previous paragraph exceeds a ...
B Legrand's user avatar
  • 653
2 votes
1 answer
116 views

Using LuaLaTeX, TeXlive 2024, Linux. EDIT: As David wrote, in the accepted answer, this does not require Lua callback. But I will leave the question, because other users may try to do something ...
user avatar
3 votes
2 answers
323 views

I have this example which replaces certain characters with specific ones, the substitution works fine on the entire input stream but fails on text inserted through a tex command. Is there a way to ...
Salim Bou's user avatar
  • 17.6k
1 vote
0 answers
141 views

I would like to encourage LaTeX to break a line or page at the end of a sentence, after one of the following punctuation marks: "." ; "!" and "?". I would like to put a ...
B Legrand's user avatar
  • 653
2 votes
1 answer
93 views

%!TEX program=lualatex \documentclass{article} \begin{document} \def\specialRead{\directlua{ luatexbase.add_to_callback('process_input_buffer', function (line) if line:find('^\\...
Tuff Contender's user avatar
3 votes
1 answer
211 views

How can be LuaTeX callbacks used in ConTeXt? (with LuaTeX backend) My main concern is the usage of process_input_buffer callback available in LuaTeX and LuaLaTeX. I am using it to altering the ...
Tomáš Kruliš's user avatar
0 votes
0 answers
29 views

LuaLateX is able to run custom code and attach it to callback, in particular it could discover line break, receiving a list of hlist that compose a line of text. I'm not an expert at all, but I was ...
Antonio Caruso's user avatar
0 votes
1 answer
94 views

When I use post_linebreak_filter to change the color of hlists, some equations are only partially colored! Here's the image, and complete code of the example. As you can see below, the horizontal ...
codepoet's user avatar
  • 1,336
1 vote
1 answer
378 views

Marcel's answer resolved the original question. I have added followup questions from his answer under my original question. Followup questions begin with a similar block quote as this stating "...
codepoet's user avatar
  • 1,336
1 vote
0 answers
267 views

I am working on writing document with informations, that are at the end of each part summarized in summary. To prevent writing them twice, I am using datatool to create "buffers" in runtime, from ...
Tomáš Kruliš's user avatar
10 votes
1 answer
216 views

I'm trying to mark the end of "words" (including punctuation) with luatex callbacks. (At the end I want to inject space chars at this positions, but the example uses rules for the visualization). ...
Ulrike Fischer's user avatar
1 vote
0 answers
174 views

This is a follow-up question to David Carlisle's answer here (Insert LaTeX code at line break). In addition to glyph nodes, is there a way to insert (almost) arbitrary LaTeX commands with the help of ...
Robert Alessi's user avatar

15 30 50 per page