|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T t
Length: 4626 (0x1212) Types: TextFile Names: »texpre.psr«
└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12 └─⟦af5ba6c8e⟧ »unix3.0/DVIWARE.tar.Z« └─⟦ca79c7339⟧ └─⟦this⟧ »DVIware/laser-setters/dvi-to-ps/TeXPS/dvitps/psr/texpre.psr«
% Copyright (c) 1988 Stephan v. Bechtolsheim % This file is part of the TeXPS Software Package. % The TeXPS Software Package is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY. No author or distributor % accepts responsibility to anyone for the consequences of using it % or for whether it serves any particular purpose or works at all, % unless he says so in writing. Refer to the TeXPS Software Package % General Public License for full details. % Everyone is granted permission to copy, modify and redistribute % the TeXPS Software Package, but only under the conditions described in the % TeXPS Software Package General Public License. A copy of this license is % supposed to have been given to you along with TeXPS Software Package so you % can know your rights and responsibilities. It should be in a % file named CopyrightLong. Among other things, the copyright notice % and this notice must be preserved on all copies. % This is part of the PostScript code to be prepended to the output % of the dvi to PostScript driver by Stephan v. Bechtolsheim. % VARIABLES % ========= % All dimensions are in pixels % The following variables are set by code downloaded from the driver: % /Resolution: in dots/inch % /Dvi-File-Name: a string % /Date-and-Time: a string % /HostName name of host where dvi2ps was executed. % /Page-H-Offset: horizontal offset, 0 unless -H option in dvi2ps is used. % /Page-V-Offset: vertical offset, 0 unless -V option in dvi2ps is used. % /DviOrientationMatrix: the matrix which converts the standard coordinate system of % PostScript into one which is compatible with TeX and the % drivers output % /DviTranslateVector-X/Y: the above matrix does not contain the shifting % of the coordinate system. This one does. % /Draft-Flag: true or false to print DRAFT and date and time. % PROCEDURES % ========== % @bop0 % ===== % page-number @bop0 - % Begin pass0 (which contains bitmaps and PS font definitions) for % page "page-number". /@bop0 { PsPrintEnabled { (Pass0: Page ) print == flush } {pop} ifelse } def % @eop0 % ===== % page-number @eop0 - % End of pass 0 /@eop0 { pop } def % @bop1 % ===== % delta-x delta-y page-number @bop1 - % Called before the start of pass1 of the page with page number "page-number". % delta-x and delta-y are shift amounts (in pixels) by which the coordinate % system is shifted, just for this specific page. % Pass1 output contains text and other information like to print rules and to move. /@bop1 { PsPrintEnabled { (Pass1: Page ) print == flush } {pop} ifelse save % restore is in @eop1 #ifdef DEBUG (@bop1) @ReportVmStatus #endif DviTranslateVector-X DviTranslateVector-Y translate DviOrientationMatrix concat Page-H-Offset Page-V-Offset translate 3 1 roll % Bring shift for this page back! translate 0 0 moveto Draft-Flag { @Draft } if /DriverDelta 0 def } def % @eop1 % ===== % page-number @eop1 - % Called after pass1 of a page has been completed. /@eop1 { pop showpage #ifdef DEBUG (@eop-1) @ReportVmStatus #endif restore #ifdef DEBUG (@eop-2) @ReportVmStatus #endif } def % @end % ==== % - @end - % Called when the whole TeX job is done. /@end { (Done!\n) print flush } def % @ReportVmStatus % =============== % string @ReportVmStatus - % string: some identifier message /@ReportVmStatus { (\n@ReportVmStatus: ) print print (: ) print vmstatus (max: ) print 20 string cvs print (, used: ) print 20 string cvs print (, level: ) print 20 string cvs print (\n) print flush } def % @ReportVmStatusNew % ================== % string estimate @ReportVmStatusNew - % string: some identifier message % estimate: how much the driver estimates the VM usage. /@ReportVmStatusNew { (VM: ) print exch print (, printer: ) print /Vmfree vmstatus pop exch pop def Vmfree ( ) cvs print (, driver: ) print dup ( ) cvs print (, delta: ) print Vmfree sub ( ) cvs print (\n) print flush } def #ifdef DEBUG (Initial) @ReportVmStatus #endif % @Draft % ====== % - @Draft - % Print DRAFT, file name, date and time on the current page. /@Draft { gsave Page-H-Offset neg Page-V-Offset neg translate -45 rotate -150 0 moveto /Helvetica-Bold findfont [120.0 0 0 -120.0 0 0 ] makefont setfont (DRAFT) show grestore gsave Page-H-Offset neg Page-V-Offset neg translate 300 -100 moveto /Helvetica-Bold findfont [60.0 0 0 -60.0 0 0 ] makefont setfont Date-and-Time show ( :: ) show Dvi-File-Name show grestore } def