LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 07-05-2010, 06:42 AM   #1
lovec
LQ Newbie
 
Registered: Jul 2010
Location: Dresden
Posts: 6

Rep: Reputation: 0
emacs: latex-mode


Hi dear LaTeX + emacs users.

I am a semi-noob on this and I have problems getting my emacs recognizing .tex as latex and even running latex-mode. Usually when you run latex-mode (M-x : latex-mode) emacs should switch to latex-mode, but nothing happens in my case. The menu bar still show the TeX options, highlighting remains the same etc.

I am running emacs 23.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.10.4), this is on a university system so I don't know much about it.

> uname -a
Linux karakum 2.6.18-164.11.1.el5 #1 SMP Wed Jan 20 00:57:09 EST 2010 x86_64 x86_64 x86_64 GNU/Linux

Any help is welcome.
 
Old 07-05-2010, 07:01 AM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218
Have you installed auctex? It provides latex support.
 
Old 07-05-2010, 07:07 AM   #3
lovec
LQ Newbie
 
Registered: Jul 2010
Location: Dresden
Posts: 6

Original Poster
Rep: Reputation: 0
No, I have not. Can I even though I have no administrative rights on the system?
 
Old 07-05-2010, 07:18 AM   #4
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218
I'm not sure, but you might be able to do it. After all, it's just a bunch of emacs lisp files. I guess if you unpack the .el (+ directories) into your .emacs.d and add it to the path in .emacs

To be able to remove it in case it doesn't work:
1. mkdir -p .emacs.d/auctex
2. copy all *.el and dirs to the above directory
3. add:
Code:
(setq load-path  (cons (expand-file-name "~/.emacs.d/auctex") load-path))
to your ~/.emacs and see if it works
 
Old 07-05-2010, 07:22 AM   #5
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218
Also make sure you've got a working TeX installation
 
Old 07-05-2010, 07:48 AM   #6
lovec
LQ Newbie
 
Registered: Jul 2010
Location: Dresden
Posts: 6

Original Poster
Rep: Reputation: 0
Still no luck. I also tried to put the tex-mode.el in my .emacs.d/ directory without it working.

Might I need a line like:
Code:
(require 'auctex)
in my ~/.emacs file?

I find all this very strange, not even M-x and manually starting latex mode works, but other modes like c++ changes highlighting and changes the TeX menu to C++, enabling c++ specific stuff.
 
Old 07-05-2010, 09:01 AM   #7
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218
Ok, I've just tried it as normal user on a fresh install of slackware in a virtual machine:
Clean your .emacs and .emacs.d first.

Install auctex:
Code:
./configure --prefix=/home/user/.emacs.d/ --with-lispdir=/home/user/.emacs.d/ --with-texmf-dir=/home/user/.emacs.d/
Then
Code:
make && make install
Add the following to ~/.emacs

Code:
(setq load-path  (cons (expand-file-name "~/.emacs.d") load-path))

(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)
You should be ok then,

Last edited by sycamorex; 07-05-2010 at 09:35 AM.
 
1 members found this post helpful.
Old 07-05-2010, 09:26 AM   #8
lovec
LQ Newbie
 
Registered: Jul 2010
Location: Dresden
Posts: 6

Original Poster
Rep: Reputation: 0
I am not sure I understand, is ./configure a command i should run in my home directory? If so, my linux does not have it. It has however a .config directory in my home directory. How does this install auctex?

make && make install, don't i need a Makefile to do make?
 
Old 07-05-2010, 09:31 AM   #9
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218
Ok, remove whatever you've downloaded/created in relation to auctex
You can leave ~/.emacs.d directory (it should be empty for now)

Download auctex
http://ftp.gnu.org/pub/gnu/auctex/auctex-11.86.tar.gz

Copy it to some directory eg. ~/temp

Untar it (cd to it first):
Code:
tar xvzf auctex-11.*
Enter the auctex dir:
Code:
cd auctex-11.86
run:
Code:
./configure --prefix=/home/user/.emacs.d/ --with-lispdir=/home/user/.emacs.d/ --with-texmf-dir=/home/user/.emacs.d/
Assuming you've got no errors, run

Code:
make
then run:

Code:
make install

edit: ./configure .... will create the Makefile and 'make && make install' can be interpreted as 'run make and then run make install only if make was exited without any errors'

Last edited by sycamorex; 07-05-2010 at 09:38 AM.
 
1 members found this post helpful.
Old 07-05-2010, 09:45 AM   #10
lovec
LQ Newbie
 
Registered: Jul 2010
Location: Dresden
Posts: 6

Original Poster
Rep: Reputation: 0
You are the best ever!

I owe you a donut or something!
 
Old 07-05-2010, 09:46 AM   #11
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218
Quote:
Originally Posted by lovec View Post
You are the best ever!

I owe you a donut or something!
A pint of beer will do, LOL

Glad to be of help
 
Old 07-05-2010, 09:51 AM   #12
lovec
LQ Newbie
 
Registered: Jul 2010
Location: Dresden
Posts: 6

Original Poster
Rep: Reputation: 0
Ok, it is a deal, if I ever go to London I will buy you a pint of beer!
 
Old 07-05-2010, 10:00 AM   #13
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218Reputation: 1218
... or I wouldn't mind tasting a wide selection of fine German beers during the Oktoberfest in Munchen
 
  


Reply


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
emacs: minor mode font-mode-lock not on by default?! hewsonism Linux - Newbie 2 06-10-2010 01:32 PM
How to get Emacs PHP mode? CoderMan Debian 3 07-14-2009 02:47 PM
Automatic hs-minor-mode in Emacs for PHP mode? CoderMan Programming 1 06-12-2009 09:38 AM
text encoding, emacs and LaTeX. bnj Linux - Newbie 2 10-13-2005 07:56 AM
cannot insert latex environment using emacs (C-c C-e) with auctex parv Linux - Software 6 09-02-2004 01:19 AM


All times are GMT -5. The time now is 10:52 PM.

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