Latest news 2021-09-06: new blog post "Legacy Documents and TeX Live Docker Images".

Bug Tracker

ID 183🔗
Submitted by: Nicola Talbot 🦜
Date: 2021-09-20 18:22:12
Status Closed (Fixed)
Category makeglossaries-lite (Lua)
Version 4.45
Summary "bad argument #1 to 'gsub'" when \makeglossaries missing
OS Linux
Interpreter Version 1.13.2

Sign in to subscribe to notifications about this report.


If \makeglossaries is missing, makeglossaries-lite is supposed to warn the user but instead generates the following error:
makeglossaries-lite:385: bad argument #1 to 'gsub' (string expected, got nil)
This stems from the second of the following two lines:
styfile = string.match(aux, "\\@istfilename{([^}]*)}")
styfile = string.gsub(styfile, "\"", "");
If \@istfilename is missing from the aux file then styfile ends up nil from match, which causes an error from gsub.

The code needs to be modified to test for styfile ~= nil:

  if styfile ~= nil
    styfile = string.gsub(styfile, "\"", "");


Download (220B)

% arara: pdflatex
% arara: bib2gls
% arara: pdflatex





Fixed in v4.47



Add Comment

Name (optional):

Are you human? Please confirm the bug report ID (which can be found at the top of this page) or login if you have an account.


You can use the following markup:


[pre]Displayed verbatim[/pre]
[quote]block quote[/quote]

In line:

[file]file/package/class name[/file]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url] [sup]superscript[/sup]

Ordered list:
[li]first item[/li]
[li]second item[/li]

Unordered list:
[li]first item[/li]
[li]second item[/li]

You can use the Preview button to review your message formatting before submitting.

Page permalink: