You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Spell checker does not respect text.lang if the *.typ is not included in main.typ #675
All Chinese characters are considered misspellings if text.lang ≠ "zh".
If I am previewing an English main.typ, and having another Chinese side.typ that is not included/imported in main.typ, then the content of side.typ will be considered misspellings even though I set text(lang: "zh") in side.typ.
// main.typ
#set text(lang: "en")
English
// #set text(lang: "zh")
// side.typ
#set text(lang: "zh")
中文
The behavior is not stable. As shown in the following screenshots, the spell checking result of side.typ depends on whether and where I write #set text(lang: "zh") in main.typ.
The problem is that set rules are not well defined outside of the previewed document. All files for which no precise language is known are assumed to have the majority language of the document.
Is there a precise definition? I have another project whose main.typ contains #set text(lang: "zh") and a few lines generated from data, but the content of side.typ is still considered misspellings.
changed the title [-]Spell checker sometimes does not respect `text.lang` if the `*.typ` is not included in `main.typ`[/-][+]Spell checker does not respect `text.lang` if the `*.typ` is not included in `main.typ`[/+]on Jul 25, 2025
Activity
laurmaedje commentedon Jul 23, 2025
The problem is that set rules are not well defined outside of the previewed document. All files for which no precise language is known are assumed to have the majority language of the document.
YDX-2147483647 commentedon Jul 23, 2025
I see…
Is there a precise definition? I have another project whose
main.typcontains#set text(lang: "zh")and a few lines generated from data, but the content ofside.typis still considered misspellings.YDX-2147483647 commentedon Jul 23, 2025
A minimal example:
Update: Interesting…
[-]Spell checker sometimes does not respect `text.lang` if the `*.typ` is not included in `main.typ`[/-][+]Spell checker does not respect `text.lang` if the `*.typ` is not included in `main.typ`[/+]