my-yatex-review-citem-stop-regexpのC[ABCD]のhiligh修正

This commit is contained in:
2026-07-21 16:25:45 +09:00
parent c981153301
commit e66cd1c51a
+12 -8
View File
@@ -295,8 +295,8 @@ Return number of highlighted answer macros."
(let ((count 0))
(goto-char (point-min))
;; 行頭またはインデント後の \CA, \CB, \CC, \CD を対象にする
(while (re-search-forward "\\\\\\(R[ABCD]\\|TO\\|XX\\)\\_>" nil t)
;; 行頭に限定せず、\CA, \CB, \CC, \CD を検索する
(while (re-search-forward "\\\\\\(C[ABCD]\\)\\_>" nil t)
(let* ((macro (match-string-no-properties 1))
(faces (my-yatex-review--faces-for-citem-macro macro))
(label-face (nth 0 faces))
@@ -315,19 +315,23 @@ Return number of highlighted answer macros."
;; \CA{A1} の A1 部分
(my-yatex-review--make-overlay
(nth 0 arg1) (nth 1 arg1) label-face 1000)
(nth 0 arg1)
(nth 1 arg1)
label-face
1000)
;; A1 に続く本文部分
;; \RA などの局所 overlay より少し低い priority にする
;; ラベルに続く回答本文
(my-yatex-review--make-overlay
body-beg body-end body-face 900)
body-beg
body-end
body-face
900)
;; 次の item まで飛ぶ
;; 次の回答項目まで移動
(goto-char body-end))))))
count))
;; ============================================================
;; Main refresh
;; ============================================================