all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* AucTeX 11.83 and MikTeX 2.5
@ 2006-09-16 17:36 Robert McDonald
  2006-09-16 18:34 ` Reiner Steib
  0 siblings, 1 reply; 7+ messages in thread
From: Robert McDonald @ 2006-09-16 17:36 UTC (permalink / raw)


I've searched around and haven't been able to find information on this 
and unfortunately my lisp skills are pretty poor.

When you enable AucTeX/MikTeX integration in Emacs 22, AucTeX assumes 
that you need to view files with postscript specials using gsview. 
However, in MikTeX 2.5, yap can handle all previews. (One advantage of 
this is that you can then use inverse search.) I have examined tex.el 
and tex-mik.el to try to figure out how to get yap to handle all 
previews, but my experiments haven't succeeded.

So can anyone provide pointers to information about this or suggestions 
for updating AucTeX for the new yap?

Thanks very much.

Bob

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: AucTeX 11.83 and MikTeX 2.5
  2006-09-16 17:36 AucTeX 11.83 and MikTeX 2.5 Robert McDonald
@ 2006-09-16 18:34 ` Reiner Steib
  2006-09-17 14:32   ` Robert McDonald
  0 siblings, 1 reply; 7+ messages in thread
From: Reiner Steib @ 2006-09-16 18:34 UTC (permalink / raw)


On Sat, Sep 16 2006, Robert McDonald wrote:

> When you enable AucTeX/MikTeX integration in Emacs 22, AucTeX
> assumes that you need to view files with postscript specials using
> gsview.

Only if pstricks or psfrag is used:

,----[ from tex-mik.el ]
| (unless (get 'TeX-output-view-style 'saved-value)
|   (setq TeX-output-view-style
| 	'(("^dvi$" "^pstricks$\\|^pst-\\|^psfrag$" "dvips %d -o && start %f")
| 	  ("^dvi$" "." "yap -1 %dS %d")
| 	  ("^pdf$" "." "start %o")
| 	  ("^html?$" "." "start %o"))))
`----

> However, in MikTeX 2.5, yap can handle all previews. 

I'd be surprised if yap really can handle all pstricks and psfrag
tricks.  (But I don't use Windows and so i don't know yap.)

> (One advantage of this is that you can then use inverse search.) I
> have examined tex.el and tex-mik.el to try to figure out how to get
> yap to handle all previews, but my experiments haven't succeeded.

Customize `TeX-output-view-style'.  In other words, delete the
"^pstricks$\\|^pst-\\|^psfrag$" entry there.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: AucTeX 11.83 and MikTeX 2.5
  2006-09-16 18:34 ` Reiner Steib
@ 2006-09-17 14:32   ` Robert McDonald
  2006-09-17 15:53     ` Ralf Angeli
  0 siblings, 1 reply; 7+ messages in thread
From: Robert McDonald @ 2006-09-17 14:32 UTC (permalink / raw)


Reiner Steib wrote:
> I'd be surprised if yap really can handle all pstricks and psfrag
> tricks.  (But I don't use Windows and so i don't know yap.)

I think your instinct is correct: I believe that yap calls dvips as a 
helper program (there is a "render method" menu item, and one choice is 
dvips). However it is done, Yap can now display files with postscript 
specials and also perform inverse search on them. I'm impressed.

> Customize `TeX-output-view-style'.  In other words, delete the
> "^pstricks$\\|^pst-\\|^psfrag$" entry there.
> 

Well, I'm a nitwit. I had tried deleting that entry but I forgot to 
byte-compile the file afterwards, so the change had no effect.

In case this is of interest to anyone else, I have edited one entry and 
added one entry to tex-mik.el to make auctex 11.83 work better with 
MikTeX 2.5. (This is trial and error, so suggestions and corrections are 
welcome.):

; new command to compile with source specials
(unless (get 'LaTeX-command 'saved-value)
   (setq LaTeX-command
         "latex -src-specials -interaction=nonstopmode %t"))

; changed last line to have yap open at current cursor location.
(unless (get 'TeX-view-style 'saved-value)
   (setq TeX-view-style '(("^epsf$" "start %f")
			 ("." "yap -1 -s%n%b %d"))))


Thanks for your help Reiner!

Bob

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: AucTeX 11.83 and MikTeX 2.5
  2006-09-17 14:32   ` Robert McDonald
@ 2006-09-17 15:53     ` Ralf Angeli
  2006-09-17 19:06       ` Robert McDonald
  0 siblings, 1 reply; 7+ messages in thread
From: Ralf Angeli @ 2006-09-17 15:53 UTC (permalink / raw)


* Robert McDonald (2006-09-17) writes:

> Reiner Steib wrote:
>
>> Customize `TeX-output-view-style'.  In other words, delete the
>> "^pstricks$\\|^pst-\\|^psfrag$" entry there.
>
> Well, I'm a nitwit. I had tried deleting that entry but I forgot to 
> byte-compile the file afterwards, so the change had no effect.

Please don't edit files directly.  There is a reason these things are
implemented as a customizable option.  What Reiner meant was that you
use `M-x customize-variable RET TeX-output-view-style RET', change the
value and save it.

> In case this is of interest to anyone else, I have edited one entry and 
> added one entry to tex-mik.el to make auctex 11.83 work better with 
> MikTeX 2.5. (This is trial and error, so suggestions and corrections are 
> welcome.):

Ouch!  Please don't recommend something like that!  Again, there is
the possibility to change the variable values without changing a
file.  Don't do this!

Additionally, with your changes you are effectively rendering TeX
Source Specials mode useless.  This mode can be used to toggle source
specials (which may change line breaking and should therefore not be
used for the final version unless you don't care about its quality).
See the "Forward and inverse search" section in the
(info "(auctex)Viewing") info node.

-- 
Ralf

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: AucTeX 11.83 and MikTeX 2.5
  2006-09-17 15:53     ` Ralf Angeli
@ 2006-09-17 19:06       ` Robert McDonald
  2006-09-20  9:04         ` yaakov.oshman
  0 siblings, 1 reply; 7+ messages in thread
From: Robert McDonald @ 2006-09-17 19:06 UTC (permalink / raw)


Ralf Angeli wrote:
> 
> Please don't edit files directly.  There is a reason these things are
> implemented as a customizable option.  What Reiner meant was that you
> use `M-x customize-variable RET TeX-output-view-style RET', change the
> value and save it.
 >
<snip>
> 
> Ouch!  Please don't recommend something like that!  Again, there is
> the possibility to change the variable values without changing a
> file.  Don't do this!
> 
	
Thank you Ralf. You're quite right on all counts. Implementing Reiner's 
original change as a customization fixes everything. After reading 
through the various AucTeX files trying to figure out what was going on, 
for some reason it never occurred to me to customize to solve the 
problem, and so I didn't pick up on that from Reiner's suggestion. Also, 
to be honest, I didn't really understand tex-source-specials-mode (for 
my purposes it suffices to leave specials on all the time) so I didn't 
understand the greater ramifications you mentioned. But now that I see 
how it works and how easily it adapts to different systems, my 
admiration for AucTeX and Emacs is all the greater.

Thanks!

Bob

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: AucTeX 11.83 and MikTeX 2.5
  2006-09-17 19:06       ` Robert McDonald
@ 2006-09-20  9:04         ` yaakov.oshman
  2006-09-20 21:48           ` Robert McDonald
  0 siblings, 1 reply; 7+ messages in thread
From: yaakov.oshman @ 2006-09-20  9:04 UTC (permalink / raw)


Hi,

I have just installed Emacs22+Auctex (preview enabled!) on my Win
XP/SP2 system with MikTeX 2.5.  I used the customization procedure
described above (thanks for the explanations!) but could not solve one
mystery:  in compiling multi-file articles, composed of a master file
and some others, the source specials that get added to the dvi file do
not include the file extensions (*.tex); hence, when trying to do
inverse search from YAP, emacs opens a blank new file that has the
correct file name -- without the extension...  I could solve the
problem by modifying the inclusion commands (in the master file) to,
e.g., \input{filename.tex} (as opposed to what I had before:
\input{filename}), but this is "not elegant", and not having the
extensions *did work* in the previous versions of emacs (21.3)+auctex!
My question is, then: how to customize auctex to pass on the file
extensions as well to YAP in the source specials?

Thanks much in advance!
Yaakov.
PS  Maybe this is relevant: I am using gnuserv, and the code added to
my .emacs file is:

(add-to-list 'load-path "c:/emacs/site-lisp/gnuserv/")
(require 'gnuserv)
(gnuserv-start)
(setq gnuserv-frame (selected-frame))



Robert McDonald wrote:
> Ralf Angeli wrote:
> >
> > Please don't edit files directly.  There is a reason these things are
> > implemented as a customizable option.  What Reiner meant was that you
> > use `M-x customize-variable RET TeX-output-view-style RET', change the
> > value and save it.
>  >
> <snip>
> >
> > Ouch!  Please don't recommend something like that!  Again, there is
> > the possibility to change the variable values without changing a
> > file.  Don't do this!
> >
>
> Thank you Ralf. You're quite right on all counts. Implementing Reiner's
> original change as a customization fixes everything. After reading
> through the various AucTeX files trying to figure out what was going on,
> for some reason it never occurred to me to customize to solve the
> problem, and so I didn't pick up on that from Reiner's suggestion. Also,
> to be honest, I didn't really understand tex-source-specials-mode (for
> my purposes it suffices to leave specials on all the time) so I didn't
> understand the greater ramifications you mentioned. But now that I see
> how it works and how easily it adapts to different systems, my
> admiration for AucTeX and Emacs is all the greater.
> 
> Thanks!
> 
> Bob

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: AucTeX 11.83 and MikTeX 2.5
  2006-09-20  9:04         ` yaakov.oshman
@ 2006-09-20 21:48           ` Robert McDonald
  0 siblings, 0 replies; 7+ messages in thread
From: Robert McDonald @ 2006-09-20 21:48 UTC (permalink / raw)


yaakov.oshman@gmail.com wrote:
<snip>

> mystery:  in compiling multi-file articles, composed of a master file
> and some others, the source specials that get added to the dvi file do
> not include the file extensions (*.tex); hence, when trying to do
> inverse search from YAP, emacs opens a blank new file that has the
> correct file name -- without the extension...  I could solve the
> problem by modifying the inclusion commands (in the master file) to,
> e.g., \input{filename.tex} (as opposed to what I had before:
> \input{filename}), but this is "not elegant", and not having the
> extensions *did work* in the previous versions of emacs (21.3)+auctex!
> My question is, then: how to customize auctex to pass on the file
> extensions as well to YAP in the source specials?
> 

I can confirm the behavior you describe. The status line in Yap 
identifies the input file without its extension.

Perhaps you should file a bug report on the MikTeX forums? Or see if 
anyone there has mentioned this?

Bob

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-09-20 21:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-16 17:36 AucTeX 11.83 and MikTeX 2.5 Robert McDonald
2006-09-16 18:34 ` Reiner Steib
2006-09-17 14:32   ` Robert McDonald
2006-09-17 15:53     ` Ralf Angeli
2006-09-17 19:06       ` Robert McDonald
2006-09-20  9:04         ` yaakov.oshman
2006-09-20 21:48           ` Robert McDonald

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.