TMVIEW – V 96.05

What is tmview? tmview is a screen-previewer for .dvi-files compiled by TEX. It let’s you see what your printed output will look like. You can choose between a black-and-white representation and greyscaling. You can choose an arbitrary zoomfactor (at some cost of performance). You can set marks to measure distances. You can search for textstrings. You may visit lots of .dvi-files, set bookmarks and get them saved to a startup-file. tmview does not support pxl-files since I think they are prehistoric. tmview ignores all special-commands and has no font-replacing mechanism, sorry lads. The current version goes with linux/svgalib only.

Contents

1 Commandline options 1

2 Viewing a .dvi-file 3

2.1 Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.1.1 * – the magic argument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.2 The detailed command list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3 The startup-file 10

4 Copying 12

1 Starting tmview – Commandline options

Usage

tmview [-?] [-hmarg] [-vmarg] [-pwidthxheight] [-rxresxyres]

[-fpath] [-nname] [-tpath] [-dwidthxheight] [-mmag] [-kleftmarg,rightmarg,uppermarg,lowermarg] [-sstartup]

       [file[.[dvi]]]

If you call tmview with the option -?, tmview will give a complete list of all possible options and their default-values, before reading any startup-file. Important: All options have to be followed immediately by their arguments, no spaces must be inserted !!! The command-line-options are meant to prepare tmview for going with your systems TEX-setup. While the defaults work fine on my system, you may have to pass suitable values. See -s for keeping your defaults in a startup-file.

-? (Help command-line-options) List all command-line-options and their defaults, before reading any startup-file (see -s).

-h (Horizontal-offset)

A lot of printer drivers do a horizontal offset of 1 inch. If yours does as well, you should use -h25.4. The length following -h must be given in mm. Default: 25.4

-v (Vertical-offset)

A lot of printer drivers do a vertical offset of 1 inch. If yours does as well, you should use -v25.4. The length following -v must be given in mm. Default: 25.4

-p (Paper-size)

Tells tmview width and height of the paper you are using. The width is given first and both width and height are given in mm. Width and height are separated by an x. Default: 210.0x297.0 (German DIN A4)

-r (Resolution)

Tells tmview what kind of pk-files to use. The horizontal resolution is given first and both horizontal and vertical resolution are given in dpi (dots per inch). The two values are separated by an x. Saying -r600x600 means tmview will use fonts which were generated for a 600-dpi-printer. As tmview assumes that pixels on the screen are square, different values for horizontal and vertical resolution will result in a distorted image. Always make sure the desired pk-files are available. The chosen resolution determines the (maximum) size of the representation (comp. [figure: +]below). Default: 300x300

-f (Font-path)

A list of paths telling tmview where to look for the pk-files. The items in this list have to be separated by ’:’. The given list is executed from left to right. If an item ends with // all subdirectories will be scanned too. This is programmed in a very odd way, so it takes a lot of time. You should place such items at the end of the list. Default: ./:/usr/lib/texmf/fonts//

-n (Name-of-the-font-file)

If your .dvifile tells tmview to use a font called thisnthatfont and tmview was told to use a resolution of 123 dpi, tmview has to know how the desired file is named. In the string following -n the following replacements are made:

xxx  replaced by
@N thisnthatfont
@K thisntha (this is @R reduced to 8 characters (MS-DOG !))
@M 123 (the resolution)
@R 615 (this is @M∗5, intended for magnified 200 dpi fonts used instead of 300 dpi fonts)

Default: @N.@Mpk

-t (Tfm-path)

A list of paths telling tmview where to look for the tfm-files. The items in this list have to be separated by ’:’. The given list is executed from left to right. tfm-files are used, when tmview can’t find a fonts pk-file. In that case boxes are drawn instead of the glyphs. Default:

./:usr/lib/texmf/fonts//

-d (Display)

Tells tmview the desired size of your display. The width is given first and both width and height are given in pixels. Width and height are separated by an x. Using linux you may choose a resolution supported by your version of svgalib with respect to your hardware. Only 256-color-modes are allowed. That means to get more than 320x240 you must have a supported svga chip-set, standard vga won’t do. See Installation on how to run tmview with standard vga. Default: look for the value of $GSVGAMODE if set, otherwise try 640x480.

-m (Magnification)

If you want to magnify by a factor n you have to specify n ∗ 1000 as an argument to -m, e.g. -m2000 means all lengths will be doubled. Note: tmview magnifies according to the origin of the dvi-coordinates, which is – in most cases – not the upper left corner of the paper. Always make sure the desired pk-files are available. -m doesn’t magnify the paper, so if you wish a larger image use the + and - keys or the -r option. Default: get magnification from .dvi-file.

-k (Kannot-print-any-further) Most printers stop printing if they are too close at the papers edge (some might even do strange things). The -k option describes the printable area, e.g. saying -k1.0,2.0,3.0,4.0 means that your printer can print as close as 1 mm to the left 2 mm to the right 3 mm to the upper 4 mm to the lower edge of the paper. These values are used to draw a frame indicating the printable area (comp. [figure: p]below). When searching textstrings, any text outside the printable area is ignored. All four values have to be given and they have to be separated by ’,’. All lengths are given in

    mm. Default: 4.0,4.0,4.0,12.0

-s (startup-file) The above options, a list of visited .dvi-files (see bookmarks below) and lots of other interna may be loaded from the startup-file, specified directly after the -s. When you say -s␣, i.e. give no argument to -s, no startup-file is loaded.

The startup-file is read before reading any commandline-options – this means you can override the defaults from the startup-file. When quitting tmview the current options etc. will be saved in the startup-file. If this is not desired, the startup-file has to be set read-only !! Therefore a possible tactic is to run tmview with suitable options, visit often used .dvifiles, set within these desired manual-bookmarks and save all that information in the startup-file. Then set it read-only and/or copy it somewhere save. See also editing the startup-file below. Default:

    ~/.dvisvga

2 Using tmview – Viewing a .dvi-file

When everything is set up to suit your needs, visiting a .dvifile simply means to navigate the visible area through the files using the cursor-keys. A great varity of commands is available, including commands for loading files, changing the paper-size or setting marks. The table shows all available commands. Commands are invoked by single key-strokes e.g. [figure: q]quits tmview.

commands of tmview

[figure: ?]  give a short description of the following command
[figure: ?; ?]  give a list of all commands
[figure: PgUp], [figure: PgDn] select a page relative to the current page
[figure: g]  select a page w.r.t. TEX-counters
[figure: ←], [figure: →], [figure: ↑], [figure: ↓] scroll the visible area
[figure: f], [figure: c]  make scrolling finer/coarser
[figure: z]  center visible area
[figure: +], [figure: −]  zoom in/out
[figure: v]  set zoom-factor
[figure: b]  set a bookmark
[figure: w]  move to a bookmark
[figure: ]ˆ  move back
[figure: o]  toggle greyscaling
[figure: x]  toggle statusline-information
[figure: t]  set unit of measurement
[figure: l]  show/hide screenmark and pagemark
[figure: y]  set pagemark at the position of screenmark
[figure: a]  how/hide marked rectangle
[figure: p]  show/hide printable area
[figure: e]  set page-offset and -size
[figure: k]  show/hide half-hyper-tex-mark
[figure: TAB]  move to next href
[figure: ↩]  follow current href
[figure: s]  search for text
[figure: r]  re-read .dvifile and re-draw screen
[figure: d]  load/kill .dvifile
[figure: q]  quit tmview

For the sake of information there is a more secure way of invoking a command: If you insert [figure: ?]before hitting another key the status-line will give a short description of the command which includes information about the commands arguments. Now there are two possibilities: Hit [figure: ↩] (perhaps after inserting arguments) to execute the command or [figure: ESC]to cancel. Besides [figure: ?]there is another way of invoking commands this way: Just insert the appropriate uppercase letter. This leads to a convenient way of getting accustomed to tmview, the tutorial-mode. Do caps-lock right after tmview has started: from now on nothing happens without your explicit confirmation.

2.1 Arguments

Some of the commands in table 1 take numerical arguments. Arguments are always optional. They have to be entered before calling the command. Multiple arguments are separated by ’,’ or ’;’. If you are giving arguments to a command, give all arguments, if you don’t give enough, the command will behave as if none had been given. After inserting the arguments just call the command, no Return or whatever is required (as a matter of fact [figure: ↩]even destroys your arguments). If you give arguments to a command that doesn’t want them, the arguments are simply discarded – no error. If no argument is given, a default is used. If an argument is passed, it serves as the default for future invocations of this command. Commands doing similar things share the same default arguments. Example: typing 10[figure: ←]results in scrolling 10% to the left. Thus typing [figure: →]afterwards scrolls 10% to the right and [figure: ↑]scrolls 10% upwards.

2.1.1 * – the magic argument

As a special argument most of the commands accept the so-called magic argument *. It is used either to modify the behaviour of the command in some way or to get the arguments from somewhere else (e.g. from the command-line or even the startup-file). To get an understanding of the magic argument consider the following examples:

[figure: p]draws a rectangle showing the printable area. It takes four arguments stating where your printer will refuse to print any closer to the paper’s edges. If * is given as an argument (one ’*’ not four), the according numbers are taken from the startup-file.

[figure: w]moves through one of two rings of bookmarks: the ring of file-bookmarks or the ring of manualbookmarks. If [figure: w]receives the magic argument the other ring is chosen, no movement is performed. The status-line will say ’SET TO MANUAL-BOOKMARKS’ if the current ring was the file-bookmark-ring (and is now the manual-bookmark-ring). So in this case * acts as a kind of flag argument.

2.2 The detailed command list

Moving through the document

[figure: PgUp], [figure: PgDn]Select a page relative to the current page

[figure: PgUp]moves towards the beginning of the .dvifile, while [figure: PgDn]moves towards the end. A single argument n specifies the number of pages to move. If the argument is *, the page-moving-mode is toggled (no movement). The two possible modi are:

1. Keep the visible area where it is.

2. Perform a centering (horizontal and vertikal) – just like calling [figure: z][figure: z]– after reaching the new page.

The second modus comes in quite handy when you want to read the .dvifile rather than to check it. After a [figure: PgDn]the top of the page will allways be visible – at least if the centered point is set up appropriately, see [figure: z]below. Example: 1[figure: PgUp]selects the previous page [figure: PgDn]selects the next page [figure: g]Select a page with respect to TEXcounters

A list of ten arguments (c_{0}, c_{1}, … c_{9}) specifies the page to be selected. tmview will jump to the first page with a value of c_{i} in \counti (i = 0, … 9), * may be used as a wildcard. If there are more than one but less than ten arguments given, the others will be taken as *. Example: 26[figure: g]selects the first page with a value of 26 in \count0.

[figure: ↑], [figure: ↓], [figure: ←], [figure: →]Scrolling the visible area

A single argument p may be used to specify the amount of scrolling in percent of the screen-width. [figure: ↑][figure: ↓]both accept the argument * to toggle between: 1. stay on the current page; 2. scroll over pages. When scrolling over pages, you may view the whole document while using only the single key [figure: ↓]. Example: 20[figure: ←]scrolls 1/5 to the left.

[figure: f], [figure: c]Make scrolling finer/coarser

These commands change the default argument for the above scrolling commands. So [figure: f]and [figure: c] don’t move the visible area at all, but they change the way the scrolling-commands act.

replacements for the cursor keys

If your terminal sends strange escape sequences when you hit a cusror key, you don’t need to worry: tmview supports keys to replace the cusor keys. These are: [figure: i]to replace [figure: PgUp], [figure: m]for [figure: PgDn], [figure: u] for [figure: ↑], [figure: n]for [figure: ↓], [figure: h]for [figure: ←]and [figure: j]for [figure: →].

…  …
[figure: ↑; PgUp; u; i]
[figure: …; ←; →; …; …; h; j; …]
[figure: ↓; PgDn; n; m]
…  …

[figure: z]Center the visible area

Without any argument [figure: z]centers horizontally only, while [figure: z][figure: z]centers in both directions. When two arguments x, y are given, they describe the point on the page, which will become the middle of the visible area. When the argument * is given, the current position is taken as the centre. When the screenmark is shown (see below [figure: l]), and the argument * is given, the position of the screenmark becomes the center. This moves the visible area, but it does not move the screenmark.

[figure: v]Set the zoom-factor

This command requires one argument f which must be between 0.1 and 2. f will become the zoom-factor and the visible-area will be redrawn. If the zoom-factor is 1, the pixels found in the pk-files are just copied one by one to the screen. Since the resolution of our days screens seems to be less than that of our days printers, and since you propably still want to use the same pk-files for printing and viewing, f = 1 usually results in a positive magnification. So when you’re just reading some text in some .dvifile the best value for f is something like 0.3, depending on the involved resolutions. When the screenmark is visible (see [figure: l]) the position of the screenmark is taken as the origin of zooming, i.e. it is fixed. When the screenmark is not visible, the middle of the screen is fixed. The current zoom-factor is displayed in the second statusline, see [figure: x]. There are two zooming modi. The fast modus only works if 1/f is an integer. So good values are f = 1.0, 0.5, 0.333, 0.25, 0.2, 0.167 and so on. When in the fast modus, the [figure: +]/[figure: −]keys described below step through these values only. Usually you don’t need to use [figure: v]at all. The good thing about the slow modus is, that it allows you to choose the zoom-factor arbitrarily (between 0.1 and 2). So poor students with small screens might find some optimum to make the text fit on the screen still being readable. The bad thing about the slow modus is that it is slow. But since glyphs are kept in memory once zoomed, this slowlyness only hurts while viewing the first few pages after changing the zoom-factor. Anyway, *[figure: v]brings you back to the fast modus, choosing the nearest possible zoom-factor. Sorry. The problem might be solved either by a better zooming algorithm or faster computers.

[figure: +], [figure: −]Zoom in/out

Increase/decrease the zoom-factor. When in the fast modus, step through the fast values only (see above). When an argument p is given, it is taken as the amount of increasing/decreasing in percent of the current zoom-factor. This is likely to result in slow modus. Example:

0.17[figure: v] set zoomfactor to 0.17  slow
10[figure: +] set zoomfactor to 1.1 ∗ 0.17 = 0.187  slow
3[figure: −]  set zoomfactor to 0.97 ∗ 1.87 = 0.181 slow
[figure: −]  set zoomfactor to 0.97 ∗ 0.181 = 0.176 slow
*[figure: v]  set zoomfactor to 1/6 = 0.167  fast
[figure: +]  set zoomfactor to 1/5 = 0.2  fast

Bookmarks

A bookmark remembers what is seen on the screen. That is the .dvifile, the page within that file, the position of the visable area and the zoom-factor. There are three kinds of bookmarks: back-bookmarks: When searching a text-string, following a href or moving to a bookmark, the position within the .dvifile might be changed to somewhere far far away. To allow returning from such excursions easily , a back-bookmark will be generated automaticly. To prevent getting fed up with thousands of back-bookmarks, the total number of these is limited. See [figure: ]ˆ below. file-bookmarks: Each file visited has one (and only one) file-bookmark, containing the information mentioned above, plus some information on the file, that is the paper-offset and -position, the location of the printable-area. File-bookmarks are generated automaticly. This results in easy revisiting a .dvifile: you’ll find it as left. A file-bookmark is removed by killing the .dvifile with [figure: d][figure: k], see [figure: d]below. manual-bookmarks: After all you may install your own bookmarks, marking often visited places, say in some manuals. manual-bookmarks are named by a number. This number has to be unique whithin the .dvifile they belong to. To define a manual-bookmark use [figure: b]. Since manual-bookmarks belong to the .dvifile they are defined on, they get lost, when that .dvifile is killed by [figure: d][figure: k]. All kinds of bookmarks are kept in a ring-buffer. There is a so called current bookmark of each type. Visiting the bookmarks along the ring-buffer is done by [figure: w]for file- and manual-bookmarks, while [figure: ]ˆ acts on back-bookmarks.

[figure: b]Define/undefine manual-bookmark.

When the current position is not already defined as a manual-bookmark, [figure: b]defines one. When a single numeric argument n is given, n will be the name of the newly defined bookmark. With no argument, a name will be generated automaticly. See [figure: w]below, for how to visit manual-bookmarks. When the current position is already defined as a manual-bookmark, [figure: b]undefines that manualbookmark.

[figure: w]Move to bookmark.

When a single numeric argument n is given, [figure: w]moves to the manual-bookmark named n, if there is one. Since manual bookmarks are bound to .dvifiles, the current .dvifile will never change in that case. If no argument is given, [figure: w]moves the postion either through the ring-buffer of file-bookmarks or through the one of manual-bookmarks. When [figure: w]is acting on file-bookmarks, it will switch to another .dvifile , since every .dvifile has got only one file-bookmark. To toggle between theese two modi, use the magic argument *.

[figure: ]ˆ Move back

Move to the latest back-bookmark, if there is one. When a single numeric argument n is given, the n latest back-bookmarks are kept and all the others are discarded.

Measuring

To allow you to measure distances on the page, there are two marks, the screenmark, which is fixed on the physical screen you’re looking at, and the pagemark, which is fixed on the .dvifiles page. When you move the visible-area, the screenmark acts as drawn with chalk on your monitor. The pagemark acts as drawn on the page. The second statusline tells the position of the pagemark relative to the corner of the sheet of paper you’re viewing. It also tells the position of the screenmark relative to the pagemark. To measure distances you first switch this marks on, using [figure: l]. When the marks are shown, the scrolling commands don’t act on the visible area anymore, but move the screenmark, now only moving the screenmark at the boarder of the screen results in scrolling. To move the pagemark just move the screenmark at the desired position and use [figure: y]to make the pagemark follow.

[figure: l](this is the letter ’ell’) Show/hide screenmark and pagemark

This commands takes the two arguments x, y. The pagemark is put at position x, y w.r.t. the upper left corner of the page. The Screenmark may be moved with the scrolling-commands.

[figure: y]Set pagemark at the position of the screenmark

Rectangles

Besides the marks there are three rectangles for measurement. First there is the boarder of the paper setup by the command-line options -h,-v and -p. Then there is the printable area, setup with the -k command-line option. Third the so called marked rectangle.

[figure: a]Show/hide marked rectangle

The four arguments t, l, w, h specify the position on the page and the size of the marked rectangle. When no argument is given and pagemark and screenmark are shown, their positions are used as default. When they are hidden, the last position of the marked rectangle is used as default.

[figure: t]Set unit of measurement

Whenever you specify arguments which are to describe a point on the page, this is done w.r.t. a unit of measurement, i.e. cm, mm, a.s.o. This unit is also used, when the position of a mark is displayed in the statusline.

[figure: p]Show/hide printable area

The four arguments l, r, t, b specify the margins of the printable area with respect to the boarder of the page. When pagemark and screenmark are shown, the argument * sets the printable area to the rectangle described by screenmark and pagemark. When they are hidden, * takes the commandline-options resp. defaults for -k.

[figure: e]Set paper-offset and -size

The four arguments h, v, w, h describe the boarder of the page. Have the top-left corner of a sheet of paper in mind. h, v is the offset of the .dvifile’s origin to this top-left point of the paper. Standard values are h = v = 2.54cm. w and h are the width and the height of the sheet of paper. The sheet of paper is represented only by a frame on the screen. It does not affect the drawing of the .dvifile. When pagemark and screenmark are shown, the argument * sets the boarder of the page to the rectangle described by screenmark and pagemark. When they are hidden, * takes the commandline-options resp. defaults for -h,-v and -p.

Half-hyper

tmview does some of the fancy hyper-tex things. I talk about half -hyper-tex, because tmview only follows links which point to somewhere in the currently visited .dvi-file. So there is no connection to the net or so. But you might find it useful (when editing a major project) to view an equation number this-and-that by clicking on this-and-that whereever the text refers to that equation. For information about hyper-tex, related macropackages and fully compatible viewer scan the net …

[figure: k]Show/hide half-hyper-mark

[figure: TAB]Goto next href

[figure: ↩]Follow current href, if one is present on the current page

Miscellaneous

[figure: o]Toggle greyscaling

When the zoom-factor is less than 1, the glyphs usually are displayed using grey-levels, making them smoother. This takes some memory, so perhaps you will like to switch it off. On high-res displays there is no need for it anyway.

[figure: x]Toggle statusline-information

In the bottom line of your screen tmview will always display a statusline. This statusline is either the standard statusline or the second statusline. While the standard statusline shows you the number of the current page and the arguments you are about to pass to a command, the second one shows additional information for measuring out distances and the current zoom. See below. [figure: x]toggles between these two statuslines.

[figure: s]Search for text

You will be asked for the text-string to search for. You may enter a regular expression^{1} describing that string, this especially includes just to enter the string as it is. If a search appears to take infinitely long (which might easily happen, if you enter a funny regexp), just hit [figure: ESC], this stops the search. tmview will take the entire .dvifile as one huge text-string and then search for the next substring, matching the regular expression you’ve entered. Here next is meant with respect to the current page. So far this sounds quite easy, but there are some ugly details, based on the fact, that a .dvifile contains information on how to draw a bitmap representing your text. It does not contain information about from what characters in which order your text is made up. Even the PKfiles which are used to draw your text consist only of lots of glyphs but no character-codes, like ASCII or so. Building a huge text-string from a .dvifile is some kind of guessing. First: What kind of huge text-string is build from the .dvifile? This string will consist of the letters A … Z, a … z, the accent " and the digits 0 … 9. It does not contain anything else like whitespaces, linefeeds or hyphens. Whenbeingprinteditwouldlooklikethisnotreadableatall. Taking the .dvifile as a huge string allows you to find all locations of a sub-string, say commandlineoptions, even those that are seperarted by linebreaks (and hyphens) or pagebreaks. In turn, there is no chance to find only those locations, where commandlineoptions is separated by a hyphen. To keep tmview from getting confused by headings, there is another rule for building up the huge text-string: any glyph outside the printable area (see [figure: p]) is ignored. So you may set up the printable area to ignore headings when searching. Second: How is the huge text-string build up? The alphanumerics A … Z, a … z, 0 … 9 are copied one by one to the huge text-string. Glyphs that look like a simple alphanumeric will be taken as the one they look like. So the TEX input \c o, producing an o̧, will be represented as a simple ’o’ in the text-string. This rule also applies to all kind of ligatures. The TEX input ffl\AE, producing fflÆ will be represented by fflAE. Any accent on top of a glyph will be translated to a ", preceding whatever the glyph without that accent would be translated to. The TEX input \"a producing the german umlaut ä, will be found as "a in the generated text-string. The TEX input \aa producing the scandinavian å will be found as "a too. Any other glyphs are ignored. Third: In what does the above result? Visiting english documents, say manuals to some computer related stuff like elisp.dvi, searching for keywords works fine. Searching in documents in which extensive use of accents and funny characters is made works too, but requires some luck and/or experience in how TEX acts on such things. Example: Take the file story.tex from the TEXbook, chapter 6, page 24. It contains the line

1here ’regular expression’ means extended regular expression

      galaxy called \"O\"o\c c

The text-string build from the corresponding story.dvi will therefore contain

          galaxycalled"O"oc

So you can search for str getting as result ans

str  ans

      galaxy  found
      galaxycalled  found
      galaxy called not found

d"  found

      galaxy.*"O"oc  found

Ooc  not found

[figure: r]Re-read current .dvifile and re-draw screen

[figure: d]Load/kill .dvifile

After typing [figure: d]you may select between [figure: l]to load a .dvifile and [figure: k]to kill a .dvifile. Loading a .dvifile: tmview will look for a file-bookmark belonging to that file. If there is one, it becomes the current filebookmark. The .dvifile will be shown as left, and any defined manual-bookmarks are accessible by [figure: w]. When loading a .dvifile for the first time, a new file-bookmark will be created. This will be set up with default values from the command-line options and won’t contain any manual-bookmarks. Killing a .dvifile: To kill a .dvifile means to kill it’s file-bookmark and any related manualbookmark. Killing a .dvifile won’t hurt the file itself. You don’t have to kill a .dvifile just to load another one.

[figure: q]Quit tmview

When quitting, a startup-file will be written. When running tmview next time, you will find almost everything as you left it.

3 Customizing tmview – The startup-file

The following explains the contents of the startup-file which is used to set up tmview. When the startup-file is not set read-only, tmview writes down a startup-file every time you quit tmview. If no startup-file can be found, a new one will be created. Hence the list of bookmarks resp. visited files will keep growing, as long as you don’t explicitly kill them with [figure: d][figure: k]. Since also command-line options are kept in the startup-file you are not able to reset any nonsense by quiting/restarting tmview (which is not necessary anyway because you can reset everything from inside tmview using the magic argument). If you are trying out funny command-line options which you don’t want to creep into your startup-file, just set the startup-file read-only – or call tmview with -s␣. Although there are great chances to get a lot of nonsense into your startup-file, there are two good reasons to make tmview remember all the above mentioned information:^{2}

1. You are working on a major TEX project, creating a huge document. This will take some days, and you still turn the system off now and then. You want tmview to remember all the bookmarks you have set in your document, the unusual papersize, the paths to special fonts used nowhere else, a.s.o. Since this kind of information is tied to your document, call tmview with -sMyDoc.tmv. So the tmview related settings on that project will be kept in MyDoc.tmv and won’t disturb your standard startup-file in ~/.dvisvga.

2. You are using tmview as a viewer of serveral manuals. This is similar to the above. Every once in a while you should save the current startup-file, to prevent loosing the valueable information (=bookmarks) by accident. However, as mentioned above, you might one day end up in a somehow ugly large or even corrupted startup-file. The easy way out is to remove the startup-file, call tmview with suitable standardoptions and thereby get a new startup-file. In case you want to copy some of the information contained in the old startup-file to the new one, the internal structure of the startup-file will be explained by the following example startup-file:

# **** this is an example startupfile of tmview *****
#
#
# basic rules:
# 1. all charakters from a '#' to the end of a line are ignored.
# 2. spaces, tabs and newlines act as separators.
# 3. a symbol starts with a letter, consists of letters and digits,
#    and ends at the next separator.
# 4. a string starts just after a '"' and ends just befor the next '"'.
#    exeption: to get a string containing a '"' type  '""'.
# 5. a number starts with '+' '-' '.' or a digit and must look like
#    numbers look like, i.e. no two '.' and so on.
# 6. a value is a list of strings and/or numbers separated by separators.
#
# The purpose of the startup-file is to set symbols to values. This is done
# by typing the symbol followed by a value (separated by ... guess ...)
# Therefore a number of valid symbols are defined, each expecting some
# kind of value. If a valid symbol is not set in the startup-file, a
# default value is used. You may therefore remove any suspect setting from
# your startup-file.
# most important: the symbol sufp
# Set the startupfile.
# Setting sufp sets the name of the file
# to write startup information when quitting tmview.
# Not setting sufp prevents writing a startup-file at all.
# Setting sufp to some other file prevents overwriting the current
# startup-file, while still saving newly generated bookmarks a.s.o.
sufp "/home/thomas/.dvisvga"
# now set the commandline-options ...

2I designed this feature – no wonder I like it.

hoff  25.40  # -h(hoff)
voff  25.40  # -v(voff)
papx 210.00  # -p(papx)x(papy)
papy 297.00
xres 300     # -r(xres)x(yres)
yres 300
tfmp "./:/usr/lib/texmf/fonts/tmp/tfm//:/usr/lib/texmf/fonts//" # -t(tfmp)
ffor "@N.@Mpk"                                                  # -n(ffor)
fntp "./:/usr/lib/texmf/fonts/tmp/pk//:/usr/lib/texmf/fonts//"  # -f(fntp)
disx 640     # -d(disx)x(disy)
disy 480
nmag 0       # -m(nmag)
lrnd   4.00  # -k(lrnd);(rrnd);(ornd);(urnd)
rrnd   4.00
ornd   4.00
urnd  12.00
#other defaults
verb 0      # 'verb 1' makes tmview a bit more verbose
# file-bookmarks and manual-bookmarks
#
# The symbol fmk starts the definition of a file-bookmark.
# It is followed by the name of the file as a string and lots
# of other values. Manual-bookmarks, belonging to a file, have to follow
# immediatly, starting with the symbol bmk. This results in blocks
# starting with fmk and ending just before the next fmk, containing
# all the information related one DVIfile.
#
# You may either delete some of the lines starting with bmk to get rid
# of those bookmarks. Or you may delete all the lines beloning to one
# file-bookmark, including the manual-bookmarks that follow. Be sure
# not to leave some of the related manual-bookmarks, when deleting
# a file-bookmark.
# You may either copy a file-bookmark only, or copy a file-bookmark together
# with the related manual-bookmarks from another startup-file.
# one block, containing 3 manual-bookmarks
fmk "/home/thomas/cc/tmview/asmith.dvi" 210.00 297.00  25.40  25.40 105.00
148.50   4.00   4.00   4.00  12.00 0 1 -7 389  3.000
bmk 3 1 -7 517  3.000
bmk 1 1 -7 261  3.000
bmk 2 1 -7 389  3.000
# another block, not containing manual-bookmarks at all.
fmk "/home/thomas/cc/tmview/tmview/dort.dvi" 186.10 276.78  17.19   8.89
186.10 261.37   4.00   4.00   4.00  12.00 0 3 -163 -120  7.000
# end of example startup-file

4 Copying tmview – rights and lefts

The code of tmview uses some rather basic ideas stolen from xdvi. This includes some few lines of code just copied. The author of xdvi is Eric Cooper. In a similar kind, tmview’s code depends on some lines of dvidjc, written by Wolfgang R. Mueller. The hyper-TeX related parts are taken from xhdvi, written by Arthur Smith. The sources of the above can be found on the CTAN. So by having mentioned the authors here, and giving a reference how to get the original sources, this should not be a violation of their copyrights. As far as I am concerned, tmview may be modified or distributed without any restrictions. tmview is distributed in the hope that it will be useful, but without any warranty.