Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-18-2004, 11:03 AM   #1
Registered: Nov 2003
Posts: 57

Rep: Reputation: 15
emacs and TeX


I have seen that it is possible to have emacs color code the statements and function calls of my TeX documents. My version of emacs currently doesn't do that but I would like it to. Do you know how to do it?

Old 10-19-2004, 09:35 AM   #2
Registered: Sep 2003
Posts: 103

Rep: Reputation: 15
I dont know, but my emacs does it automatically. My .emacs contains:

;; Red Hat Linux default .emacs initialization file ; -*- mode: emacs-lisp -*-

;; Set up the keyboard so the delete key on both the regular keyboard
;; and the keypad delete the character under the cursor and to the right
;; under X, instead of the default, backspace behavior.
(global-set-key [delete] 'delete-char)
(global-set-key [kp-delete] 'delete-char)

;; turn on font-lock mode
(global-font-lock-mode t)
;; enable visual feedback on selections
(setq-default transient-mark-mode t)

;; always end a file with a newline
(setq require-final-newline t)

;; stop at the end of the file, not just add lines
(setq next-line-add-newlines nil)

(when window-system
;; enable wheelmouse support by default
;; use extended compound-text coding for X clipboard
(set-selection-coding-system 'compound-text-with-extensions))

compare with your .emacs and see if there is a difference - if so add the difference to your .emacs (in your home directory) and see if it helps.


Old 10-19-2004, 09:54 AM   #3
Registered: Nov 2003
Posts: 57

Original Poster
Rep: Reputation: 15

Actually it was just this line I had to add:

;; turn on font-lock mode
(global-font-lock-mode t)



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
where is the .emacs file in the emacs source code tarball? aizkorri Programming 2 01-13-2007 03:05 PM
TeX can't find tex.fmt jrdioko Linux - Software 0 11-14-2005 06:34 PM
emacs not responding to .emacs file in Mandriva 2005 LE. Please help LaptopLinux Mandriva 1 06-08-2005 09:36 AM
Emacs/TeX question guygriffiths Linux - Software 2 04-12-2004 04:10 PM
edb (emacs database) won't open file - emacs 20 & 21 tip184 Linux - Software 0 04-03-2004 08:31 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:11 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration