updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / tmview / 200_backslashes.diff
blob72a4933b057d56c1a2755812837b233f7b36944c
1 --- tmview-01.03.orig/svga/writevga.c
2 +++ tmview-01.03/svga/writevga.c
3 @@ -64,10 +64,10 @@
4 if(!MECK) gl_freecontext(&physicalscreen); /* does not hurt if not allocated ? */
5 #ifndef VGAHASWAITIO
6 #ifdef LETSTRYGS
7 - pfprot("\n\
8 -warning: display: use polling when rendering eps-figures due to
9 - a compiletime-option. If your svgalib is above version 1.2.10,
10 - recompiling with \"VGAHASWAITIO\" defined may speed up rendering.\n\n");
11 + pfprot("\n"
12 + "warning: display: use polling when rendering eps-figures due to\n"
13 + "a compiletime-option. If your svgalib is above version 1.2.10,\n"
14 + "recompiling with \"VGAHASWAITIO\" defined may speed up rendering.\n\n");
15 #endif
16 #endif
18 @@ -203,9 +203,9 @@
19 if (n==0 || !vga_hasmode(n)) {
20 n=vga_getdefaultmode();
21 if((n!=5 && n!=10 && n!=11 && n!=12) || !vga_hasmode(n)) {
22 - pfprot("\n\
23 -warning: display: mode not supported on this machine. Now try -d640x480.
24 - Check your svgalib configuration.\n");
25 + pfprot("\n"
26 + "warning: display: mode not supported on this machine. Now try -d640x480.\n"
27 + "Check your svgalib configuration.\n");
28 n=10;
31 @@ -213,14 +213,14 @@
32 MECK=0;
33 } else {
34 MECK=1;
35 - pfprot("\n\
36 -warning: display: mode -d640x480 not supported at 256 colors. Now try at
37 - 16 colors. This will reduce display quality and speed. Check your
38 - svgalib configuration.\n\n");
39 + pfprot("\n"
40 + "warning: display: mode -d640x480 not supported at 256 colors. Now try at\n"
41 + "16 colors. This will reduce display quality and speed. Check your\n"
42 + "svgalib configuration.\n\n");
43 n=4;
44 if(!vga_hasmode(n)) {
45 - pfprot("\n\
46 -warning: display: mode -d640x480 not even supported at 16 colors.\n");
47 + pfprot("\n"
48 + "warning: display: mode -d640x480 not even supported at 16 colors.\n");
49 vgaerror("Sorry.");
52 --- tmview-01.03.orig/src/help.h
53 +++ tmview-01.03/src/help.h
54 @@ -1,598 +1,598 @@
55 #define HELPWIDTH 60
56 -#define HELPSTR "\
57 -LIST OF COMMANDS WITH TYPICAL ARGUMENTS ************ V 01.03
59 - <i>/<m> goto previous/next page
60 -(NUM)<g> goto page NUM w.r.t. TeX-counters
61 - <u>/<n>/<h>/<j> scroll the visible area
62 - <f>/<c> make scrolling finer/coarser
63 - <z> center visible area
64 - <+>/<-> zoom in/out
65 -(NUM)<v> set zoom-factor to NUM
67 - <b> set a bookmark
68 - <w> move to a bookmark
69 - <^> move back
71 - <o> display options
72 - <x> toggle statusline-information
73 - <t> set unit of measurement
75 - <l> show/hide screenmark and pagemark
76 - <y> set pagemark at screenmark position
77 - <a> show/hide marked rectangle
78 - <p> show/hide printable area
79 - <e> set page-offset and -size
81 - <k> show/hide half-hyper-tex-mark
82 - <TAB> move to next href
83 - <RET> follow current href
85 - <s> search for text
86 - <*><r> re-read DVIfile, fonts, eps-figures
87 - <d> load/kill DVIfile
88 - <q> quit tmview
91 -GENERAL USAGE *******************************************
93 -When everything is setup right, visiting a DVIfile with
94 -tmview just means to navigate the visible area along that
95 -file, using the cursor-keys. Some of the following
96 -commands obviously require an argument, f.e. <g>.
97 -Arguments are to be entered BEFORE executing a command.
98 -When executed by hitting the corresponding uppercase key,
99 -you will be asked for the argument. While the
100 -user-interface of tmview is meant to save keystrokes, it
101 -is not too intuitive. You may either read the following
102 -instructions, or just do <caps-lock>.
104 -The cursor-keys <page-up> and <page-down> are taken as <i>
105 -resp. <m>. The keys <pos1> and <end> select the first
106 -resp. the last page. The cursor-keys <left> <right> <up>
107 -and <down> do <h> <j> <u> resp. <n>. All in all this
108 -means, that the cursor-keys do what they are meant to.
110 -When a mouse is connected, it moves any visible mark. When
111 -the right or left mousebutton is no good for anything
112 -else, moving the mouse while holding that button acts on
113 -the visible area instead. (That sounds bad, but works out
114 -fine) When the screenmark is shown (see <l>), the left
115 -mouse-button sets the pagemark (see <y>) and the right
116 -button marks a rectangle (see <a>). When the
117 -half-hyper-mark is shown, the left mouse-button follows
118 -the current href, if any.
120 -*********************************************************
121 -NON-INTUITIVE USER-INTERFACE ****************************
122 -*********************************************************
124 -To explain the way tmview expects to receive commands, a
125 -short nomenclature used in the sequel is given:
127 -Any text within `<' and `>' represents a single keystroke,
128 -while `(' and `)' mark the beginning resp. the end of a
129 -string to enter. So <h> is about to hit the key named `h'
130 -and (25.4) could stand for <2><5> <.><4>. The carriage-
131 -return-key is referred by <ret>, the backspace-key or
132 -delete-key by <del> and the escape-key by <esc>. Almost
133 -whenever a string is expected by tmview, you may use <del>
134 -to remove the last character you typed. So even
135 -<2><5><6><del><.><4> results in (25.4). Note that a string
136 -does not need to be terminated by <ret>. To simplify a
137 -reference to a string, in this text any uppercase letters
138 -within `(' and `)' are not meant as a string, but as the
139 -name of some string. So we may read something like
140 -`(PP)<h> scrolls PP percent to the left' as `typing in any
141 -number just before <h> results in scrolling left according
142 -to that number'.
145 -COMMANDS AND ARGUMENTS***********************************
147 -A command is executed by typing its name, which consists
148 -of a single character. Some of the above listed commands
149 -take numerical arguments. Arguments are always
150 -optional. They may be entered before executing the
151 -command. Multiple arguments are separated by <,> or
152 -<;>. If no argument is passed, a default is used. If an
153 -argument is passed, it serves as the default for following
154 -commands. Commands doing similar things share the same
155 -default arguments.
157 -Example:
158 -Typing (10)<h> results in scrolling 10% to the left and
159 -sets the default for any scrolling commands to 10%. Thus
160 -typing <j> afterwards results in scrolling 10% to the
161 -right.
164 -MAGIC ARGUMENT*******************************************
166 -As a special argument some commands accept the magic
167 -argument <*>. It is used either to vary the command in
168 -some way or to get the arguments from another place. <#>
169 -is equivalent to <*> and saves you from holding down the
170 -shift-key on some keyboards.
172 -<z> for example centers the visible area. It excepts as
173 -argument the point which will be taken as origin. Since
174 -this will become the default for a future <z>, you may
175 -measure out the origin only once. Even quicker it is to
176 -position the visible area by scrolling and then to do a
177 -<*><z>. This results in taking the current position as
178 -centered and so as default for a coming <z>.
180 -As another example look at the command <m>, which moves
181 -pages forward, according to a given argument resp. a
182 -default. By moving on the next page there are two modi
183 -available: 1. keep the visible area; 2. do center like
184 -<z><z>. <*><m> toggles between these two modi. So in this
185 -case <*> acts as a kind of flag argument.
189 -SELECTING THE PAGE****************************************
191 -<i>/<m> Select a page relative to the current page.
193 - <i> moves towards the beginning of the DVIfile, while
194 - <m> moves towards the end. A single argument (N) may
195 - specify the amount of movement in pages. However, (N)
196 - will NOT become the default value. The argument is (*),
197 - the page-moving-mode is toggled. See above.
199 - Example:
200 - (1)<i> selects the previous page <m> selects the next
201 - page
203 -<g> Select a page with respect to TeX counters.
205 - A list of ten arguments (COUNT0; COUNT1; ... COUNT9)
206 - specifies the page to be selected. <*> may be used as
207 - wildcard. If there are more than one but less than ten
208 - arguments given, the others will be taken as <*>.
210 - Example:
211 - (26)<g> selects the first page after the current page
212 - with a value of 26 in \\count0.
216 -MOVING AROUND ON CURRENT PAGE ******************************
218 -<u>/<n>/<h>/<j> Scrolling the visible area
220 - A single argument (PP) may be used to specify the
221 - amount of scrolling in percent of the
222 - screen-width. <u>/<n> resp. <up>/down> both accept
223 - the argument (*) to toggle between: 1. stay on the
224 - current page; 2. scroll over pages. When scrolling
225 - over pages, you may view the whole document while
226 - using only the single key <n>.
228 - Example:
229 - (20)<h> scrolls 1/5 to the left.
231 -<f>/<c> Make scrolling finer/coarser
233 - These commands change the default argument for the
234 - above scrolling- commands. So <f> and <c> don't move
235 - the visible area at all, but they change the way the
236 - scrolling-commands act.
238 -<z> Center the visible area
240 - Without any argument <z> centers horizontally only,
241 - while <z><z> centers in both directions.
242 - When two arguments (X,Y) are given, they describe
243 - the point on the page, which will become the middle
244 - of the visible area. When the argument (*) is given,
245 - the current position is taken as centered. When the
246 - screenmark is shown (see below <l>), and the
247 - argument (*) is given, the position of the
248 - screenmark becomes the center. This does move the
249 - visible area, but it does not move the screenmark.
252 -ZOOMING ****************************************************
254 -<v> Set the zoom-factor
256 - This command requires one argument (F) which must be
257 - between 0.05 and 2. F will become the zoom-factor
258 - and the visible-area will be redrawn. Use (*)<v> to
259 - adjust the zoom-factor such that the page horizontaly
260 - fits the visible-area.
262 - If the zoom-factor is 1, the pixels found in pk-files
263 - are just copied one by one to the screen. Since the
264 - resolution of our days screens seems to be less than
265 - that of our days printers, and since you may still
266 - want to use the same pk-files for printing and
267 - viewing, F=1 usually results in a magnification. So
268 - when you're just reading some text in some DVIfile
269 - you will set F to something like 0.3, depending on
270 - the involved resolutions. When the screenmark is
271 - visible (see <l>) the position of the screenmark is
272 - taken as the origin of zooming, i.e. it is fixed.
273 - When the screenmark is not visible, the middle of the
274 - screen is fixed. The current zoom-factor is displayed
275 - in the optional statusline, see <x>.
277 - There are two zooming modi. The integer modus
278 - requieres 1/f to be an integer. This modus is quite
279 - fast, so good values are F=0.5, 0.333, 0.25, 0.2,
280 - 0.167 etc. The good thing about the slow modus is,
281 - that it allows you to choose the zoom-factor
282 - arbitrary (between 0.05 and 2). So poor students with
283 - small screens might find some optimum to make the
284 - text fit and still be readable. The bad thing about
285 - the slow modus is that it is slow. But since once
286 - zoomed glyphs are kept in memory, this slowness only
287 - hurts the first few pages after changing the
288 - zoom-factor. Modus selection is done by the display
289 - options <o>.
291 -<+>/<-> Zoom in/out
293 - Increase/decrease the zoom-factor. When in the fast
294 - modus, step through the fast values only (see
295 - above). When an argument (PP) is given, it is taken
296 - as the amount of increasing/decreasing in percent of
297 - the current zoom-factor. This is likely to result in
298 - the slow modus.
301 -BOOKMARKS **************************************************
303 -A bookmark remembers what is seen on the screen. That is
304 -the DVIfile, the page within that file, the position of the
305 -visable area and the zoom-factor. There are three kind of
306 -bookmarks ...
308 -file-bookmarks:
309 -Each file visited has a file-bookmark, containing the above
310 -information about what was seen on the screen when visited
311 -the last time, plus some information on the file, that is
312 -the paper-offset and -position, the location of the
313 -printable-area. file-bookmarks are generated automaticly.
314 -This results in easy re-visiting a DVIfile: you'll find it
315 -as left. A file-bookmark is removed by killing the DVIfile
316 -with <d><k>, see <d> below.
318 -back-bookmarks:
319 -When searching a text-string, following a href or moving to
320 -a bookmark, the position within the DVIfile might be
321 -changed to somewhere far far away. To simplify recovering
322 -fromsuch excursions, a back-bookmark will be generated
323 -automaticly. To prevent getting fed up with thousands of
324 -back-bookmarks, the total number of theese is limited. See
325 -<^> below.
327 -manual-bookmarks:
328 -After all you may install your own bookmarks, marking often
329 -visited places, say in some manuals. manual-bookmarks are
330 -named by a number. This number has to be unique whithin
331 -the DVIfile they belong to. To define a manual-bookmark
332 -use <b>. Since manual-bookmarks belong to the DVIfile they
333 -are defined on, they get lost, when that DVIfile is killed
334 -by <d><k>.
336 -All kind of bookmarks are kept in a ring-buffer. There is a
337 -so called current bookmark of each type. Visiting the
338 -bookmarks along the ring-buffer is done by <w> for file-
339 -and manual-bookmarks, while <^> acts on back-bookmarks.
341 -<b> Define/undefine manual-bookmark.
343 - When the current position is not already defined as
344 - a manual-bookmark, <b> defines one. When an single
345 - numeric argument (NUM) is given, NUM will be the
346 - name of the newly defined bookmark. With no
347 - argument, a name will be generated automaticly. See
348 - <w> below, for how to visit manual-bookmarks. When
349 - the current position is already defined as a
350 - manual-bookmark, <b> undefines that manual-bookmark.
352 -<w> Move to bookmark.
354 - When a single numeric argument (NUM) is given, <w>
355 - moves to the manual-bookmark named NUM, if
356 - any. Since manual bookmarks are bound to DVIfiles,
357 - the current DVIfile will never change in that
358 - case. If no argument is given, <w> goes moves the
359 - postion either thrue the ring-buffer of
360 - file-bookmarks or thrue the one of
361 - manual-bookmarks. To toggle between theese two modi,
362 - use the magic argument <*>.
364 -<^> Move back
366 - Move to the latest back-bookmark, if any. When a
367 - single numeric argument (TOTAL) is given, keep the
368 - TOTAL latest back-bookmarks and discard all the
369 - others.
372 -CHOOSING WHAT'S ON THE DISPLAY *****************************
374 -<o> Display options
376 - This command collects a number of general options
377 - on how the things get on the screen. Use the cursor
378 - keys (or <u>/<n>/<h>/<h>) to navigate.
380 - > Greyscales. When the zoom-factor is less than 1,
381 - the glyphs may be displayed using grey-levels, making
382 - them more smooth. This takes some memory, so you are
383 - allowed to switch it off. On high-res displays there
384 - is no need for greyscaling anyway.
386 - > Eps-rendering. There is limited support for
387 - rendering eps-files by running ghostscript. However,
388 - this sometimes is quite slow and memory intensive, so
389 - you may turn it off. If rendering is enabled the
390 - results are buffered. Hence, if the eps-files are
391 - updated by some graphics program, you need to do a
392 - <*><r> to force rerendering. To disable certain
393 - eps-files individually, abort the rendering process
394 - by <esc>.
396 - > Double-page. There is also limited support for
397 - viewing two pages beside each other. Again their
398 - is some memory required to keep it all buffered.
399 - You may disable double paged viewing entirely. You
400 - may let tmview deceide on basis of the zoom-factor.
401 - Or you may permanently enable this feature.
403 - > Zooming. There is a fast zooming mode allowing
404 - only zomming by 1/f where f is required to be an
405 - integer. And there is an arbitrary mode to be
406 - selected.
408 -<x> Toggle statusline-information
410 - While the standard statusline shows you the
411 - page-number of the current page and the arguments
412 - you are about to enter, you may select optional
413 - information for measuring out distances and so. See
414 - below.
416 -<t> Set unit of measurement
418 - Whenever you specify arguments which are to describe
419 - a point on the page, this is done w.r.t. a unit of
420 - measurement, i.e. cm, mm, a.s.o.. This unit is also
421 - used, when the position of a mark is displayed in
422 - the statusline.
425 -MEASURING **************************************************
427 -To allow you to measure distances on the page, there are
428 -two marks, the screenmark, which is fixed on the physical
429 -screen you're looking at, and the pagemark, which is fixed
430 -on the DVIfiles page. When you move the visible-area, the
431 -screenmark acts as drawn with edding on your monitor. The
432 -pagemark acts as drawn on the page. The optional statusline
433 -tells the position of the pagemark relative to the corner
434 -of the sheet of paper you're viewing. It also tells the
435 -position of the screenmark relative to the pagemark. To
436 -measure distances you first may switch this marks on, using
437 -<l>. When the marks are shown, the scrolling commands don't
438 -act on the visible area anymore, but move the screenmark.
439 -For that case only moving the screenmark at the boarder of
440 -the screen results in scrolling. To move the pagemark just
441 -move the screenmark at the desired position and use <y> to
442 -make the pagemark follow.
444 -<l> Show/hide screenmark and pagemark
446 - This commands takes the two arguments
447 - (PM_X;PM_Y). The pagemark is put at position PM_X
448 - PM_Y w.r.t. the upper left corner of the page. The
449 - Screenmark may be moved with the scrolling-commands.
451 -<y> Set pagemark at the position of the screenmark
453 -Beside of these marks there are three rectangles for
454 -measurement. First there is the boarder of the paper setup
455 -by the command-line options -h,-v and -p. Then there is
456 -the printable area, setup with the -k command-line option.
457 -Third the so called marked rectangle used.
459 -<a> Show/hide marked rectangle
461 - The four arguments (LEFT,TOP,WIDTH,HIGHT) specify
462 - the position on page an the size of the marked
463 - rectangle. When pagemark and screenmark are shown,
464 - their positions are used as default. When they are
465 - hidden, the last position of the marked rectangle is
466 - used as default.
468 -<p> Show/hide printable area
470 - The four arguments (LEFT,RIGHT,TOP,BOTTOM) specify
471 - the margins of the printable area, w.r.t. the
472 - boarder of the page. When pagemark and screenmark
473 - are shown, the argument (*) sets the printable area
474 - to the rectangle described by screenmark and
475 - pagemark. When they are hidden, (*) takes the
476 - command-line-options resp. defaults -k of the
477 - printable area.
479 -<e> Set paper-offset and -size
481 - The four arguments (HOFF;VOFF;WIDTH;HEIGHT) specify
482 - the boarder of the page. Have the top-left corner of
483 - a sheet of paper in mind. Then (HOFF,VOFF) is the
484 - offset of the DVIfile's origin to the left boarder
485 - of the paper. Standard values are
486 - HOFF=VOFF=2.54cm. WIDTH and HEIGHT are the width and
487 - the height of the sheet of paper. The sheet of paper
488 - is represented only by a frame on the screen. It
489 - does not affect the drawing of the DVIfile.
491 - When pagemark and screenmark are shown, the argument
492 - (*) sets the boarder of the page to the rectangle
493 - described by screenmark and pagemark. When they are
494 - hidden, (*) takes the command-line-options
495 - resp. defaults -h,-v and -p.
498 -HALF-HYPER *************************************************
500 -tmview does some of the fancy hyper-tex things. I talk
501 -about HALF-hyper-tex, because tmview follows only links
502 -which point to somewhere within the currently visited
503 -dvi-file. So there is no connection to the net or so. But
504 -you might find it usefull (when editing a major project) to
505 -view an equation number this-and-that by clicking on
506 -this-and-that whereever the text refers to that equation.
507 -For information about hyper-tex, related macropackages and
508 -fully compatible viewer scan the net ...
510 -<k> Show/hide half-hyper-mark
511 -<TAB> Goto next href
512 -<RET> Follow current href, if any
515 -MISC *******************************************************
517 -<s> Search for text
519 - You will be asked for the text-string to be searched.
520 - You may enter a regular expression describing that
521 - string, that includes especially just to enter the
522 - string as it is.
524 - tmview will take the entire DVIfile as one huge
525 - text-string and then search for the next substring,
526 - fitting the regular expression you've enterd. Thereby
527 - \"next\" is ment with respect to the current page.
529 - So far this sounds quite easy, but there are some ugly
530 - details, based on the fact, that a DVIfile contains
531 - information on how to draw a bitmap representing your
532 - text. It does not contain information about from what
533 - characters in which order your text is made up. Even
534 - the PKfiles used to draw your text consist only of
535 - lots of glyphs but no character-codes, like ASCII or
536 - so. Building a huge text-string from a DVIfile is some
537 - kind of guessing.
539 - Fisrt: What kind of huge-string is build from the DVIfile?
541 - This string will consists of the letters <A> ... <Z>,
542 - <a> ... <z>, the accent <\"> and the digits <0>
543 - ... <9>. It does NOT contain anything else, like
544 - <space>, <ret> or <->:
545 - Whenbeingprinteditwouldlooklikethisnotreadableatall.
546 - Taking the DVIfile as huge string allows you to find
547 - all locations of a sub-string, say
548 - \"commandlineoptions\", even those that are seperarted
549 - by linebreaks (and hyphens) or pagebreaks. In turn,
550 - there is no chance to find all those locations, where
551 - \"commandlineoptions\" is seperated by a hypenation. To
552 - keep tmview from being confused by headings, there is
553 - another rule for building up the huge text-string: any
554 - glyph outside the printable area (see <p>) is
555 - ignored. So you may setup the printable area to ignore
556 - headings when searching.
558 - Second: How is the huge-string build up?
560 - To translate the list of glyphs found in the DVIfile
561 - to a text-string, the tfm-files are asked for the
562 - encoding-scheme. This does work with dc-fonts and
563 - cm-fonts, since the following encoding-scheme names
564 - are accepted: \"ASCII\", \"TeX text\", \"TeX math italic\",
565 - \"TeX math symbols\", \"TeX typewriter text\", \"Extended
566 - TeX Font Encoding - Latin\", \"Adobe StandardEncoding\".
567 - The alphanumerics <A>...<Z>, <a>...<z>, <0> ... <9>
568 - are copied one by one to the huge text-string. Glyphs
569 - that \"look like\" a simple alphanumeric will be taken
570 - as that one it looks like. So the Tex input '\\c o',
571 - producing an 'o'-with-an-cedilla-accent, will be
572 - represented as a simple (o) in the text-string. This
573 - rule also works for all kind of ligatures. The TeX
574 - input 'ffl\\AE' will be represented by (fflAE). Any
575 - accent ON TOP of a glyph will be translated to a (\"),
576 - preceding whatever the glyph without that accent would
577 - be translated to. The TeX input '\\\"a' producing the
578 - german umlaut 'a'-with-two-dots-on-top, will be found
579 - as (\"a) in the generated text-string. The TeX input
580 - '\\aa' producing the scandinavian
581 - 'a'-with-circle-on-top will be found as (\"a) too. Any
582 - other glyphs are ignored.
584 - Third: In what does the above result?
586 - Visiting english documents, say manuals to some
587 - computer related stuff like elisp.dvi, searching for
588 - keywords works fine. Searching in documents in which
589 - extensive use of accents and funny characters is made
590 - works too, but requires some luck or/and experiance in
591 - how TeX acts on such things.
594 - Example:
596 - Take the file story.tex from the TeXbook, chapter 6,
597 - page 24. It contains the line
598 - galaxy called \\\"O\\\"o\\c c,
599 - The text-string build from the corresponding story.dvi
600 - will therfore contain
601 - galaxycalled\"O\"oc
602 - You may search for ... getting as result ...
603 - galaxy found
604 - galaxycalled found
605 - galaxy called not found
606 - d\" found
607 - galaxy.*\"O\"oc found
608 - Ooc not found
611 -<r> Re-read current DVIfile and re-draw screen.
613 - Note: <r> will not re-initialize the fontdatabase,
614 - nor the buffer for rendered eps-figures. To force
615 - everything beeing re-read, use (*)<r>.
618 -<d> Load/kill DVIfile
620 - After typing <d> you may select between <l> to load a
621 - DVIfile and <k> to kill a DVIfile.
623 - Loading a DVIFile:
625 - tmview will look for a file-bookmark belonging to that
626 - file. If there is one, it becomes the current
627 - file-bookmark. The DVIfile will be shown as left, and
628 - any defined manual-bookmarks are accessable by
629 - <w>. When loading a DVIfile for the first time, a new
630 - file-bookmark will be generated. This will be setup
631 - with default values from the command-line options and
632 - won't contain any manual-bookmarks.
634 - Killing a DVIfile:
635 - To kill a DVIfile means to kill its file-bookmark and
636 - any related manual-bookmark. Killing a DVIfile won't
637 - hurt the file itself. You don't have to kill a
638 - DVIfile just to load another one.
640 -<q> Quit tmview
642 - When quitting, a startup-file will be written. When
643 - running tmview next time, you will find almost
644 - everything as you left it.
647 -**********************************************************
648 -End of help***********************************************
649 -\n\n\n"
650 +#define HELPSTR "\n" \
651 +"LIST OF COMMANDS WITH TYPICAL ARGUMENTS ************ V 01.03\n" \
652 +"\n" \
653 +" <i>/<m> goto previous/next page \n" \
654 +"(NUM)<g> goto page NUM w.r.t. TeX-counters\n" \
655 +" <u>/<n>/<h>/<j> scroll the visible area\n" \
656 +" <f>/<c> make scrolling finer/coarser\n" \
657 +" <z> center visible area\n" \
658 +" <+>/<-> zoom in/out\n" \
659 +"(NUM)<v> set zoom-factor to NUM\n" \
660 +"\n" \
661 +" <b> set a bookmark\n" \
662 +" <w> move to a bookmark\n" \
663 +" <^> move back\n" \
664 +"\n" \
665 +" <o> display options \n" \
666 +" <x> toggle statusline-information\n" \
667 +" <t> set unit of measurement\n" \
668 +"\n" \
669 +" <l> show/hide screenmark and pagemark\n" \
670 +" <y> set pagemark at screenmark position\n" \
671 +" <a> show/hide marked rectangle\n" \
672 +" <p> show/hide printable area\n" \
673 +" <e> set page-offset and -size\n" \
674 +"\n" \
675 +" <k> show/hide half-hyper-tex-mark\n" \
676 +" <TAB> move to next href\n" \
677 +" <RET> follow current href\n" \
678 +"\n" \
679 +" <s> search for text\n" \
680 +" <*><r> re-read DVIfile, fonts, eps-figures\n" \
681 +" <d> load/kill DVIfile\n" \
682 +" <q> quit tmview\n" \
683 +"\n" \
684 +"\n" \
685 +"GENERAL USAGE *******************************************\n" \
686 +"\n" \
687 +"When everything is setup right, visiting a DVIfile with\n" \
688 +"tmview just means to navigate the visible area along that\n" \
689 +"file, using the cursor-keys. Some of the following\n" \
690 +"commands obviously require an argument, f.e. <g>.\n" \
691 +"Arguments are to be entered BEFORE executing a command.\n" \
692 +"When executed by hitting the corresponding uppercase key,\n" \
693 +"you will be asked for the argument. While the\n" \
694 +"user-interface of tmview is meant to save keystrokes, it\n" \
695 +"is not too intuitive. You may either read the following\n" \
696 +"instructions, or just do <caps-lock>.\n" \
697 +"\n" \
698 +"The cursor-keys <page-up> and <page-down> are taken as <i>\n" \
699 +"resp. <m>. The keys <pos1> and <end> select the first\n" \
700 +"resp. the last page. The cursor-keys <left> <right> <up>\n" \
701 +"and <down> do <h> <j> <u> resp. <n>. All in all this\n" \
702 +"means, that the cursor-keys do what they are meant to.\n" \
703 +"\n" \
704 +"When a mouse is connected, it moves any visible mark. When\n" \
705 +"the right or left mousebutton is no good for anything\n" \
706 +"else, moving the mouse while holding that button acts on\n" \
707 +"the visible area instead. (That sounds bad, but works out\n" \
708 +"fine) When the screenmark is shown (see <l>), the left\n" \
709 +"mouse-button sets the pagemark (see <y>) and the right\n" \
710 +"button marks a rectangle (see <a>). When the\n" \
711 +"half-hyper-mark is shown, the left mouse-button follows\n" \
712 +"the current href, if any.\n" \
713 +"\n" \
714 +"*********************************************************\n" \
715 +"NON-INTUITIVE USER-INTERFACE ****************************\n" \
716 +"*********************************************************\n" \
717 +"\n" \
718 +"To explain the way tmview expects to receive commands, a\n" \
719 +"short nomenclature used in the sequel is given:\n" \
720 +" \n" \
721 +"Any text within `<' and `>' represents a single keystroke,\n" \
722 +"while `(' and `)' mark the beginning resp. the end of a\n" \
723 +"string to enter. So <h> is about to hit the key named `h'\n" \
724 +"and (25.4) could stand for <2><5> <.><4>. The carriage-\n" \
725 +"return-key is referred by <ret>, the backspace-key or \n" \
726 +"delete-key by <del> and the escape-key by <esc>. Almost \n" \
727 +"whenever a string is expected by tmview, you may use <del>\n" \
728 +"to remove the last character you typed. So even\n" \
729 +"<2><5><6><del><.><4> results in (25.4). Note that a string\n" \
730 +"does not need to be terminated by <ret>. To simplify a\n" \
731 +"reference to a string, in this text any uppercase letters\n" \
732 +"within `(' and `)' are not meant as a string, but as the\n" \
733 +"name of some string. So we may read something like\n" \
734 +"`(PP)<h> scrolls PP percent to the left' as `typing in any\n" \
735 +"number just before <h> results in scrolling left according\n" \
736 +"to that number'.\n" \
737 +"\n" \
738 +"\n" \
739 +"COMMANDS AND ARGUMENTS***********************************\n" \
740 +"\n" \
741 +"A command is executed by typing its name, which consists\n" \
742 +"of a single character. Some of the above listed commands\n" \
743 +"take numerical arguments. Arguments are always\n" \
744 +"optional. They may be entered before executing the\n" \
745 +"command. Multiple arguments are separated by <,> or\n" \
746 +"<;>. If no argument is passed, a default is used. If an\n" \
747 +"argument is passed, it serves as the default for following\n" \
748 +"commands. Commands doing similar things share the same\n" \
749 +"default arguments.\n" \
750 +"\n" \
751 +"Example: \n" \
752 +"Typing (10)<h> results in scrolling 10% to the left and\n" \
753 +"sets the default for any scrolling commands to 10%. Thus\n" \
754 +"typing <j> afterwards results in scrolling 10% to the\n" \
755 +"right.\n" \
756 +"\n" \
757 +"\n" \
758 +"MAGIC ARGUMENT*******************************************\n" \
759 +"\n" \
760 +"As a special argument some commands accept the magic\n" \
761 +"argument <*>. It is used either to vary the command in\n" \
762 +"some way or to get the arguments from another place. <#>\n" \
763 +"is equivalent to <*> and saves you from holding down the\n" \
764 +"shift-key on some keyboards.\n" \
765 +"\n" \
766 +"<z> for example centers the visible area. It excepts as\n" \
767 +"argument the point which will be taken as origin. Since\n" \
768 +"this will become the default for a future <z>, you may\n" \
769 +"measure out the origin only once. Even quicker it is to\n" \
770 +"position the visible area by scrolling and then to do a\n" \
771 +"<*><z>. This results in taking the current position as\n" \
772 +"centered and so as default for a coming <z>.\n" \
773 +"\n" \
774 +"As another example look at the command <m>, which moves\n" \
775 +"pages forward, according to a given argument resp. a\n" \
776 +"default. By moving on the next page there are two modi\n" \
777 +"available: 1. keep the visible area; 2. do center like\n" \
778 +"<z><z>. <*><m> toggles between these two modi. So in this\n" \
779 +"case <*> acts as a kind of flag argument.\n" \
780 +"\n" \
781 +"\n" \
782 +"\n" \
783 +"SELECTING THE PAGE****************************************\n" \
784 +"\n" \
785 +"<i>/<m> Select a page relative to the current page. \n" \
786 +"\n" \
787 +" <i> moves towards the beginning of the DVIfile, while\n" \
788 +" <m> moves towards the end. A single argument (N) may\n" \
789 +" specify the amount of movement in pages. However, (N)\n" \
790 +" will NOT become the default value. The argument is (*), \n" \
791 +" the page-moving-mode is toggled. See above. \n" \
792 +"\n" \
793 +" Example: \n" \
794 +" (1)<i> selects the previous page <m> selects the next\n" \
795 +" page\n" \
796 +"\n" \
797 +"<g> Select a page with respect to TeX counters. \n" \
798 +"\n" \
799 +" A list of ten arguments (COUNT0; COUNT1; ... COUNT9)\n" \
800 +" specifies the page to be selected. <*> may be used as\n" \
801 +" wildcard. If there are more than one but less than ten\n" \
802 +" arguments given, the others will be taken as <*>.\n" \
803 +"\n" \
804 +" Example: \n" \
805 +" (26)<g> selects the first page after the current page\n" \
806 +" with a value of 26 in \\count0.\n" \
807 +"\n" \
808 +"\n" \
809 +"\n" \
810 +"MOVING AROUND ON CURRENT PAGE ******************************\n" \
811 +"\n" \
812 +"<u>/<n>/<h>/<j> Scrolling the visible area\n" \
813 +"\n" \
814 +" A single argument (PP) may be used to specify the\n" \
815 +" amount of scrolling in percent of the\n" \
816 +" screen-width. <u>/<n> resp. <up>/down> both accept\n" \
817 +" the argument (*) to toggle between: 1. stay on the\n" \
818 +" current page; 2. scroll over pages. When scrolling\n" \
819 +" over pages, you may view the whole document while\n" \
820 +" using only the single key <n>.\n" \
821 +"\n" \
822 +" Example:\n" \
823 +" (20)<h> scrolls 1/5 to the left. \n" \
824 +"\n" \
825 +"<f>/<c> Make scrolling finer/coarser\n" \
826 +"\n" \
827 +" These commands change the default argument for the\n" \
828 +" above scrolling- commands. So <f> and <c> don't move\n" \
829 +" the visible area at all, but they change the way the\n" \
830 +" scrolling-commands act.\n" \
831 +"\n" \
832 +"<z> Center the visible area\n" \
833 +"\n" \
834 +" Without any argument <z> centers horizontally only,\n" \
835 +" while <z><z> centers in both directions.\n" \
836 +" When two arguments (X,Y) are given, they describe\n" \
837 +" the point on the page, which will become the middle\n" \
838 +" of the visible area. When the argument (*) is given,\n" \
839 +" the current position is taken as centered. When the\n" \
840 +" screenmark is shown (see below <l>), and the\n" \
841 +" argument (*) is given, the position of the\n" \
842 +" screenmark becomes the center. This does move the\n" \
843 +" visible area, but it does not move the screenmark.\n" \
844 +"\n" \
845 +"\n" \
846 +"ZOOMING ****************************************************\n" \
847 +"\n" \
848 +"<v> Set the zoom-factor\n" \
849 +" \n" \
850 +" This command requires one argument (F) which must be\n" \
851 +" between 0.05 and 2. F will become the zoom-factor\n" \
852 +" and the visible-area will be redrawn. Use (*)<v> to \n" \
853 +" adjust the zoom-factor such that the page horizontaly \n" \
854 +" fits the visible-area.\n" \
855 +"\n" \
856 +" If the zoom-factor is 1, the pixels found in pk-files \n" \
857 +" are just copied one by one to the screen. Since the\n" \
858 +" resolution of our days screens seems to be less than\n" \
859 +" that of our days printers, and since you may still\n" \
860 +" want to use the same pk-files for printing and\n" \
861 +" viewing, F=1 usually results in a magnification. So\n" \
862 +" when you're just reading some text in some DVIfile\n" \
863 +" you will set F to something like 0.3, depending on\n" \
864 +" the involved resolutions. When the screenmark is\n" \
865 +" visible (see <l>) the position of the screenmark is\n" \
866 +" taken as the origin of zooming, i.e. it is fixed. \n" \
867 +" When the screenmark is not visible, the middle of the \n" \
868 +" screen is fixed. The current zoom-factor is displayed \n" \
869 +" in the optional statusline, see <x>.\n" \
870 +"\n" \
871 +" There are two zooming modi. The integer modus \n" \
872 +" requieres 1/f to be an integer. This modus is quite \n" \
873 +" fast, so good values are F=0.5, 0.333, 0.25, 0.2, \n" \
874 +" 0.167 etc. The good thing about the slow modus is, \n" \
875 +" that it allows you to choose the zoom-factor \n" \
876 +" arbitrary (between 0.05 and 2). So poor students with \n" \
877 +" small screens might find some optimum to make the \n" \
878 +" text fit and still be readable. The bad thing about \n" \
879 +" the slow modus is that it is slow. But since once \n" \
880 +" zoomed glyphs are kept in memory, this slowness only \n" \
881 +" hurts the first few pages after changing the\n" \
882 +" zoom-factor. Modus selection is done by the display \n" \
883 +" options <o>. \n" \
884 +"\n" \
885 +"<+>/<-> Zoom in/out\n" \
886 +"\n" \
887 +" Increase/decrease the zoom-factor. When in the fast\n" \
888 +" modus, step through the fast values only (see\n" \
889 +" above). When an argument (PP) is given, it is taken\n" \
890 +" as the amount of increasing/decreasing in percent of\n" \
891 +" the current zoom-factor. This is likely to result in\n" \
892 +" the slow modus.\n" \
893 +"\n" \
894 +"\n" \
895 +"BOOKMARKS **************************************************\n" \
896 +"\n" \
897 +"A bookmark remembers what is seen on the screen. That is\n" \
898 +"the DVIfile, the page within that file, the position of the\n" \
899 +"visable area and the zoom-factor. There are three kind of\n" \
900 +"bookmarks ...\n" \
901 +"\n" \
902 +"file-bookmarks:\n" \
903 +"Each file visited has a file-bookmark, containing the above\n" \
904 +"information about what was seen on the screen when visited\n" \
905 +"the last time, plus some information on the file, that is\n" \
906 +"the paper-offset and -position, the location of the\n" \
907 +"printable-area. file-bookmarks are generated automaticly.\n" \
908 +"This results in easy re-visiting a DVIfile: you'll find it\n" \
909 +"as left. A file-bookmark is removed by killing the DVIfile\n" \
910 +"with <d><k>, see <d> below.\n" \
911 +"\n" \
912 +"back-bookmarks:\n" \
913 +"When searching a text-string, following a href or moving to\n" \
914 +"a bookmark, the position within the DVIfile might be\n" \
915 +"changed to somewhere far far away. To simplify recovering\n" \
916 +"fromsuch excursions, a back-bookmark will be generated\n" \
917 +"automaticly. To prevent getting fed up with thousands of\n" \
918 +"back-bookmarks, the total number of theese is limited. See\n" \
919 +"<^> below.\n" \
920 +"\n" \
921 +"manual-bookmarks:\n" \
922 +"After all you may install your own bookmarks, marking often\n" \
923 +"visited places, say in some manuals. manual-bookmarks are\n" \
924 +"named by a number. This number has to be unique whithin\n" \
925 +"the DVIfile they belong to. To define a manual-bookmark\n" \
926 +"use <b>. Since manual-bookmarks belong to the DVIfile they\n" \
927 +"are defined on, they get lost, when that DVIfile is killed\n" \
928 +"by <d><k>.\n" \
929 +"\n" \
930 +"All kind of bookmarks are kept in a ring-buffer. There is a\n" \
931 +"so called current bookmark of each type. Visiting the\n" \
932 +"bookmarks along the ring-buffer is done by <w> for file-\n" \
933 +"and manual-bookmarks, while <^> acts on back-bookmarks.\n" \
934 +"\n" \
935 +"<b> Define/undefine manual-bookmark. \n" \
936 +"\n" \
937 +" When the current position is not already defined as\n" \
938 +" a manual-bookmark, <b> defines one. When an single\n" \
939 +" numeric argument (NUM) is given, NUM will be the\n" \
940 +" name of the newly defined bookmark. With no\n" \
941 +" argument, a name will be generated automaticly. See\n" \
942 +" <w> below, for how to visit manual-bookmarks. When\n" \
943 +" the current position is already defined as a\n" \
944 +" manual-bookmark, <b> undefines that manual-bookmark.\n" \
945 +"\n" \
946 +"<w> Move to bookmark.\n" \
947 +"\n" \
948 +" When a single numeric argument (NUM) is given, <w>\n" \
949 +" moves to the manual-bookmark named NUM, if\n" \
950 +" any. Since manual bookmarks are bound to DVIfiles,\n" \
951 +" the current DVIfile will never change in that\n" \
952 +" case. If no argument is given, <w> goes moves the\n" \
953 +" postion either thrue the ring-buffer of\n" \
954 +" file-bookmarks or thrue the one of\n" \
955 +" manual-bookmarks. To toggle between theese two modi,\n" \
956 +" use the magic argument <*>.\n" \
957 +"\n" \
958 +"<^> Move back\n" \
959 +" \n" \
960 +" Move to the latest back-bookmark, if any. When a\n" \
961 +" single numeric argument (TOTAL) is given, keep the\n" \
962 +" TOTAL latest back-bookmarks and discard all the\n" \
963 +" others.\n" \
964 +"\n" \
965 +"\n" \
966 +"CHOOSING WHAT'S ON THE DISPLAY *****************************\n" \
967 +"\n" \
968 +"<o> Display options\n" \
969 +"\n" \
970 +" This command collects a number of general options \n" \
971 +" on how the things get on the screen. Use the cursor\n" \
972 +" keys (or <u>/<n>/<h>/<h>) to navigate.\n" \
973 +"\n" \
974 +" > Greyscales. When the zoom-factor is less than 1, \n" \
975 +" the glyphs may be displayed using grey-levels, making \n" \
976 +" them more smooth. This takes some memory, so you are \n" \
977 +" allowed to switch it off. On high-res displays there \n" \
978 +" is no need for greyscaling anyway.\n" \
979 +"\n" \
980 +" > Eps-rendering. There is limited support for \n" \
981 +" rendering eps-files by running ghostscript. However, \n" \
982 +" this sometimes is quite slow and memory intensive, so \n" \
983 +" you may turn it off. If rendering is enabled the \n" \
984 +" results are buffered. Hence, if the eps-files are \n" \
985 +" updated by some graphics program, you need to do a \n" \
986 +" <*><r> to force rerendering. To disable certain \n" \
987 +" eps-files individually, abort the rendering process \n" \
988 +" by <esc>.\n" \
989 +"\n" \
990 +" > Double-page. There is also limited support for \n" \
991 +" viewing two pages beside each other. Again their\n" \
992 +" is some memory required to keep it all buffered.\n" \
993 +" You may disable double paged viewing entirely. You\n" \
994 +" may let tmview deceide on basis of the zoom-factor.\n" \
995 +" Or you may permanently enable this feature.\n" \
996 +"\n" \
997 +" > Zooming. There is a fast zooming mode allowing\n" \
998 +" only zomming by 1/f where f is required to be an\n" \
999 +" integer. And there is an arbitrary mode to be\n" \
1000 +" selected.\n" \
1001 +"\n" \
1002 +"<x> Toggle statusline-information\n" \
1003 +"\n" \
1004 +" While the standard statusline shows you the\n" \
1005 +" page-number of the current page and the arguments\n" \
1006 +" you are about to enter, you may select optional\n" \
1007 +" information for measuring out distances and so. See\n" \
1008 +" below.\n" \
1009 +"\n" \
1010 +"<t> Set unit of measurement\n" \
1011 +"\n" \
1012 +" Whenever you specify arguments which are to describe\n" \
1013 +" a point on the page, this is done w.r.t. a unit of\n" \
1014 +" measurement, i.e. cm, mm, a.s.o.. This unit is also\n" \
1015 +" used, when the position of a mark is displayed in\n" \
1016 +" the statusline.\n" \
1017 +"\n" \
1018 +"\n" \
1019 +"MEASURING **************************************************\n" \
1020 +"\n" \
1021 +"To allow you to measure distances on the page, there are\n" \
1022 +"two marks, the screenmark, which is fixed on the physical\n" \
1023 +"screen you're looking at, and the pagemark, which is fixed\n" \
1024 +"on the DVIfiles page. When you move the visible-area, the\n" \
1025 +"screenmark acts as drawn with edding on your monitor. The\n" \
1026 +"pagemark acts as drawn on the page. The optional statusline\n" \
1027 +"tells the position of the pagemark relative to the corner\n" \
1028 +"of the sheet of paper you're viewing. It also tells the\n" \
1029 +"position of the screenmark relative to the pagemark. To\n" \
1030 +"measure distances you first may switch this marks on, using\n" \
1031 +"<l>. When the marks are shown, the scrolling commands don't\n" \
1032 +"act on the visible area anymore, but move the screenmark. \n" \
1033 +"For that case only moving the screenmark at the boarder of\n" \
1034 +"the screen results in scrolling. To move the pagemark just\n" \
1035 +"move the screenmark at the desired position and use <y> to\n" \
1036 +"make the pagemark follow.\n" \
1037 +" \n" \
1038 +"<l> Show/hide screenmark and pagemark\n" \
1039 +"\n" \
1040 +" This commands takes the two arguments\n" \
1041 +" (PM_X;PM_Y). The pagemark is put at position PM_X\n" \
1042 +" PM_Y w.r.t. the upper left corner of the page. The\n" \
1043 +" Screenmark may be moved with the scrolling-commands.\n" \
1044 +"\n" \
1045 +"<y> Set pagemark at the position of the screenmark\n" \
1046 +" \n" \
1047 +"Beside of these marks there are three rectangles for\n" \
1048 +"measurement. First there is the boarder of the paper setup\n" \
1049 +"by the command-line options -h,-v and -p. Then there is\n" \
1050 +"the printable area, setup with the -k command-line option.\n" \
1051 +"Third the so called marked rectangle used.\n" \
1052 +"\n" \
1053 +"<a> Show/hide marked rectangle\n" \
1054 +"\n" \
1055 +" The four arguments (LEFT,TOP,WIDTH,HIGHT) specify\n" \
1056 +" the position on page an the size of the marked\n" \
1057 +" rectangle. When pagemark and screenmark are shown,\n" \
1058 +" their positions are used as default. When they are\n" \
1059 +" hidden, the last position of the marked rectangle is\n" \
1060 +" used as default.\n" \
1061 +"\n" \
1062 +"<p> Show/hide printable area \n" \
1063 +" \n" \
1064 +" The four arguments (LEFT,RIGHT,TOP,BOTTOM) specify\n" \
1065 +" the margins of the printable area, w.r.t. the\n" \
1066 +" boarder of the page. When pagemark and screenmark\n" \
1067 +" are shown, the argument (*) sets the printable area\n" \
1068 +" to the rectangle described by screenmark and\n" \
1069 +" pagemark. When they are hidden, (*) takes the\n" \
1070 +" command-line-options resp. defaults -k of the\n" \
1071 +" printable area.\n" \
1072 +"\n" \
1073 +"<e> Set paper-offset and -size \n" \
1074 +"\n" \
1075 +" The four arguments (HOFF;VOFF;WIDTH;HEIGHT) specify\n" \
1076 +" the boarder of the page. Have the top-left corner of\n" \
1077 +" a sheet of paper in mind. Then (HOFF,VOFF) is the\n" \
1078 +" offset of the DVIfile's origin to the left boarder\n" \
1079 +" of the paper. Standard values are\n" \
1080 +" HOFF=VOFF=2.54cm. WIDTH and HEIGHT are the width and\n" \
1081 +" the height of the sheet of paper. The sheet of paper\n" \
1082 +" is represented only by a frame on the screen. It\n" \
1083 +" does not affect the drawing of the DVIfile.\n" \
1084 +"\n" \
1085 +" When pagemark and screenmark are shown, the argument\n" \
1086 +" (*) sets the boarder of the page to the rectangle\n" \
1087 +" described by screenmark and pagemark. When they are\n" \
1088 +" hidden, (*) takes the command-line-options\n" \
1089 +" resp. defaults -h,-v and -p.\n" \
1090 +"\n" \
1091 +"\n" \
1092 +"HALF-HYPER *************************************************\n" \
1093 +"\n" \
1094 +"tmview does some of the fancy hyper-tex things. I talk\n" \
1095 +"about HALF-hyper-tex, because tmview follows only links\n" \
1096 +"which point to somewhere within the currently visited\n" \
1097 +"dvi-file. So there is no connection to the net or so. But\n" \
1098 +"you might find it usefull (when editing a major project) to\n" \
1099 +"view an equation number this-and-that by clicking on\n" \
1100 +"this-and-that whereever the text refers to that equation.\n" \
1101 +"For information about hyper-tex, related macropackages and\n" \
1102 +"fully compatible viewer scan the net ...\n" \
1103 +"\n" \
1104 +"<k> Show/hide half-hyper-mark\n" \
1105 +"<TAB> Goto next href\n" \
1106 +"<RET> Follow current href, if any \n" \
1107 +"\n" \
1108 +"\n" \
1109 +"MISC *******************************************************\n" \
1110 +"\n" \
1111 +"<s> Search for text\n" \
1112 +"\n" \
1113 +" You will be asked for the text-string to be searched.\n" \
1114 +" You may enter a regular expression describing that\n" \
1115 +" string, that includes especially just to enter the\n" \
1116 +" string as it is.\n" \
1117 +"\n" \
1118 +" tmview will take the entire DVIfile as one huge\n" \
1119 +" text-string and then search for the next substring,\n" \
1120 +" fitting the regular expression you've enterd. Thereby\n" \
1121 +" \"next\" is ment with respect to the current page.\n" \
1122 +"\n" \
1123 +" So far this sounds quite easy, but there are some ugly\n" \
1124 +" details, based on the fact, that a DVIfile contains\n" \
1125 +" information on how to draw a bitmap representing your\n" \
1126 +" text. It does not contain information about from what\n" \
1127 +" characters in which order your text is made up. Even\n" \
1128 +" the PKfiles used to draw your text consist only of\n" \
1129 +" lots of glyphs but no character-codes, like ASCII or\n" \
1130 +" so. Building a huge text-string from a DVIfile is some\n" \
1131 +" kind of guessing.\n" \
1132 +"\n" \
1133 +" Fisrt: What kind of huge-string is build from the DVIfile?\n" \
1134 +"\n" \
1135 +" This string will consists of the letters <A> ... <Z>,\n" \
1136 +" <a> ... <z>, the accent <\"> and the digits <0>\n" \
1137 +" ... <9>. It does NOT contain anything else, like\n" \
1138 +" <space>, <ret> or <->:\n" \
1139 +" Whenbeingprinteditwouldlooklikethisnotreadableatall. \n" \
1140 +" Taking the DVIfile as huge string allows you to find\n" \
1141 +" all locations of a sub-string, say\n" \
1142 +" \"commandlineoptions\", even those that are seperarted\n" \
1143 +" by linebreaks (and hyphens) or pagebreaks. In turn,\n" \
1144 +" there is no chance to find all those locations, where\n" \
1145 +" \"commandlineoptions\" is seperated by a hypenation. To\n" \
1146 +" keep tmview from being confused by headings, there is\n" \
1147 +" another rule for building up the huge text-string: any\n" \
1148 +" glyph outside the printable area (see <p>) is\n" \
1149 +" ignored. So you may setup the printable area to ignore\n" \
1150 +" headings when searching.\n" \
1151 +"\n" \
1152 +" Second: How is the huge-string build up?\n" \
1153 +"\n" \
1154 +" To translate the list of glyphs found in the DVIfile\n" \
1155 +" to a text-string, the tfm-files are asked for the\n" \
1156 +" encoding-scheme. This does work with dc-fonts and\n" \
1157 +" cm-fonts, since the following encoding-scheme names\n" \
1158 +" are accepted: \"ASCII\", \"TeX text\", \"TeX math italic\",\n" \
1159 +" \"TeX math symbols\", \"TeX typewriter text\", \"Extended\n" \
1160 +" TeX Font Encoding - Latin\", \"Adobe StandardEncoding\".\n" \
1161 +" The alphanumerics <A>...<Z>, <a>...<z>, <0> ... <9>\n" \
1162 +" are copied one by one to the huge text-string. Glyphs\n" \
1163 +" that \"look like\" a simple alphanumeric will be taken\n" \
1164 +" as that one it looks like. So the Tex input '\\c o',\n" \
1165 +" producing an 'o'-with-an-cedilla-accent, will be\n" \
1166 +" represented as a simple (o) in the text-string. This\n" \
1167 +" rule also works for all kind of ligatures. The TeX\n" \
1168 +" input 'ffl\\AE' will be represented by (fflAE). Any\n" \
1169 +" accent ON TOP of a glyph will be translated to a (\"),\n" \
1170 +" preceding whatever the glyph without that accent would\n" \
1171 +" be translated to. The TeX input '\\\"a' producing the\n" \
1172 +" german umlaut 'a'-with-two-dots-on-top, will be found\n" \
1173 +" as (\"a) in the generated text-string. The TeX input\n" \
1174 +" '\\aa' producing the scandinavian\n" \
1175 +" 'a'-with-circle-on-top will be found as (\"a) too. Any\n" \
1176 +" other glyphs are ignored.\n" \
1177 +"\n" \
1178 +" Third: In what does the above result?\n" \
1179 +"\n" \
1180 +" Visiting english documents, say manuals to some\n" \
1181 +" computer related stuff like elisp.dvi, searching for\n" \
1182 +" keywords works fine. Searching in documents in which\n" \
1183 +" extensive use of accents and funny characters is made\n" \
1184 +" works too, but requires some luck or/and experiance in\n" \
1185 +" how TeX acts on such things.\n" \
1186 +"\n" \
1187 +"\n" \
1188 +" Example: \n" \
1189 +"\n" \
1190 +" Take the file story.tex from the TeXbook, chapter 6, \n" \
1191 +" page 24. It contains the line\n" \
1192 +" galaxy called \\\"O\\\"o\\c c,\n" \
1193 +" The text-string build from the corresponding story.dvi\n" \
1194 +" will therfore contain\n" \
1195 +" galaxycalled\"O\"oc\n" \
1196 +" You may search for ... getting as result ...\n" \
1197 +" galaxy found\n" \
1198 +" galaxycalled found\n" \
1199 +" galaxy called not found\n" \
1200 +" d\" found\n" \
1201 +" galaxy.*\"O\"oc found\n" \
1202 +" Ooc not found\n" \
1203 +" \n" \
1204 +" \n" \
1205 +"<r> Re-read current DVIfile and re-draw screen.\n" \
1206 +"\n" \
1207 +" Note: <r> will not re-initialize the fontdatabase,\n" \
1208 +" nor the buffer for rendered eps-figures. To force\n" \
1209 +" everything beeing re-read, use (*)<r>.\n" \
1210 +"\n" \
1211 +"\n" \
1212 +"<d> Load/kill DVIfile\n" \
1213 +"\n" \
1214 +" After typing <d> you may select between <l> to load a \n" \
1215 +" DVIfile and <k> to kill a DVIfile. \n" \
1216 +" \n" \
1217 +" Loading a DVIFile: \n" \
1218 +"\n" \
1219 +" tmview will look for a file-bookmark belonging to that\n" \
1220 +" file. If there is one, it becomes the current\n" \
1221 +" file-bookmark. The DVIfile will be shown as left, and\n" \
1222 +" any defined manual-bookmarks are accessable by\n" \
1223 +" <w>. When loading a DVIfile for the first time, a new\n" \
1224 +" file-bookmark will be generated. This will be setup\n" \
1225 +" with default values from the command-line options and\n" \
1226 +" won't contain any manual-bookmarks.\n" \
1227 +"\n" \
1228 +" Killing a DVIfile:\n" \
1229 +" To kill a DVIfile means to kill its file-bookmark and\n" \
1230 +" any related manual-bookmark. Killing a DVIfile won't\n" \
1231 +" hurt the file itself. You don't have to kill a\n" \
1232 +" DVIfile just to load another one.\n" \
1233 +"\n" \
1234 +"<q> Quit tmview \n" \
1235 +" \n" \
1236 +" When quitting, a startup-file will be written. When\n" \
1237 +" running tmview next time, you will find almost\n" \
1238 +" everything as you left it.\n" \
1239 +"\n" \
1240 +"\n" \
1241 +"**********************************************************\n" \
1242 +"End of help***********************************************\n" \
1243 +"\n\n\n"
1245 char helpstr[]=HELPSTR;
1247 --- tmview-01.03.orig/src/readpk.c
1248 +++ tmview-01.03/src/readpk.c
1249 @@ -752,10 +752,10 @@
1250 theChar->bmp2.h = CEIL(theChar->bmp.h / fshrink) +2;
1252 if(firstrows<=0 || firstcols<=0)
1253 - pfprot("IMPORTANT DEBUGINFORMATION
1254 -break with fro %d fco %d
1255 -fshr %f hof %d vof %d hof2 %d vof2 %d\n",firstrows,firstcols,
1256 - fshrink,theChar->hof,theChar->vof,theChar->hof2,theChar->vof2);
1257 + pfprot("IMPORTANT DEBUG INFORMATION\n"
1258 + "break with fro %d fco %d\n"
1259 + "fshr %f hof %d vof %d hof2 %d vof2 %d\n",firstrows,firstcols,
1260 + fshrink,theChar->hof,theChar->vof,theChar->hof2,theChar->vof2);
1263 theChar->bmp2.type=GREYSCALE;
1264 @@ -877,8 +877,8 @@
1265 exit(1);
1268 -/*pfprot("DEBUG
1269 -fshr %f hof %d vof %d hof2 %d vof2 %d\n",
1270 +/*pfprot("DEBUG\n"
1271 + "fshr %f hof %d vof %d hof2 %d vof2 %d\n",
1272 fshrink, theChar->hof,theChar->vof,theChar->hof2,theChar->vof2);
1273 pfprot("srcw %d srch %d destw %d desth %d \n",
1274 theChar->bmp.w,theChar->bmp.h,theChar->bmp2.w,theChar->bmp2.h); */
1275 @@ -902,8 +902,8 @@
1276 topweight=1-(CEIL(fi)-fi);
1277 botweight=1-((fi-frows)-FLOOR(fi-frows));
1279 - /* pfprot("\nrow info at fi %f
1280 -fr %f tw %f bw %f oy %d oh %d iy %d ih %d\n",
1281 + /* pfprot("\nrow info at fi %f\n"
1282 + "fr %f tw %f bw %f oy %d oh %d iy %d ih %d\n",
1283 fi,frows,topweight,botweight,oy,oh,iy,ih); */
1285 m= BITS_PER_BMUNIT -GREYSCALE;
1286 @@ -919,8 +919,8 @@
1287 ix=MIN(CEIL(fj)+theChar->hof,theChar->bmp.w);
1288 iw=MAX(0,MIN(FLOOR(fj+fcols)-CEIL(fj),theChar->bmp.w-ix));
1290 - /*pfprot(" col info at fj %f
1291 - fc %f ox %d ow %d ix %d iw %d\n",fj,fcols,ox,ow,ix,iw);*/
1292 + /*pfprot(" col info at fj %f\n"
1293 + "fc %f ox %d ow %d ix %d iw %d\n",fj,fcols,ox,ow,ix,iw);*/
1295 leftweight=1-(fj-FLOOR(fj));
1296 rightweight=1-(CEIL(fj+fcols)-fj-fcols);
1297 @@ -1039,10 +1039,10 @@
1298 theChar->bmp2.h = CEIL(theChar->bmp.h / fshrink) +2;
1300 if(firstrows<=0 || firstcols<=0)
1301 - pfprot("IMPORTANT DEBUGINFORMATION
1302 -break with fro %d fco %d
1303 -fshr %f hof %d vof %d hof2 %d vof2 %d\n",firstrows,firstcols,
1304 - fshrink, theChar->hof,theChar->vof,theChar->hof2,theChar->vof2);
1305 + pfprot("IMPORTANT DEBUG INFORMATION\n"
1306 + "break with fro %d fco %d\n"
1307 + "fshr %f hof %d vof %d hof2 %d vof2 %d\n",firstrows,firstcols,
1308 + fshrink, theChar->hof,theChar->vof,theChar->hof2,theChar->vof2);
1311 theChar->bmp2.w = CEIL(theChar->bmp.w / fshrink) +2;
1312 --- tmview-01.03.orig/lX/writelx.c
1313 +++ tmview-01.03/lX/writelx.c
1314 @@ -129,9 +129,9 @@
1315 if(ibytes_per_pixel == 3) ibytes_per_pixel =4;
1317 if(ibytes_per_pixel != IBYTES_PER_PIXEL) {
1318 - pfprot("\n
1319 -warning: display: found %d-bit depth while optimized for %d-bit.
1320 - Recompile for better performance.\n", offimage->depth, IBYTES_PER_PIXEL*8);
1321 + pfprot("\n"
1322 + "warning: display: found %d-bit depth while optimized for %d-bit.\n"
1323 + "Recompile for better performance.\n", offimage->depth, IBYTES_PER_PIXEL*8);
1324 setvar();
1325 } else {
1326 pfverb("writelx: using built in %d-bit pixmap functions on a %d-bit display\n",