I notice there is a strange box-shaped icon in the toolbar in the AUCTeX mode (circled in the picture below).

Strange toolbar icon in AUCTeX

It should be a toolbar separator (for example, on Linux):

On Linux platform

I am using GNU Emacs 26.1 with AUCTeX 12.1.1 on macOS 10.13.6. This problem seems to have existed for many years. The exact same problem was reported in 2011. Does anyone know what causes this problem and how to fix it?

  • Paste (insert (propertize " " 'display (eval tool-bar-separator-image-expression))) into the *scratch* buffer, place point behind the last closing parenthesis and press C-j. That should insert the separator image at point. Call C-h v tool-bar-separator-image-expression to get the relative file path to the separator image. For me that is separator.xbm. Call C-h v image-load-path to get the completion to an absolute path (for me: /usr/share/emacs/26.1/etc/images/). Search there for the image and look what you get.Compare the appearance in Emacs and in some external image program. – Tobias Jan 11 at 16:36
  • @Tobias Thank you. I did what you suggested. Emacs shows the separator image (in the *scratch* buffer) as a thin vertical bar which is exactly it should be (see the screenshot). The separator image files (in /Applications/Emacs.app/Contents/Resources/etc/images/ with names separator.pbm and separator.xpm) show exactly the same as the one shown from executing (insert (propertize " " 'display (eval tool-bar-separator-image-expression))). But it is not like the one shown on the toolbar. – Huihui Li Jan 12 at 5:57
  • @Tobias I do notice that AUCTeX carries a separator image itself (for me, it is located at ~/.emacs.d/elpa/auctex-12.1.1/images/sep.xpm). But this image also shows a thin vertical bar when I view it by external image program. – Huihui Li Jan 12 at 6:02
  • Go to the buffer 1.tex and type M-: (nth 7 (cdr tool-bar-map)) and finish with <RET>. That should output the binding for the separator. (We should have done this first.) Normally it is just (separator-1 "--"). (For that reason I asked the previous questions.) But in auctex it is a real noop-binding like (separator menu-item "Separator" (lambda nil (interactive) t) :image (image :type xpm :file "/home/naehring/.emacs.d/elpa/auctex-12.1.1/images/sep.xpm" :scale 1) :help "" :enable nil). – Tobias Jan 12 at 15:06
  • @Tobias Running that line in the 1.tex buffer yields (separator menu-item "Separator" (lambda nil (interactive) t) :image (image :type xpm :file "/Users/huihui/.emacs.d/elpa/auctex-12.1.1/images/sep.xpm" :scale 1) :help "" :enable nil) (the screenshot) – Huihui Li Jan 12 at 15:06

Huihui Li pointed out in a discussion that separators are not shown in the standard tool bars of GNU Emacs 26.1 with AUCTeX 12.1.1 on macOS 10.13.6.

The strange AUCTeX tool bar separator icon comes from the XEmacs compatibility package toolbarx.

You can turn off this icon by unchecking the [separator nil] entry in the customization menu of TeX-bar-LaTeX-buttons (e.g., call M-x customize-option RET TeX-bar-LaTeX-buttons RET and uncheck [separator nil] in the appearing customization menu, afterwards press Apply and Save).

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.