I just switched from windows to ubuntu. Somehow it has changed the behavior of Org mode so that now test enclosed between / are underlined (similarly as text enclosed between _) while it was italicised before. How can I change that ? I suppose I would have to deal with fonts and associates but I still lack proficiency in that matter.

  • I guess you are running Emacs inside a terminal, where there is no italics font. Try running the GUI version of emacs instead.
    – Juancho
    Jun 20 '12 at 13:21
  • I run it with the GUI version.
    – M. Toya
    Jun 20 '12 at 13:32

Move point to something that's not displayed as you want, and hit C-u C-x =. This will bring up a new buffer with information about the character at point.

The piece you're interested in is this:

There are text properties here:
  face                 (italic)

(You might have something else than italic there.)

In my Emacs, italic is a link to a page where you can customize the face. You can also type M-x customize-face RET italic directly. In the Customize buffer that appears, you can change what the text should look like.

  • 1
    I followed your advice, removed the underline and addes slant = italic but now it appears just normal. Maybe that as something to do with my font ? I noticed that the font name contains a bold instead of normal for the text enclosed between *. I suppose there should be an italic somewhere for the text enclosed between / but I do not now how to control that.
    – M. Toya
    Jun 26 '12 at 14:55
  • Hm, what's the font name? It might be a font that doesn't have any italic form...
    – legoscia
    Jun 26 '12 at 16:43
  • 1
    DéjaVu : -unknown-DejaVu Sans Mono-normal-normal-normal-*-16-*-*-*-m-0-iso10646-
    – M. Toya
    Jun 26 '12 at 17:13
  • 2
    I tried every possible field in the slant customization menu (italic, oblique, normal, italic and roman) without success.
    – M. Toya
    Jun 28 '12 at 6:30
  • 1
    @danlei: I have not this problem anymore but I don't know how. Probably some update solved it.
    – M. Toya
    Mar 2 '13 at 19:15

I had the same problem. Using a fresh installation of emacs would give me underlined text for text inside of // instead of slanted text. While using the customize-face-editor could solve the problem somehow, the solution looked messy inside my init-file and I did not understand it, which I found unpleasant. Therefore I investigated to solve the problem with "set-face-attribute". Here is what worked for me:

(set-face-attribute 'italic nil
                :slant 'italic 
                :underline nil)

Note: set-face-attribute is a function which takes a 'face and can set several :attributes with regard to the face. The "nil" is set to apply the settings to every frame.


This answer amounts to the same thing as @legoscia's, but depending on your Emacs configuration and experience level, you may need some addition details he does not provide. For example, I am using Spacemacs with Evil mode, so C-u C-x = does not invoke the function he describes.

The function you want is describe-text-properties (use SPC SPC first in Spacemacs). Follow the (italic) link as @legoscia describes, by placing your cursor on it and hitting enter, or using the mouse. You will then see a description of the italic face, beginning Face: italic (sample) (customize this face). The (customize this face) part should again be a link; follow it as before. You will see something like:

customize showing wrong configuration

Note how the italic face defined in terms of underline! Click the Show All Attributes link, uncheck the checkbox for underline, check the checkbox for slant, and select oblique (or perhaps italic—experiment with what works for you) from the value menu. You will then need to apply and save. After clicking Hide Unused Attributes and Apply and Save, the result will look something like:

enter image description here

On Spacemacs, this will result in the following configuration being added to dotspacemacs/emacs-custom-settings (i.e. in your .spacemacs):

 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(italic ((t (:slant oblique)))))

Which means the configuration should persist between sessions.

Details may depend slightly on your font; for reference, I am using Liberation Mono.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.