Skip to content

Spell-checking in command arguments #117

@pcdi

Description

@pcdi

Is your feature request related to a problem? Please describe.
When using the integrated quotation commands from the csquotes package, certain command arguments contain regular text and should be spell-checked, while other arguments should not be spell-checked.
Currently, it is only possible to turn spell-checking on and off for commands as a whole, not for their respective arguments in isolation.

Example:

% Interface provided by csquotes:
\blockcquote[⟨prenote⟩][⟨postnote⟩]{⟨bib key⟩}[⟨punctuation⟩]{⟨quotation text⟩}
% Real life example:
\blockcquote[see also][27]{GreenhalghGoverningChinasPopulation}[.]{politically productive, working to constitute population, programs, politics, and power itself}

In this case, all arguments of \blockcquote are checked by LTeX.
Therefore, the bib key GreenhalghGoverningChinasPopulation is identified as a spelling mistake.

Currently it is only possible to ignore commands as a whole, that is all their arguments, via setting the option ltex.latex.commands to ignore.
However, since ⟨quotation text⟩ (as well as possibly ⟨prenote⟩ or ⟨postnote⟩) contain regular text and should therefore be spell-checked, it is not sensible to ignore the command with all its arguments.

Describe the solution you'd like
Be able to ignore individual arguments of commands.
In the above example, ignore the command name \blockcquote and {⟨bib key⟩}[⟨punctuation⟩] arguments, while spell-checking [⟨prenote⟩][⟨postnote⟩] and {⟨quotation text⟩}.

Describe alternatives you've considered
Setting the commands of csquotes to ignore.
While in this case, the bib keys are not spell-checked and thus do not appear as spelling mistakes, this has the disadvantage that the regular text in the other arguments is also not spell-checked whereas this would be desirable.

Additional context
N/A

Metadata

Metadata

Assignees

Labels

1-feature-request ✨Issue type: Request for a desirable, nice-to-have feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions