4

I have texlive 2025 installed on windows. Typing luatex --credits I get the version number for Lua used when compiling LuaTeX as 5.3.6 I am trying to find out what library was used to compile the lpeg library into LuaTeX and the c source as well. Why I have Lua 5.3.6 installed on my computer and would like to have the same version of lpeg to use with pure Lua as well.

2
  • 2
    If there's some feature from newer versions of LPEG that you want, then provided that the new version is 100% backwards-compatible, you could email [email protected] and request that they upgrade. Commented May 27 at 8:44
  • @MaxChernoff Not really, but I am trying to use pure Lua to test some of my packages and got stuck here. I might email the list and ask them to add this to the credits. Commented May 27 at 8:50

2 Answers 2

8

https://svn.tug.org:8369/texlive/trunk/Build/source/texk/web2c/luatexdir/luapeg/lpeg.c?revision=57915&view=markup

says

/* ** $Id: lpprint.c,v 1.10 2016/09/13 16:06:03 roberto Exp $ ** Copyright 2007, Lua.org & PUC-Rio (see 'lpeg.html' for license) */ 

That version corresponds to lpprint.c in the upstream sources, perhaps more useful is the #DEFINE in lpeg.h in the same directory

https://svn.tug.org:8369/texlive/trunk/Build/source/texk/web2c/luatexdir/luapeg/lpeg.h?revision=57915&view=markup

which has

#define VERSION "1.0.1" 
4
  • Thanks so much. I was looking in the svn.tug.org side like a madman and for every click I got this horrible mascot telling me she is checking if I am a robot, hehehe. Commented May 27 at 8:48
  • @yannisl That's my fault; the scraping bots were making the SVN interface completely unusable without it. But if it's not letting you through after a couple seconds, then that means that I've screwed something up, so please let me know if it's not working for you. Commented May 27 at 8:50
  • @MaxChernoff I can assure you your script is working, although annoying, as no amount of love would get an an answer and a link from any of the AIs? I tried 3. Commented May 27 at 8:53
  • 1
    @yannisl note updated answer Commented May 27 at 9:27
8

Instead of checking the source code, you can also get the version directly from TeX (well, Lua):

\directlua{print("LPEG Version:", lpeg.version())} \csname@@end\endcsname\end 
This is LuaHBTeX, Version 1.21.0 (TeX Live 2025) [...] LPEG Version: 1.0.1 
11
  • 1
    I had the version number, but wanted to make sure I had the correct lpeg.c file as well. Commented May 27 at 8:57
  • Can't you check using texlua so avoiding needing the TeX side entirely? Commented May 27 at 8:58
  • 1
    @MaxChernoff Sure - I have texlua as one of the engine choices in TeXworks :) Commented May 27 at 9:11
  • 1
    Interestingly you get the system to print 1.0.1, whereas I show the source comment in lpeg.c which shows (a) it claims to be lpprint.c and (b) it claims to be version 1.10. Moral: never believe code comments or documentation:-) Commented May 27 at 9:21
  • 1
    I will update my answer with the version from the .h header (so it matches yours) Commented May 27 at 9:24

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.