再検証までして頂きありがとうございます。
● babelLanguage.jsの中身は以下のようになっています。私がパソコンに詳しくなく、設定が書き込まれているのか分からなかったのですが、ご教示頂いた24,25行目は正しくなっています。
// TeXworksScript
// Title: Babel language
// Description: Looks for a Babel line to set the spell-check language
// Author: Jonathan Kew & Stefan Löffler
// Version: 0.3.1
// Date: 2012-03-20
// Script-Type: hook
// Hook: LoadFile
var spellcheckModlineRE = new RegExp("% *!TEX +spellcheck *=", "i");
var babelRE = new RegExp("^[^%]*\\\\usepackage\\[(?:.+,)*([^,]+)\\]\\{babel\\}");
var spellingDict = new Array();
// extend or customize this list as needed
spellingDict.czech = "cs_CZ";
spellingDict.german = "de_DE";
spellingDict.germanb = "de_DE";
spellingDict.ngerman = "de_DE";
spellingDict.greek = "el_GR";
spellingDict.english = "en_US";
spellingDict.USenglish = "en_US";
spellingDict.american = "en_US";
spellingDict.UKenglish = "en_GB";
spellingDict.british = "en_GB";
spellingDict.spanish = "es_ES";
spellingDict.french = "fr_FR";
spellingDict.francais = "fr_FR";
spellingDict.latin = "la_LA";
spellingDict.latvian = "lv_LV";
spellingDict.polish = "pl_PL";
spellingDict.brazilian = "pt_BR";
spellingDict.brazil = "pt_BR";
spellingDict.portuges = "pt_PT";
spellingDict.portuguese= "pt_PT";
spellingDict.russian = "ru_RU";
spellingDict.slovak = "sk_SK";
spellingDict.slovene = "sl_SL";
spellingDict.swedish = "sv_SV";
// get list of available dictionairies to avoid overriding the default spell
// checking language by "None" in case we tried to set the language to something
// for which no dict exists.
var dicts = TW.getDictionaryList();
function startsWith(haystack, needle)
{</font></div>
<div><font size="2"> if (needle.length > haystack.length) {</font></div>
<div><font size="2"> return false;</font></div>
<div><font size="2"> }
return haystack.substr(0, needle.length) === needle;
}
function trySetSpellcheckLanguage(lang)
{</font></div>
<div><font size="2"> // See if we have any entry for this in our list</font></div>
<div><font size="2"> if (spellingDict[lang] === undefined) {</font></div>
<div><font size="2"> return false;</font></div>
<div><font size="2"> }
// map the babel code to an ISO language code
lang = spellingDict[lang];
// If we have a matching dict, set it
if (dicts[lang] !== undefined) {</font></div>
<div><font size="2"> TW.target.setSpellcheckLanguage(lang);</font></div>
<div><font size="2"> TW.result = "Set spell-check language to " + lang;</font></div>
<div><font size="2"> return true;</font></div>
<div><font size="2"> }
// Otherwise, see if we have a specialized dict (e.g., de_DE_frami when de_DE
// is requested).
for (var d in dicts) {</font></div>
<div><font size="2"> if (startsWith(d, lang)) {</font></div>
<div><font size="2"> TW.target.setSpellcheckLanguage(d);</font></div>
<div><font size="2"> TW.result = "Set spell-check language to " + d;</font></div>
<div><font size="2"> return true;</font></div>
<div><font size="2"> }
}
return false;
}
// get the text from the document window
var txt = TW.target.text;
var lines = txt.split('\n');
// look for a babel line...
for (var i = 0; i < lines.length; ++i) {</font></div>
<div><font size="2"> var line = lines[i];</font></div>
<div><font size="2"> // If we have a "%!TeX spellcheck" modline, we don't override it (after all,</font></div>
<div><font size="2"> // the user has probably put it there for a reason)</font></div>
<div><font size="2"> if (spellcheckModlineRE.test(line)) {</font></div>
<div><font size="2"> break;</font></div>
<div><font size="2"> }
var matched = babelRE.exec(line);
if (matched) {</font></div>
<div><font size="2"> if (trySetSpellcheckLanguage(matched[1])) {</font></div>
<div><font size="2"> break;</font></div>
<div><font size="2"> }
}
// ...but give up at the end of the preamble
if (line.match("\\\\begin\\{document\\}")) {</font></div>
<div><font size="2"> break;</font></div>
<div><font size="2"> }
if (line.match("\\\\starttext")) { // oops, seems to be ConTeXt!</font></div>
<div><font size="2"> break;</font></div>
<div><font size="2"> }
}
undefined;
● tree コマンドでスペルチェック用辞書他の確認結果は次のようになりました:
tree .\.texlive2021\texmf-config\texworks\ /f
フォルダー パスの一覧
ボリューム シリアル番号は 000000F8 32A8:92CB です
C:\USERS\KIYOIKI_HOSHINO\.TEXLIVE2021\TEXMF-CONFIG\TEXWORKS
│ TwFileVersions.db
│
├─completion
│ tw-basic.txt
│ tw-beamer.txt
│ tw-context.txt
│ tw-latex.txt
│
├─configuration
│ auto-indent-patterns.txt
│ delimiter-pairs.txt
│ smart-quotes-modes.txt
│ syntax-patterns.txt
│ tag-patterns.txt
│ texworks-config.txt
│ tools.ini
│
├─dictionaries
│ en-GB.aff
│ en-GB.dic
│ README_en_GB.txt
│
├─scripts
│ │ launchPdf.js
│ │ makeBold.lua
│ │ makeBold.py
│ │ system.js
│ │
│ ├─Hooks
│ │ babelLanguage.js
│ │ logParser.js
│ │
│ ├─LaTeX styles
│ │ toggleBold.js
│ │ toggleEmph.js
│ │
│ └─Text transforms
│ titlecase.js
│
├─templates
│ ├─Basic LaTeX documents
│ │ article.tex
│ │ letter.tex
│ │
│ ├─Beamer presentations
│ │ conference-ornate-20min.en.tex
│ │ generic-ornate-15min-45min.en.tex
│ │ speaker_introduction-ornate-2min.en.tex
│ │
│ ├─More LaTeX classes
│ │ KOMA-letter.tex
│ │ memoir.tex
│ │
│ └─XeLaTeX documents
│ article-fontspec.tex
│
├─translations
│ qtbase_ca.qm
│ qtbase_cs.qm
│ qtbase_de.qm
│ qtbase_fr.qm
│ qtbase_it.qm
│ qtbase_ja.qm
│ qtbase_ko.qm
│ qtbase_pl.qm
│ qtbase_ru.qm
│ qtmultimedia_ca.qm
│ qtmultimedia_cs.qm
│ qtmultimedia_de.qm
│ qtmultimedia_fr.qm
│ qtmultimedia_it.qm
│ qtmultimedia_ja.qm
│ qtmultimedia_ko.qm
│ qtmultimedia_pl.qm
│ qtmultimedia_ru.qm
│ QtPDF_af.qm
│ QtPDF_ar.qm
│ QtPDF_ca.qm
│ QtPDF_cs.qm
│ QtPDF_de.qm
│ QtPDF_es.qm
│ QtPDF_fa.qm
│ QtPDF_fo.qm
│ QtPDF_fr.qm
│ QtPDF_it.qm
│ QtPDF_ja.qm
│ QtPDF_ko.qm
│ QtPDF_nl.qm
│ QtPDF_nn.qm
│ QtPDF_pl.qm
│ QtPDF_pt_BR.qm
│ QtPDF_ru.qm
│ QtPDF_sl.qm
│ QtPDF_tr.qm
│ QtPDF_zh_CN.qm
│ qtquick1_ca.qm
│ qtquick1_cs.qm
│ qtquick1_de.qm
│ qtquick1_fr.qm
│ qtquick1_it.qm
│ qtquick1_ja.qm
│ qtquick1_ko.qm
│ qtquick1_pl.qm
│ qtquick1_ru.qm
│ qtscript_ca.qm
│ qtscript_cs.qm
│ qtscript_de.qm
│ qtscript_fr.qm
│ qtscript_it.qm
│ qtscript_ja.qm
│ qtscript_ko.qm
│ qtscript_pl.qm
│ qtscript_ru.qm
│ qtxmlpatterns_ca.qm
│ qtxmlpatterns_cs.qm
│ qtxmlpatterns_de.qm
│ qtxmlpatterns_fr.qm
│ qtxmlpatterns_it.qm
│ qtxmlpatterns_ja.qm
│ qtxmlpatterns_ko.qm
│ qtxmlpatterns_pl.qm
│ qtxmlpatterns_ru.qm
│ qt_ar.qm
│ qt_ca.qm
│ qt_cs.qm
│ qt_de.qm
│ qt_es.qm
│ qt_fa.qm
│ qt_fr.qm
│ qt_it.qm
│ qt_ja.qm
│ qt_ko.qm
│ qt_nl.qm
│ qt_pl.qm
│ qt_pt_BR.qm
│ qt_ru.qm
│ qt_sl.qm
│ qt_tr.qm
│ qt_zh_CN.qm
│ TeXworks_af.qm
│ TeXworks_ar.qm
│ TeXworks_ca.qm
│ TeXworks_cs.qm
│ TeXworks_de.qm
│ TeXworks_es.qm
│ TeXworks_fa.qm
│ TeXworks_fo.qm
│ TeXworks_fr.qm
│ TeXworks_it.qm
│ TeXworks_ja.qm
│ TeXworks_ko.qm
│ TeXworks_nl.qm
│ TeXworks_nn.qm
│ TeXworks_pl.qm
│ TeXworks_pt_BR.qm
│ TeXworks_ru.qm
│ TeXworks_sl.qm
│ TeXworks_tr.qm
│ TeXworks_zh_CN.qm
│
└─TUG
TeXworks.ini
以下は、同様のテストを行った結果です。添付した画像です。やはり赤の下線が表示されません。
どのような問題が考えられますでしょうか。
教えて頂けると幸いです。よろしくお願いします。