home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / s / stex2-18.zip / SeeTeX / Xtex / Xtex.AD < prev    next >
Text File  |  1992-06-25  |  29KB  |  917 lines

  1. !#
  2. !# File:         Xtex.ad
  3. !# Description:  Application Default: put in ...app-defaults/Xtex
  4. !# Author:       Dirk Grunwald
  5. !#
  6. !# 
  7. !#  Copyright 1989 Dirk Grunwald
  8. !#  
  9. !#  Permission to use, copy, modify, distribute, and sell this software
  10. !#  and its documentation for any purpose is hereby granted without fee,
  11. !#  provided that the above copyright notice appear in all copies and that
  12. !#  both that copyright notice and this permission notice appear in
  13. !#  supporting documentation, and that the name of Dirk Grunwald or M.I.T.
  14. !#  not be used in advertising or publicity pertaining to distribution of
  15. !#  the software without specific, written prior permission.  Dirk
  16. !#  Grunwald and M.I.T. makes no representations about the suitability of
  17. !#  this software for any purpose.  It is provided "as is" without express
  18. !#  or implied warranty.
  19. !#  
  20. !#  DIRK GRUNWALD AND M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
  21. !#  SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  22. !#  FITNESS, IN NO EVENT SHALL M.I.T.  BE LIABLE FOR ANY SPECIAL, INDIRECT
  23. !#  OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
  24. !#  OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  25. !#  OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  26. !#  OR PERFORMANCE OF THIS SOFTWARE.
  27. !#  
  28. !#  Author:
  29. !#      Dr. Dirk Grunwald
  30. !#      Dept. of Computer Science
  31. !#      Campus Box 430
  32. !#      Univ. of Colorado, Boulder
  33. !#      Boulder, CO 80309
  34. !#  
  35. !#      grunwald@colorado.edu
  36. !#      
  37. !#  
  38. !# Please send any improvements, bug fixes, useful modifications, and comments
  39. !# to grunwald@boulder.colorado.edu
  40. !#
  41.  
  42. !#
  43. !# Variables to make installation a little easier
  44. !#
  45. *.incorrectlyInstalled: false
  46. *.resourcesVersion: RESOURCES_VERSION
  47. *.helpText:\
  48. Welcome to Xtex, Version RESOURCES_VERSION\n\
  49. Copyright(C) 1989, 1990 Dirk Grunwald\n
  50.  
  51. !#######################################################################
  52. !#
  53. !# The automatic font building code comes from Morry Katz
  54. !# (katz@rpal.com, katz@cs.stanford.edu)
  55. !#
  56. !#######################################################################
  57. !# Comand to build fonts:
  58. !#    %n will be replaced by the font name
  59. !#    %d will be replaced by the dpi
  60. !#    %b will be replaced by the base dpi of the display device
  61. !#    %m will be replaced by the magnification
  62. !# For a server and client on the same machine the following is recommended:
  63. !#   Xtex*.makeFont:TeXtoXfont %n %d %b %m MODE FONTCACHEDIR
  64. !#    MODE should be replaced by the metafont mode_def for the server's
  65. !#        display
  66. !#    FONTCACHEDIR should be replaced by the directory in which the .bdf 
  67. !#        and/or .snf font files which are built should be stored (this 
  68. !#        directory must be in the server's font search path for correct
  69. !#        operation).
  70. !# For execution when the client is on a different machine than the server 
  71. !# the following is recommended (note that TeXtoXfont and mftodbf must exist 
  72. !# on the server):
  73. !#   Xtex*.makeFont:rsh SERVER -l USER TeXtoXfont %n %d %b %m MODE FONTCACHEDIR
  74. !#      SERVER should be replaced by the name of the X server.
  75. !#      USER should be replaced by the username of the user whose account 
  76. !#        should be used to run the script.  (The clinet must have rsh access 
  77. !#        to the server for this to work.)
  78. !# In those rare cases in which the server and client are different and the 
  79. !# client knows how to build fonts for the server which the server cannot 
  80. !# build on its own the following is recommended:
  81. !#   Xtex*.makeFont:TeXtoXfont.remote %n %d %b %m MODE FONTCACHEDIR SERVER USER
  82. !#
  83. !# Xtex*.makeFont:TeXtoXfont %n %d %b %m METAFONT_MODE_DEF /usr/local/lib/X11/fonts/100dpi/tex
  84. *.makeFont: XTEX_MAKE_FONT
  85. *.automakeFont: false
  86.  
  87. !#
  88. !#    Font specifications:
  89. !#
  90. !
  91. !#    This specifies the location of the TFM files that xtex needs to
  92. !#    determine true font widths.
  93. !
  94. *.tfmPath: XTEX_TFM_PATH
  95.  
  96. ! Really two font paths are needed, one for the MIT server, one for XNeWS.
  97. ! Since XNeWS is more forgiving about bogus font paths we always use the MIT
  98. ! font path here and rely on XNeWS users setting their path correctly in
  99. ! advance.
  100. *.fontPath: XTEX_FONT_PATH
  101.  
  102. !
  103. !# Note that the sun does not have 1x1 pixels; they vary slightly,
  104. !# at least on mine. In cases like this, we use the horizontal dpi
  105. !# as the size for selecting fonts. If you don't specify dpiVert,
  106. !# then it defaults to the value in `dpiHoriz'. It they're the same,
  107. !# it's better to leave dpiVert unspecified; otherwise, you need
  108. !# to specify -dpiVert on the Xtex command line to change the vertical
  109. !# spacing.
  110. !# You can use floats, for dpiHoriz and dpiVert
  111. !#
  112. !#    Valid magnifications:
  113. !#    
  114. !#    For shrunken fonts: 1000,500,333,250,100
  115. !#    For screen resolution fonts: 500, 1000, 1098, 1200, 1440, 1728
  116. !#                2074, 2489
  117. !#
  118. !#    Note: your site may not have 1/2 sizes, e.g. 11point is cmr10 at
  119. !#    1098. If you set your `large' mag to 1440, you'd need cmr10 @ 1581
  120. !#    to match.
  121. !
  122. !#    Use these if you're using shrunken 300dpi fonts
  123. !
  124. !#    *.mag:333
  125. !#    *.smallMag:333
  126. !#    *.largeMag:500
  127. !#    *.dpiHoriz:300
  128. !#    *.dpiVert:300
  129. !
  130. !# Use these if you're using metafont generated 85dpi fonts for Suns.
  131. *.dpiHoriz: 85
  132. *.dpiVert: 83.5
  133. *.mag: 1000
  134. *.smallMag: 1000
  135. *.largeMag: 1440
  136.  
  137. !#
  138. !#
  139. !#    These specify the top and left offsets, in inches. If you decrease
  140. !#    these, and don't intrude on the 1inch default TeX margins, you can
  141. !#    view more of your document at once.
  142. !#
  143. *.topOffset: 1
  144. *.leftOffset: 1
  145. !#
  146. !#    This is the size, in inches, of the intended paper. If you
  147. !#    swap these values, you can get a landcape printing.
  148. !#
  149. *.paperWidth:8.5
  150. *.paperHeight:11
  151. !#
  152. !#    Xtex attempts to size the final dvi page to your display.
  153. !#    On a sun3, I use twm & specify no header bar, 2bit bourders
  154. !#    and a maxPageHt of 890, paperHeight of 10.4 and topOffset of 0.75.
  155. !#    This lets me see an entire page without having to move it around
  156. !#    while stilling being able to look at it in large mode.
  157. !#
  158. *.pageMaxWd: 0
  159. *.pageMaxHt: 0
  160.  
  161. !#
  162. !#    The DviPage widget is much faster when you enable backing store,
  163. !#    If it's available, do it.
  164. !#    However, this has caused problems on microvaxen, and chews up
  165. !#    server memory.
  166. !#    Backing store also makes the PMAX UWS2.2 server suck down VM.
  167. !#    
  168. *.DviPage.backingStore: default
  169.  
  170. !#
  171. !#    If useButtons is True, each dviPage will have a row of buttons
  172. !#    across the top to select forward-page, etc.
  173. !#
  174. *.useButtons: True
  175. !#
  176. !#    If updateNames is True, the window and icon names will be updated
  177. !#    to reflect the current DVI file and page number.
  178. !#
  179. *.updateNames: True
  180. !#
  181. !#    pushOnStart can be either 'open' or 'copy', and opens or copy&opens
  182. !#    any file name given to xtex. This makes it similar to e.g., xdvi.
  183. !#
  184. *.pushOnStart:open
  185. !#
  186. !#    A 'diversion' is when you want to visit another page for a little
  187. !#    while. This is normally signalled by a 'xtex special' implementing
  188. !#    a button. If divertByPush is *true*, you'll just ``push'' the current
  189. !#    page and view the new page within the current window. If divertByPush
  190. !#    is false, you'll create a new page in which to view the diversion.
  191. !#
  192. *.divertByPush:true
  193. !#
  194. !#    The ``print'' command is used to print selected pages or the
  195. !#    entire document. You will be asked to confirm the print command
  196. !#    before it is issued. Myself, I specify this in my .resources
  197. !#    file because ``lpr -d'' doesn't work on my machine.
  198. !#
  199. *.print:lpr -d %f 
  200. !# *.print:dvips %f 
  201. !#
  202. !#    If autoSize is true, the dviPages will shrink or expand to fit
  203. !#    the paper size at the current magnification.
  204. !#
  205. *.autoSize:True
  206.  
  207. !#
  208. !#    For persnicity window manager
  209. !#
  210. *.input:True
  211.  
  212. !#
  213. !#    The width of the top level display
  214. !#
  215.  
  216. !#*.topLevel.width:                     525
  217. *.topLevel.fileName.width:                 525
  218. *.topLevel.markMenuViewPort.width:             525
  219. !# *.topLevel.markMenuViewPort.markMenuList.width:     510
  220. *.topLevel.directoryLabel.width:            525
  221. *.topLevel.fileLabel.width:             525
  222.  
  223. *.topLevel.dialogText.height:    150
  224. *.topLevel.dialogText.width:     525
  225. *.topLevel.dialogText.scrollVertical: Always
  226. *.topLevel.dialogText.scrollHorizontal: Never
  227. *.topLevel.dialogText.Wrap: line
  228. *.topLevel.dialogText.resize: never
  229.  
  230. *.topLevel.directoryLabel.font: fixed
  231. *.topLevel.fileLabel.font: fixed
  232.  
  233. *.markMenuViewPort.height: 50
  234. *.markMenuViewPort.resize:True
  235. *.markMenuViewPort.resizable:False
  236. *.markMenuViewPort.allowHoriz:False
  237. *.markMenuViewPort.allowVert:True
  238. *.markMenuViewPort.forceBars:True
  239.  
  240. *.markMenuList.verticalList:False
  241. *.markMenuList.resize:False
  242. *.markMenuList.resizable:False
  243. *.markMenuList.translations:#override\n\
  244.     <Btn1Up>:        Notify()\n\
  245.     <Btn2Up>:        xtex-mark-all(clear)\n\
  246.     <Btn3Up>:        xtex-mark-all(toggle)
  247.  
  248. !#
  249. !#    Translations for the filename entry widget. Note that the pressing
  250. !#    return *.down* opens the file. The upstroke is used to pop up a page.
  251. !#
  252. *.topLevel.fileName.translations:#override\n\
  253.     <KeyDown>Return: xtex-file(reopen)\n\
  254.     <KeyUp>Return: xtex-page-popup()\n\
  255.     <Key>Escape:        xtex-noop() \n\
  256.     Ctrl<Key>M:        xtex-noop() \n\
  257.     Meta<Key>]:        xtex-noop() \n\
  258.     Ctrl<Key>[:        xtex-noop() \n\
  259.     Ctrl<Key>N:        xtex-noop() \n\
  260.     Ctrl<Key>P:        xtex-noop() \n\
  261.     Ctrl<Key>V:        xtex-noop() \n\
  262.     Meta<Key>V:        xtex-noop() \n\
  263.     Ctrl<Key>Z:        xtex-noop() \n\
  264.     Meta<Key>Z:        xtex-noop() \n\
  265.     Ctrl<Key>J:        xtex-noop() \n\
  266.     Ctrl<Key>O:        xtex-noop() \n
  267.  
  268. !#
  269. !#    Button labels for the top level box
  270. !#
  271. *.topLevel.Command.Font: variable
  272. *.topLevel.Command.Resizable: False
  273.  
  274. *.topLevel.quitButton.label: Quit
  275. *.topLevel.quitButton.translations:#override\n\
  276.     <Btn1Up>:        xtex-quit() notify() unset()
  277.  
  278. #ifdef SELFILE
  279. *.topLevel.selectButton.label: Select
  280. *.topLevel.selectButton.horizDistance: 15
  281. *.topLevel.selectButton.translations:#override\n\
  282.     <Btn1Up>:        xtex-file(select) notify() unset()
  283.  
  284. *.topLevel.openButton.label: Open
  285. *.topLevel.openButton.translations:#override\n\
  286.     <Btn1Up>:        xtex-file(open) notify() unset()
  287.  
  288. #else
  289.  
  290. *.topLevel.openButton.label: Open
  291. *.topLevel.openButton.horizDistance: 15
  292. *.topLevel.openButton.translations:#override\n\
  293.     <Btn1Up>:        xtex-file(open) notify() unset()
  294. #endif
  295.  
  296. *.topLevel.copyButton.label: Copy
  297. *.topLevel.copyButton.translations:#override\n\
  298.     <Btn1Up>:        xtex-file(copy) notify() unset()
  299.  
  300. *.topLevel.closeButton.label: Close
  301. *.topLevel.closeButton.translations:#override\n\
  302.     <Btn1Up>:        xtex-file(close) notify() unset()
  303.  
  304. *.topLevel.cdButton.label: Set Directory
  305. *.topLevel.cdButton.translations:#override\n\
  306.     <Btn1Up>:        xtex-file(cd) notify() unset()
  307.  
  308. *.topLevel.pageButton.label: Popup Page
  309. *.topLevel.pageButton.horizDistance: 15
  310. *.topLevel.pageButton.translations:#override\n\
  311.     <Btn1Up>:        xtex-page-popup() notify() unset()
  312.  
  313. *.topLevel.printAllButton.label: Print All
  314. *.topLevel.printAllButton.translations:#override\n\
  315.     <Btn1Up>:        xtex-print-using(all) notify() unset()
  316.  
  317. *.topLevel.printMarkedButton.label: Print Marked
  318. *.topLevel.printMarkedButton.translations:#override\n\
  319.     <Btn1Up>:        xtex-print-using(set) xtex-mark-all(clear) notify() unset()
  320.  
  321. *.topLevel.printUnmarkedButton.label: Print Unmarked
  322. *.topLevel.printUnmarkedButton.translations:#override\n\
  323.     <Btn1Up>:        xtex-print-using(clear) xtex-mark-all(clear) notify() unset()
  324.  
  325. *.topLevel.clearMarksButton.label: Clear Marks
  326. *.topLevel.clearMarksButton.translations:#override\n\
  327.     <Btn1Up>:        xtex-mark-all(clear) notify() unset()
  328.  
  329. *.topLevel.dialogClear.label: Clear Dialog Box
  330.  
  331. !#
  332. !#    String query popup
  333. !#
  334. *.stringQuery.resizable: True
  335.  
  336. *.stringQuery.width: 500 
  337. *.stringQuery.height: 85
  338. *.stringQuery.form.confirm.width: 30
  339. *.stringQuery.form.cancel.width: 30
  340. *.stringQuery.form.translations:#override\n\
  341.     <Key>Return: xtex-string-confirm()\n\
  342.     <Key>Escape:    xtex-string-cancel()\n\
  343.     Ctrl<Key>G:    xtex-string-cancel()
  344.  
  345. *.stringQuery.form.title.top: chaintop
  346. *.stringQuery.form.title.left: chainleft
  347. *.stringQuery.form.title.right: chainright
  348. *.stringQuery.form.title.resize: True
  349. *.stringQuery.form.title.resizable: True
  350.  
  351. *.stringQuery.form.Command.resizable: False
  352.  
  353. #ifdef COLOR_BUTTONS
  354. *.stringQuery.form.confirm.foreground: green
  355. *.stringQuery.form.confirm.background: dim grey
  356. #else
  357. *.stringQuery.form.confirm.foreground: black
  358. *.stringQuery.form.confirm.background: white
  359. #endif
  360.  
  361. *.stringQuery.form.confirm.label: Confirm
  362. *.stringQuery.form.confirm.top: chaintop
  363. *.stringQuery.form.confirm.left: chainleft
  364. *.stringQuery.form.confirm.fromVert: title
  365.  
  366. *.stringQuery.form.cancel.foreground:red
  367. *.stringQuery.form.cancel.background:wheat
  368. *.stringQuery.form.cancel.label: Cancel
  369. *.stringQuery.form.cancel.left: chainleft
  370. *.stringQuery.form.cancel.bottom: chainbottom
  371. *.stringQuery.form.cancel.fromVert: confirm
  372.  
  373. *.stringQuery.form.string.height: 40
  374. *.stringQuery.form.string.foreground: White
  375. *.stringQuery.form.string.background: Black
  376. *.stringQuery.form.string.resizable: True
  377. *.stringQuery.form.string.right: chainright
  378. *.stringQuery.form.string.fromHoriz: confirm
  379. *.stringQuery.form.string.horizDistance: 10
  380. *.stringQuery.form.string.fromVert: title
  381. *.stringQuery.form.string.scrollHorizontal: Always
  382. *.stringQuery.form.string.translations:#override\n\
  383.     <Key>Return:     xtex-string-confirm()\n\
  384.     <Key>Escape:    xtex-string-cancel()\n\
  385.     Ctrl<Key>G:    xtex-string-cancel()\n\
  386.     Ctrl<Key>M:    xtex-noop() \n\
  387.     Meta<Key>]:    xtex-noop() \n\
  388.     Ctrl<Key>[:    xtex-noop() \n\
  389.     Ctrl<Key>V:    xtex-noop() \n\
  390.     Meta<Key>V:    xtex-noop() \n\
  391.     Ctrl<Key>Z:    xtex-noop() \n\
  392.     Meta<Key>Z:    xtex-noop() \n\
  393.     Ctrl<Key>J:    xtex-noop() \n\
  394.     Ctrl<Key>O:    xtex-noop()
  395.  
  396. !##
  397. !##    TeX page display
  398. !##
  399. *.xtex-page.allowShellResize: True
  400.  
  401. !#
  402. !#    Make ``bad keys'' beep in the ``what page number'' box.
  403. !#    
  404. *.xtex-page.form.numberText.translations:#override\n\
  405.     Ctrl<Key>Return:    xtex-noop() \n\
  406.     Ctrl<Key>M:        xtex-noop() \n\
  407.     Meta<Key>]:        xtex-noop() \n\
  408.     Ctrl<Key>[:        xtex-noop() \n\
  409.     Ctrl<Key>N:        xtex-noop() \n\
  410.     Ctrl<Key>P:        xtex-noop() \n\
  411.     Ctrl<Key>V:        xtex-noop() \n\
  412.     Meta<Key>V:        xtex-noop() \n\
  413.     Ctrl<Key>Z:        xtex-noop() \n\
  414.     Meta<Key>Z:        xtex-noop() \n\
  415.     Ctrl<Key>J:        xtex-noop() \n\
  416.     Ctrl<Key>O:        xtex-noop() \n
  417.  
  418. *.xtex-page.form.*.Font: -adobe-courier-bold-r-*-*-14-*-*-*-m-*-*-*
  419. *.xtex-page.form.*.top: chaintop
  420. *.xtex-page.form.Command.resizable: False
  421.  
  422. *.xtex-page.form.quitButton.label: Quit
  423. *.xtex-page.form.quitButton.left: chainleft
  424. *.xtex-page.form.quitButton.translations:#override\n\
  425.     <Btn1Up>:        xtex-page-quit() notify() unset()
  426.  
  427. *.xtex-page.form.forwardButton.label: Forward
  428. *.xtex-page.form.forwardButton.fromHoriz: quitButton
  429. *.xtex-page.form.forwardButton.horizDistance: 30
  430. *.xtex-page.form.forwardButton.translations:#override\n\
  431.     <Btn1Up>:        xtex-page-forward() notify() unset()
  432.  
  433. *.xtex-page.form.backwardButton.label: Backward
  434. *.xtex-page.form.backwardButton.fromHoriz: forwardButton
  435. *.xtex-page.form.backwardButton.translations:#override\n\
  436.     <Btn1Up>:        xtex-page-backward() notify() unset()
  437.  
  438. *.xtex-page.form.markButton.label: Mark
  439. *.xtex-page.form.markButton.fromHoriz: backwardButton
  440. *.xtex-page.form.markButton.translations:#override\n\
  441.     <Btn1Up>:        xtex-mark-page(toggle) notify() unset()
  442.  
  443. *.xtex-page.form.dupButton.label: Dup
  444. *.xtex-page.form.dupButton.fromHoriz: markButton
  445. *.xtex-page.form.dupButton.translations:#override\n\
  446.     <Btn1Up>:        xtex-page-duplicate() notify() unset()
  447.  
  448. *.xtex-page.form.tieButton.label: Tied
  449. *.xtex-page.form.tieButton.fromHoriz: dupButton
  450. *.xtex-page.form.tieButton.translations:#override\n\
  451.     <Btn1Up>:        xtex-page-tie() notify() unset()
  452.  
  453. *.xtex-page.form.largeButton.label: Large
  454. *.xtex-page.form.largeButton.fromHoriz: tieButton
  455. *.xtex-page.form.largeButton.translations:#override\n\
  456.     <Btn1Up>:        xtex-page-magnify(large) notify() unset()
  457.  
  458. *.xtex-page.form.smallButton.label: Small
  459. *.xtex-page.form.smallButton.fromHoriz: largeButton
  460. *.xtex-page.form.smallButton.translations:#override\n\
  461.     <Btn1Up>:        xtex-page-magnify(small) notify() unset()
  462.  
  463. *.xtex-page.form.reopenButton.label: Reopen
  464. *.xtex-page.form.reopenButton.fromHoriz: smallButton
  465. *.xtex-page.form.reopenButton.translations:#override\n\
  466.     <Btn1Up>:        xtex-file(reopen) notify() unset()
  467.  
  468. *.xtex-page.form.numberText.resize: width
  469. *.xtex-page.form.numberText.editType: textEdit
  470. *.xtex-page.form.numberText.fromHoriz: reopenButton
  471. *.xtex-page.form.numberText.horizDistance: 30
  472. *.xtex-page.form.numberText.width: 40
  473. *.xtex-page.form.numberText.translations:#override\n\
  474.     <KeyDown>Return: xtex-page-goto(box)
  475.  
  476. *.xtex-page.form.gotoButton.label: Goto
  477. *.xtex-page.form.gotoButton.fromHoriz: numberText
  478. *.xtex-page.form.gotoButton.translations:#override\n\
  479.     <Btn1Up>:    xtex-page-goto(box) notify() unset()
  480.  
  481. !#
  482. !#    The following accelerators allow you to press the Up key to
  483. !#    page up, and Down to go down and the Space back to flip
  484. !#    between the two halves; note that space only works when you're
  485. !#    originally looking at the top of the display.
  486. !#
  487. *.xtex-page.form.viewPort.left: chainleft
  488. *.xtex-page.form.viewPort.resizable: True
  489. *.xtex-page.form.viewPort.allowHoriz:True
  490. *.xtex-page.form.viewPort.allowVert:True
  491. *.xtex-page.form.viewPort.vertical.accelerators:\
  492.   <KeyUp>Up: StartScroll(Backward) NotifyScroll(FullLength) EndScroll() \n\
  493.   <KeyUp>Down: StartScroll(Forward) NotifyScroll(FullLength) EndScroll()
  494.  
  495.  
  496. !#
  497. !#    left & right keys move around window
  498. !#
  499. *.xtex-page.form.viewPort.horizontal.accelerators:\
  500.   <KeyUp>Right: StartScroll(Forward) NotifyScroll(FullLength) EndScroll() \n\
  501.   <KeyUp>Left: StartScroll(Backward) NotifyScroll(FullLength) EndScroll()
  502. !#
  503.  
  504. !#
  505. !#    The Goto popup - currently bound to button-2, so we also
  506. !#    enable button-2 for confirm/cancel buttons.
  507. !#
  508. *.Goto.resizable:True
  509. *.Goto.width: 400
  510. *.Goto.height: 80
  511. *.Goto.translations:#override\n\
  512.     <KeyDown>Return: xtex-page-goto-popup-confirm()\n\
  513.     <KeyDown>Escape: xtex-page-goto-popup-cancel()\n\
  514.     Ctrl<KeyDown>G: xtex-page-goto-popup-cancel()
  515.  
  516. *.Goto.form.confirm.width:80
  517. *.Goto.form.cancel.width:80
  518.  
  519. *.Goto.form.valueLabel.resize:True
  520. *.Goto.form.valueLabel.resizable:True
  521. *.Goto.form.valueLabel.top:chaintop
  522. *.Goto.form.valueLabel.left:rubber
  523. *.Goto.form.valueLabel.right:rubber
  524. *.Goto.form.valueLabel.label:Select Physical Page Number:
  525.  
  526. *.Goto.form.value.resize:True
  527. *.Goto.form.value.resizable:True
  528. *.Goto.form.value.top: chaintop
  529. *.Goto.form.value.fromHoriz: valueLabel
  530. *.Goto.form.value.right: chainright
  531.  
  532. #ifdef COLOR_BUTTONS
  533. *.Goto.form.confirm.foreground:green
  534. *.Goto.form.confirm.background:dim grey
  535. #else
  536. *.Goto.form.confirm.foreground: black
  537. *.Goto.form.confirm.background: white
  538. #endif
  539. *.Goto.form.confirm.label:Confirm
  540. *.Goto.form.confirm.resizable: True
  541. *.Goto.form.confirm.resize: True
  542. *.Goto.form.confirm.fromVert: valueLabel
  543. *.Goto.form.value.left: chainleft
  544. *.Goto.form.confirm.translations:#override\n\
  545.     <Btn1Up>: xtex-page-goto-popup-confirm() notify() unset()\n\
  546.     <Btn2Up>: xtex-page-goto-popup-confirm() notify() unset()
  547.  
  548. #ifdef COLOR_BUTTONS
  549. *.Goto.form.cancel.foreground:red
  550. *.Goto.form.cancel.background:wheat
  551. #else
  552. *.Goto.form.cancel.foreground: black
  553. *.Goto.form.cancel.background: white
  554. #endif
  555. *.Goto.form.cancel.label:Cancel
  556. *.Goto.form.cancel.resizable: True
  557. *.Goto.form.cancel.resize: True
  558. *.Goto.form.cancel.fromVert: confirm
  559. *.Goto.form.cancel.left: chainleft
  560. *.Goto.form.cancel.translations:#override\n\
  561.     <Btn1Up>: xtex-page-goto-popup-cancel() notify() unset()\n\
  562.     <Btn2Up>: xtex-page-goto-popup-cancel() notify() unset()
  563.  
  564. *.Goto.form.valuator.resize:True
  565. *.Goto.form.valuator.resizable:True
  566. *.Goto.form.valuator.fromVert: valueLabel
  567. *.Goto.form.valuator.fromHoriz: confirm
  568. *.Goto.form.valuator.right: chainright
  569. *.Goto.form.valuator.format:%4.0f
  570.  
  571. !#
  572. !#    We define keypresses for equivilent functions to the buttons --
  573. !#    this allows us to omit the buttons, giving us a bigger display area.
  574. !#
  575.  
  576. *.dviPage.resizable: True
  577. *.dviPage.translations:#replace\n\
  578.     Shift<Key>q: xtex-quit()\n\
  579.     Shift<Key>x: xtex-quit()\n\
  580.     Ctrl<Key>d: xtex-quit()\n\
  581.     <Key>q: xtex-page-quit()\n\
  582.     <Key>x: xtex-page-quit()\n\
  583. \
  584.     Meta<Key>g: xtex-page-divert() xtex-page-number-reset()\n\
  585.     <Key>g: xtex-page-goto() xtex-page-number-reset()\n\
  586.     Meta<Key>p: xtex-page-undivert() xtex-page-number-reset()\n\
  587.     <Key>p: xtex-page-backward() xtex-page-number-reset()\n\
  588. \
  589.     Shift<Btn1Down>:dvi-line-undraw() dvi-line-draw()\n\
  590.     Shift<Btn1Motion>: dvi-line-undraw() dvi-line-draw()\n\
  591.     Shift<Btn1Up>:\n\
  592.     Ctrl<Btn1Down>: dvi-line-undraw() dvi-line-draw()\n\
  593.     Ctrl<Btn1Motion>:\n\
  594.     Ctrl<Btn1Up>:dvi-line-undraw() dvi-line-castoff()\n\
  595.     Meta<Btn1Down>: dvi-line-anchor() dvi-line-draw() \n\
  596.     Meta<Btn1Motion>: \n\
  597.     Meta<Btn1Up>: \n\
  598. \
  599.     <Btn1Down>: dvi-line-anchor() dvi-line-draw() \n\
  600.     <Btn1Motion>: dvi-line-undraw() dvi-line-draw() \n\
  601.     <Btn1Up>: dvi-line-undraw() dvi-line-castoff() \n\
  602. \
  603.     Meta<Btn2Down>: dvi-push-button()\n\
  604.     Meta<Btn2Up>: xtex-page-undivert()\n\
  605.     <Btn2Up>: dvi-push-button()\n\
  606. \
  607.     Ctrl<Key>l: xtex-page-redisplay()\n\
  608.     <Key>question: xtex-system(lpq)\n\
  609. \
  610.     Meta<Btn3Down>: xtex-page-goto-popup() xtex-page-number-reset()\n\
  611.     <Btn3Down>: XawPositionSimpleMenu(menu) MenuPopup(menu)\n\
  612. \
  613.     <Key>f: xtex-page-foreward() xtex-page-number-reset()\n\
  614.     <Key>space: xtex-page-foreward() xtex-page-number-reset()\n\
  615.     <Key>n: xtex-page-foreward() xtex-page-number-reset()\n\
  616.     Ctrl<Key>n: xtex-page-foreward() xtex-page-number-reset()\n\
  617.     <Key>Return: xtex-page-foreward() xtex-page-number-reset()\n\
  618. \
  619.     <Key>b: xtex-page-backward() xtex-page-number-reset()\n\
  620. \
  621.     Ctrl<Key>h: xtex-page-backward() xtex-page-number-reset()\n\
  622.     <Key>BackSpace: xtex-page-backward() xtex-page-number-reset()\n\
  623.     <Key>Delete: xtex-page-backward() xtex-page-number-reset()\n\
  624. \
  625.     Ctrl<Key>t: xtex-mark-push() xtex-mark-page(set) xtex-print-using(set)  xtex-mark-pop()\n\
  626. \
  627.     <Key>l: xtex-page-magnify(large) xtex-page-number-reset()\n\
  628.     <Key>s: xtex-page-magnify(small) xtex-page-number-reset()\n\
  629.     Shift<Key>m: xtex-page-magnify() xtex-page-number-reset()\n\
  630. \
  631.     <Key>t: xtex-mark-page(toggle) xtex-page-number-reset()\n\
  632.     <Key>m: xtex-mark-page(set) xtex-page-number-reset()\n\
  633.     <Key>u: xtex-mark-page(clear) xtex-page-number-reset()\n\
  634. \
  635.     <Key>F12: xtex-file(reopen) xtex-page-number-reset()\n\
  636.     <Key>r: xtex-file(reopen) xtex-page-number-reset()\n\
  637. \
  638.     Shift<Key>d: xtex-page-duplicate() xtex-page-number-reset()\n\
  639.     Shift<Key>t: xtex-page-tie() xtex-page-number-reset()\n\
  640. \
  641.     <Key>a: dvi-push-button()\n\
  642. \
  643.     <Key>Escape: xtex-page-number-reset()\n\
  644.     <Key>0: xtex-page-number(0)\n\
  645.     <Key>1: xtex-page-number(1)\n\
  646.     <Key>2: xtex-page-number(2)\n\
  647.     <Key>3: xtex-page-number(3)\n\
  648.     <Key>4: xtex-page-number(4)\n\
  649.     <Key>5: xtex-page-number(5)\n\
  650.     <Key>6: xtex-page-number(6)\n\
  651.     <Key>7: xtex-page-number(7)\n\
  652.     <Key>8: xtex-page-number(8)\n\
  653.     <Key>9: xtex-page-number(9)\n\
  654.     <Key>-: xtex-page-number-minus()\n
  655.  
  656. !#
  657. !#    The menu specifications. Have you kept count? That's three
  658. !#    user interfaces to moving around. yech.
  659. !#
  660. *.xtex-page*.menu.label: XTeX Menu
  661. *.xtex-page*.menu*.RowHeight: 16
  662. *.xtex-page*.menu.menu:\
  663.     (line)\
  664.     (item "Forward" (action "xtex-page-foreward()"))\
  665.     (item "...10 pages" (action "xtex-page-number(1) xtex-page-number(0) xtex-page-foreward() xtex-page-number-reset()"))\
  666.     (item "Backward" (action "xtex-page-backward()"))\
  667.     (item "...10 pages" (action "xtex-page-number(1) xtex-page-number(0) xtex-page-backward() xtex-page-number-reset()"))\
  668.     (item "Goto..." (action "xtex-page-goto-popup()"))\
  669.     (blank)\
  670.     (item "Overview" (action "xtex-page-magnify(small)"))\
  671.     (item "Detail View" (action "xtex-page-magnify(large)"))\
  672.     (blank)\
  673.     (item "Mark" (action "xtex-mark-page(set)"))\
  674.     (item "Unmark" (action "xtex-mark-page(clear)"))\
  675.     (blank)\
  676.     (item "Reopen" (action "xtex-file(reopen) xtex-page-number-reset()"))\
  677.     (blank)\
  678.     (menu "Print..." \
  679.         (line)\
  680.         (item "This Page" \
  681.            (action "xtex-mark-push() xtex-mark-page(set) xtex-print-using(set)  xtex-mark-pop()"))\
  682.         (item "All Pages" (action "xtex-print-using(all)"))\
  683.         (item "All Marked Pages" (action "xtex-print-using(set)"))\
  684.         (item "All Unmarked Pages" (action "xtex-print-using(clear)"))\
  685.     )\
  686.     (blank)\
  687.     (menu "Ruler Units..."\
  688.         (line)\
  689.         (item "Inches" (action "dvi-line-units(in)"))\
  690.         (item "Points" (action "dvi-line-units(pt)"))\
  691.         (item "Centimeters" (action "dvi-line-units(cm)"))\
  692.         (item "Millimeters" (action "dvi-line-units(mm)"))\
  693.         (item "Scaled Points" (action "dvi-line-units(sp)"))\
  694.         (item "Picas" (action "dvi-line-units(pc)"))\
  695.         (item "Big Points" (action "dvi-line-units(bp)"))\
  696.         (item "Didot" (action "dvi-line-units(dd)"))\
  697.         (item "Cicero" (action "dvi-line-units(cc)"))\
  698.     )\
  699.     (blank)\
  700.     (item "Disable PostScript" (action "xtex-show-postscript(false) xtex-page-redisplay()"))\
  701.     (item "Enable PostScript" (action "xtex-show-postscript(true) xtex-page-redisplay()"))\
  702.     (blank)\
  703.     (item "Quit Page" (action "xtex-page-quit()"))\
  704.     (item "Quit XTeX" (action "xtex-quit()"))
  705. !#
  706. !#
  707. !#    If you have lots of fonts, you might want to enable the following.
  708. !#    I don't have lots of fonts, so I don't.
  709. !#    
  710. !#    (menu "Magnification..."\
  711. !#        (item "4 magsetp" (action "xtex-page-magnify(2074)"))\
  712. !#        (item "3 magstep" (action "xtex-page-magnify(1728)"))\
  713. !#        (item "2 magstep" (action "xtex-page-magnify(1440)"))\
  714. !#        (item "1 magstep" (action "xtex-page-magnify(1200)"))\
  715. !#        (item ".5 magstep" (action "xtex-page-magnify(1098)"))\
  716. !#        (item "0 magstep" (action "xtex-page-magnify(1000)"))\
  717. !#    )\
  718. !#
  719.  
  720.  
  721. *.DviPage.boxColor: red
  722.  
  723. *.DviPage.scale.allowShellResize: True
  724. *.DviPage.scale.x: 0
  725. *.DviPage.scale.y: 0
  726. *.DviPage.scale.label.label: 88888888888888888
  727. *.DviPage.scale.label.justify: center
  728. *.DviPage.scale.label.resize: True
  729.  
  730. #if defined(NEWS) || defined(DPS)
  731. *.DviPage.DPSpreamble:\
  732. /cvsprint{=string cvs print ( ) print} def\
  733. \
  734. /bdf { bind def } def\
  735.                              \
  736. /Inch  {Resolution mul} bdf  \
  737. /Dots {72 div Resolution mul} bdf  \
  738. \
  739. /dopage\
  740.   { 72 Resolution div dup neg scale          \
  741.      translate\
  742.   } bdf\
  743. \
  744. /@letter\
  745.   { Resolution dup -10 mul dopage } bdf\
  746. \
  747. /@note { @letter } bdf\
  748. \
  749. /@a4\
  750.   { Resolution dup -10.6929133858 mul dopage } bdf\
  751. \
  752. /@translate { translate } bdf\
  753. \
  754. /@scale { scale } bdf\
  755. \
  756. /@rotate { rotate } bdf\
  757. \
  758. /@landscape\
  759.   { [ 0 1 -1 0 0 0 ] concat\
  760.     Resolution dup dopage } bdf\
  761. \
  762. /@legal\
  763.   { Resolution dup -13 mul dopage } bdf\
  764. \
  765. /@manualfeed\
  766.    { statusdict /manualfeed true put\
  767.    } bdf\
  768. \
  769.         \
  770. /@copies\
  771.    { /#copies exch def\
  772.    } bdf\
  773. /psf$TeXscale { 65536 div } def\
  774. \
  775. /@newsstart \
  776.  {\
  777.    translate 1 -1 scale \
  778.  } bdf \
  779. \
  780. /@start         \
  781.   {\
  782.     /Scaling exch def \
  783.     /Resolution exch def\
  784.     /TeXEncoding 256 array def\
  785.     0 1 255 {TeXEncoding exch 1 string dup 0 3 index put cvn put} for\
  786.   } bdf\
  787. \
  788. /startTexFig {\
  789.     /psf$SavedState save def\
  790.     userdict maxlength dict begin\
  791. \
  792.     /psf$ury exch psf$TeXscale def\
  793.     /psf$urx exch psf$TeXscale def\
  794.     /psf$lly exch psf$TeXscale def\
  795.     /psf$llx exch psf$TeXscale def\
  796.     /psf$ht exch psf$TeXscale def\
  797.     /psf$wd exch psf$TeXscale def\
  798.     \
  799.     Scaling psf$wd mul psf$urx psf$llx sub div\
  800.     Scaling psf$ht mul psf$ury psf$lly sub div scale\
  801.     psf$llx neg psf$ury neg translate \
  802.     \
  803.     /showpage {\
  804.     } def\
  805.     /erasepage {\
  806.     } def\
  807.     /copypage {\
  808.     } def\
  809. } def\
  810. \
  811. \
  812. /doclip {\
  813.         psf$llx psf$lly psf$urx psf$ury\
  814.     currentpoint 6 2 roll\
  815.     newpath 4 copy\
  816.     4 2 roll moveto\
  817.     6 -1 roll exch lineto\
  818.     exch lineto\
  819.     exch lineto\
  820.     closepath clip\
  821.     newpath\
  822.     moveto\
  823. } def\
  824. \
  825. /endTexFig { end psf$SavedState restore } def\
  826. /@MacSetUp\
  827.   { userdict /md known\
  828.       { userdict /md get type /dicttype eq\
  829.     {\
  830.     md begin\
  831.     /letter {} def\
  832.     /note {} def\
  833.     /legal {} def\
  834.     /od{txpose\
  835.         1 0 mtx defaultmatrix dtransform exch atan/pa exch def\
  836.         newpath clippath mark\
  837.         {transform{itransform moveto}}\
  838.         {transform{itransform lineto}}\
  839.         { 6 -2 roll transform\
  840.           6 -2 roll transform\
  841.           6 -2 roll transform\
  842.           { itransform 6 2 roll\
  843.         itransform 6 2 roll\
  844.         itransform 6 2 roll\
  845.         curveto\
  846.           }\
  847.         }\
  848.         {{closepath}}\
  849.         pathforall newpath counttomark array astore /gc xdf\
  850.         pop ct 39 0 put\
  851.         10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}if\
  852.     }def\
  853.     /txpose{\
  854.         pxs pys scale ppr aload pop\
  855.         por {\
  856.         noflips {\
  857.             pop exch neg exch translate pop 1 -1 scale\
  858.         }if\
  859.         xflip yflip and {\
  860.             pop exch neg exch translate 180 rotate 1 -1 scale\
  861.             ppr 3 get ppr 1 get neg sub neg ppr 2 get\
  862.             ppr 0 get neg sub neg translate\
  863.         }if \
  864.         xflip yflip not and {\
  865.             pop exch neg exch translate pop 180 rotate\
  866.             ppr 3 get ppr 1 get neg sub neg 0 translate\
  867.         }if\
  868.         yflip xflip not and {\
  869.             ppr 1 get neg ppr 0 get neg translate\
  870.         }if\
  871.         }\
  872.         {\
  873.         noflips {\
  874.             translate pop pop 270 rotate 1 -1 scale\
  875.         }if\
  876.         xflip yflip and {\
  877.             translate pop pop 90 rotate 1 -1 scale\
  878.             ppr 3 get ppr 1 get neg sub neg ppr 2 get\
  879.             ppr 0 get neg sub neg translate\
  880.         }if\
  881.         xflip yflip not and {\
  882.             translate pop pop 90 rotate ppr 3 get\
  883.             ppr 1 get neg sub neg 0 translate\
  884.         }if\
  885.         yflip xflip not and {\
  886.             translate pop pop 270 rotate ppr 2 get\
  887.             ppr 0 get neg sub neg 0 exch translate\
  888.         }if\
  889.         }ifelse\
  890.         scaleby96 {\
  891.         ppr aload pop 4 -1 roll add 2 div 3 1 roll add 2 div 2 copy\
  892.         translate .96 dup scale neg exch neg exch translate\
  893.         }if\
  894.     }def\
  895.     /cp {pop pop showpage pm restore}def\
  896.         end\
  897.       }if\
  898.     } if    \
  899.   } def
  900. #endif
  901.  
  902. #if defined(GHOST)
  903. *.DviPage.GSpreamble:\
  904. /bdf {bind def} def \
  905. /@xtexGhostShowpage {showpage} bind def \
  906. /startTexFig {/psf$SavedState save def erasepage clear \
  907. userdict maxlength dict begin \
  908. /showpage {} def\
  909. } def\n \
  910. /endTexFig {end @xtexGhostShowpage psf$SavedState restore} def\n
  911. !# Colon separated list of directories
  912. !# This string is prepended to ghostscripts default search path
  913. !# Put directories containing prolog files (e.g., mac.pro) or additional fonts
  914. !# for ghostscript on this list
  915. *.DviPage.GhostSearchPath: GHOST_SEARCH_PATH
  916. #endif
  917.