cwls contain many duplicates
Opened this issue · 4 comments
As the person who wrote most of the cwls that texfindpkg uses, I should warn that there's a LOT of duplicated lines among different cwls, mostly due to the limitations of the cwl format (or rather texstudio's syntax parser). For example if a package loads the T1
option of the package fontenc
, there's no way to write something like #includeoption:fontenc/T1
. Instead I just copy all the commands from this option, something like
# from T1 option of fontenc
\DH#n
\dh#n
\dj#n
\DJ#n
\guillemetleft#n
\guillemetright#n
\guillemotleft#*n
\guillemotright#*n
\guilsinglleft#n
\guilsinglright#n
\Hwithstroke#n
\hwithstroke#n
\k{arg}#n
\NG#n
\ng#n
\quotedblbase#n
\quotesinglbase#n
\textogonekcentered{arg}#n
\textquotedbl#n
\th#n
\TH#n
Hence calling something like texfindpkg query -c guillemetleft
produces a huge list of packages. Not necessarily a major issue, just something I thought you should be aware of.
If these commands are always put between # from xxx option of somepkg
line and an empty line, we can drop them in generating texfindpkg.json
file.
That is usually true already so I can normalize the rest so this is always the case. I'll post here when that's done.
Edit: Sometime they're sandwiched in an #ifOption: ... #endif
so either a blank line, #endif
, or end of file should be used to recognize the end of a block of ignored commands.
Should be normalized in format above with this commit
Thank you. I will update texfindpkg
later.