forcing view with xdvi

View: New views
5 Messages — Rating Filter:   Alert me  

forcing view with xdvi

by Matthew Bainbridge :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear List,

When I view a document from within emacs using C-c C-c (view), AUCTeX
normally uses xdvi.  This is very convenient, since am using forward and
inverse search, etc.

The problem is when my document uses graphics (for example .eps), AUXTeX
instead uses gv:
  dvips foo.dvi -o && gv foo.ps
Is there some way to force AUCTeX to always use xdvi?  I tried adding
%%% TeX-output-view-style: (("^dvi$" "." "xdvi -s 4 -watchfile 1 %dS%d"))
to the end of the file, but there is no effect.

Best,
Matt


_______________________________________________
auctex mailing list
auctex@...
http://lists.gnu.org/mailman/listinfo/auctex

Re: forcing view with xdvi

by Ralf Angeli-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Matthew Bainbridge (2009-11-04) writes:

> When I view a document from within emacs using C-c C-c (view), AUCTeX
> normally uses xdvi.  This is very convenient, since am using forward and
> inverse search, etc.
>
> The problem is when my document uses graphics (for example .eps), AUXTeX
> instead uses gv:
>   dvips foo.dvi -o && gv foo.ps

It's not the use of graphics which leads to this.  You likely loaded a
PSTricks package.

> Is there some way to force AUCTeX to always use xdvi?  I tried adding
> %%% TeX-output-view-style: (("^dvi$" "." "xdvi -s 4 -watchfile 1 %dS%d"))
> to the end of the file, but there is no effect.

Works fine here.  Is this a document with multiple files you are dealing
with?

--
Ralf


_______________________________________________
auctex mailing list
auctex@...
http://lists.gnu.org/mailman/listinfo/auctex

Re: forcing view with xdvi

by Matthew Bainbridge :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for your quick reply.

I don't think I'm using PSTricks, but the problem seems to be the psfrag
package.  With the following document, dvips && gv is used:

\documentclass{article}
\usepackage{psfrag}

\begin{document}
test
\end{document}

But if I comment out the \usepackage line, it uses xdvi.  Do you know if
it is possible to use psfrag and have xdvi function normally?  Maybe there
is something screwy in my .emacs file.  The relevent part seems to be
this:

        (TeX-source-specials-mode 1)
        (setq TeX-source-specials-view-start-server t)
        ;; Special arguments to put XDVI in the correct place.
        (setq xdvi-extras
              (concat "-xoffset .35in -yoffset .4in "
                      "-s 4 -geometry 1800x1900+0+0"))
             ;; Add the above arguments to all instances of xdvi
        (unless (get 'TeX-output-view-style 'xdvi-extra)
          (mapcar (lambda (list)
                    (let ((func (nth 2 list)))
                      (if (string-match "xdvi" func)
                          (setq func
                                (replace-match
                                 (concat "\\& " xdvi-extras) t nil func)))
                      (setcar (last list) func)))
                  TeX-output-view-style)
          (put 'TeX-output-view-style 'xdvi-extra t))

Cheers,
Matt


On Wed, 4 Nov 2009, Ralf Angeli wrote:

> * Matthew Bainbridge (2009-11-04) writes:
>
>> When I view a document from within emacs using C-c C-c (view), AUCTeX
>> normally uses xdvi.  This is very convenient, since am using forward and
>> inverse search, etc.
>>
>> The problem is when my document uses graphics (for example .eps), AUXTeX
>> instead uses gv:
>>   dvips foo.dvi -o && gv foo.ps
>
> It's not the use of graphics which leads to this.  You likely loaded a
> PSTricks package.
>
>> Is there some way to force AUCTeX to always use xdvi?  I tried adding
>> %%% TeX-output-view-style: (("^dvi$" "." "xdvi -s 4 -watchfile 1 %dS%d"))
>> to the end of the file, but there is no effect.
>
> Works fine here.  Is this a document with multiple files you are dealing
> with?
>
> --
> Ralf
>


_______________________________________________
auctex mailing list
auctex@...
http://lists.gnu.org/mailman/listinfo/auctex

Re: forcing view with xdvi

by Ralf Angeli-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Matthew Bainbridge (2009-11-04) writes:

> I don't think I'm using PSTricks, but the problem seems to be the psfrag
> package.

Yes, psfrag is "supported" as well.

> But if I comment out the \usepackage line, it uses xdvi.  Do you know if
> it is possible to use psfrag and have xdvi function normally?

The idea is that if you use a package related to Postscript graphics,
you don't want to start a viewer which is not able to display such
graphics.  Under this assumption, starting dvips and gv would be
considered "normal".

If you don't want that, throw out the entries in `TeX-output-view-style'
which check for PSTricks packages and psfrag.  Either programmatically
like you do below or manually with `M-x customize-variable <RET> ...'.

> Maybe there
> is something screwy in my .emacs file.  The relevent part seems to be
> this:
>
>         (TeX-source-specials-mode 1)
>         (setq TeX-source-specials-view-start-server t)
>         ;; Special arguments to put XDVI in the correct place.
>         (setq xdvi-extras
>               (concat "-xoffset .35in -yoffset .4in "
>                       "-s 4 -geometry 1800x1900+0+0"))
>              ;; Add the above arguments to all instances of xdvi
>         (unless (get 'TeX-output-view-style 'xdvi-extra)
>           (mapcar (lambda (list)
>                     (let ((func (nth 2 list)))
>                       (if (string-match "xdvi" func)
>                           (setq func
>                                 (replace-match
>                                  (concat "\\& " xdvi-extras) t nil func)))
>                       (setcar (last list) func)))
>                   TeX-output-view-style)
>           (put 'TeX-output-view-style 'xdvi-extra t))

Wow.

--
Ralf


_______________________________________________
auctex mailing list
auctex@...
http://lists.gnu.org/mailman/listinfo/auctex

Re: forcing view with xdvi

by Matthew Bainbridge :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

M-x customize-variable did the trick.  Thanks so much!

--Matt



On Wed, 4 Nov 2009, Ralf Angeli wrote:

> * Matthew Bainbridge (2009-11-04) writes:
>
>> I don't think I'm using PSTricks, but the problem seems to be the psfrag
>> package.
>
> Yes, psfrag is "supported" as well.
>
>> But if I comment out the \usepackage line, it uses xdvi.  Do you know if
>> it is possible to use psfrag and have xdvi function normally?
>
> The idea is that if you use a package related to Postscript graphics,
> you don't want to start a viewer which is not able to display such
> graphics.  Under this assumption, starting dvips and gv would be
> considered "normal".
>
> If you don't want that, throw out the entries in `TeX-output-view-style'
> which check for PSTricks packages and psfrag.  Either programmatically
> like you do below or manually with `M-x customize-variable <RET> ...'.
>
>> Maybe there
>> is something screwy in my .emacs file.  The relevent part seems to be
>> this:
>>
>>         (TeX-source-specials-mode 1)
>>         (setq TeX-source-specials-view-start-server t)
>>         ;; Special arguments to put XDVI in the correct place.
>>         (setq xdvi-extras
>>               (concat "-xoffset .35in -yoffset .4in "
>>                       "-s 4 -geometry 1800x1900+0+0"))
>>              ;; Add the above arguments to all instances of xdvi
>>         (unless (get 'TeX-output-view-style 'xdvi-extra)
>>           (mapcar (lambda (list)
>>                     (let ((func (nth 2 list)))
>>                       (if (string-match "xdvi" func)
>>                           (setq func
>>                                 (replace-match
>>                                  (concat "\\& " xdvi-extras) t nil func)))
>>                       (setcar (last list) func)))
>>                   TeX-output-view-style)
>>           (put 'TeX-output-view-style 'xdvi-extra t))
>
> Wow.
>
> --
> Ralf
>


_______________________________________________
auctex mailing list
auctex@...
http://lists.gnu.org/mailman/listinfo/auctex