Coder Social home page Coder Social logo

Comments (10)

Udi-Fogiel avatar Udi-Fogiel commented on August 23, 2024 1

Sure, sorry for not doing already, I just got out of home and did not want to forget to report. I'll add an example when I'll return to my computer.

If you don't want to wait, you can look at reutenauer/polyglossia@ce56af7

from l3build.

Udi-Fogiel avatar Udi-Fogiel commented on August 23, 2024 1

OK, let's keep this ticket open until it is addressed somewhere else?

from l3build.

josephwright avatar josephwright commented on August 23, 2024

Can you provide a short demo? This is not something I've seen in our .tlg files.

from l3build.

Udi-Fogiel avatar Udi-Fogiel commented on August 23, 2024

This is build.lua

bundle = ""
module = "foo"
checkengines = {"luatex"}

In the testfiles directory a test with

\input{regression-test.tex}
\START
\directlua{require'foo'}
\END

and in the testfiles/support there is a file foo.lua which contains

local module = {
    name          = "foo",
    version       = "this is the version",
    date          = "2024/05/09"
}

luatexbase.provides_module(module)

the .tlg is

This is a generated file for the l3build validation system.
Don't change this file in any respect.
Lua module: foo ....-..-.. this is the version

from l3build.

josephwright avatar josephwright commented on August 23, 2024

We already normalise things that 'look like' version strings: this isn't dependent on being from a Lua module. The current patterns cover classical LaTeX-like version strings (vX.Ya) and semantic versioning like (vX.Y.Z). The issue with the one you've pointed to is there's no indicator it's a version string: no leading v :(

from l3build.

Udi-Fogiel avatar Udi-Fogiel commented on August 23, 2024

Is it more appropriate that I'll ask from the fontspec maintainer to use version tags that fall under this scheme?

from l3build.

josephwright avatar josephwright commented on August 23, 2024

@Udi-Fogiel I wonder if this would be better addressed in ltluatex? It would be easy to check if the version string starts with v and print it if not, so that there is consistency in how they are logged.

from l3build.

muzimuzhi avatar muzimuzhi commented on August 23, 2024

In the LaTeX2e module ltluatex.dtx, currently the optional version field is loosely documented as a (lua) string and it happens both fontspec and polyglossia provide the version without leading v.

image

Maybe the luatexbase.provides_module() in ltluatex.dtx can add a leading v if version doesn't start with it.

Implementation of luatexbase.provides_module(), LaTeX2e 2023-11-01 Patch level 1

https://github.com/latex3/latex2e/blob/7cac63f1fa933a4bc643d934feca3407133ab698/base/ltluatex.dtx#L1011-L1026

local function provides_module(info)
  if not (info and info.name) then
    luatexbase_error("Missing module name for provides_module")
  end
  local function spaced(text)
    return text and (" " .. text) or ""
  end
  luatexbase_log(
    "Lua module: " .. info.name
      .. spaced(info.date)
      .. spaced(info.version)
      .. spaced(info.description)
  )
  modules[info.name] = info
end
luatexbase.provides_module = provides_module

from l3build.

josephwright avatar josephwright commented on August 23, 2024

@muzimuzhi Yes, I was thinking about something as simple as

spaced(string.gsub(info.version,"^(%d)","v%1"))

from l3build.

Udi-Fogiel avatar Udi-Fogiel commented on August 23, 2024

currently the optional version field is loosely documented as a (lua) string and it happens both fontspec and polyglossia provide the version without leading v.

Yes, the version of polyglossia.lua was not updated since 2013/05/11, which was probably before this convention, and probably should be changed :)

I addressed this in latex3/latex2e#1364, so I'm closing here.
Thanks for the help!

from l3build.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.