I've finaly found out why…
So, Auctex detects that my intro.tex is actually a plain-TeX file (because
of the beginning not containing any \end{document}) and so use "tex" as to
compile.
There is two way to change that and to tell it that it's also a latex file:
1 - by changing the tex command… but it's rather not good since we might
need it someday
2 - by forcing auctex to open a *.tex file as a LaTeX file so in such mode.
The bad part is that for a contex/bibtex file we need to specify auctex that
it's not a latex file…
I use the second option by putting the next line to my .emacs:
(add-to-list 'auto-mode-alist '("\\.tex\\'" . LaTeX-mode))
It's not perfect but I really don't see how to fix it otherwise… if you have
a better trick to do that…
The C-c C-e and so on works now since the mode is really latex…
Jiehong
2011/9/7 Jiehong Ma <[email protected]>
> Hello everyone!
>
> So, after hours of seeking for an help for my issue I finally just cannot
> make it to work.
>
> I have a master file called master.tex. In this file, I use
> "\input{intro.text}" to include my intro file. If I compile master.tex (with
> xetex) it's working great.
> However, if I work on the intro.tex, if I use a C-c C-b then it's not
> working. I've looked up the _region_.tex created and I have found why:
> In the _region_.tex, auctek put a "\message{ !name(master.tex)}" right
> before the \documentclass in the preamble. Plus, it put some at different
> part too. If I delete them and try to compile the _region_.tex by hand it's
> working fine and the pdf document _region_.pdf is exactly like what I should
> have. So, why is auctek doing that T.T
>
> My second issue is that I can't use C-c C-e or C-c C-s in my intro.tex…
> that's very annoying!!!
>
> I've attached my master.tex, intro.tex and also the _region_.tex that C-c
> C-b gives me.
>
> I use Emacs (without X I mean) and here is the part for Auctek in my .emacs
> file:
> *(load "auctex.el" nil t t)
> (load "preview-latex.el" nil t t)
> (setq TeX-auto-save t)
> (setq TeX-parse-self t) ;; Enable TeX parsing
> ;; Master file
> (setq-default TeX-master nil)
> (setq TeX-engine 'xetex) ;; Use of XeTeX
> (setq TeX-PDF-mode t)
> (setq LaTeX-indent-environment-check t)
> (setq fill-column 90) ;; line wrapping
> (add-hook 'LaTeX-mode-hook 'turn-on-auto-fill)
> (add-hook 'TeX-mode-hook 'turn-on-auto-fill)
> ;; Outline mode as a minor mode and binded as C-c C-o
> (defun turn-on-outline-minor-mode ()
> (outline-minor-mode 1))
> (add-hook 'LaTeX-mode-hook 'turn-on-outline-minor-mode)
> (add-hook 'TeX-mode-hook 'turn-on-outline-minor-mode)
> (setq outline-minor-mode-prefix "\C-c\C-o")
>
> (add-hook 'LaTeX-mode-hook
> (lambda ()
> (global-set-key (quote [f9]) (quote TeX-next-error))
> (global-set-key [f10] "\C-c\C-c Check")))*
>
> I really hope someone can help me :D
>
> Thank you for your time for reading my message too.
>
> Jiehong
>
_______________________________________________
auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex