Latest news 2024-10-15: New blog post: Tales for Our Times Book Launch.

Bug Tracker RSS feed

I’m currently working on a major new version of the datatool package. This may take a while. Please be patient. (Experimental version available for testing.)

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.

Description

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
  then
    styfile = string.gsub(styfile, "\"", "");
  end

MWE

Download (220B)

% arara: pdflatex
% arara: bib2gls
% arara: pdflatex
\documentclass{article}

\usepackage{glossaries}

\newglossaryentry{sample}{name={sample},description={}}
\glsaddall

\begin{document}
\printglossaries
\end{document}

Evaluation

Fixed in v4.47

Comments

0 comments.


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.

Comment:


You can use the following markup:

Block:

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

In line:

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

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

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

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

Page permalink: https://www.dickimaw-books.com/bugtracker.php?key=183