hyphen-show-20000425/ 40700 1750 144 0 7102671337 12136 5ustar mbusershyphen-show-20000425/hyphen_show.1100600 1750 144 5724 6606112311 14650 0ustar mbusers.TH hyphen_show l "May 28, 1997" "Version: 6" .SH NAME \fBhyphen_show\fP \- a program to look for hyphenations in a .dvi-file created by TeX/LaTeX .SH SYNTAX \fBhyphen_show\fP [ \fB-c\fI fontencoding\fP ] \fItexfilename\fP[\fB.dvi\fP] [ \fIfile_checked_hyphenations\fP ] .SH DESCRIPTION \fBhyphen_show\fP is a program (written in C language) which looks for hyphenations in a .dvi-file created by TeX/LaTeX. .LP As there is no line structure in the .dvi-file, line breakings must be concluded from horizontal and vertical gaps. There are constructs, where hyphenations cannot be found, and there are constructs, where we cannot extract correctly both fragments of an hyphenated word (especially at end of page, because of following footers, footnotes, running title etc.) .LP On standard output you will find a list of hyphenations found together with page numbers, both extracted from \fItexfilename\fB.dvi\fR. In file \fItexfilename\fB.hyp\fR the user will find hyphenations only. .LP Each hyphenation is included only at it's first occurence and only if it's not already found in file \fIfile_checked_hyphenations\fP (if such a second file is specified at \fBhyphen_show\fP call). .LP Files \fItexfilename\fB.hyp\fR and \fIfile_checked_hyphenations\fR have the same structure and are simple text files, so the user can easily edit each of these files (especially delete lines with incorrect hyphenations) and append file \fItexfilename\fB.hyp\fR to file \fIfile_checked_hyphenations\fR e.g. by using \fBcat\fR command. .LP Program \fBhyphen_show\fR can be called as stand-alone program as described ahead; yet originally \fBhyphen_show\fR was written for use with \fBxtem_TeXMenu\fR, where it is started automatically (depending on the user's settings) after each TeX run or where it can be started explicitely as an \fBxtem\fR utility program. .SH DOCUMENTATION For the implementator a README is included in the package. .SH OPTIONS .TP 10 .B -c\fI fontencoding\fP specifies the font encoding which is used in TeX (\\usepackage[\fIfontencoding\fP]{fontenc}). At the moment the following font encodings are available: T1 and OT1, i.e. \fIfontencoding\fP may get one of these values: \fBT1\fP or \fBOT1\fP. The default value is set to T1, yet can be adapted by the local implementation. .SH FILES .TP 10 .B \fItexfilename\fB.dvi this file is scanned for hyphenations (must exist). .TP .B \fIfile_checked_hyphenations\fP if specified, this file will be scanned for correct (`checked') hyphenations. .TP .B \fItexfilename\fB.hyp all hyphenations found in \fItexfilename\fB.dvi\fR and not included in \fIfile_checked_hyphenations\fR up to now will be written into this file (will be created/overwritten). .SH SOURCES \fBhyphen_show.c\fP may be copied by anonymous ftp from .ti +5 \fBftp://ftp.iwd.uni-bremen.de:/pub/tex/hyphenation/\fP .SH AUTHORS Guenther Lamprecht, Wolfhard Lotz, Roland Weibezahn .br e-mail: weibezahn@iwd.uni-bremen.de .br www: http://ftp.iwd.uni-bremen.de/xtem/xtem_texmenu.html .Ee hyphen-show-20000425/hyphen_show.c100600 1750 144 53135 7101266653 14763 0ustar mbusers/* hyphen_show: listing hyphenations */ /* */ /* Copyright (C) 1997, 1998 */ /* G. Lamprecht, W. Lotz, R. Weibezahn; IWD, Uni Bremen */ /***************************************************************/ /* Plea to the implementator: */ /* */ /* If you have to modify the following include instructions */ /* (or any other command of this program) */ /* please send your modifications to us: */ /* */ /* email: weibezahn@iwd.uni-bremen.de */ /* */ /* See also ifdef's after command */ /* main(n_arg,v_arg) int n_arg; char *v_arg[]; */ /***************************************************************/ #include #include #define LAENGE_PUF 250 #define LAENGE_NEU 5000 #define LAENGE_SEITE 5000 #define LAENGE_HCK 20000 #define MITTE 30 #define R_GRENZE 50000 #define R_GRENZE_ZEILE 1000000 #define V_GRENZE 10000 #define V_GRENZE_ZEILE 600000 #define W_GRENZE 50000 #define W_GRENZE_ZEILE 5000000 #define X_GRENZE 50000 #define X_GRENZE_ZEILE 700000 #define Y_GRENZE 10000 #define Y_GRENZE_ZEILE 100000 #define Z_GRENZE 10000 #define Z_GRENZE_ZEILE 700000 #define FONT_CODE_1 "OT1" #define FONT_CODE_2 "T1" #define TRUE 't' #define FALSE 'f' #define E_ENDFILE 'f' #if defined(AIX) /* AIX Compiler call: */ /* gcc -o hyphen_show hyphen_show.c -DAIX */ /* xlc -o hyphen_show hyphen_show.c -DAIX -D_POSIX_SOURCE */ #include #include int open(const char *, int,...); int close(int); ssize_t read(int,void *,size_t); int isalpha(char); #elif defined(__BORLANDC__) #include #include #include #include #elif defined(__DECC__) /* VMS Compiler call: */ /* compile: cc/decc/define=(__DECC__) hyphen_show */ /* link: link hyphen_show */ /* install: hyphen_show == "$hyphen_show.exe */ /* works with cc/decc on OpenVMS versions >=6.1 Alpha and VAX */ /* To install this helpfile in the standard DECUS TeX release */ /* use "LIBRARY/INSERT/HELP DECUS[.HLB] HYPHEN_SHOW[.HLP]". */ #include #include int open(const char *, int); int close(int); int read(int,char *,unsigned); int isalpha(char); #else /* tested with: SUN-Solaris 2.5 (cc, gcc), Linux (gcc), SGI IRIS 5.2 */ #include int close(int); int read(int,char *,unsigned); int isalpha(char); #endif int gchar(unsigned char *); void fehler(void); unsigned char e_inbyte(void); void a_outimage(void); void a_outchar(char); void skip(int); void umlaut(void); void set_char_k(unsigned char); char special_char(char,unsigned char); void set_put(int); void bop(unsigned char); void test_neue_seite(void); char gefunden(char *); char *wortanfang(char *); char *wortende(char *); void f_set_pos(int); void set_pos(int); char *strip(char *); char vergl_test(char *); char zugelassen(char, unsigned char); char* text_clear(char *, int *); void eop(void); long pow(int,int); void eingabe(long *, unsigned char); void right(unsigned char); void w0(void); void w(unsigned char); void x0(void); void x(unsigned char); void down(unsigned char); void y0(void); void y(unsigned char); void z0(void); void z(unsigned char); void xxx(unsigned char); void fnt_def(unsigned char); void pre(void); /***********************************************************/ #define BUFLEN_E 32768 int filed1; FILE *a_file,*ver_dat; int anzz=0; int gchar( unsigned char *byt) { static char buffer[BUFLEN_E]; static int cnt=0; static char *ptr; if (cnt == 0) {cnt=read(filed1,buffer,BUFLEN_E); ptr=buffer; } if (cnt > 0) {*byt = *ptr; cnt--; ptr++; anzz++; return (1); } else if (cnt < 0) {printf("\nerror in reading, return code=%d\n",cnt); return (cnt); } else return (cnt); } long d_r, r_grenze = R_GRENZE, r_grenze_zeile = R_GRENZE_ZEILE, d_v, v_grenze = V_GRENZE, v_grenze_zeile = V_GRENZE_ZEILE, d_w, w_grenze = W_GRENZE, w_grenze_zeile = W_GRENZE_ZEILE, d_x, x_grenze = X_GRENZE, x_grenze_zeile = X_GRENZE_ZEILE, d_y, y_grenze = Y_GRENZE, y_grenze_zeile = Y_GRENZE_ZEILE, d_z, z_grenze = Z_GRENZE, z_grenze_zeile = Z_GRENZE_ZEILE; int laenge_hck = LAENGE_HCK, laenge_neu = LAENGE_NEU, laenge_puf = LAENGE_PUF, mitte = MITTE; int s_p,s_max, hck_p,hck_max,neu_max,s_puffer_p,np,pos1, n_t1_ot1; long gesamt,anzgef; char seite[LAENGE_SEITE][LAENGE_PUF], *seitep[LAENGE_SEITE], s_puffer[LAENGE_PUF],hh[LAENGE_PUF], hh1[LAENGE_PUF], wortanf[LAENGE_PUF],wortend[LAENGE_PUF],stra[LAENGE_PUF], hck[LAENGE_HCK][80], neu[LAENGE_NEU+1][80], vorschub,enthalten, hauptdatei[80],verdatei[80],ausdatei[80], *hauptdateip, *verdateip, *ausdateip, *font_codep, font_code[10]; char tns_alt[80]; char tr_gef; unsigned char k,zz; void fehler(void) {printf("\nError: eof before postamble\n"); exit(0); } unsigned char e_inbyte(void) { if ( gchar(&zz) != 1) fehler(); return zz; } /* Beginn der Umsetzroutinen */ void a_outimage(void) { char b; if (s_puffer_p > 2) { if (s_puffer[s_puffer_p-2] == '-') { b = TRUE; } else if (s_puffer[s_puffer_p-1] == '-') { b = TRUE; } else {b = FALSE;}; if (s_puffer_p > 3) {if (s_puffer[s_puffer_p-3] == '-') {b = TRUE;} }; if ((b == TRUE) || (enthalten == TRUE)) { memset(&seite[s_p][0],(char)0,laenge_puf); seitep[s_p] = strncpy(&seite[s_p][0],&s_puffer[0],s_puffer_p); s_p++; enthalten = b; } s_puffer_p = 0; } } void a_outchar( char c) { s_puffer[s_puffer_p] = c; s_puffer_p++; if (s_puffer_p >= laenge_puf-1) a_outimage(); s_puffer[s_puffer_p] = (char)0; } void skip(int kk) { int j; for (j=1; j <= kk; j++) {e_inbyte();} } void umlaut(void) { a_outchar('"'); } void set_char_k(unsigned char code) { a_outchar((char) code); } char special_char(char opcode,unsigned char k) { /* Sonderzeichen fuer "von" "bis" (--) und Gedankenstrich (---) sollen in der Form angezeigt werden. */ if ((char) k == '{') {a_outchar('-'); a_outchar('-'); return TRUE;} if ((char) k == '|') {a_outchar('-'); a_outchar('-'); a_outchar('-'); return TRUE;} if (strcmp(font_code, FONT_CODE_1) == 0) { if (opcode == FALSE){if (k > 127) { n_t1_ot1 = n_t1_ot1 + 1; return FALSE;}}; if (k <= 10) {a_outchar('^'); a_outchar('^'); return TRUE;} else if (k == 11) {a_outchar('f'); a_outchar('f'); return TRUE;} else if (k == 12) {a_outchar('f'); a_outchar('i'); return TRUE;} else if (k == 13) {a_outchar('f'); a_outchar('l'); return TRUE;} else if (k == 14) {a_outchar('f'); a_outchar('f'); a_outchar('i'); return TRUE;} else if (k == 15) {a_outchar('f'); a_outchar('f'); a_outchar('l'); return TRUE;} else if (k <= 24) {a_outchar('^'); a_outchar('^'); return TRUE;} else if (k == 25) {a_outchar('"'); a_outchar('s'); return TRUE;} else if (k <= 31) {a_outchar('^'); a_outchar('^'); return TRUE;} else return FALSE; } else if (strcmp(font_code, FONT_CODE_2) == 0) { if (k <= 15) {a_outchar('^'); a_outchar('^'); return TRUE;} else if (k == 16) {a_outchar('"'); return TRUE;} else if (k == 17) {a_outchar('"'); return TRUE;} else if (k <= 26) {a_outchar('^'); a_outchar('^'); return TRUE;} else if (k == 27) {a_outchar('f'); a_outchar('f'); return TRUE;} else if (k == 28) {a_outchar('f'); a_outchar('i'); return TRUE;} else if (k == 29) {a_outchar('f'); a_outchar('l'); return TRUE;} else if (k == 30) {a_outchar('f'); a_outchar('f'); a_outchar('i'); return TRUE;} else if (k == 31) {a_outchar('f'); a_outchar('f'); a_outchar('l'); return TRUE;} else if (k == 255) {a_outchar((char)223); return TRUE;} else return FALSE; } else return FALSE; } void set_put(int hj) { int hn; unsigned char hc; for (hn = 1; hn<= hj+1; hn++) { hc = e_inbyte(); if (special_char(FALSE,hc)== TRUE){} else a_outchar((char) hc); } } void bop(unsigned char code) { char b; long hn,hw; unsigned char hk; a_outimage(); vorschub = TRUE; hw = (int) e_inbyte(); for (hn=2; hn <= 4; hn++) { hk = e_inbyte(); hw = hw * 256 + (long) hk; } skip(40); /* skip 9*c[4] und p[1] */ sprintf(&s_puffer[0],"%c %d",(char) code, (int) hw); s_puffer_p = strlen(&s_puffer[0]); b = enthalten; enthalten = TRUE; a_outimage(); enthalten = b; } void test_neue_seite(void) { char * pp,tns[80]; pp = strchr(seitep[s_p], (char) 139); if (pp != NULL) { if (np >= 15) {printf("\n"); np = 0;} strcpy(tns,pp+2); if(strcmp(tns,tns_alt) != 0) { if (tr_gef == TRUE) {printf("[%s]",tns_alt); np = np+1;}; tr_gef = FALSE; printf("[%s]",tns); np = np+1; strcpy(tns_alt, tns); }; }; } char gefunden(char *str) { int n; n = strlen(str); if (str[n-1] != '-') {return FALSE;} if (n > 1){if (str[n-2] != '-') return TRUE;} return FALSE; } char *wortanfang(char *str) { char ht[2] = {(char)0, (char)0}; int n,k; n = strlen(str); k = 0; while ((str[k] == ' ') && (k <= n)) k++; memset(&stra[0], (char)0,laenge_puf); strncpy(&stra[0], &str[k],n-k); if (k == n) goto fin; n = n-k; k = n; ht[0] = (char)0; if (n <= 2) { if (stra[0] == '-') {goto fin;} else {ht[0] = '-';} } /* wenn sich \emph{Textwert}- am Ende einer Zeile ergibt, dann steht >Textwert -< in .dvi-Datei, deshalb: */ if (stra[n-2] == ' ') {stra[n-2] = '}';} while ((k>0) && (stra[k-1] != ' ')) { if (k==0) {goto fin;} k--; } fin: memset(&wortanf[0], (char)0,laenge_puf); return strcat(strncpy(&wortanf[0],&stra[k],n-k),&ht[0]); } char *wortende(char *str) { int n,k,k1; n = strlen(str); k1 = 0; k = 0; while ((str[k1] == ' ') && (k1 <= n)) k1++; if (k1 == n) goto fin; k = k1; while ((k0) && (str[k-1] == ' ')){ str[k-1] = (char)0; k--;}; return str; } char vergl_test(char * tcp) { int p1; p1 = 0; while ( p1 < hck_max) { if (strcmp(tcp, &hck[p1][0]) == 0) {anzgef++; return TRUE;} p1++; } p1 = 0; while ( p1 <= neu_max) { if (strcmp(tcp, &neu[p1][0]) == 0) {anzgef++; return TRUE;} p1++; } neu_max++; if (neu_max > laenge_neu) { neu_max = laenge_neu; } else strcpy(&neu[neu_max][0],tcp); return FALSE; } char zugelassen(char sta, unsigned char c) { int rc; if ((c == '-') || (isalpha(c)>0)) return TRUE; rc = (unsigned char) c; /* Nationals nach DIN 66 303, Tab 1; `A bis ''y, ohne \times und \div.*/ if (strcmp(font_code, FONT_CODE_1) == 0) {if ((rc >= 192) && (rc != 215) && (rc != 247)) {return TRUE;};} if (strcmp(font_code, FONT_CODE_2) == 0) /* Cork-Tabelle, Sept 1990 */ { if ((rc >= 128) && (rc != 159) && (rc != 189) && (rc != 190) && (rc != 191)) {return TRUE;} } if (sta == TRUE) { if (c == '"') {return TRUE;}}; return FALSE; } char* text_clear(char * str, int* p) { unsigned n; char cc; n = 0; *p = 0; while (strlen(str) > 0) { cc = (char) str[strlen(str)-1]; if (zugelassen(FALSE,cc) == FALSE) { str[strlen(str)-1] = (char) 0;} else goto trail; } trail: while (n < strlen(str)) { cc = (char) str[n]; if (zugelassen(TRUE,cc) == FALSE) {n++;} else goto fin; } fin: *p = n; memset(&hh1[0],(char)0,laenge_puf); return strncpy(&hh1[0], &str[n], strlen(&str[n])); } void eop(void) { char gef; char * ttp, *ttap,*tgesp, *tcp, *terr; int ttapl,ntc; a_outimage(); s_max = s_p-1; s_p = 0; test_neue_seite(); while (s_p <= s_max) { ttp = strip(seitep[s_p]); gef = gefunden(ttp); if (gef == TRUE) { ttap = wortanfang(ttp); ttapl = strlen(ttap); if (mitte-ttapl > 1) {pos1 = mitte-ttapl;} else pos1 = 1; s_p++; if (s_p > s_max) goto hinter_schl; if (ttapl < 2){gef = FALSE; goto schl;}; if (ttapl == 2){if (ttap[0] == '}'){gef = FALSE; goto schl;};}; test_neue_seite(); ttp = strip(seitep[s_p]); terr = wortende(ttp); tgesp = strcat(ttap,terr); gesamt++; strcpy(&hh[0],tgesp); tcp = text_clear(&hh[0],&ntc); if (vergl_test(tcp) == FALSE) { if (vorschub == TRUE) {printf("\n"); np = 0; vorschub = FALSE;} if (a_file != NULL){f_set_pos(pos1+ntc);fprintf(a_file,"%s\n",tcp);}; set_pos(pos1); printf("%s\n",tgesp); tr_gef = TRUE; } goto schl; } s_p++; if (s_p > s_max) goto hinter_schl; test_neue_seite(); schl: ; } hinter_schl: if (gef == TRUE) { if (vergl_test(ttap) == FALSE) { if (vorschub == TRUE) {printf("\n"); np = 0; vorschub = FALSE;}; if (a_file != NULL){f_set_pos(pos1); fprintf(a_file,"%s\n",ttap);}; set_pos(pos1); printf("%s\n",ttap); } } s_p = 0; } long pow(int b,int p) { int w,k; w = b; for (k=1; k < p; k++) {w = w *b;}; return w; } void eingabe(long* dd, unsigned char k) { char neg; unsigned char hk; long hn,hw; hw = (int) e_inbyte(); neg = FALSE; if (hw > 127) {neg = TRUE;}; for (hn = 2; hn <= (long) k; hn++) { hk = e_inbyte(); hw = hw*256+hk; }; if (neg == TRUE) {*dd = -(pow(2,k*8))+hw; } else *dd = hw; } void right(unsigned char code) { eingabe(&d_r, code-142); if (d_r > r_grenze) a_outchar(' '); if (d_r > r_grenze_zeile) a_outimage(); } void w0(void) { if (d_w > w_grenze) a_outchar(' '); if (abs(d_w) > w_grenze_zeile) a_outimage(); } void w(unsigned char code) { eingabe(&d_w, code-147); if (d_w > w_grenze) a_outchar(' '); if (d_w > w_grenze_zeile) a_outimage(); } void x0(void) { if (d_x > x_grenze) a_outchar(' '); if (abs(d_x) > x_grenze_zeile) a_outimage(); } void x(unsigned char code) { eingabe(&d_x, code-152); if (d_x > x_grenze) a_outchar(' '); if (d_x > x_grenze_zeile) a_outimage(); } void down(unsigned char code) { eingabe(&d_v, code-156); if (d_v > v_grenze_zeile) a_outimage(); } void y0(void) { if (d_y > y_grenze) a_outimage(); if (abs(d_y) > y_grenze_zeile) a_outimage(); } void y(unsigned char code) { eingabe(&d_y, code-161); if (d_y > y_grenze) a_outchar(' '); if (d_y > y_grenze_zeile) a_outimage(); } void z0(void) { if (d_z > z_grenze) a_outimage(); if (abs(d_z) > z_grenze_zeile) a_outimage(); } void z(unsigned char code) { eingabe(&d_z, code-166); if (d_z > z_grenze) a_outchar(' '); if (d_z > z_grenze_zeile) a_outimage(); } void xxx(unsigned char code) { long hn,hw,hk,hk1; hk = (int) code-238; hw = (int) e_inbyte(); for (hn=2; hn <= hk; hn++) { hk1 = (int) e_inbyte(); hw = hw * 256 + (long) hk1; } skip(hw); } void fnt_def(unsigned char code) { long hw,hk; skip(code - 230); /* skip k[1] bzw k[4] */ hw = (int) e_inbyte(); /* Lesen a[1] */ hk = (int) e_inbyte(); /* Lesen l[1] */ skip(2*hw+hk); /* skip a + 1 */ } void pre(void) { long hn; skip(13); hn = (int) e_inbyte(); skip(hn); } int main(int n_arg, char *v_arg[]) { /***********************************************************/ #ifdef __BORLANDC__ _fmode = O_BINARY; #endif /***********************************************************/ font_codep = strcpy(&font_code[0],FONT_CODE_2); verdateip = NULL; if (setvbuf(stdout,NULL,_IOLBF,0) != 0) { perror("setvbuf"); exit(1);} printf("\n%s ",v_arg[0]); printf("version 25.4.2000\n"); if (n_arg >= 3) { if (strcmp(v_arg[1],"-c") == 0) { font_codep = strcpy(&font_code[0],v_arg[2]); if (n_arg == 3) { printf("missing file name; exit\n"); goto schluss; } else { hauptdateip = strcpy(&hauptdatei[0],v_arg[3]); if (n_arg >= 5) { verdateip = strcpy(&verdatei[0],v_arg[4]);} } } else { hauptdateip = strcpy(&hauptdatei[0],v_arg[1]); verdateip = strcpy(&verdatei[0],v_arg[2]); } } else if (n_arg == 1) { printf("missing file name; exit\n"); goto schluss; } else { hauptdateip = strcpy(&hauptdatei[0],v_arg[1]); if (n_arg == 3) {verdateip = strcpy(&verdatei[0],v_arg[2]);}; }; if ((strlen(hauptdateip) <= 4) || (strstr(hauptdateip,".dvi") == 0)) { hauptdateip = strcat(hauptdateip,".dvi"); }; ausdateip = strncpy(&ausdatei[0],hauptdateip, strlen(hauptdateip)-4); ausdateip = strcat(ausdateip,".hyp"); filed1=open(hauptdateip,O_RDONLY); if ((int)filed1 <= 0) {printf("\ninput file not found\n");goto schluss;} a_file=fopen(ausdateip,"w+"); if (a_file == NULL) {printf("\nwarning: could not open file %s for writing\n",ausdateip);}; if (verdateip == NULL) {} else { ver_dat = fopen(verdateip,"r"); if (ver_dat == NULL) {printf("\nfile not found: %s\n",verdateip);} else { hck_p = 0; fscanf(ver_dat,"%s", & hck[hck_p][0]); while (feof(ver_dat) == 0) { hck_p++; if (hck_p >= laenge_hck) { printf("\nwarning: more than %d lines in file %s\n", laenge_hck,verdateip); goto weiter; } fscanf(ver_dat,"%s", & hck[hck_p][0]); } weiter: hck_max = hck_p; } } tr_gef = FALSE; printf("coding: %s\n",font_codep); printf("same words are given only once\n\n"); s_puffer_p = 0; s_p = 0; enthalten = FALSE; anzgef = 0; neu_max = 0; np = 0; k = e_inbyte(); while (E_ENDFILE == FALSE) { if (k == 0) {;} /* set_char_0 */ else if (special_char(TRUE,k) == TRUE) {;}/* Ligatur, sz -- u. --- */ else if (k <= 126) {set_char_k(k);} /* Ausgabe druckb. Zeichen */ else if (k == 127) {umlaut();} /* Umlautzeichen wird zu " */ else if (k <= 131) {set_put(k-128);} /* set1 bis set4 */ else if (k == 132) {skip(8);} /* set_rule */ else if (k <= 136) {set_put(k-133);} /* put1 bis put4 */ else if (k == 137) {skip(8);} /* put_rule */ else if (k == 138) {;} /* nop (no operation) */ else if (k == 139) {bop(k);} /* Seiten-Beginn */ else if (k == 140) {eop();} /* Seiten-Ende */ else if (k == 141) {;} /* push */ else if (k == 142) {;} /* pop */ else if (k <= 146) {right(k);} /* right1 bis right4 */ else if (k == 147) {w0();} /* w0 */ else if (k <= 151) {w(k);} /* w1 bis w4 */ else if (k == 152) {x0();} /* x0 */ else if (k <= 156) {x(k);} /* x1 bis x4 */ else if (k <= 160) {down(k);} /* down1 bis down4 */ else if (k == 161) {y0();} /* y0 */ else if (k <= 165) {y(k);} /* y1 bis y4 */ else if (k == 166) {z0();} /* z0 */ else if (k <= 170) {z(k);} /* z1 bis z4 */ else if (k <= 234) {;} /* Fontumschaltungen */ else if (k <= 238) {skip(k-234);} /* fnt1 bis fnt4 */ else if (k <= 242) {xxx(k);} /* xxx1 bis xxx4 */ else if (k <= 246) {fnt_def(k);} /* Font-Definitionen */ else if (k == 247) {pre();} /* Praeambel */ else if (k == 248) {break;} /* Ueberlesen Post,Post_post*/ ; k = e_inbyte(); }; close(filed1); printf("\nnumber of hyphenations:%5ld\n",gesamt); printf("already known/multiple:%5ld\n",anzgef); if (n_t1_ot1 > 0) { printf("%d\n",n_t1_ot1); printf("warning: coding OT1 used, T1 may be correct\n"); }; if (a_file != NULL) {fclose(a_file);} else {printf("\nwarning: could not open file %s for writing\n\n",ausdateip);}; exit(0); schluss: exit(1); } hyphen-show-20000425/README.hyphen_show100600 1750 144 7053 6606112311 15442 0ustar mbusersCopyright (C) 1997 G. Lamprecht, W. Lotz, R. Weibezahn; IWD, Bremen University hyphen_show is a program (written in C language) which looks for hyphenations in a .dvi-file created by TeX/LaTeX. As there is no line structure in the .dvi-file, line breakings must be concluded from horizontal and vertical gaps. There are constructs, where hyphenations cannot be found, and there are constructs, where we cannot extract correctly both fragments of an hyphenated word (especially at end of page, because of following footers, footnotes, running title etc.) On standard output you will find a list of hyphenations found together with page numbers, both extracted from texfilename.dvi. In file texfilename.hyp the user will find hyphenations only. Each hyphenation is included only at it's first occurence and only if it's not already found in file file_checked_hyphenations (if such a second file is specified at hyphen_show call). Files texfilename.hyp and file_checked_hyphenations have the same structure and are simple text files, so the user can easily edit each of these files (especially delete lines with incorrect hyphenations) and append file texfilename.hyp to file file_checked_hyphenations e.g. by using cat command. Program hyphen_show can be called as stand-alone program as described ahead; yet originally hyphen_show was written for use with xtem_TeXMenu, where it is started automatically (depending on the user's settings) after each TeX run or where it can be started explicitely as an xtem utility program. The program hyphen_show may be used and copied under the conditions of the (added) GNU GENERAL PUBLIC LICENSE, the Copyright must not be deleted or modified. IN NO EVENT SHALL THE LRW/IWD BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE LRW HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE LRW/IWD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE LRW/IWD NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. You may get hyphen_show directly from the authors (anonymous, password: RFC-conform e-mail address): ftp://ftp.iwd.uni-bremen.de/pub/tex/xtem/hyphenation/ or WWW: http://www.iwd.uni-bremen.de/xtem/xtem_texmenu.html Installation (if not done by "xteminstall" -- xtem's installation procedure): for system dependent compilation, link calls etc. see file hyphen_show.c. for tests and implememntation on various systems we are much obliged to: AIX (gcc, xlc) Gerlinde Kettl, University of Regensburg OpenVMS (cc, decc) Volker Schaa, Gesellschaft f. Schwerionenforschung (GSI), Darmstadt BORLAND-C Wolfram Liebchen, Forschungsinstitut fuer Optik we (the authors) developed and tested this program with: Sun SOLARIS 2.5 (gcc, cc) Linux (gcc) 1. compile program, e.g.: gcc hyphen_show.c -o hyphen_show 2. test program, e.g.: hyphen_show test.dvi (or use any other .dvi-file) 3. install program, e.g.: mv hyphen_show -c OT1 /usr/local/bin/hyphen_show 4. install man-page or hlp-file, e.g.: cp hyphen_show.1 /usr/local/man/man1/hyphen_show.1 or LIBRARY/INSERT/HELP DECUS[.HLB] HYPHEN_SHOW[.HLP In case of errors etc. give us a message: weibezahn@iwd.uni-bremen.de Authors: Guenther Lamprecht, Wolfhard Lotz, Roland Weibezahn