1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823
|
*******************************************************************************
****This is README for tmview v98.06 (C)opyright 1995 Thomas Moor*************
*******************************************************************************
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
DVIfiles, 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, sorry lads. tmview tries its best with virtual fonts and
is prepeared to be linked with kpathsea.
The current version goes with linux/svgalib as well as
the X Window System.
*******************************************************************************
USAGE**************************************************************************
*******************************************************************************
tmview [-?] [-h<marg>] [-v<marg>] [-p<width>x<height>] [-r<xres>x<yres>]
[-f<path>] [-n<name>] [-t<path>] [-g<path>] [-d<width>x<height>]
[-m<mag>] [-k<leftmarg>,<rightmarg>,<uppermarg>,<lowermarg>]
[-s<startup>] [<file>[.[dvi]]]
If you call tmview with the option -?, tmview will give a complete list of
all possible options and their default-values, after reading the startup-
file, if any.
IMPORTANT: All options have to be followed IMMEDIATELY by their arguments,
NO spaces must be inserted !!!
COMMANDLINE-OPTIONS************************************************************
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, after reading the
startup-file, if any. (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. <+> 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 ":"'s. 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 lots 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)
Defaults: "@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 ";"'s. 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.
Defaults: "./:usr/lib/texmf/fonts//"
-g (Vf-path)
A list of paths telling tmview where to look for the vf-files.
The support of vf-files is not very well tested. If anything
goes wrong with vf-files, use dvicopy to replace them by
ordinary dvi-code. Nomenclature of the list is as above.
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 wont 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 DVIfile.
-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. <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 DVIfiles (see bookmarks below) and
lots of other interna may be loaded from the startup-file, specified
directly after the -s. 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 !! A possible tactic therefore it
is, to run tmview with suitable options, vistit often used DVIfiles, set
within theese 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"
*******************************************************************************
VIEWING A DVI-FILE*************************************************************
*******************************************************************************
When everything is setup right, visiting a DVIfile with tmview just means to
navigate the visible area along that file, using the cursor-keys. Some of the
following commands obviously require an argument, f.e. <g>. Arguments are to
be entered BEFORE executing a command. When executed by hitting the
corresponding uppercase key, you will be asked for the argument. While the
user-interface of tmview is meant to save keystrokes, it is not too
intuitive. You may either read the following instructions, or just do
<caps-lock>.
<?> give a short description of the following command,
hitting <?> twice gives the list of all commands
<i>/<m> select a page relative to the current page
<g> select a page w.r.t. TeX-counters
<u>/<n>/<h>/<j> scroll the visible area
<f>/<c> make scrolling finer/coarser
<z> center visible area
<+>/<-> zoom in/out
<v> set zoom-factor
<b> set a bookmark
<w> move to a bookmark
<^> move back
<o> toggle greyscaling
<x> toggle statusline-information
<t> set unit of measurement
<l> show/hide screenmark and pagemark
<y> set pagemark at the position of screenmark
<a> show/hide marked rectangle
<p> show/hide printable area
<e> set page-offset and -size
<k> show/hide half-hyper-tex-mark
<TAB> move to next href
<RET> follow current href
<s> search for text
<r> re-read DVIfile and re-draw screen
<d> load/kill DVIfile
<q> quit tmview
The cursor-keys <page-up> and <page-down> are taken as <i> resp. <m>. The
keys <pos1> and <end> select the first resp. the last page. The cursor-keys
<left> <right> <up> and <down> do <h> <j> <u> resp. <n>. All in all this means,
that the cursor-keys do what they are meant to.
When a mouse is connected, it moves any visible mark. When the right or left
mousebutton is no good for anything else, moving the mouse while holding that
button acts on the visible area instead. (That sounds bad, but works out fine)
When the screenmark is shown (see <l>), the left mouse-button sets the
pagemark (see <y>) and the right button marks a rectangle (see <a>). When the
half-hyper-mark is shown, the left mouse-button follows the current href, if
any.
******************************************************************************
NON-INTUITIVE USER-INTERFACE **************************************************
******************************************************************************
To explain the way tmview expects to receive commands, a short nomenclature
used in the sequel is given:
Any text within `<' and `>' represents a single keystroke, while `(' and `)'
mark the beginning resp. the end of a string to enter. So <h> is about to hit
the key named `h' and (25.4) could stand for <2><5> <.><4>. The
carriage-return-key is referred by <ret>, the backspace-key or delete-key by
<del> and the escape-key by <esc>. Almost whenever a string is expected by
tmview, you may use <del> to remove the last character you typed. So even
<2><5><6><del><.><4> results in (25.4). Note that a string does not need to be
terminated by <ret>. To simplify a reference to a string, in this text any
uppercase letters within `(' and `)' are not meant as a string, but as the
name of some string. So we may read something like `(PP)<h> scrolls PP percent
to the left' as `typing in any number just before <h> results in scrolling left
according to that number'.
COMMANDS AND ARGUMENTS*********************************************************
A command is executed by typing its name, which consists of a single
character. Some of the above listed commands take numerical arguments.
Arguments are always optional. They may be entered before executing the
command. Multiple arguments are separated by <,> or <;>. If no argument is
passed, a default is used. If an argument is passed, it serves as the default
for following commands. Commands doing similar things share the same default
arguments.
Example:
Typing (10)<h> results in scrolling 10% to the left and sets the default for
any scrolling commands to 10%. Thus typing <j> afterwards results in scrolling
10% to the right.
MAGIC ARGUMENT*****************************************************************
As a special argument some commands accept the magic argument <*>. It is used
either to vary the command in some way or to get the arguments from another
place. <#> is equivalent to <*> and saves you from holding down the shift-key
on some keyboards.
<z> for example centers the visible area. It excepts as argument the point
which will be taken as origin. Since this will become the default for a future
<z>, you may measure out the origin only once. Even quicker it is to position
the visible area by scrolling and then to do a <*><z>. This results in taking
the current position as centered and so as default for a coming <z>.
As another example look at the command <m>, which moves pages forward,
according to a given argument resp. a default. By moving on the next page
there are two modi available: 1. keep the visible area; 2. do center like
<z><z>. <*><m> toggles between these two modi. So in this case <*> acts as a
kind of flag argument.
SELECTING THE PAGE************************************************************
<i>/<m> Select a page relative to the current page.
<i> moves towards the beginning of the DVIfile, while <m> moves towards
the end. A single argument (N) may specify the amount of movement in
pages. If the argument is (*), the page-moving-mode is toggled. See
above.
Example:
(1)<i> selects the previous page
<m> selects the next page
<g> Select a page with respect to TeX counters.
A list of ten arguments (COUNT0; COUNT1; ... COUNT9) specifies the page
to be selected. <*> may be used as wildcard. If there are more than one
but less than ten arguments given, the others will be taken as <*>.
Example:
(26)(i) selects the first page after the current page with a value of
26 in \count0.
MOVING AROUND ON CURRENT PAGE *************************************************
<u>/<n>/<h>/<j> Scrolling the visible area
A single argument (PP) may be used to specify the amount of scrolling
in percent of the screen-width. <u>/<n> resp. <up>/down> 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 <n>.
Example:
(20)<h> scrolls 1/5 to the left.
<f>/<c> Make scrolling finer/coarser
These commands change the default argument for the above scrolling-
commands. So <f> and <c> don't move the visible area at all, but they
change the way the scrolling-commands act.
<z> Center the visible area
Without any argument <z> centers horizontally only, while <z><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 centered.
When the screenmark is shown (see below <l>), and the argument (*) is
given, the position of the screenmark becomes the center. This does
move the visible area, but it does not move the screenmark.
ZOOMING *******************************************************************
<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 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 may still want to
use the same pk-files for printing and viewing, F=1 usually results in
a magnification. So when you're just reading some text in some DVIfile
you will set F to something like 0.3, depending on the involved
resolutions. When the screenmark is visible (see <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 optional statusline, see <x>.
There are two zooming modi. The fast modus works only if 1/F is an
integer. So good values are F=0.5, 0.333, 0.25, 0.2, 0.167 and so
on. When in the fast modus, the <+>/<-> keys described below step
through that values. And since F is to be small anyway, you may never
use <v> to set it explicitly.
The good thing about the slow modus is, that it allows you to choose
the zoom-factor arbitrary (between 0.1 and 2). So poor students with
small screens might find some optimum to make the text fit and still be
readable. The bad thing about the slow modus is that it is slow. But
since once zoomed glyphs are kept in memory, this slowness only hurts
the first few pages after changing the zoom-factor. Anyway, <*><v>
brings you back in the fast modus, choosing the nearest possible
zoom-factor therefore.
<+>/<-> Zoom in/out
Increase/decrease the zoom-factor. When in the fast modus, step through
the fast values only (see above). When an argument (PP) is given, it
is taken as the amount of increasing/decreasing in percent of the
current zoom-factor. This is likely to result in the slow modus.
Example:
(0.17)<v> set zoomfactor to 0.17 (slow)
(10)<+> set zoomfactor to 1.1*0.17=0.187 (slow)
(3)<-> set zoomfactor to 0.97*1.87=0.181 (slow)
<-> ... to 0.97*0.181=0.176 (slow)
(*)<v> ... to 1/6=0.167 (fast)
<+> ... 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 kind of bookmarks ...
file-bookmarks:
Each file visited has a file-bookmark, containing the above information about
what was seen on the screen when visited the last time, 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 re-visiting a DVIfile: you'll find it as left. A file-bookmark is removed
by killing the DVIfile with <d><k>, see <d> below.
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
simplify recovering fromsuch excursions, a back-bookmark will be generated
automaticly. To prevent getting fed up with thousands of back-bookmarks, the
total number of theese is limited. See <^> 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 <b>. Since manual-bookmarks belong to the DVIfile they are defined on,
they get lost, when that DVIfile is killed by <d><k>.
All kind 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
<w> for file- and manual-bookmarks, while <^> acts on back-bookmarks.
<b> Define/undefine manual-bookmark.
When the current position is not already defined as a manual-bookmark,
<b> defines one. When an single numeric argument (NUM) is given, NUM
will be the name of the newly defined bookmark. With no argument, a
name will be generated automaticly. See <^> below, for how to visit
manual-bookmarks. When the current position is already defined as a
manual-bookmark, <b> undefines that manual-bookmark.
<w> Move to bookmark.
When a single numeric argument (NUM) is given, <w> moves to the
manual-bookmark named NUM, if any. Since manual bookmarks are bound to
DVIfiles, the current DVIfile will never change in that case. If no
argument is given, <w> goes moves the postion either thrue the
ring-buffer of file-bookmarks or thrue the one of manual-bookmarks. To
toggle between theese two modi, use the magic argument <*>.
<^> Move back
Move to the latest back-bookmark, if any. When a single numeric
argument (TOTAL) is given, keep the TOTAL latest back-bookmarks and
discard all the others.
CHOOSING WHAT'S ON THE DISPLAY ************************************************
<o> Toggle greyscaling
When the zoom-factor is less than 1, the glyphs may be displayed using
grey-levels, making them more smooth. This takes some memory, so you
may switch it off. On high-res displays there is no need for it anyway.
<x> Toggle statusline-information
While the standard statusline shows you the page-number of the current
page and the arguments you are about to enter, you may select optional
information for measuring out distances and so. See below.
<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.
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 edding on your monitor. The pagemark acts as
drawn on the page. The optional 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 may switch this marks on, using <l>. When the marks are shown,
the scrolling commands don't act on the visible area anymore, but move the
screenmark. For that case 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 <y> to make the pagemark follow.
<l> Show/hide screenmark and pagemark
This commands takes the two arguments (PM_X;PM_Y). The pagemark is put
at position PM_X PM_Y w.r.t. the upper left corner of the page. The
Screenmark may be moved with the scrolling-commands.
<y> Set pagemark at the position of the screenmark
Beside of these 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 used.
<a> Show/hide marked rectangle
The four arguments (LEFT,TOP,WIDTH,HIGHT) specify the position on page
an the size of the marked rectangle. When 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.
<p> Show/hide printable area
The four arguments (LEFT,RIGHT,TOP,BOTTOM) specify the margins
of the printable area, w.r.t. 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 command-line-options resp. defaults -k of the
printable area.
<e> Set paper-offset and -size
The four arguments (HOFF;VOFF;WIDTH;HEIGHT) specify the boarder of the
page. Have the top-left corner of a sheet of paper in mind. Then
(HOFF,VOFF) is the offset of the DVIfile's origin to the left boarder
of the paper. Standard values are HOFF=VOFF=2.54cm. WIDTH and HEIGHT
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 command-line-options
resp. defaults -h,-v and -p.
HALF-HYPER ********************************************************************
tmview does some of the fancy hyper-tex things. I talk about HALF-hyper-tex,
because tmview follows only links which point to somewhere within the
currently visited dvi-file. So there is no connection to the net or so. But
you might find it usefull (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 ...
<k> Show/hide half-hyper-mark
<TAB> Goto next href
<RET> Follow current href, if any
MISC **************************************************************************
<s> Search for text
You will be asked for the text-string to be searched. You may enter a
regular expression describing that string, that includes especially just
to enter the string as it is.
tmview will take the entire DVIfile as one huge text-string and then
search for the next substring, fitting the regular expression you've
enterd. Thereby "next" is ment 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 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.
Fisrt: What kind of huge-string is build from the DVIfile?
This string will consists of the letters <A> ... <Z>, <a> ... <z>, the
accent <"> and the digits <0> ... <9>. It does NOT contain anything
else, like <space>, <ret> or <->:
Whenbeingprinteditwouldlooklikethisnotreadableatall.
Taking the DVIfile as 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 all those locations, where "commandlineoptions" is seperated by a
hypenation. To keep tmview from being confused by headings, there is
another rule for building up the huge text-string: any glyph outside the
printable area (see <p>) is ignored. So you may setup the printable area
to ignore headings when searching.
Second: How is the huge-string build up?
To translate the list of glyphs found in the DVIfile to a text-string,
the tfm-files are asked for the encoding-scheme. This does work with
dc-fonts and cm-fonts, since the following encoding-scheme names are
accepted: "ASCII", "TeX text", "TeX math italic", "TeX math symbols",
"TeX typewriter text", "Extended TeX Font Encoding - Latin", "Adobe
StandardEncoding".
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 that one it looks like. So the Tex input
'\c o', producing an 'o'-with-an-cedilla-accent, will be represented as
a simple (o) in the text-string. This rule also works for all kind of
ligatures. The TeX input 'ffl\AE' 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 'a'-with-two-dots-on-top, will be
found as ("a) in the generated text-string. The TeX input '\aa'
producing the scandinavian 'a'-with-circle-on-top 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 or/and experiance in how TeX acts on
such things.
Example:
Take the file story.tex from the TeXbook, chapter 6, page 24. It
contains the line
galaxy called \"O\"o\c c,
The text-string build from the corresponding story.dvi will therfore
contain
galaxycalled"O"oc
You may search for ... getting as result ...
galaxy found
galaxycalled found
galaxy called not found
d" found
galaxy.*"O"oc found
Ooc not found
<r> Re-read current DVIfile and re-draw screen
When the argument <*> is given, re-read the font-files too.
<d> Load/kill DVIfile
After typing <d> you may select between <l> to load a DVIfile and <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 file-bookmark. The DVIfile will be shown as
left, and any defined manual-bookmarks are accessable by <w>. When
loading a DVIfile for the first time, a new file-bookmark will be
generated. This will be setup 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
manual-bookmark. Killing a DVIfile won't hurt the file itself. You
don't have to kill a DVIfile just to load another one.
<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.
*******************************************************************************
THE STARTUP-FILE***************************************************************
*******************************************************************************
The following explains the contents of the startup-file used to setup
tmview. When not set read-only, tmview writes down a startup-file every time
you quit tmview. Therefore the list of bookmarks resp. visited files will keep
growing, solong as you don't explicitly kill them with <d><k>. Since also
command-line options are kept in the startup-file you are not able to reset
any nonsense by quiting/restarting tmview. To prevent such a behavioral,
simply set the startup-file read-only. But there are two good reasons to make
tmview remember all the above mentioned information:
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 sometimes.
You want tmview to remember all the bookmarks you've set in your document,
the abnormal papersize, the paths to special fonts used nowhere else, a.s.o.
Since that 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 and 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 standard-options and thereby get a new
startup-file. For the 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 seperators.
# 3. a symbol starts with a letter, consists of letters and digits,
# and ends at the next seperator.
# 4. a string starts just after a '"' end 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 seperated by seperators.
#
# The purpose of the startup-file is to set symbols to values. This is done
# by typing the symbol followed by a value (seperated by ... guess ...)
# Therfore 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 seting from you
# your startup-file.
# most important: the symbol sufp
# Set the startupfile. Since this is read from a startup-file, and
# that one has to be known therefore, setting sufp sets the name of the file
# to write startup information when quitting tmview.
# Not to set 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 ...
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/tfm//:/usr/lib/texmf/fonts//" # -t(tfmp)
vffp "./:/usr/lib/texmf/fonts/vf//:/usr/lib/texmf/fonts//" # -g(vf)
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 shure,
# not to leave some of the related manual-bookmarks, when deleting
# a file-bookmark.
# You may either copy a file-bookmark only, copy or 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
*******************************************************************************
COPYING************************************************************************
*******************************************************************************
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. Mller. 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.
*******************************************************************************
End of README******************************************************************
*******************************************************************************
|