The following settings affect how Latex-Suite will display compiled files.
Here <format>
refers to a format such as
dvi
, ps
, etc. This variable defines
the program which will be called to display a file of that format.
By default, Latex-Suite defines viewer programs for viewing DVI, PS and PDF formats as follows:
Windows | Unix | |
---|---|---|
g:Tex_ViewRule_dvi | 'yap -1' | 'xdvi' |
g:Tex_ViewRule_ps | 'gsview32' | 'ghostview' |
g:Tex_ViewRule_pdf | 'AcroRd32' | 'xpdf' |
For Macintosh systems, these strings are left empty by default. This lets the system pick the program for each format. If you define these variables for Mac, the system choice will be over-ridden.
Latex-Suite appends file.format
to the above settings
while calling the external programs. For example, with
let g:Tex_ViewRule_dvi = 'yap -1'
yap
is called as
!start yap -1 file.dvi
from within
Vim. (The initial start
is used on
Windows
platforms is to make yap
start as a separate process.) If you find the way Latex-Suite constructs the
command line too restrictive, you can use the Tex_ViewRuleComplete_format
setting for more complete control on how the command line is
constructed while calling the external program for viewing.
For windows, you will need to set the $PATH
variable
to include the paths to yap
,
AcroRd32
, gsview32
and any other
programs. See your system documentation for how to do this.
To change the default format for viewing files, set the g:Tex_DefaultTargetFormat variable.
Here <format>
refers to the extension of a
output format such as dvi
, html
etc.
Tex_ViewRuleComplete_format
takes precedence over
Tex_ViewRule_format
if both are specified. By
default, Latex-Suite does not define values for
Tex_ViewRuleComplete_format
for any
format
. Unlike in the case of
Tex_ViewRule_format
, Latex-Suite does not modify
Tex_ViewRuleComplete_format
at all in constructing
the command line. The only modification is to substitute
'$*'
everywhere in the string with the name of the
file being viewed (without the extension).
Make sure you make the process go into the background otherwise vim will wait for the viewer to terminate before letting you edit the file again.
To make a process go into the background on a *nix
platform, use a trailing &
in the setting. On
Windows
, use start
at the
beginning of the setting. Example: Suppose you have a latex->html
converter which converts a file say foo.tex to a file foo/index.html.
Then you would use:
" On *nix platform let g:Tex_ViewRuleComplete_html = 'MozillaFirebird $*/index.html &' " On windows platform let g:Tex_ViewRuleComplete_html = 'start MozillaFirebird $*/index.html'