[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xelatex menu option does not show
From: |
Tariq |
Subject: |
Re: xelatex menu option does not show |
Date: |
Tue, 27 Apr 2010 08:49:30 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Apr 26, 4:45 pm, Andreas Politz <poli...@fh-trier.de> wrote:
> Tariq <tariq.per...@gmail.com> writes:
> > Hi Everyone,
>
> > I have this code in my .emacs file and it worked very well until a few
> > days ago. It was kindly given to me on this forum. With this code,
> > when a buffer with fontspec package is opened, I used to see an option
> > XeLaTeX under the Command menu. Today, however, I do not see such
> > option. I have opened and closed Emacs just to make sure.
>
> > My computer had crashed yesterday when I was working in Emacs but I
> > did not see any other issue with Emacs performance. I have been
> > working on other LaTeX files since reboot without any apparent
> > problems. Still, something is not right. Could the computer crash have
> > done some damage to my Emacs? How can I fix it? BTW, I am running
> > Ubuntu 9.10.
>
> > Thanks for your help. Regards,
>
> > Tariq
>
> > ;;Code from .emacs
>
> > ;;set xetex mode in tex/latex
> > (defun my-latex-mode-hook ()
> > (add-to-list 'TeX-command-list
> > '("XeLaTeX" "%`xelatex%(mode)%' %t" TeX-run-TeX nil
> > t))
> > (setq TeX-command-default
> > (save-excursion
> > (save-restriction
> > (widen)
> > (goto-char (point-min))
> > (let ((re (concat "^\\s-*\\\\usepackage\\(?:\\[.*\\]\
> > \)?"
> > "{.*\\<\\(?:font\\|math\\)spec\
> > \>.*}")))
> > (if (re-search-forward re 3000 t)
> > "XeLaTeX"
> > "LaTeX"))))))
> > ;;
>
> I think you simply forgot to
>
> (add-hook 'LaTeX-mode-hook 'my-latex-mode-hook)
>
> .
>
> -ap
Here is the code I have now in .emacs. However, the problem is only
partly solved; that is, the option XeLaTeX does show up in the Command
menu but when I do C-c C-c, I still get this in the minibuffer:
Command: (default LaTeX)
As I understand the matter, this should be:
Command: (default XeLaTeX)
What is missing? I would appreciate any help.
Tariq
(I must add that previously, C-c C-c used to give me the expected
default XeLaTeX as default in the minibuffer.)
;; Part of the code snippet in .emacs
;;set xetex mode in tex/latex
(add-hook 'LaTeX-mode-hook #'my-latex-mode-hook) ;; removal of # does
not do any good/harm (why?)
(defun my-latex-mode-hook ()
(add-to-list 'TeX-command-list
'("XeLaTeX" "%`xelatex%(mode)%' %t" TeX-run-TeX nil
t))
(setq TeX-command-default
(save-excursion
(save-restriction
(widen)
(goto-char (point-min))
(let ((re (concat "^\\s-*\\\\usepackage\\(?:\\[.*\\]\
\)?"
"{.*\\<\\(?:font\\|math\\)spec\
\>.*}")))
(if (re-search-forward re 3000 t)
"XeLaTeX"
"LaTeX"))))))
;;