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}.

Filter by
Sorted by
Tagged with
1
vote
1answer
37 views

Proper kerning of \{f\} \sigma_0 in TeX Gyre Termes

Continuing https://chat.stackexchange.com/rooms/97632/discussion-between-marcel-kruger-and-mdayq6, running lualatex on \documentclass{article} \usepackage{fontspec} \usepackage{unicode-math} % \...
0
votes
0answers
28 views

Define fallback font for a large character set (e.g. Simplified Chinese)

I've been asked to integrate Chinese characters into a mainly-English LaTeX template. Although I found different options, such as ctex, I stumbled with its integration (mainly because the ...
1
vote
1answer
34 views

line of text preceding equation breaking over page using Lyx

I'm in the process of implementing copy-edit comments on a book that has lots of math and lots of single lines before equations in a displayed equation environment. LaTeX likes to break pages between ...
6
votes
1answer
180 views

Erroneous text layer. Mismatch between kerning in fontforge and in {xe|lua}latex

Running xelatex (or lualatex) on the input \documentclass{standalone} \usepackage{unicode-math} \setmathfont[Ligatures=TeX]{texgyretermes-math.otf} \begin{document} \(\{f\}\) \end{document} should ...
3
votes
1answer
46 views

How to get \backprime if the main math font is Cambria Math?

Running xelatex on \documentclass{standalone} \usepackage{unicode-math} \setmathfont{CambriaMath.ttf} %\setmathfont[Ligatures=TeX,range={\backprime}]{TeX Gyre Termes Math} %\setmathfont[Ligatures=TeX,...
0
votes
0answers
21 views

Lualatex print \\par stopped producing the result

The \par option stopped working in lualatex in 2019. tex.print(-2,x .. "\\par") produces only \par in the final text, no paragraph break. File.txt may be any text file with ^ and & to mark the ...
0
votes
0answers
8 views

References to institutions in article authors [duplicate]

I'm using the article class (with LuaLaTeX) and trying to do write a author reference to its institution and e-mail address (as commonly seen in many papers) like this one https://impa.br/wp-content/...
0
votes
1answer
21 views

Format a number/pageref range according to Oxford (OUP) elision rules

The Oxford style guide rules say this about abbreviating ranges of numbers and page references: For a span of numbers generally, use an en rule, eliding to the fewest number of figures possible: 30–...
0
votes
0answers
36 views

Using LuaLatex, can I produce an output image where all the text maps to “pure black”? [on hold]

I am creating a pdf with lualatex then trying to convert it to an imagefile (.jpg or .tiff or .png, probably .tiff). There is a lot of text in there. I am also working with a manufacturer/printer ...
0
votes
1answer
31 views

Option Numbers=Lining not working any more with font Constantia after MikTek Update

I need to use the font Constantia and thus compile my document with LuaLaTeX using \usepackage{fontspec}(Editor is TeXStudio). As I do not like the OldStyle numbers, I use \setmainfont[Numbers=Lining]{...
3
votes
1answer
115 views

Calling Julia from Lua

This example code previously appeared on a blog posting by Aditya, with one minor adjustments. I tried to run it on Debian 10 (buster), but it failed with the following error. texlua julia.lua ERROR:...
0
votes
1answer
71 views

Ignore part [^\\] in Lua pattern

I want to find, using lua features, char $, but only if it is no char \ before char $. For this I create the pattern: ([^\\]?)%$ However, Lua ignores the first part of my pattern and find only %$. ...
0
votes
1answer
51 views

Reference 'last page' undefined, only running latex twice shows wanted result

If I run lualatex on a .tex file I only get ?? as a result from 'lastpage' in my document. Then if I run lualatex a second time, the correct result (2) is shown in the document footer. Main ...
1
vote
1answer
39 views

How to correctly set x,y of nodes within a custom lua layout

I am trying to understand how I can place nodes within lua at correct x and y coordinates. I have this code mainly from the pgf/tikz manual: -- This is the file RectangleTreeLayout.lua local declare ...
0
votes
0answers
82 views

Switched from overleaf to local and now small caps not working [closed]

I had previously been working in Overleaf and due to slow compile times I decided to download my project and use MiKTeX. However small caps no longer works now that I'm working locally (using \textsc{}...
0
votes
1answer
39 views

Undefined control sequence using pdfx and Lualatex

Compiling a simple example on PDF/A with Lualatex returns the following error: ! Undefined control sequence. l.660 \ifnum\shellescape Or, for a PDF/X: ! Undefined control sequence. l.333 \...
1
vote
2answers
120 views

How rewrite tex file using lua

As you know, I try to solve problem with $ and $$ in formulas, to do automatic tagging of this formulas, including adding it in structure tree. Variant with \grabinline or \grabdisplay does not work ...
1
vote
1answer
32 views

Avoid Pagebreak In Appendix

I am trying to get the headings on the same page and have already tried using /nopagebreak and samepage, however it will still break the page. As to my understanding, the pdf size should be small ...
0
votes
0answers
63 views

{xe|lua}latex + svmono + newfloat + biblatex = ↯

Running xelatex or lualatex on \documentclass{svmono}%%% V 5.6 from http://www.springer.com/gp/authors-editors/book-authors-editors/resources-guidelines/rights-permissions-licensing/manuscript-...
0
votes
1answer
15 views

Change font in baposter package

I tried to change the font to garamond in baposter.cls using the following code: \usepackage{bm} % bold stuff \usepackage{bbm} % bold stuff \usepackage{fontspec} \usepackage[T1]{fontenc} \...
2
votes
1answer
23 views

Why can't I center my table using xtable and lualatex in rmd

Can anyone help me solving my issue with xtable, please ? I create a table using xtable, based on data that I processed Rstudio. The main R code runs a Rmd script who generates a pdf with that table....
0
votes
0answers
30 views

Force recto and verso pages to be the same height or number of lines

I'm using memoir for typesetting a novel and the nowidow package to control widows, running with lualatex. To prevent widows the nowidow package will leave empty lines at the end of the page, but I ...
1
vote
0answers
37 views

Moving luacode to Lua file, accessing glyphs by name

I have a package that includes (basically) the following code (provided by a contributor after asking this question on tex.stackoverflow). \begin{luacode} documentdata = documentdata or { } ...
15
votes
2answers
739 views

Different answers of calculations in LuaLaTeX on local computer, lua compiler and on overleaf

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 The following code is to be run by matrix.lua ...
1
vote
0answers
28 views

Turkish.ldf and font substitution with lualatex

Referring to this tread: Xelatex vs Lualatex and font substitution the following code \documentclass[a4paper,12pt]{article} \usepackage{ifxetex,ifluatex} \usepackage{fontspec} \ifluatex \usepackage[...
0
votes
1answer
23 views

LuaLaTex, TeXstudio, biber - Do not compile bibliography when using Compile command

I'm trying to compile a document including a glossary and a bibliography. For adjustment purposes, I need to compile it every few lines I write. For this I use the TeXstudio command "Compile" (F6 in ...
3
votes
0answers
57 views

How to apply a LuaLaTeX function to only a specific font?

In the italic font I am using, the apostrophe appears too far right in its bounding box, and therefore a space between an apostrophe and a glyph appears smaller than a space between two glyphs. I ...
0
votes
1answer
45 views

LuaTex parse LaTeX to variable

I am currently working on a template to be used by our consultants. For this I have make a set of functions that automatically generate and calculate certain parts of the report. And example of the ...
0
votes
1answer
55 views

Difficulty accessing character variant with LuaLaTeX and fontspec

I’ve already asked a similar question previously, but it seems the same trick doesn’t work. I am using the Junicode (1.002) font available at this link. I want to access the character variant for the ...
0
votes
0answers
25 views

When I write while it gives 'do' as well, how can I write while and for equations without getting do

\While{t $<$ maximum number of iterations} \For {each search agent} \State Update the position of current search agent by equation \EndFor \State Update a,A and C \State Calculate fitness of all ...
2
votes
1answer
41 views

Font doesn't change in math mode with mathasfont

I'm trying to change math font to sans serif font (the same I use in the rest of the document) with mathastext package. Letters change but numbers doesn't do it and I don't know why. This is my ...
7
votes
2answers
188 views

Achieving better kerning in text mode italics

In the font I'm using to set italics, the apostrophe / right single quote is outputting poorly kerned: The kerning of the first apostrophe in 'n' and the apostrophes in they've and they're is ...
1
vote
0answers
41 views

LuaLaTeX not outputting ligatures in Helvetica Neue TrueType Collection

Consider the following MWE: \documentclass{article} \usepackage{fontspec} \setmainfont{HelveticaNeue.ttc}[ UprightFeatures = {FontIndex=0} ] \begin{document} ff fi fl ffi ffl \end{document} ...
2
votes
1answer
54 views

LuaLaTex not outputting small caps for Times New Roman

Consider the following MWE: \documentclass{article} \usepackage{fontspec} \setmainfont{Times New Roman} \begin{document} \textsc{smallcaps} \end{document} When I compile it using XeLaTeX, it ...
0
votes
1answer
21 views

LuaLaTeX: problem with Xy-pic

Just running LuaLaTeX on \documentclass{article} \usepackage{xy} \begin{document} \end{document} produces an error, This is LuaTeX, Version 1.10.0 (MiKTeX 2.9.7050 64-bit) (format=lualatex 2019....
0
votes
0answers
88 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=...
3
votes
2answers
49 views

Lua equivalent for @ifpackageloaded

I'm writing a package mostly in Lua files. So far I haven't found a way to test in the Lua code whether a given package is loaded. What I'm doing is using \@ifpackageloaded and call into a Lua ...
1
vote
1answer
67 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} \...
0
votes
1answer
41 views

Using output of one lua function as input of another function in tex file

The following is the code. \documentclass{article} \usepackage{luacode} \begin{document} \begin{luacode*} function string(x) tex.sprint(x) end function combine(x,y) tex.sprint(x.." "..y) end \end{...
7
votes
0answers
102 views

Map all ASCII characters in document to Nemeth Braille

My goal is to type regular LaTeX input, and remap the fonts to produce Nemeth Braille. One answer to the question LaTeX to Braille was to download the font http://www.searchfreefonts.com/free/braille....
0
votes
0answers
29 views

glossaries: Setting unicode character as entry label

Why does the following compile with lualatex and fail with pdflatex when setting entry label to be Unicode character? % arara: pdflatex: { options: [ '-synctex=1', '-shell-escape' ]} % arara: ...
0
votes
1answer
31 views

Changing the size of the mathfont, except for the numbers

I need to use Tex Gyre Adventor as a font in my documents. This font has no math font, so I'd like to use the numbers of that font in math mode. I managed to do it using \setmathfont[range=up/{num}]{...
0
votes
0answers
31 views

How insert structure elements in structure tree using code of lua

In one of the questions i asked,how insert spans around paragraphs,formulas etc. Now i need insert not only spans,but structure elements in structure tree at least for paragraphs at first,but in ...
4
votes
2answers
117 views

Bug in Lualatex: not printing characters from calculation

I have the following code \documentclass{article} \usepackage{luacode} \begin{document} \begin{luacode*} local matrix = require "matrix" local complex = require "complex" function cmatrix(n) return ...
0
votes
0answers
22 views

Simplest lstlistring in beamer fails to compile with LuaLaTeX [duplicate]

I expect the following code to compile to a PDF which contains a beamer page with a source code listing containing a. I see no syntax or logical errors. \documentclass{beamer} \usepackage{fontspec} \...
1
vote
1answer
46 views

Adding medium profile in profile section

I want to add my medium profile in the personal section in my resume. Given that this is my first time using TeX, is there any way to do this. As font awesome is supported, so I added these lines: \...
2
votes
2answers
88 views

How to pass array of values in lualatex?

Here is code for matrix multiplication. \documentclass{article} \usepackage{luacode} \begin{luacode} function MatMul( m1, m2 ) if #m1[1] ~= #m2 then return nil end local ...
9
votes
1answer
173 views

Finding Greatest Common Divisor using LuaLatex

Here is my code to find Greatest Common Divisor of two positive integers. \documentclass{article} \usepackage{luacode} \begin{luacode} function gcd(a,b) if b ~= 0 then return gcd(b, a % ...
3
votes
0answers
72 views

XeLaTeX and PDFLaTeX give different outputs for Tikz in TeXLive 2019 [closed]

Consider the following code: \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (0,0)--(0,1) node[midway,sloped]{ABCD}; \end{tikzpicture} \end{document} When I ...
4
votes
3answers
145 views

Enumerate list with each item in a new row

Q: How can I create a table which contains a continuous numerating list with each item in a new row. So I can insert content for the other columns in that row. I use luatex. The result should look ...