Emacs 24.4.1中的下标未正确显示

5
我正在处理一个使用unicode下标k ("\_k")的任务。但是,我没有得到下标k,而是得到了这个:
![][1]
仍然可以将数字和一些字母作为下标使用,但不能用于'k'。
最初,我在emacs 24.3上遇到了这个问题,然后被告知更新到24.4。问题仍然存在。
有其他人也遇到了这个问题并找到了解决方案吗?
我运行的是Mac系统,Emacs版本为v.24.4.1
提前感谢!
编辑: 这是我的.emacs文件:
(load-file (let ((coding-system-for-read 'utf-8))
             (shell-command-to-string "agda-mode locate")))

(set-default-font "-apple-DejaVu_Sans-medium-normal-normal-*-*-*-*-*-p-0-iso10646-1")
; Change Control-c Control-, and Control-c Control-. in Agda mode
; so they show the normalized rather than the "simplified" goals
(defun agda2-normalized-goal-and-context ()
  (interactive)
  (agda2-goal-and-context '(3)))
(defun agda2-normalized-goal-and-context-and-inferred ()
  (interactive)
  (agda2-goal-and-context-and-inferred '(3)))
(eval-after-load "agda2-mode"
  '(progn
     (define-key agda2-mode-map (kbd "C-c C-,")
       'agda2-normalized-goal-and-context)
     (define-key agda2-mode-map (kbd "C-c C-.")
       'agda2-normalized-goal-and-context-and-inferred)))

; This defines backslash commands for some extra symbols.
(eval-after-load "quail/latin-ltx"
  '(mapc (lambda (pair)
           (quail-defrule (car pair) (cadr pair) "TeX"))
         '( ("\\bb" "") ("\\bl" "") ("\\bs" "")
            ("\\bt" "") ("\\bv" "") ("\\cv" "⋎")
            ("\\comp" "∘") ("\\m" "↦") ("\\om" "ω"))))

; This sets the Control-c Control-k shortcut to
; describe the character under your cursor.
(global-set-key "\C-c\C-k" 'describe-char)

(custom-set-variables
 '(agda2-include-dirs
   (quote ("." "/Users/dylanthiemann/Dropbox/University of Iowa/2nd Senior Year/Spring 2015/PLC/ial")))
 )

这段代码来自Agda:

module bool-kleene-thms where

open import bool
open import bool-kleene
open import eq

&&ₖ-idem : ∀ (b : ₖ) → b &&ₖ b ≡ b
&&ₖ-idem b = {!!}

tt-&&ₖ : ∀ (b : ₖ) → tt &&ₖ b ≡ b
tt-&&ₖ b = {!!}

||ₖ-idem : ∀ (b : ₖ) → b ||ₖ b ≡ b
||ₖ-idem b = {!!}

||ₖ-tt : ∀ (b : ₖ) → b ||ₖ tt ≡ tt
||ₖ-tt b = {!!}

||ₖ-ff : ∀ (b : ₖ) → b ||ₖ ff ≡ b
||ₖ-ff b = {!!}

编辑2

在受影响的字符上执行Ctrl-u Ctrl-x =的结果:

             position: 91 of 830 (11%), column: 2
            character:  (displayed as ₖ) (codepoint 8342, #o20226, #x2096)
    preferred charset: unicode (Unicode (ISO10646))
code point in charset: 0x2096
               script: symbol
               syntax: w        which means: word
             category: .:Base, L:Left-to-right (strong)
             to input: type "\_k" with Agda input method
          buffer code: #xE2 #x82 #x96
            file code: #xE2 #x82 #x96 (encoded by coding system utf-8-unix)
              display: terminal code #xE2 #x82 #x96

1
通常我会怀疑字体问题。尝试切换到具有良好Unicode覆盖范围的字体,例如DejaVu Sans Mono,并查看是否有所帮助。(在这种情况下,我看到您已经拥有一些其他有趣字符的字形,因此您可能已经在使用适当的字体。) - Chris
这是我当前正在使用的字体(在.emacs中找到)(set-default-font“-apple-DejaVu_Sans-medium-normal-normal-*-*-*-*-*-p-0-iso10646-1”) - Dylan
1
我认为我们需要更多的信息。你使用的是哪种主要模式?除了渲染后的截图,你能否将原始代码粘贴到你的问题中? - Chris
1
哦,哇。这种语言本地使用Unicode,是吗?在有问题的字符上,您能运行C-u C-x =吗?您应该会得到一堆信息,包括类似于character: ₖ (displayed as ₖ) (codepoint 8342, #o20226, #x2096)的内容。 - Chris
让我们在聊天室中继续这个讨论 - Chris
显示剩余2条评论
1个回答

6

谢谢,这个修复对我有用。有点惊讶,因为我不需要更改我正在使用的字体(我相信是Menlo)。自从写这篇文章以来,DejaVu字体的页面已经移动到https://dejavu-fonts.github.io/。 - C. Hammill

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接