David Kastrup | 2 Oct 2009 07:07
Picon
Picon

Re: lua snippets in TeX

Thomas <thomas.schmitz <at> uni-bonn.de> writes:

> Hi,
>
> maybe this is a naive question, but is it somehow possible to have
> lua snippets within TeX code highlighted as lua code? This snippets
> are delimited with 
>
> \startluacode
>
> \stopluacode
>
> tags. Could I convince aucTeX to use lua-mode.el 
> highlighting for these snippets? 

Changing modes in mid-buffer is not something supported by Emacs in
general.  There is something called mmm-mode (multiple major mode) for
this problem space available somewhere, but I don't think somebody
adapted it for AUCTeX yet.

--

-- 
David Kastrup
Joost Kremers | 2 Oct 2009 10:37

Re: Re: lua snippets in TeX

On Fri, Oct 02, 2009 at 07:07:59AM +0200, David Kastrup wrote:
> Thomas <thomas.schmitz <at> uni-bonn.de> writes:
> 
> > Hi,
> >
> > maybe this is a naive question, but is it somehow possible to have
> > lua snippets within TeX code highlighted as lua code? This snippets
> > are delimited with 
> >
> > \startluacode
> >
> > \stopluacode
> >
> > tags. Could I convince aucTeX to use lua-mode.el 
> > highlighting for these snippets? 
> 
> Changing modes in mid-buffer is not something supported by Emacs in
> general.  There is something called mmm-mode (multiple major mode) for
> this problem space available somewhere, but I don't think somebody
> adapted it for AUCTeX yet.

in fact, there are several libraries that implement multiple major modes in a
single buffer:

<http://www.emacswiki.org/emacs/MultipleModes>

HTH

--

-- 
Joost Kremers, PhD
(Continue reading)

Plamen Tanovski | 2 Oct 2009 14:00
Picon
Favicon

Re: lua snippets in TeX

> Changing modes in mid-buffer is not something supported by Emacs in
> general.

Pity. That whould be great for switching the input encoding somewhere
in the buffer after \inputencoding-command.

best regards,

--

-- 
Plamen Tanovski
Prager Str. 125, 04317 Leipzig
Tel. (03 41) 3 08 57 60
David Kastrup | 2 Oct 2009 14:07
Picon
Picon

Re: Re: lua snippets in TeX

Plamen Tanovski <pgt <at> arcor.de> writes:

>> Changing modes in mid-buffer is not something supported by Emacs in
>> general.
>
> Pity. That whould be great for switching the input encoding somewhere
> in the buffer after \inputencoding-command.

No, it wouldn't.  Changing the mode is not the same as changing the
buffer coding system.  The coding system applies for reading and writing
the buffer, the mode for interpreting its contents.

Multiple encodings in one buffer don't make much sense in my book.

--

-- 
David Kastrup
Picon

Several question on Auctex

Hello,

I am new to Auctex, currently have several questions.

I got two machines running LaTeX, one with Ubuntu and another one Windows XP with Cygwin.

Ubuntu:
-I want to have split screen in my emacs, this is my ~/.emacs

(load "preview-latex.el" nil t t)
(load "auctex.el" nil t t)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)

But instead of having split screen, it only shows the preview in the current page whenever I invoke to command in emacs-gtk.

Win XP:
Here I tried to compile my auctex after I got my XEmacs and emacs installed. Does xemacs-sumo is compulsory for xemacs?
I got this error out :


Compiling /home/Najmi/auctex-11.85/tex-jp.el...
While compiling toplevel forms in file /home/Najmi/auctex-11.85/tex-jp.el:
  !! Symbol's function definition is void ((regexp-opt))
>>Error occurred processing tex-jp.el:
Symbol's function definition is void: regexp-opt


Done
make: *** [lisp] Error 1

_______________________________________________
auctex mailing list
auctex <at> gnu.org
http://lists.gnu.org/mailman/listinfo/auctex
Picon

Several question on Auctex

Hello,

I am new to Auctex, currently have several questions.

I got two machines running LaTeX, one with Ubuntu and another one Windows XP with Cygwin.

Ubuntu:
-I want to have split screen in my emacs, this is my ~/.emacs

(load "preview-latex.el" nil t t)
(load "auctex.el" nil t t)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)

But instead of having split screen, it only shows the preview in the current page whenever I invoke to command in emacs-gtk.

Win XP:
Here I tried to compile my auctex after I got my XEmacs and emacs installed. Does xemacs-sumo is compulsory for xemacs?
I got this error out :


Compiling /home/Najmi/auctex-11.85/tex-

jp.el...
While compiling toplevel forms in file /home/Najmi/auctex-11.85/tex-jp.el:
  !! Symbol's function definition is void ((regexp-opt))
>>Error occurred processing tex-jp.el:
Symbol's function definition is void: regexp-opt


Done
make: *** [lisp] Error 1


So my working options is installing Emacsw32 outside Cygwin, and compiling Auctex within Cygwin with ./configure options.
_______________________________________________
auctex mailing list
auctex <at> gnu.org
http://lists.gnu.org/mailman/listinfo/auctex
Thomas | 5 Oct 2009 10:46
Picon

Re: lua snippets in TeX

Joost Kremers <joostkremers <at> fastmail.fm> writes:

> 
> On Fri, Oct 02, 2009 at 07:07:59AM +0200, David Kastrup wrote:

> > 
> > Changing modes in mid-buffer is not something supported by Emacs in
> > general.  There is something called mmm-mode (multiple major mode) for
> > this problem space available somewhere, but I don't think somebody
> > adapted it for AUCTeX yet.
> 
> in fact, there are several libraries that implement multiple major modes in a
> single buffer:
> 
> <http://www.emacswiki.org/emacs/MultipleModes>
> 
> HTH
> 

Thank you, David and Joost. two-mode.el looks like exactly what I need; I'll
give it a try and see if it works with auctex. I'll report here!

Best

Thomas
bugger | 5 Oct 2009 22:33
Picon
Favicon

auctex preview failed for equation, but works for equation*

I am not sure why. All equation environment are displaying a stopped sign, which when I click for error, gives:

<quote>
gs -dOutputFile\=\(_region_.prv/tmp2652fRo/pr1-1.png\) -q -dSAFER -dNOPAUSE -DNOPLATFONTS
-dPrinted -dTextAlphaBits\=4 -dGraphicsAlphaBits\=4 -sDEVICE\=png16m -r106.556x105.614
GS>{DELAYSAFER{.setsafe}if}stopped pop/.preview-BP currentpagedevice/BeginPage get dup null
eq{pop{pop}bind}if def<</BeginPage{currentpagedevice/PageSize get dup 0 get 1 ne exch 1 get 1 ne
or{.preview-BP }{pop}ifelse}bind/PageSize[1 1]>>setpagedevice/preview-do{[count 3 roll save]3 1
roll dup length 0 eq{pop}{setpagedevice}{ifelse .runandhide}stopped{handleerror quit}if aload pop
restore}bind def [(_region_.prv/tmp2652fRo/preview.ps)(r)file]aload exch dup 0 setfileposition
18103()/SubFileDecode filter cvx .runandhide aload pop dup dup 18103 setfileposition
298()/SubFileDecode filter cvx<<>>preview-do
Error: /undefined in --execute--
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push  
--nostringval--   --nostringval--   %loop_continue   1753   2   3   %oparray_pop   --nostringval--  
--nostringval--   false   1   %stopped_push   .runexec2   --nostringval--   --nostringval--   --nostringval--   2  
%stopped_push   --nostringval--   --nostringval--   false   1   %stopped_push   1148   --nostringval--  
%end_runandhide   --nostringval--
Dictionary stack:
   --dict:1159/1684(ro)(G)--   --dict:0/20(G)--   --dict:76/200(L)--   --dict:102/300(L)--   --dict:19/200(L)--
Current allocation mode is local
Last OS error: 2

Preview-Ghostscript finished
</quote>

equation* and \[ \] works fine though.

--M

--------------------------------------
Protect yourself from spam, 
use http://sneakemail.com
Mathieu Zhang | 6 Oct 2009 01:03
Picon
Favicon

Re: I can not preview equation with equation number.

Waterloo,

I am having the same problem in Gentoo. I am not sure if it's not a Gentoo thing because my netbook runing
Ubuntu is fine. It does have an older version of auctex though (11.84 instead of 11.85).

However, I found commenting out:
%\usepackage{hyperref} 
or disabling it via:
\usepackage[draft]{hyperref}
fixes the problem.

Hope this works for you too.

--M

--------------------------------------
Protect yourself from spam, 
use http://sneakemail.com
Sergio Roa | 5 Oct 2009 23:47
Picon
Favicon

latex symbols

Hi!

Are there any plans to include the symbol pictures for the toolbar in 
the next AucTeX distribution? The link 
http://www.math.leidenuniv.nl/~frasson/symb-pics.tar.gz does not exist 
anymore.

Greetings,

Sergio.
--

-- 
Sergio Roa
http://www.dfki.de/~sroa
-------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Trippstadter Strasse 122, D-67663 Kaiserslautern, Germany
* Geschaeftsfuehrung: Prof. Dr. Wolfgang Wahlster (Vors.)
                       Dr. Walter Olthoff
* Vorsitzender des Aufsichtsrats:Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
-------------------------------------------------------------

Gmane