Emacs图像模式中的删除线 [英] Strikethrough in Emacs image mode

查看:245
本文介绍了Emacs图像模式中的删除线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 .emacs



但是Emacs显示了一个令人分心的删除线。





如何摆脱它?

解决方案

看起来你正在使用adoc的标记字体来进行内部引用。通过从 markup-internal-reference-face 中删除​​下划线,可以使该行消失。这样的东西添加到你的 .emacs 可能会修复它:

  custom-set-faces 
'(markup-internal-reference-face((t(:inherit markup-meta-face)))))


With a .emacs loading iimage-mode and adoc-mode:

;; Don't glare 200W in my eyes all day:
(set-foreground-color "white")
(set-background-color "black")

;; Use adoc as major mode for any file with the extension .adoc.
(require 'adoc-mode)
(setq auto-mode-alist (cons '("\\.adoc\\'" . adoc-mode) auto-mode-alist))

;; Use iimage-mode as minor mode whenever we're in adoc-mode.
(add-hook 'adoc-mode-hook 'my-adoc-mode-hook)
(defun my-adoc-mode-hook ()
  "Custom `adoc-mode' behaviours."
  (iimage-mode 1))

if I convert the file file.adoc

.A PNG smiley
image::smiley.png[]

to HTML using Asciidoctor

asciidoctor file.adoc

I get the nicely formatted HTML file

but Emacs shows a distracting strikethrough

How do I get rid of it?

解决方案

It looks like you're running into adoc's markup fontification for internal references. I was able to make that line go away by removing the underlining from markup-internal-reference-face. Something like this added to your .emacs might fix it:

(custom-set-faces
 '(markup-internal-reference-face ((t (:inherit markup-meta-face)))))

这篇关于Emacs图像模式中的删除线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆