-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
Includegraphics resiliency and file extension case de-sensitivity #3145
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to https://tex.stackexchange.com/questions/469734/which-file-does-includegraphics-select-if-there-are-multiple-files-with-differen \includegraphics
just tries a list of extensions one by one. Why not do that as well (extending the hardcoded list), instead of this case insensitivity mess?
Oh yes please. Hence why i made only a draft pr. What if we made it tell you specifically that an extension is not valid (instead of file.pdf is missing) and also a warning when multiple candidates are found (ex all of .png .jpg etc exist)? Maybe thats beyond the scope of this issue but it sounds like a cool feature. |
a15853f
to
4c559ea
Compare
I pushed with great force, and now all that gross code is gone! |
Yeah we could make a 'maybe you meant this file instead' quickfix, that would be really nice. |
That sounds out of the scope of this PR and while I agree, i think it should be covered in a separate pr |
src/nl/hannahsten/texifyidea/lang/commands/LatexGenericRegularCommand.kt
Outdated
Show resolved
Hide resolved
src/nl/hannahsten/texifyidea/lang/commands/LatexGenericRegularCommand.kt
Outdated
Show resolved
Hide resolved
This allows us to search for files with a biased order to our search
One test fails locally. |
src/nl/hannahsten/texifyidea/lang/commands/LatexGenericRegularCommand.kt
Fixed
Show fixed
Hide fixed
src/nl/hannahsten/texifyidea/lang/commands/LatexGenericRegularCommand.kt
Fixed
Show fixed
Hide fixed
Exactly, so I switched the order |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks!
Merge? |
Fix #3142
Added
jpeg
, and allowJPG
,JPg
and such to be valid.Why though, does
TeXiFy-IDEA/src/nl/hannahsten/texifyidea/lang/commands/RequiredFileArgument.kt
Lines 72 to 78 in cea8254
I have no idea how to use the already implemented commands, so i did some jank in order to get it to work, please fix
https://github.com/jojo2357/TeXiFy-IDEA/blob/a15853ff8736c5b434546edb677cbe8c50affacf/src/nl/hannahsten/texifyidea/reference/InputFileReference.kt#L169