Copyright (C) 1998, 1999 Christian Schenk
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation.
You use Yap(1) to view a DVI file compiled by TeX. Yap tries hard to follow the WYSIWYG-principle: what you see (on screen) is what you get (when you take the paper out of the tray).
This document will explain
You can conclude from the version number 0.95b, that Yap is still under development. You can get the newest development version from the MiKTeX Project Page at http://www.snafu.de/~cschenk/miktex/.
You can open a DVI file
File
menu
There are two different methods to send a DVI document to the printer:
If your DVI document contains PostScript specials (e.g. EPS inclusions), than you can't use the standard print command.
The Dvips interface also works in conjunction with non-PostScript printers, provided that you have GhostScript installed on your workstation.
The command `File|Print...' opens the standard Print Setup dialog box.
The command `File|Print PostScript...' opens the Print PostScript dialog box.
This dialog box allows you select various Dvips options.
Check this button if you want to pipe the Dvips output through the
GhostScript interpreter (gswin32c.exe
). GhostScript will be
invoked with the following options:
-sDEVICE=mswinpr2
-dBATCH
-dNOPAUSE
-dSAFER
Check this button if you want to send the Dvips output to a PostScript printer or if you want to save the output in a PostScript file. Enter a printer port (such as `lpt1') or a filename.
Select the pages that you want to print.
You can enter additional Dvips options here.
Check this button if you want to inspect the Dvips command line.
Yap is capable of searching the DVI file for so called source specials. This feature can help you to optimize the edit-compile-view cycle:
TeX inserts source specials into the DVI file, if you specify the command-line switch `--src-specials'. You simply can say
tex --src-specials mybook.tex
and the TeX compiler will insert one source special at the beginning of each paragraph.
You can control the frequency of embedded source specials by specifying where to insert the specials into the DVI file:
tex --src-specials=where mybook.tex
The where argument must be a comma-separated value list. Legal values are:
cr
display
hbox
math
par
vbox
Forward search is initiated by specifying --find-src-special
on the Yap command-line (see section Command line switches).
But initiating forward search from the command-line is rather invonvenient.
It makes more sense to initiate forward search out of the text editor.
The editor must be capable of starting Yap with a correct
--find-src-special
directive.
Two popular text editors which are capable to initiate forward search are
GNU Emacs
and
WinEdt.
You will need the Emacs packages Auc-TeX, which provides an enhanced TeX environment.
The following code should be added to your `.emacs':
(setq TeX-command-list '(("TeX" "tex --src \"\\nonstopmode\\input %t\"" TeX-run-TeX nil t) ("LaTeX" "%l --src \"\\nonstopmode\\input{%t}\"" TeX-run-LaTeX nil t) ("View" "yap -1 -s \"%n %t\" %d" TeX-run-discard nil nil) ("BibTeX" "bibtex %s" TeX-run-BibTeX nil nil) ("Index" "makeindex %s" TeX-run-command nil t)))
`TeX' (resp. `LaTeX') creates a DVI file which contains source file information.
`View' starts Yap (if it is not already running) and moves the focus to the corresponding DVI location.
Provided that the DVI document contains source file information (see section How to enrich your document with source specials), you can initiate inverse search by double-clicking inside the Yap document window.
Yap supports the following graphics formats:
*.emf
).
*.wmf
).
*.bmp
).
*.eps
); requires GhostScript.
Yap has built-in support for Windows Metafiles (WMF) and Enhanced Metafiles (EMF).
You can use the `graphicx' package to include WMF/EMF files.
For example, the following LaTeX code will include the WMF file
drawing.wmf
:
\usepackage{graphicx} \DeclareGraphicsRule{.wmf}{bmp}{}{}% declare WMF filename extension \begin{document} \includegraphics[width=2in,height=1in]{drawing.wmf} \end{document}
Yap has built-in support for Windows Bitmap Files.
You can use the `graphicx' package to include BMP files.
For example, the following LaTeX code will include the BMP file
picture.bmp
:
\usepackage{graphicx} \begin{document} \includegraphics[width=2in,height=1in]{picture.bmp} \end{document}
Yap displays EPS figures with the help of GhostScript, which must be installed on your computer.
You can use the `graphicx' package to include EPS files.
For example, the following LaTeX code will include the EPS file
drawing.eps
:
\usepackage{graphicx} \begin{document} \includegraphics{drawing.eps} \end{document}
Yap can convert almost any graphics file into an equivalent Windows Bitmap (BMP) file, provided that a suitable filter program is available. The BMP file will then be displayed instead of the original file.
Many filters are included in the netpbm graphics suite, which can be downloaded
from the CTAN directory systems/win32/miktex/util
.
You can use the `graphicx' package to include graphics files.
For example, the following LaTeX code will include the GIF file
picture.gif
:
\usepackage{graphicx} \DeclareGraphicsRule{.gif}{bmp}{}{}% declare GIF filename extension \begin{document} \includegraphics[width=2in,height=1in]{picture.gif} \end{document}
New filters have to be specified in the [Graphics]
section of the
MiKTeX configuration file (`miktex.ini'). A filter specification
has the syntax `.xxx.bmp=command', where
The command line must contain the following place-holders
The following specification defines a GIF filter:
[Graphics] .gif.bmp=giftopnm %i | ppmtobmp -windows > %o
This filter works as follows:
giftopnm
is used to convert the .gif
file into a portable
bitmap, which is written to a pipe (`|')
ppmtobmp
is used to convert the portable bitmap, which is read from the
pipe, into the final BMP file.
Yap provides several tools for browsing the DVI document.
The command `Tools|Source Specials...' opens the the Source Specials windows.
This window lists all source specials found in the current DVI document.
This button brings into view the portion of the DVI document which contains the selected source special
This button invokes an editor to edit the TeX source corresponding to the selected source special.
This button closes the window.
The hand tool allows you to scroll the page by moving the cursor while the left mouse button is pressed. You select the Hand Tool with the command `Tools|Hand Tool' or by clicking the corresponding button in the toolbar.
The Magnifying Glass allows you to view a small part of the unshrunk page. You select this tool with the command `Tools|Magnifying Glass' or by clicking the corresponding button in the toolbar.
You can choose between three sizes:
The three magnifying glasses are fully customizable (see section Magnifying Glass Propery Page).
You can specify the power of the magnifying glass by entering a numerical prefix argument. The argument is interpreted as a shrink factor for the text inside the magnifying glass. A shrink factor of 1 (the default) results in a maximum magnification.
Goto Page
dialog box if no prefix argument was entered.
Otherwise goes to the specified page.
The User Interface
property page allows you to customize the
Look & Feel of Yap.
Select this checkbox to cause Yap to keep the vertical scroll position at a change of page.
Select this checkbox to cause Yap to keep the horizontal scroll position at a change of page.
This property page allows you to customize the three magnifying glasses.
Check this button if the mouse cursor should not be visible while a magnifying glass is opened.
Width Enter the width (in screen pixels) of the rectangular magnifying glass window.
Enter the height (in screen pixels) of the rectangular magnifying glass window.
Specify the shrink factor to be used in the magnifying glass window. The shrink factor specifies the power of the magnifying glass. A shrink factor of 1 results in a maximum magnification.
The Display
property page allows you to change various display settings.
Specify the METAFONT mode for the display.
The Mode
list field contains a list of known METAFONT modes.
This information is needed, when new PK fonts are to be generated.
In principle, it doesn't matter what mode name you select here.
But it's recommended, that you use the same mode name as for the printer,
since this reduces the invocations of the font-generator.
Specify the default shrink factor.
Specify the paper type.
Specify the orientation of the paper.
The Printer
property page allows yoy to change various printer settings.
Specify the METAFONT mode for the printer.
The Mode
list field contains a list of known METAFONT modes.
This information is needed, when new PK fonts are to be generated.
You must select a mode, that matches your printer resolution.
Specify the the print offset.
For some old printer models it may be necessary to adjust the the print offset (i.e. the position, where printing begins). x-shift/y-shift gives the amount of pixels, an output page has to be shifted right/down.
Specify the command line which Yap shall execute after a successful inverse search operation (see section Initiating Inverse Search).
The command may contain the following placeholders:
%f
%l
Enter something like this, if you use Emacs as a TeX editor:
c:\emacs-20.3\bin\gnuclientw.exe -F +%l %f
Enter something like this, if you are using the WinEdt TeX shell:
"c:\Program Files\WinEdt\winedt.exe" "[Open('%f');SelLine(%l,8)]"
This property page allows you to configure PostScript support.
Check this button, if you want Yap to ignore all PostScript specials.
Check this button to disable anti-aliasing for PostScript graphics. This speeds up the interpretation of PostScript specials at the expense of output quality.
This property page allows you to permit or forbid the execution of embedded shell commands.
Check this button to prevent the execution of embedded shell commands.
Check this button if you want to be warned about any embedded shell commands. You can then choose whether or not to execute the command.
Check this button to allow secure commands. Enter a comma-separated list of command names in the edit box.
Check this button to execute embedded shell commands unconditionally.
This property page allows you to set advanced options.
Check this button to cause Yap to record events into the logbook.
Check this button to cause Yap to show all source specials.
Yap consults several font mapping files when a missing PK font has to be generated from a PostScript Type 1 font:
Yap records certain events in a logbook. The command `View|Logbook...' opens the logbook.
Press this button to close the logbook.
Press this button to copy the logbook to the Windows Clipboard.
Press this button to erase the logbook.
The general Yap command line syntax is
yap [options] [dvifile]
The following options are recognized:
--find-src-special srcspecial
-s srcspecial
--goto-hyper-label label
html:
special.
--single-instance
-1
--unregister
You want Yap to do a forward search to the DVI location corresponding
to line 41 of the source file mydoc.tex
.
The name of the DVI file is mydoc.dvi
.
The forward search is initiated like this:
yap -s 41mydoc.tex mydoc.dvi
If you already have an open Yap application instance, and you
don't want to start another instance, then add the -1
flag:
yap -1 -s 41mydoc.tex mydoc.dvi
\special{! string}
\special{" string}
\special{ps: string}
\special{ps::[begin] string}
\special{ps:: string}
\special{ps::[end] string}
\special{ps: plotfile filename}
\special{header=filename}
\special{PSfile="filename"}
\special{psfile=filename}
\special{html:<a href="hrefstring">}
\special{html:<a name="namestring">}
\special{html:</a>}
\special{em:graph filename}
\special{em:graph filename, width, height}
\special{anisoscale filename, width, height}
{src: linenumber filename}
The following copyright notice applies to the Yap program. The copyright and copying permissions for this manual appear near the beginning of this document.
Copyright (C) 1996, 97, 98 Christian Schenk. Yap is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Yap is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Yap; if not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
The GhostScript interpreter (gsdll32.dll
) could not be located.
Remedy: Install GhostScript 5.50 and make sure that the GhostScript
directory (usually `c:\gstools\gs5.50') is included in the
PATH
variable.
More information: PostScript specials are rendered with the help of GhostScript, a free PostScript interpreter.
The GhostScript executable (gswin32.exe
) could not be located.
Remedy: Install GhostScript 5.50 and make sure that the GhostScript
directory (usually `c:\gstools\gs5.50') is included in the
PATH
variable.
More information: PostScript specials are printed with the help of GhostScript, a free PostScript interpreter.
Yap was not able to create a missing font.
Remedy: Install the font source file(s).
More information: The logbook (`View|Logbook...') should state the name of the missing file.
The DVI file contains no source specials.
Remedy: Use the `--src' option the next time you compile your TeX source file (see section How to enrich your document with source specials).
Yap cannot open the TeX source file because the current DVI page contains no source file information.
Remedy: Use the `--src' option the next time you compile your TeX source file (see section How to enrich your document with source specials).
Jump to: b - c - d - e - f - g - h - i - m - n - o - p - s - t - w - x - y - z
Yet Another Previewer
Most Recently Used (File)
This document was generated on 12 April 1999 using texi2html 1.56k.