Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional LuaTeX node functions #5

Closed
wants to merge 1 commit into from

Conversation

gucci-on-fleek
Copy link
Contributor

LuaMetaTeX is missing quite a few node functions compared to LuaTeX. ConTeXt has support code for most of these functions, so I've copied that in here. There are a number of potential approaches here:

  1. Add in all of the functions from the ConTeXt code.
  2. Add in only the 3 functions (node.slide, node.vpack, and node.find_attribute) that my package needs.
  3. Do nothing here and add in the functions to my package directly.

I'm using option 1 in this PR since that will maximize the backwards compatibility, but I can change this PR to use options 2 or 3 if you prefer.

@gucci-on-fleek gucci-on-fleek changed the title Add additional LusTeX node functions Add additional LuaTeX node functions Oct 27, 2022
@zauguin
Copy link
Owner

zauguin commented Oct 27, 2022

For licensing reason no ConTeXt code can be used in this repo.

@zauguin zauguin closed this Oct 27, 2022
@gucci-on-fleek
Copy link
Contributor Author

gucci-on-fleek commented Oct 27, 2022

For licensing reason no ConTeXt code can be used in this repo.

Ah, okay. So should I rewrite from scratch the functions that my package uses and open a new PR with just those, or should I just carry those functions in my package itself? You've included a few functions in luametalatex-oldnode.lua for third-party package compatibility, but I'm not sure if you're goal is maximum LuaTeX compatibility or just making the minimum number of changes required to compile average documents. Either option works for me.

(Regarding licensing, I'd think that using the ConTeXt code should be fine since it's all GPLv2. I can see how the "viral" nature there might be a concern, but luaotfload has the exact same issue and that's already built in to the regular LuaLaTeX format)

@zauguin
Copy link
Owner

zauguin commented Oct 27, 2022

So should I rewrite from scratch the functions that my package uses and open a new PR with just those, or should I just carry those functions in my package itself?

If you want to do so feel free to open a PR, but I can also quickly add them. They should just be wrappers around the .direct functions anyway if I'm not mistaken(?)

You've included a few functions in luametalatex-oldnode.lua for third-party package compatibility, but I'm not sure if you're goal is maximum LuaTeX compatibility or just making the minimum number of changes required to compile average documents.

The long term goal is as much compatibility as possible, but the short term approach is to avoid compatibility for compatibilities sake and prioritize actually needed functionality.

Regarding licensing, I'd think that using the ConTeXt code should be fine since it's all GPLv2.

Mostly I personally dislike the GPL for various reasons. That doesn't mean that I would never use GPL code or even that I would never write GPL code, but if I have the choice I prefer to avoid it. LuaMetaLaTeX is in many ways very independent from external code so it reasonably can avoid GPL code, so I stay away from it. (Also a big part of the motivation behind writing it is to create a completely independent LuaMetaTeX format, therefore avoiding ConTeXt code is kind of the point...)

@gucci-on-fleek
Copy link
Contributor Author

If you want to do so feel free to open a PR, but I can also quickly add them. They should just be wrappers around the .direct functions anyway if I'm not mistaken(?)

Yep, they're just simple wrappers. I've opened a PR since it's pretty quick. See #7.

Mostly I personally dislike the GPL for various reasons. That doesn't mean that I would never use GPL code or even that I would never write GPL code, but if I have the choice I prefer to avoid it.

Ah, fair enough.

Also a big part of the motivation behind writing it is to create a completely independent LuaMetaTeX format, therefore avoiding ConTeXt code is kind of the point...

I had just assumed that most of the code here was copied from ConTeXt already. I was impressed before that you managed to get LaTeX to work, but now I'm really impressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants