Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.stsci.edu/ftp/software/tex/posters/poster.patch570
Дата изменения: Wed Mar 5 23:34:50 1997
Дата индексирования: Sun Dec 23 01:27:25 2007
Кодировка:

Поисковые слова: http astrokuban.info astrokuban
This is a patch file.
Apply it with the command:

patch -p0 < patch.version

*** ./Makefile.orig Sun Mar 2 21:23:19 1997
--- ./Makefile Wed Mar 5 10:28:56 1997
***************
*** 145,151 ****
hps.o

all : afm2tfm dvips tex.pro texps.pro texc.pro special.pro finclude.pro \
! color.pro crop.pro hps.pro

dvips : $(OBJ)
$(CC) $(CFLAGS) $(OBJ) $(LIBS) $(FLIBS) -o dvips
--- 146,152 ----
hps.o

all : afm2tfm dvips tex.pro texps.pro texc.pro special.pro finclude.pro \
! color.pro crop.pro hps.pro poster.pro

dvips : $(OBJ)
$(CC) $(CFLAGS) $(OBJ) $(LIBS) $(FLIBS) -o dvips
***************
*** 189,197 ****
hps.pro : hps.lpro squeeze
./squeeze hps.pro

install : afm2tfm dvips MakeTeXPK \
tex.pro texc.pro texps.pro special.pro finclude.pro color.pro \
! crop.pro hps.pro config.ps psfonts.map epsf.tex epsf.sty rotate.tex \
rotate.sty colordvi.tex colordvi.sty blackdvi.tex blackdvi.sty \
dvips.tex dvipsmac.tex dvips.1 afm2tfm.1
- mkdir $(BINDIR)
--- 190,201 ----
hps.pro : hps.lpro squeeze
./squeeze hps.pro

+ poster.pro: poster.lpro squeeze
+ ./squeeze poster.pro
+
install : afm2tfm dvips MakeTeXPK \
tex.pro texc.pro texps.pro special.pro finclude.pro color.pro \
! crop.pro hps.pro poster.pro config.ps psfonts.map epsf.tex epsf.sty rotate.tex \
rotate.sty colordvi.tex colordvi.sty blackdvi.tex blackdvi.sty \
dvips.tex dvipsmac.tex dvips.1 afm2tfm.1
- mkdir $(BINDIR)
***************
*** 210,215 ****
--- 214,220 ----
$(INSTALL) -c -m 644 color.pro $(HEADERDIR)
$(INSTALL) -c -m 644 crop.pro $(HEADERDIR)
$(INSTALL) -c -m 644 hps.pro $(HEADERDIR)
+ $(INSTALL) -c -m 644 poster.pro $(HEADERDIR)
$(INSTALL) -c -m 644 config.ps $(CONFIGDIR)/$(CONFIGFILE)
$(INSTALL) -c -m 644 psfonts.map $(CONFIGDIR)
$(INSTALL) -c -m 644 epsf.tex $(TEXMACRODIR)
*** ./dospecial.c.orig Sun Mar 2 23:15:52 1997
--- ./dospecial.c Wed Mar 5 09:47:04 1997
***************
*** 83,88 ****
--- 83,94 ----
extern int prettycolumn ;
extern Boolean disablecomments ;

+ /* Added for posters, HEP */
+ extern Boolean makeposter ;
+ extern int nrows, ncols ;
+ extern int posterpages ; /* Each sheet of the poster requires a
+ ** collated copy. */
+
#ifdef DEBUG
extern integer debug_flag;
#endif
***************
*** 198,204 ****
{"ury", Number},
{"rwi", Number},
{"rhi", Number},
! {"clip", None}};

#ifdef VMS
#ifndef __GNUC__ /* GNUC tolower is too simple */
--- 204,212 ----
{"ury", Number},
{"rwi", Number},
{"rhi", Number},
! {"clip", None},
! {"nrows", Number},
! {"ncols", Number}};

#ifdef VMS
#ifndef __GNUC__ /* GNUC tolower is too simple */
***************
*** 389,394 ****
--- 397,416 ----
}
return ;
}
+ else if (strncmp(p, "poster", 6)==0) {
+ makeposter = 1 ;
+ p += 6 ;
+ nrows = 1 ;
+ ncols = 1 ;
+ while ( (p=GetKeyVal(p, &j)) != NULL) {
+ if( j == 17 )
+ nrows = ValNum ;
+ if( j == 18 )
+ ncols = ValNum ;
+ }
+ posterpages = nrows * ncols ;
+ return ;
+ }
break ;
case 'x':
if (strncmp(p, "xtex:", 5)==0) return ;
***************
*** 559,564 ****
--- 581,588 ----
return;
}
if (strncmp(p, "papersize", 9) == 0)
+ return ;
+ if (strncmp(p, "poster", 6)==0)
return ;
#ifdef TPIC
if (strncmp(p, "pn ", 3) == 0) {setPenSize(p+2); return;}
*** ./dvips.c.orig Sun Mar 2 23:15:52 1997
--- ./dvips.c Wed Mar 5 09:47:04 1997
***************
*** 17,26 ****
--- 17,28 ----
/* and put in GNU_CC:[INCLUDE.LOCAL] */
#include "ctype.h"
#include "descrip.h"
+ #include "ssdef.h"
#else
#include climsgdef
#include ctype
#include descrip
+ #include ssdef
#endif
#endif
/*
***************
*** 27,32 ****
--- 29,35 ----
* First we define some globals.
*/
#ifdef VMS
+ static void vmscli (void);
static char ofnme[252],infnme[252],pap[40],thh[20];
#endif
fontdesctype *fonthead ; /* list of all fonts mentioned so far */
***************
*** 164,169 ****
--- 167,175 ----
extern int dontmakefont ;
struct papsiz *papsizes ; /* all available paper size */
int headersready ; /* ready to check headers? */
+ Boolean makeposter ; /* each page is a poster */
+ integer nrows, ncols ; /* poster size */
+ integer posterpages = 1 ; /* how many poster sheets/page */
#if defined(MSDOS) || defined(OS2) || defined(ATARIST)
char *mfjobname = NULL; /* name of mfjob file if given */
FILE *mfjobfile = NULL; /* mfjob file for font making instructions */
***************
*** 171,180 ****
--- 177,188 ----
#ifdef DEBUG
integer debug_flag = 0;
#endif /* DEBUG */
+ #ifndef VMS
char queryline[256]; /* interactive query of options */
int qargc;
char *qargv[32];
char queryoptions;
+ #endif /* !VMS */
/*
* This routine calls the following externals:
*/
***************
*** 428,433 ****
--- 436,442 ----
}
return (VOID *)qq ;
}
+ #ifndef VMS
/* this asks for a new set of arguments from the command line */
void
queryargs()
***************
*** 443,448 ****
--- 452,458 ----
}
qargv[qargc] = (char *)NULL;
}
+ #endif /* !VMS */

/*
* Finally, our main routine.
***************
*** 1063,1073 ****
--- 1073,1086 ----
(void)add_header(SPECIALHEADER) ;
if (usescolor) /* IBM: color */
(void)add_header(COLORHEADER) ;
+ if (makeposter)
+ (void)add_header(POSTERHEADER) ;
#ifdef HPS
if (HPS_FLAG)
(void)add_header(HPSHEADER) ;
#endif
sects = sections ;
+ pagecopies *= posterpages ;
totalpages *= collatedcopies ;
if (sects == NULL || sects->next == NULL) {
sectioncopies = collatedcopies ;
***************
*** 1094,1100 ****
initprinter(sections) ;
outbangspecials() ;
}
! for (i=0; i sects = sections ;
while (sects != NULL) {
if (sepfiles) {
--- 1107,1113 ----
initprinter(sections) ;
outbangspecials() ;
}
! for (i=0; i<(collatedcopies); i++) {
sects = sections ;
while (sects != NULL) {
if (sepfiles) {
***************
*** 1151,1158 ****
#endif
}
#endif
! exit(0) ;
/*NOTREACHED*/
}
#ifdef VMS
#include "[.vms]vmscli.c"
--- 1164,1175 ----
#endif
}
#endif
! #if defined (VMS) && defined (__DECC)
! return 0 ;
/*NOTREACHED*/
+ #else
+ exit(0) ;
+ #endif /* VMS VAXC */
}
#ifdef VMS
#include "[.vms]vmscli.c"
*** ./output.c.orig Sun Mar 2 23:15:53 1997
--- ./output.c Wed Mar 5 09:47:05 1997
***************
*** 76,81 ****
--- 76,86 ----
extern void set_bitfile() ;
#endif
/*
+ ** For posters:
+ */
+ extern Boolean makeposter ;
+ extern int nrows, ncols ;
+ /*
* We need a few statics to take care of things.
*/
static integer rhh, rvv ;
***************
*** 1184,1189 ****
--- 1189,1200 ----
paperspec(finpapsiz->specdat, 0) ;
}
if (manualfeed) cmdout("@manualfeed") ;
+ if (makeposter) {
+ numout((integer)nrows) ;
+ numout((integer)ncols) ;
+ cmdout("@poster") ;
+ newline() ;
+ }
if (landscape) cmdout("@landscape") ;
if (numcopies != 1) {
numout((integer)numcopies) ;
*** ./paths.h.orig Sun Mar 2 21:23:21 1997
--- ./paths.h Wed Mar 5 09:47:06 1997
***************
*** 29,34 ****
--- 29,35 ----
#define PSFONTHEADER "texps.pro"
#define IFONTHEADER "finclude.pro"
#define SPECIALHEADER "special.pro"
+ #define POSTERHEADER "poster.pro"
#define COLORHEADER "color.pro" /* IBM: color */
#define CROPHEADER "crop.pro"
#define PSMAPFILE "psfonts.map"
*** ./poster.lpro.orig Wed Mar 5 09:47:06 1997
--- ./poster.lpro Wed Mar 5 09:47:06 1997
***************
*** 0 ****
--- 1,150 ----
+ % Functions for posters.
+
+ % The basic idea, taken from the printposter program in the Blue Book,
+ % is to translate before printing each page, making sure that the
+ % desired part of the large page falls on the paper. Each poster page
+ % has a size given by the number of rows and columns of pieces of paper
+ % needed to print. Regardless of whether the document is landscape
+ % mode, rows go across the page, parallel with the lines of text, and
+ % columns go down the page. The poster mechanism is invoked from
+ % within a document by a \special of the form
+ %
+ % \special{poster nrows=x ncols=y}
+ %
+ % Each sheet of the poster requires a separate pass through the
+ % document. That is, a poster where each page is one row of sheets
+ % of paper high, and three columns wide, requires three passes
+ % through the document. All of the left edge sheets are printed
+ % first. Then all of the center sheets, followed by all of the
+ % right edge sheets are printed. The user then must collate the
+ % sheets for each page, cut off the edges of some of the sheets,
+ % and paste them together.
+
+ TeXDict begin
+
+ /inch {Resolution mul} N
+
+ /leftmargin {0.5 inch} N
+ /rightmargin {0.5 inch} N
+ /botmargin {0.5 inch} N
+ /topmargin {0.5 inch} N
+ /ticklen {0.2 inch} N
+ /tickoffs {0.2 inch} N
+
+ % Save poster dimensions in sheets of paper. The arguments are nrows
+ % and ncols as given by the user in the \special command.
+
+ /@poster
+ {
+ /columns X
+ /rows X
+ } N
+
+ % Re-defined bop.
+
+ /bop % %t %d bop - -- begin a brand new page, %t=pageno %d=seqno
+ {
+ userdict /bop-hook known { bop-hook } if
+ /SI save N
+ @rigin
+ %
+ % Now we check the resolution. If it's correct, we use RV as V,
+ % otherwise we use QV.
+ %
+ 0 0 moveto
+ /V matrix currentmatrix
+ dup 1 get dup mul exch 0 get dup mul add .99 lt
+ {/QV} {/RV} ifelse load def
+ % pop pop
+
+ postersheet
+ } N
+
+ % Set clip path near the edges of the a sheet. This
+ % doesn't really buy you anything except to insure
+ % that the fiducial marks don't get covered up.
+
+ /pageclip
+ {
+ leftmargin 1 inch sub tickoffs sub topmargin 1 inch sub tickoffs sub moveto
+ 0 pageheight tickoffs dup add add rlineto
+ pagewidth tickoffs dup add add 0 rlineto
+ 0 pageheight tickoffs dup add add neg rlineto
+ closepath clip
+ } N
+
+ % Draw fiducial marks to help line things up once you
+ % have cut off the wasted paper. There is a little
+ % bit of overlap between what is printed on neighboring
+ % pagex, so the cuts don't have to be precise.
+ % We suppress the marks where there is no joint between
+ % sheets, i.e. where they would not get covered up.
+
+ /fiducials
+ {
+ save
+ leftmargin 1 inch sub topmargin 1 inch sub pageheight add translate
+ 0.2 setlinewidth
+
+ rowcount 0 eq colcount 0 eq and not % Upper left mark
+ {
+ newpath 0 pageheight tickoffs add neg moveto 0 ticklen neg rlineto stroke
+ newpath tickoffs neg pageheight neg moveto ticklen neg 0 rlineto stroke
+ }
+ if
+
+ rowcount 0 eq colcount columns 1 sub eq and not % Upper right mark
+ {
+ newpath pagewidth pageheight tickoffs add neg moveto
+ 0 tickoffs neg rlineto stroke
+ newpath pagewidth tickoffs add pageheight neg moveto
+ tickoffs 0 rlineto stroke
+ }
+ if
+
+ rowcount rows 1 sub eq colcount 0 eq and not % Lower left mark
+ {
+ newpath 0 tickoffs moveto 0 ticklen rlineto stroke
+ newpath tickoffs neg 0 moveto ticklen neg 0 rlineto stroke
+ }
+ if
+
+ rowcount rows 1 sub eq colcount columns 1 sub eq and not % Lower right mark
+ {
+ newpath pagewidth tickoffs moveto 0 ticklen rlineto stroke
+ newpath pagewidth tickoffs add 0 moveto ticklen 0 rlineto stroke
+ }
+ if
+
+ restore
+ } N
+
+ % Given a sheet counter, figure out which row and column this sheet
+ % is in, and translate so that the appropriate part of the page
+ % falls on the paper. Put down fiducial marks where cuts need to be
+ % made when pasting the poster together.
+
+ /postersheet
+ { /seq X
+
+ seq rows columns mul mod /sheet X
+
+ hsize Resolution mul 72 div leftmargin sub rightmargin sub /pagewidth X
+ vsize VResolution mul 72 div topmargin sub botmargin sub /pageheight X
+
+ % Given the sheet count, which row and column are we on?
+ % Note that (0,0) is the upper left, and (columns-1,rows-1) is the
+ % lower right.
+
+ sheet columns idiv /rowcount exch N
+ sheet columns mod /colcount exch N
+
+ fiducials
+ pageclip
+ pagewidth colcount neg mul
+ pageheight rowcount neg mul
+ translate
+
+ } N
+
+ end