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

Support Custom Graphics Extensions #3483

Open
jojo2357 opened this issue Mar 2, 2024 · 3 comments
Open

Support Custom Graphics Extensions #3483

jojo2357 opened this issue Mar 2, 2024 · 3 comments
Labels
enhancement New feature or (non bug related) change to the program.

Comments

@jojo2357
Copy link
Contributor

jojo2357 commented Mar 2, 2024

It was mentioned in #3145 and I want to do it, but it seems hard...RequiredFileArgument's extensions are very static. Any suggestions @PHPirates ?

@jojo2357 jojo2357 added enhancement New feature or (non bug related) change to the program. untriaged Issue type still needs to be triaged or verified. labels Mar 2, 2024
@PHPirates
Copy link
Collaborator

I'm not sure what issue you are referring to?

@jojo2357
Copy link
Contributor Author

jojo2357 commented Mar 3, 2024

Support DeclareGraphicsExtensions, sorry forgot to mention it explicitly.

@PHPirates
Copy link
Collaborator

The most difficult thing about \DeclareGraphicsExtensions I think is that you can use it anywhere in a document taking only effect from then on. But if we ignore that, it might be doable. If we need to resolve a file then we already are using indexes so I hope the performance will not be much worse.

How I would implement it I think, is in InputFileReference when resolving an \includegraphics, first check the LatexCommandsIndex for any \DeclareGraphicsExtension and if found use that order of preference given to findFile.

In case performance turns out to be bad, we could first check if there are multiple files with the same name, which is usually not the case, and only if there are do the expensive check.

@PHPirates PHPirates removed the untriaged Issue type still needs to be triaged or verified. label Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or (non bug related) change to the program.
Projects
None yet
Development

No branches or pull requests

2 participants