Automattic / Automattic/harper

[LaTeX] Add support for \gls and \glspl commands

Open
#2,811 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
15.4k
Forks
627
Avg merge
1d 15h
Merged PRs (30d)
106

Description

**What problem does this solve?**
These lines don't raise any error while they should
```
The \gls{prb} are doing it.
The \glspl{prb} are doing it.
```
This line however, raise en error about having spaces before a comma
```
A single downlink cell serving a set of \glspl{ue},
```
To my knowledge, the LaTex parser right now doesn't parse the \gls and \glspl commands, and simply return an empty string.

**Proposed Solution**
Implement a way so that \gls and \glspl are correctly parsed, by looking in the glossaries file defined by the \input command

**Component**
- [x] Core engine
- [ ] Plugin/Extension
- [ ] Other: _____

Contributor guide

Open the contributing guide

Research direction

Start by tracing the LaTeX parser's handling of \gls and \glspl and how the \input command locates glossary files. Use the examples in the issue to verify that glossary terms are resolved and that the resulting text is checked correctly, including the comma case.

Written by the indexing model from the issue text.

Assessment

Tech stack
latex, rust
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.