Monday 15 August 2011

emacs23 - Add a TeX symbol in the Emacs init file -


I am trying to add the following code to my .emacs init file:

  (Text-add-symbol '("EKRF" TEX-RGR-RIF))   

But I can not get it to work command line From emacs t.tex ( t.tex here is a sample text file) I get the following error when I run:

  Warning ( Initialization): There was an error while loading `.emacs': the function of the symbol defined by the definition Numeric: TeX-add-symbols   

I am using GNU Emacs version 23.3.1 at Ubuntu 12.04. My .emacs init file looks

  (setq tex-auto-parse t) (setq reftex-label-alist ' (Zero) e zero "~ \\ eqref {% s}" zero zero)) (Ad-hook 'latex-mode-hook' turn-on-riftex) (Setac Reftex-Plug-in-Acatex T) (if I enter  esc -  (i.e. if the command is starting the  eval) ------- add-symbol '("eqref" TeX-arg-ref)) < / Code>  

- Expression ) and enter (text-add-symbol) ("eqref" TeX-arg-ref) at the prompt Work fine (After running it, I can enter \ eqref in the buffer and it does the required work. But this is not a good solution, whenever I edit a file, This code is to be entered manually every time. This is the reason I try to set it in the .emacs file ..)

This Background information for the question:

I have a problem using the AucTeX style amsmath.el . Ace That it did not load properly on my machine. For more information, see.

You have to evaluate the code LaTeX-mode is active, otherwise you The error is found the function definition of the symbol is zero: the tax-add-symbol . You can add that function to the hook of latex-mode to override the potential other eqref macro definitions, to define macro definitions, you will see a dummy ( Ignore this code, in your .emacs , should do the following: (add- Hook 'latex-mode-hook' (lambda () (text-add-symbol '("ekreff" tex-rzr-riff (ignored)))

No comments:

Post a Comment