Spell Checking defaults

9 views
Skip to first unread message

Oscar Levin

unread,
Jul 8, 2024, 11:05:19 PMJul 8
to PreTeXt development
Hi all,

VS Code has a very nice optional spell checker (Code Spell aka cSpell) that can be customized in settings based on language.  For the pretext-tools extension, I will set these default configurations automatically.  If the user doesn't have cSpell installed, no harm.  If they do, it will enable pretext as a language that should be checked, and set some regex patterns that should be ignored.

My question: what patterns should be ignored for spell checking?  Right now, I'm thinking that anything between a pair of angle brackets should be ignored (this will include the tag name, attribute names, and attribute values), as would anything between math-mode tags (<m>, <me>, etc) and <latex-image> tags.  Is this too much?  Am I missing anything?

I suppose I could also do anything inside <program> or <pre>.  Alternatively, I can load other language dictionaries, like python.  But perhaps this would give some false negatives.

Another option is to add a dictionary for PreTeXt, which could ship in codespaces at least, or added by the CLI (in fact, I think it could be in the .ptx directory).  But does maintaining a list of words seem like the right solution here?  

I'd love to hear your thoughts.

Andrew Scholer

unread,
Jul 9, 2024, 12:34:19 AMJul 9
to prete...@googlegroups.com
As an individual with spelling challenges, I favor erring on the side of false positives.

I would encourage you to let it check the contents of <program> or <pre>. I also would check inside comments. Possibly more divisive, I would even want my CDATA scanned as I generally use that for large code listings. Ones that I would probably author somewhere else initially, but then invariably edit in the pretext and proceed to add typos.

Andrew Scholer (he/him/his)
Computer Science Instructor/Program Chair
Chemeketa Community College


--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-dev/5b413524-1467-4637-bbd0-2f03590d83e5n%40googlegroups.com.

Rob Beezer

unread,
Jul 11, 2024, 10:27:42 AM (13 days ago) Jul 11
to prete...@googlegroups.com
FWIW, I use "aspell" (at the command-line, naturally).

It has an "sgml" (XML) mode.

Then I tell it to skip over lots of elements like #m and #c and #program.

Works very smoothly for me. Perhaps cSpell has similar features?

Rob
Reply all
Reply to author
Forward
0 new messages