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 support for bib2gls .bib files (Latex glossaries-extra) #211

Closed
jschwe opened this issue Jan 6, 2021 · 5 comments
Closed

Add support for bib2gls .bib files (Latex glossaries-extra) #211

jschwe opened this issue Jan 6, 2021 · 5 comments
Assignees
Labels
1-feature-request ✨ Issue type: Request for a desirable, nice-to-have feature 3-fixed Issue resolution: Issue has been fixed on the develop branch
Milestone

Comments

@jschwe
Copy link

jschwe commented Jan 6, 2021

Is your feature request related to a problem? Please describe.
Currently there is no spell-checking for .bib files. The Latex package glossaries-extra provides bib2gls, a tool which uses
.bib files to maintain glossary entries. It would be great to have spellchecking for the descriptions of the entries.

A sample bib2gls .bib looks like this:

@entry{some-label,
  name = {Some Name},
  description = {This can be a multi-line description.}
}

@entry{some-label2,
  name = {Some Name},
  description = {This can be a multi-line description.
  },
}

@abbreviation{some-label3,
  short = {shortform},
  long  = {longform},
 } 

Describe the solution you'd like
Entries can contain custom keys, but for me it would be enough to have spellchecking for the description key.
Alternatively spellchecking for all keys would be even better, if there is an option to blacklist some keys (e.g. see and see-also, which expect a label).

Describe alternatives you've considered
The alternative I've been using is converting the compiled PDF to Word and running a spellchecker on the Glossary in Word.

Also thanks for your great extension, it's already been pretty helpful.

@jschwe jschwe added the 1-feature-request ✨ Issue type: Request for a desirable, nice-to-have feature label Jan 6, 2021
@valentjn valentjn self-assigned this Jan 18, 2021
@valentjn valentjn added this to the 8.3.0 milestone Jan 18, 2021
valentjn added a commit to valentjn/ltex-ls that referenced this issue Jan 18, 2021
@valentjn
Copy link
Owner

Thanks for the great feature request. This is now implemented.

If there are any additional fields apart from see and see-also that should be ignored by default, let me know.

@valentjn valentjn added the 3-fixed Issue resolution: Issue has been fixed on the develop branch label Jan 18, 2021
@valentjn
Copy link
Owner

Fix released in 8.3.0.

@jschwe
Copy link
Author

jschwe commented Jan 24, 2021

Thank you for implementing this! It's working great and already caught some mistakes!
Some things I noticed:

  • I misremembered the key name for see-also. The key is defined as seealso in glossaries-extra. Sorry about that.
  • Is it possible to suppress LTeX - UPPERCASE_SENTENCE_START by default or as an option for the glossary? Glossaries provides the \Gls* variants to make the first letter uppercase if required, while \gls* does not change casing. Currently, I get a lot of false positives with this warning in the glossary for lowercase entry names.

Additional keys that (I use and) are defined in glossaries-extra by default and contain labels:

  • parent (Used to define a parent entry for hierarchical glossaries)
  • category (Used for category specific style modifications)

valentjn added a commit to valentjn/ltex-ls that referenced this issue Jan 24, 2021
valentjn added a commit to valentjn/ltex-ls that referenced this issue Jan 24, 2021
@valentjn
Copy link
Owner

seealso is fixed now. UPPERCASE_SENTENCE_START is now disabled in BibTEX files. category and parent are now ignored by default.

FWIW, there's a new setting ltex.bibtex.fields that allows to ignore the values of additional fields (or override the defaults and enable a field again). If they are fields that might be ignored by many users, it's better to have them added to the default list, so thanks for the suggestions.

@valentjn
Copy link
Owner

Fix released in 8.4.0.

me-johnomar added a commit to me-johnomar/ltex-ls that referenced this issue Jan 31, 2024
me-johnomar added a commit to me-johnomar/ltex-ls that referenced this issue Jan 31, 2024
me-johnomar added a commit to me-johnomar/ltex-ls that referenced this issue Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-feature-request ✨ Issue type: Request for a desirable, nice-to-have feature 3-fixed Issue resolution: Issue has been fixed on the develop branch
Projects
None yet
Development

No branches or pull requests

2 participants