Changeset f36635 in git
- Timestamp:
- Jul 1, 1999, 2:52:33 PM (25 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '1e435b8ba068f7dbcd2aad89bcf324ebfd49f7ba')
- Children:
- 90402fff9cff37cdf6bd00ce9b9fd9b3994289ce
- Parents:
- e03e679922f2f0c529514b3e8dc048988ddad4ee
- Files:
-
- 3 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
COPYING
re03e67 rf36635 1 SINGULAR version 1.21 SINGULAR version <x-y-z> 2 2 University of Kaiserslautern 3 3 Department of Mathematics and Centre for Computer Algebra 4 4 Authors: G.-M. Greuel, G. Pfister, H. Schoenemann 5 Copyright (C) 1986-9 8; All Rights reserved5 Copyright (C) 1986-99; All Rights reserved 6 6 7 7 NOTICE -
Makefile.in
re03e67 rf36635 18 18 19 19 PERL = @PERL@ 20 TMP_DIR = @TMP_DIR@ 20 21 21 22 ############################################################## … … 29 30 .PHONY: all install uninstall 30 31 32 TEXINFO_TEX_FILES = epsf.tex texinfo.tex txi-cs.tex txi-de.tex txi-no.tex 33 TEXINFO_TEX_DIR = Texinfo/doc 31 34 all install uninstall: 32 35 @ for SUBDIR in ${BUILD_SUBDIRS}; \ 33 36 do \ 34 37 echo ${MAKE} $@ in $${SUBDIR}; \ 35 ( cd $${SUBDIR} && ${MAKE} $@; ) \ 38 ( cd $${SUBDIR} && ${MAKE} $@;); \ 39 (if test "$${SUBDIR}" = Texinfo && test -d doc; then \ 40 for FILE in ${TEXINFO_TEX_FILES}; \ 41 do \ 42 if test "$@" = uninstall; then\ 43 echo rm -f doc/$${FILE};\ 44 rm -f doc/$${FILE}; \ 45 else \ 46 echo cp ${TEXINFO_TEX_DIR}/$${FILE} doc; \ 47 cp ${TEXINFO_TEX_DIR}/$${FILE} doc; \ 48 fi; \ 49 done;\ 50 fi;); \ 36 51 done 37 52 … … 108 123 LN_S = @LN_S@ 109 124 MKINSTALLDIRS = ./mkinstalldirs 110 TMPDIR = /tmp/singdist125 TMPDIR = ${TMP_DIR}/singdist 111 126 SINGUNAME = @SINGUNAME@ 112 127 S_VERSION = $${SINGULAR_VERSION-@SINGULAR_VERSION@} 113 DISTROOT_NAME = Singular-${S_VERSION} 114 BINDIST_NAME = ${DISTROOT_NAME}-${SINGUNAME} 115 SHAREDIST_NAME = ${DISTROOT_NAME}-share 128 BINDIR_NAME = Singular/${SINGUNAME}/${S_VERSION} 129 LIBDIR_NAME = Singular/LIB/${S_VERSION} 130 GFTABLESDIR_NAME= Singular/LIB/gftables 131 DOCDIR_NAME = Singular/doc/${S_VERSION} 132 HTMLDIR_NAME = Singular/html/${S_VERSION} 133 134 BINDIST_NAME = Singular-${S_VERSION}-${SINGUNAME} 135 SHAREDIST_NAME = Singular-${S_VERSION}-share 116 136 ZIP = zip 117 137 … … 123 143 cd doc; ${MAKE} all ps 124 144 rm -rf ${TMPDIR}/ 125 ${MKINSTALLDIRS} ${TMPDIR}/ Singular/LIB/${S_VERSION}126 ${MKINSTALLDIRS} ${TMPDIR}/ Singular/doc/${S_VERSION}127 ${MKINSTALLDIRS} ${TMPDIR}/ Singular/html/${S_VERSION}128 ${MKINSTALLDIRS} ${TMPDIR}/ Singular/LIB/gftables129 cp Singular/LIB/*.lib ${TMPDIR}/ Singular/LIB/${S_VERSION}145 ${MKINSTALLDIRS} ${TMPDIR}/${LIBDIR_NAME} 146 ${MKINSTALLDIRS} ${TMPDIR}/${GFTABLESDIR_NAME} 147 ${MKINSTALLDIRS} ${TMPDIR}/${DOCDIR_NAME} 148 ${MKINSTALLDIRS} ${TMPDIR}/${HTMLDIR_NAME} 149 cp Singular/LIB/*.lib ${TMPDIR}/${LIBDIR_NAME} 130 150 rm -f ${TMPDIR}/Singular/LIB/${S_VERSION}/fastsolv.lib 131 151 rm -f ${TMPDIR}/Singular/LIB/${S_VERSION}/tst.lib 132 cp Singular/LIB/gftables/[0-9]* ${TMPDIR}/ Singular/LIB/gftables152 cp Singular/LIB/gftables/[0-9]* ${TMPDIR}/${GFTABLESDIR_NAME} 133 153 cp doc/singular.hlp doc/singular.ps doc/usercard.ps \ 134 154 doc/singular.dvi doc/usercard.dvi \ 135 ${TMPDIR}/ Singular/doc/${S_VERSION}136 cp -R doc/html/* ${TMPDIR}/ Singular/html/${S_VERSION}155 ${TMPDIR}/${DOCDIR_NAME} 156 cp -R doc/html/* ${TMPDIR}/${HTMLDIR_NAME} 137 157 cat README.general | sed -e "s/<x-y-z>/${S_VERSION}/g" > \ 138 158 ${TMPDIR}/Singular/README … … 150 170 cd Singular; ${MAKE} Singular-$@ libparse 151 171 rm -rf ${TMPDIR} 152 ${MKINSTALLDIRS} ${TMPDIR}/${SINGUNAME}/bin/ 153 ${MKINSTALLDIRS} ${TMPDIR}/Singular 154 cp Singular/Singular-$@ \ 155 ${TMPDIR}/${SINGUNAME}/bin/Singular-${S_VERSION} 156 cd ${TMPDIR}/${SINGUNAME}/bin; \ 157 ${LN_S} Singular-${S_VERSION} Singular 158 cp Singular/libparse ${TMPDIR}/${SINGUNAME}/bin/ 159 -strip ${TMPDIR}/${SINGUNAME}/bin/* 172 ${MKINSTALLDIRS} ${TMPDIR}/${BINDIR_NAME} 173 cp Singular/Singular-$@ ${TMPDIR}/${BINDIR_NAME}/Singular 174 cp Singular/libparse ${TMPDIR}/${BINDIR_NAME} 175 -strip ${TMPDIR}/${BINDIR_NAME}/* 160 176 cat INSTALL.unix | sed -e "s/<x-y-z>/${S_VERSION}/g" > \ 161 177 ${TMPDIR}/Singular/INSTALL 162 178 cd ${TMPDIR}; chmod -R a+rX *;\ 163 tar cf ${BINDIST_NAME}.tar ${SINGUNAME}Singular; \179 tar cf ${BINDIST_NAME}.tar Singular; \ 164 180 gzip ${BINDIST_NAME}.tar 165 181 mv ${TMPDIR}/${BINDIST_NAME}.tar.gz . … … 169 185 cd Singular; ${MAKE} Singular-$@ libparse 170 186 rm -rf ${TMPDIR} 171 ${MKINSTALLDIRS} ${TMPDIR}/${SINGUNAME}/bin/ 172 ${MKINSTALLDIRS} ${TMPDIR}/Singular 173 cp Singular/Singular-$@ \ 174 ${TMPDIR}/${SINGUNAME}/bin/Singular-${S_VERSION}-static 175 cd ${TMPDIR}/${SINGUNAME}/bin; \ 176 ${LN_S} Singular-${S_VERSION}-static Singular 177 cat INSTALL | sed -e "s/<x-y-z>/${S_VERSION}/g" > \ 187 ${MKINSTALLDIRS} ${TMPDIR}/${BINDIR_NAME} 188 cp Singular/Singular-$@ ${TMPDIR}/${BINDIR_NAME}/Singular-static 189 cp Singular/libparse ${TMPDIR}/${BINDIR_NAME} 190 -strip ${TMPDIR}/${BINDIR_NAME}/* 191 cat INSTALL.unix | sed -e "s/<x-y-z>/${S_VERSION}/g" > \ 178 192 ${TMPDIR}/Singular/INSTALL 179 193 cd ${TMPDIR}; chmod -R a+rX *;\ 180 tar cf ${BINDIST_NAME}-static.tar ${SINGUNAME} Singular;\194 tar cf ${BINDIST_NAME}-static.tar Singular; \ 181 195 gzip ${BINDIST_NAME}-static.tar 182 196 mv ${TMPDIR}/${BINDIST_NAME}-static.tar.gz . … … 197 211 INFO_PROGRAM = /bin/info 198 212 CYGWIN_DLL = /bin/cygwin1.dll 199 WIN_BINDIR = ${TMPDIR}/Singular/${S_VERSION}200 213 201 214 windist: ${SINGULAR} 202 215 cd Singular; ${MAKE} Singular-bindist libparse 203 216 rm -rf ${TMPDIR} 204 ${MKINSTALLDIRS} ${WIN_BINDIR} 205 ${INSTALL} Singular/Singular-bindist ${WIN_BINDIR}/Singular.exe 206 ${INSTALL} Singular/libparse ${WIN_BINDIR} 207 ${INSTALL} ${SH_PROGRAM} ${WIN_BINDIR} 208 ${INSTALL} ${INFO_PROGRAM} ${WIN_BINDIR} 209 ${INSTALL} ${CYGWIN_DLL} ${WIN_BINDIR} 217 ${MKINSTALLDIRS} ${TMPDIR}/${BINDIR_NAME} 218 ${INSTALL} Singular/Singular-bindist \ 219 ${TMPDIR}/${BINDIR_NAME}/Singular.exe 220 ${INSTALL} Singular/libparse ${TMPDIR}/${BINDIR_NAME} 221 ${INSTALL} ${SH_PROGRAM} ${TMPDIR}/${BINDIR_NAME} 222 ${INSTALL} ${INFO_PROGRAM} ${TMPDIR}/${BINDIR_NAME} 223 ${INSTALL} ${CYGWIN_DLL} ${TMPDIR}/${BINDIR_NAME} 210 224 cat INSTALL.win | sed -e "s/<x-y-z>/${S_VERSION}/g" > \ 211 225 ${TMPDIR}/Singular/INSTALL … … 214 228 mv ${TMPDIR}/sing.zip Singular-${S_VERSION}-${SINGUNAME}.zip 215 229 rm -rf ${TMPDIR} 216 217 230 srcdist: 218 231 rm -rf ${TMPDIR} … … 225 238 rm -rf ${TMPDIR} 226 239 227 rpmdist:228 cd rpm; ${MAKE} rpm229 230 240 # You can remeber the password with "iwd" == "ich war dabei" 231 241 CRYPT = enigma # it does not seem to decrypt correctly with the HP crypt -
README.download
re03e67 rf36635 31 31 where <uname> is a description of your hardware and 32 32 operating system. 33 Messages from tar like "Could not create symlink to ..."34 can safely be ignored - they appaer only in the case that you install35 the same version of Singular twice.36 33 37 34 (2) Unpack them at the same place and follow the instructions -
Singular/Makefile.in
re03e67 rf36635 253 253 install: all installbin 254 254 255 installbin: Singular 255 installbin: Singular libparse 256 256 ${MKINSTALLDIRS} ${bindir} 257 257 ${INSTALL_PROGRAM} Singular ${bindir}/Singular-${SINGULAR_VERSION} 258 ${INSTALL_PROGRAM} libparse ${bindir}/libparse 259 chmod a+x ${bindir}/Singular-${SINGULAR_VERSION} 258 260 rm -f ${bindir}/Singular 259 261 cd ${bindir}; ${LN_S} Singular-${SINGULAR_VERSION} Singular;\ -
Singular/libparse.l
re03e67 rf36635 3 3 * Computer Algebra System SINGULAR * 4 4 ****************************************/ 5 /* $Id: libparse.l,v 1.3 1 1998-12-02 15:56:05 kruegerExp $ */5 /* $Id: libparse.l,v 1.32 1999-07-01 12:49:48 obachman Exp $ */ 6 6 #include <stdio.h> 7 7 #include <string.h> … … 57 57 int yylplineno = 1; 58 58 int lpverbose = 0, check = 0; 59 int texinfo_out = 0; 59 60 int found_info=0, 60 61 found_version=0, … … 252 253 make_version(yytext,1); 253 254 #ifdef STANDALONE_PARSER 254 printf("Version:%s;\n", libnamebuf); 255 if (texinfo_out) 256 printf("$version = \"%s\";\n", libnamebuf); 257 else 258 printf("Version:%s;\n", libnamebuf); 255 259 #else 256 260 # ifdef HAVE_NAMESPACES … … 814 818 #endif /* HAVE_NAMESPACES */ 815 819 { 816 # ifndef STANDALONE_PARSER 820 #ifdef STANDALONE_PARSER 821 if (texinfo_out && last_cmd == LP_INFO) 822 { 823 long current_location = ftell(yylpin), i = string_start, quote = 0; 824 char c; 825 printf("$info = <<EOT;\n"); 826 fseek (yylpin, i, SEEK_SET); 827 while (i< current_location) 828 { 829 c = fgetc(yylpin); 830 if (c == '\\') 831 { 832 quote = (! quote); 833 } 834 else if (c == '"') 835 { 836 if (! quote) break; 837 } 838 else 839 quote = 0; 840 if (c == '@' || c == '$') putchar('\\'); 841 if (c != '\r') putchar(c); 842 i++; 843 } 844 fseek (yylpin, current_location, SEEK_SET); 845 printf("\nEOT\n"); 846 } 847 #else 817 848 if((last_cmd == LP_INFO)&&(mode == GET_INFO)) 818 849 { … … 849 880 # endif /* HAVE_NAMESPACES */ 850 881 } 851 # 882 #endif /* STANDALONE_PARSER */ 852 883 } 853 884 … … 876 907 main_init(argc, argv); 877 908 if(yyin == NULL) { 878 printf("No library found to parse.\n");909 fprintf(stderr, "No library found to parse.\n"); 879 910 exit(1); 880 911 } 881 882 if(lpverbose)printf("Verbose level=%d\n", lpverbose); 883 if(check)printf("Reporting most possible annomalies.\n"); 884 if(lpverbose||check)printf("\n"); 885 886 printf( " %-15s %20s %s,%s %s,%s %s,%s\n", "Library", 887 "function", "line", "start-eod", "line", "body-eob", 888 "line", "example-eoe"); 912 if (! texinfo_out) 913 { 914 if(lpverbose)printf("Verbose level=%d\n", lpverbose); 915 if(check)printf("Reporting most possible annomalies.\n"); 916 if(lpverbose||check)printf("\n"); 917 918 printf( " %-15s %20s %s,%s %s,%s %s,%s\n", "Library", 919 "function", "line", "start-eod", "line", "body-eob", 920 "line", "example-eoe"); 921 } 889 922 yylplex(argv[0], argv[0], &lib_style); 890 if(yylp_errno) 891 { 923 if(yylp_errno) { 892 924 printf("ERROR occured: [%d] ", yylp_errno); 893 925 printf(yylp_errlist[yylp_errno], yylplineno); … … 895 927 } 896 928 else if(pi!=NULL) printpi(pi); 897 main_result(argv[0]); 929 if (texinfo_out) 930 printf("1;"); 931 exit(0); 898 932 } 899 933 -
Singular/utils.cc
re03e67 rf36635 14 14 extern int optind, opterr, optopt; 15 15 extern int lpverbose, check; 16 extern int texinfo_out; 16 17 extern int found_version, found_info, found_oldhelp, found_proc_in_proc; 17 18 int warning_info = 0, warning_version = 0; … … 25 26 printf(" -d [digit] : digit=1,..,4 increases the verbosity of the checks\n"); 26 27 printf(" -s : turns on reporting about violations of unenforced syntax rules\n"); 28 printf(" -i : perl output of examples and help of procs\n"); 27 29 printf(" -h : print this message\n"); 28 30 exit(1); 29 31 } 32 33 static char* lib_file = NULL; 30 34 31 35 /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ 32 36 void main_init(int argc, char *argv[]) 33 37 { 34 char c , *file=NULL;35 36 while((c=getopt(argc, argv, " hd:sf:"))>=0) {38 char c; 39 40 while((c=getopt(argc, argv, "ihd:sf:"))>=0) { 37 41 switch(c) { 38 42 case 'd': … … 41 45 else optind--; 42 46 break; 43 case 'f': file = argv[optind-1];47 case 'f': lib_file = argv[optind-1]; 44 48 break; 45 49 case 's': 46 50 check++; 47 51 break; 52 case 'i': 53 texinfo_out = 1; 54 break; 48 55 case 'h' : 49 56 usage(argv[0]); 50 57 break; 58 51 59 case -1 : printf("no such option:%s\n", argv[optind]); 52 60 usage(argv[0]); … … 56 64 } 57 65 } 58 if(file!=NULL) { 59 yylpin = fopen( file, "rb" ); 60 printf("Checking library '%s'\n", file); 66 if (texinfo_out) lpverbose = 0; 67 68 if(lib_file!=NULL) { 69 yylpin = fopen( lib_file, "rb" ); 70 if (! texinfo_out) 71 printf("Checking library '%s'\n", lib_file); 72 else 73 printf("$library = \"%s\";\n", lib_file); 61 74 } else { 62 75 while(argc>optind && yylpin==NULL) { 63 76 yylpin = fopen( argv[optind], "rb" ); 64 if(yylpin!=NULL) printf("Checking library '%s'\n", argv[optind]); 77 if(yylpin!=NULL) 78 { 79 lib_file = argv[optind]; 80 if (! texinfo_out) 81 printf("Checking library '%s'\n", argv[optind]); 82 else 83 printf("$library = \"%s\";\n", lib_file); 84 } 65 85 else optind++; 66 86 } … … 120 140 121 141 /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ 142 143 #ifndef SEEK_SET 144 #define SEEK_SET 0 145 #endif 146 147 static void PrintOut(FILE *fd, int pos_start, int pos_end) 148 { 149 if (pos_start <= 0 || pos_end - pos_start <= 4) return; 150 char c; 151 152 fseek(fd, pos_start, SEEK_SET); 153 while (pos_start++ <= pos_end) 154 { 155 c = fgetc(fd); 156 if (c == '@' || c == '$') putchar('\\'); 157 if (c != '\r') putchar(c); 158 } 159 } 160 161 122 162 printpi(procinfov pi) 123 163 { 124 FILE *fp = fopen( pi->libname, "rb");125 164 char *buf, name[256]; 126 165 int len1, len2; 166 /* pi->libname is badly broken -- use file, instead */ 167 FILE *fp = fopen( lib_file, "rb"); 168 169 if (fp == NULL) 170 { 171 printf("Can not open %s\n", lib_file); 172 return 0; 173 } 127 174 128 175 if(!found_info && !warning_info) warning_info++; … … 131 178 pi->data.s.body_end = pi->data.s.proc_end; 132 179 133 if(lpverbose) printf("// "); 134 printf( "%c %-15s %20s ", pi->is_static ? 'l' : 'g', pi->libname, 135 pi->procname); 136 printf("line %4d,%5ld-%-5ld %4d,%5ld-%-5ld %4d,%5ld-%-5ld\n", 137 pi->data.s.proc_lineno, pi->data.s.proc_start, pi->data.s.def_end, 138 pi->data.s.body_lineno, pi->data.s.body_start, pi->data.s.body_end, 139 pi->data.s.example_lineno, pi->data.s.example_start, 140 pi->data.s.proc_end); 141 if(check) { 142 if(!pi->is_static && (pi->data.s.body_start-pi->data.s.def_end)<4) 143 printf("*** Procedure '%s' is global and has no help-section.\n", 144 pi->procname); 145 if(!pi->is_static && !pi->data.s.example_start) 146 printf("*** Procedure '%s' is global and has no example-section.\n",\ 147 pi->procname); 148 if(found_proc_in_proc) 149 printf("*** found proc within procedure '%s'.\n", pi->procname); 150 } 180 if (texinfo_out) 181 { 182 if ((! pi->is_static) && 183 (pi->data.s.body_start - pi->data.s.def_end > 10) && 184 (pi->data.s.example_start > 0) && 185 (pi->data.s.proc_end - pi->data.s.example_start > 10) && 186 (! found_proc_in_proc)) 187 { 188 printf("push(@procs, \"%s\");\n", pi->procname); 189 printf("$help{\"%s\"} = <<EOT;\n", pi->procname); 190 PrintOut(fp, pi->data.s.help_start, pi->data.s.body_start-3); 191 printf("\nEOT\n$example{\"%s\"} = <<EOT;\n", pi->procname); 192 PrintOut(fp, pi->data.s.example_start, pi->data.s.proc_end); 193 printf("\nEOT\n"); 194 } 195 } 196 else 197 { 198 if(lpverbose) printf("// "); 199 printf( "%c %-15s %20s ", pi->is_static ? 'l' : 'g', pi->libname, 200 pi->procname); 201 printf("line %4d,%5ld-%-5ld %4d,%5ld-%-5ld %4d,%5ld-%-5ld\n", 202 pi->data.s.proc_lineno, pi->data.s.proc_start, pi->data.s.def_end, 203 pi->data.s.body_lineno, pi->data.s.body_start, pi->data.s.body_end, 204 pi->data.s.example_lineno, pi->data.s.example_start, 205 pi->data.s.proc_end); 206 if(check) { 207 if(!pi->is_static && (pi->data.s.body_start-pi->data.s.def_end)<4) 208 printf("*** Procedure '%s' is global and has no help-section.\n", 209 pi->procname); 210 if(!pi->is_static && !pi->data.s.example_start) 211 printf("*** Procedure '%s' is global and has no example-section.\n",\ 212 pi->procname); 213 if(found_proc_in_proc) 214 printf("*** found proc within procedure '%s'.\n", pi->procname); 215 } 216 } 217 151 218 152 219 #if 0 -
configure
re03e67 rf36635 2 2 3 3 # Guess values for system-dependent variables and create Makefiles. 4 # Generated automatically using autoconf version 2.1 24 # Generated automatically using autoconf version 2.13 5 5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. 6 6 # … … 13 13 # Any additions from configure.in: 14 14 ac_default_prefix=`pwd` 15 ac_help="$ac_help 16 \ 17 --with-tmpdir=DIR use DIR as temporary directory" 15 18 ac_help="$ac_help 16 19 \ … … 37 40 \ 38 41 Singular CAS for Polynomial Computations" 42 ac_help="$ac_help 43 \ 44 Texinfo Texinfo for info, texi2dvi, makeinfo" 39 45 ac_help="$ac_help 40 46 \ … … 94 100 subdirs= 95 101 MFLAGS= MAKEFLAGS= 102 SHELL=${CONFIG_SHELL-/bin/sh} 96 103 # Maximum number of lines to put in a shell here document. 97 104 ac_max_here_lines=12 … … 377 384 378 385 -version | --version | --versio | --versi | --vers) 379 echo "configure generated by autoconf version 2.1 2"386 echo "configure generated by autoconf version 2.13" 380 387 exit 0 ;; 381 388 … … 547 554 ac_cpp='$CPP $CPPFLAGS' 548 555 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 549 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'556 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 550 557 cross_compiling=$ac_cv_prog_cc_cross 551 558 559 ac_exeext= 560 ac_objext=o 552 561 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then 553 562 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. … … 564 573 565 574 566 OUTPUT_MAKEFILES="Makefile doc/Makefile "575 OUTPUT_MAKEFILES="Makefile doc/Makefile doc/version.texi" 567 576 if test -d "mpr"; then 568 577 OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" mpr/Makefile" … … 580 589 581 590 echo $ac_n "checking uname for singular""... $ac_c" 1>&6 582 echo "configure:5 83: checking uname for singular" >&5591 echo "configure:592: checking uname for singular" >&5 583 592 if eval "test \"`echo '$''{'ac_cv_singuname'+set}'`\" = set"; then 584 593 echo $ac_n "(cached) $ac_c" 1>&6 … … 608 617 SINGULAR_MINOR_VERSION=3 609 618 SINGULAR_SUB_VERSION=3 610 SINGULAR_VERSION="${SINGULAR_MAJOR_VERSION}${VERSION_SEP}${SINGULAR_MINOR_VERSION}${VERSION_SEP}${SINGULAR_SUB_VERSION}" 611 VERSION_DATE="May 1999" 612 SINGULAR_DOS_VERSION="${SINGULAR_MAJOR_VERSION}-${SINGULAR_MINOR_VERSION}-${SINGULAR_SUB_VERSION}" 619 SINGULAR_SHORT_VERSION="${SINGULAR_MAJOR_VERSION}${VERSION_SEP}${SINGULAR_MINOR_VERSION}" 620 SINGULAR_VERSION="${SINGULAR_SHORT_VERSION}${VERSION_SEP}${SINGULAR_SUB_VERSION}" 621 VERSION_DATE="February 1999" 622 613 623 export SINGULAR_MINOR_VERSION 614 624 export SINGULAR_MAJOR_VERSION … … 620 630 621 631 632 622 633 # Extract the first word of "gcc", so it can be a program name with args. 623 634 set dummy gcc; ac_word=$2 624 635 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 625 echo "configure:6 26: checking for $ac_word" >&5636 echo "configure:637: checking for $ac_word" >&5 626 637 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 627 638 echo $ac_n "(cached) $ac_c" 1>&6 … … 630 641 ac_cv_prog_CC="$CC" # Let the user override the test. 631 642 else 632 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 633 for ac_dir in $PATH; do 643 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 644 ac_dummy="$PATH" 645 for ac_dir in $ac_dummy; do 634 646 test -z "$ac_dir" && ac_dir=. 635 647 if test -f $ac_dir/$ac_word; then … … 652 664 set dummy cc; ac_word=$2 653 665 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 654 echo "configure:6 55: checking for $ac_word" >&5666 echo "configure:667: checking for $ac_word" >&5 655 667 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 656 668 echo $ac_n "(cached) $ac_c" 1>&6 … … 659 671 ac_cv_prog_CC="$CC" # Let the user override the test. 660 672 else 661 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=" ${IFS}:"673 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 662 674 ac_prog_rejected=no 663 for ac_dir in $PATH; do 675 ac_dummy="$PATH" 676 for ac_dir in $ac_dummy; do 664 677 test -z "$ac_dir" && ac_dir=. 665 678 if test -f $ac_dir/$ac_word; then … … 696 709 fi 697 710 711 if test -z "$CC"; then 712 case "`uname -s`" in 713 *win32* | *WIN32*) 714 # Extract the first word of "cl", so it can be a program name with args. 715 set dummy cl; ac_word=$2 716 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 717 echo "configure:718: checking for $ac_word" >&5 718 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 719 echo $ac_n "(cached) $ac_c" 1>&6 720 else 721 if test -n "$CC"; then 722 ac_cv_prog_CC="$CC" # Let the user override the test. 723 else 724 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 725 ac_dummy="$PATH" 726 for ac_dir in $ac_dummy; do 727 test -z "$ac_dir" && ac_dir=. 728 if test -f $ac_dir/$ac_word; then 729 ac_cv_prog_CC="cl" 730 break 731 fi 732 done 733 IFS="$ac_save_ifs" 734 fi 735 fi 736 CC="$ac_cv_prog_CC" 737 if test -n "$CC"; then 738 echo "$ac_t""$CC" 1>&6 739 else 740 echo "$ac_t""no" 1>&6 741 fi 742 ;; 743 esac 744 fi 698 745 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } 699 746 fi 700 747 701 748 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 702 echo "configure:7 03: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5749 echo "configure:750: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 703 750 704 751 ac_ext=c … … 706 753 ac_cpp='$CPP $CPPFLAGS' 707 754 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 708 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'755 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 709 756 cross_compiling=$ac_cv_prog_cc_cross 710 757 711 cat > conftest.$ac_ext <<EOF 712 #line 713 "configure" 758 cat > conftest.$ac_ext << EOF 759 760 #line 761 "configure" 713 761 #include "confdefs.h" 762 714 763 main(){return(0);} 715 764 EOF 716 if { (eval echo configure:7 17: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then765 if { (eval echo configure:766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 717 766 ac_cv_prog_cc_works=yes 718 767 # If we can't run a trivial program, we are probably using a cross compiler. … … 728 777 fi 729 778 rm -fr conftest* 779 ac_ext=c 780 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 781 ac_cpp='$CPP $CPPFLAGS' 782 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 783 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 784 cross_compiling=$ac_cv_prog_cc_cross 730 785 731 786 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 … … 734 789 fi 735 790 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 736 echo "configure:7 37: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5791 echo "configure:792: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 737 792 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 738 793 cross_compiling=$ac_cv_prog_cc_cross 739 794 740 795 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 741 echo "configure:7 42: checking whether we are using GNU C" >&5796 echo "configure:797: checking whether we are using GNU C" >&5 742 797 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then 743 798 echo $ac_n "(cached) $ac_c" 1>&6 … … 748 803 #endif 749 804 EOF 750 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure: 751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then805 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then 751 806 ac_cv_prog_gcc=yes 752 807 else … … 759 814 if test $ac_cv_prog_gcc = yes; then 760 815 GCC=yes 761 ac_test_CFLAGS="${CFLAGS+set}" 762 ac_save_CFLAGS="$CFLAGS" 763 CFLAGS= 764 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 765 echo "configure:766: checking whether ${CC-cc} accepts -g" >&5 816 else 817 GCC= 818 fi 819 820 ac_test_CFLAGS="${CFLAGS+set}" 821 ac_save_CFLAGS="$CFLAGS" 822 CFLAGS= 823 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 824 echo "configure:825: checking whether ${CC-cc} accepts -g" >&5 766 825 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then 767 826 echo $ac_n "(cached) $ac_c" 1>&6 … … 778 837 779 838 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 780 if test "$ac_test_CFLAGS" = set; then 781 CFLAGS="$ac_save_CFLAGS" 782 elif test $ac_cv_prog_cc_g = yes; then 839 if test "$ac_test_CFLAGS" = set; then 840 CFLAGS="$ac_save_CFLAGS" 841 elif test $ac_cv_prog_cc_g = yes; then 842 if test "$GCC" = yes; then 783 843 CFLAGS="-g -O2" 784 844 else 845 CFLAGS="-g" 846 fi 847 else 848 if test "$GCC" = yes; then 785 849 CFLAGS="-O2" 786 fi 787 else 788 GCC= 789 test "${CFLAGS+set}" = set || CFLAGS="-g" 850 else 851 CFLAGS= 852 fi 790 853 fi 791 854 792 855 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 793 echo "configure: 794: checking how to run the C preprocessor" >&5856 echo "configure:857: checking how to run the C preprocessor" >&5 794 857 # On Suns, sometimes $CPP names a directory. 795 858 if test -n "$CPP" && test -d "$CPP"; then … … 806 869 # not just through cpp. 807 870 cat > conftest.$ac_ext <<EOF 808 #line 8 09"configure"871 #line 872 "configure" 809 872 #include "confdefs.h" 810 873 #include <assert.h> … … 812 875 EOF 813 876 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 814 { (eval echo configure:8 15: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }815 ac_err=`grep -v '^ *+' conftest.out `877 { (eval echo configure:878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 878 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 816 879 if test -z "$ac_err"; then 817 880 : … … 823 886 CPP="${CC-cc} -E -traditional-cpp" 824 887 cat > conftest.$ac_ext <<EOF 825 #line 8 26"configure"888 #line 889 "configure" 826 889 #include "confdefs.h" 827 890 #include <assert.h> … … 829 892 EOF 830 893 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 831 { (eval echo configure:8 32: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }832 ac_err=`grep -v '^ *+' conftest.out `894 { (eval echo configure:895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 895 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 833 896 if test -z "$ac_err"; then 834 897 : … … 838 901 cat conftest.$ac_ext >&5 839 902 rm -rf conftest* 903 CPP="${CC-cc} -nologo -E" 904 cat > conftest.$ac_ext <<EOF 905 #line 906 "configure" 906 #include "confdefs.h" 907 #include <assert.h> 908 Syntax Error 909 EOF 910 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 911 { (eval echo configure:912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 912 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 913 if test -z "$ac_err"; then 914 : 915 else 916 echo "$ac_err" >&5 917 echo "configure: failed program was:" >&5 918 cat conftest.$ac_ext >&5 919 rm -rf conftest* 840 920 CPP=/lib/cpp 921 fi 922 rm -f conftest* 841 923 fi 842 924 rm -f conftest* … … 852 934 853 935 echo $ac_n "checking for AIX""... $ac_c" 1>&6 854 echo "configure: 855: checking for AIX" >&5936 echo "configure:937: checking for AIX" >&5 855 937 cat > conftest.$ac_ext <<EOF 856 #line 857"configure"938 #line 939 "configure" 857 939 #include "confdefs.h" 858 940 #ifdef _AIX … … 881 963 set dummy $ac_prog; ac_word=$2 882 964 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 883 echo "configure: 884: checking for $ac_word" >&5965 echo "configure:966: checking for $ac_word" >&5 884 966 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then 885 967 echo $ac_n "(cached) $ac_c" 1>&6 … … 888 970 ac_cv_prog_PERL="$PERL" # Let the user override the test. 889 971 else 890 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 891 for ac_dir in $PATH; do 972 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 973 ac_dummy="$PATH" 974 for ac_dir in $ac_dummy; do 892 975 test -z "$ac_dir" && ac_dir=. 893 976 if test -f $ac_dir/$ac_word; then … … 909 992 done 910 993 994 # Extract the first word of "latex2html", so it can be a program name with args. 995 set dummy latex2html; ac_word=$2 996 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 997 echo "configure:998: checking for $ac_word" >&5 998 if eval "test \"`echo '$''{'ac_cv_prog_LATEX2HTML'+set}'`\" = set"; then 999 echo $ac_n "(cached) $ac_c" 1>&6 1000 else 1001 if test -n "$LATEX2HTML"; then 1002 ac_cv_prog_LATEX2HTML="$LATEX2HTML" # Let the user override the test. 1003 else 1004 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 1005 ac_dummy="$PATH" 1006 for ac_dir in $ac_dummy; do 1007 test -z "$ac_dir" && ac_dir=. 1008 if test -f $ac_dir/$ac_word; then 1009 ac_cv_prog_LATEX2HTML="latex2html" 1010 break 1011 fi 1012 done 1013 IFS="$ac_save_ifs" 1014 fi 1015 fi 1016 LATEX2HTML="$ac_cv_prog_LATEX2HTML" 1017 if test -n "$LATEX2HTML"; then 1018 echo "$ac_t""$LATEX2HTML" 1>&6 1019 else 1020 echo "$ac_t""no" 1>&6 1021 fi 1022 911 1023 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 912 echo "configure: 913: checking whether ln -s works" >&51024 echo "configure:1025: checking whether ln -s works" >&5 913 1025 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then 914 1026 echo $ac_n "(cached) $ac_c" 1>&6 … … 930 1042 fi 931 1043 1044 if test -x Texi2html/texi2html; then 1045 TEXI2HTML=`pwd`/Texi2html/texi2html 1046 1047 else 1048 echo "configure: warning: could not find Texi2html/texi2html HTML generation might fail" 1>&2 1049 # Extract the first word of "texi2html", so it can be a program name with args. 1050 set dummy texi2html; ac_word=$2 1051 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1052 echo "configure:1053: checking for $ac_word" >&5 1053 if eval "test \"`echo '$''{'ac_cv_prog_TEXI2HTML'+set}'`\" = set"; then 1054 echo $ac_n "(cached) $ac_c" 1>&6 1055 else 1056 if test -n "$TEXI2HTML"; then 1057 ac_cv_prog_TEXI2HTML="$TEXI2HTML" # Let the user override the test. 1058 else 1059 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 1060 ac_dummy="$PATH" 1061 for ac_dir in $ac_dummy; do 1062 test -z "$ac_dir" && ac_dir=. 1063 if test -f $ac_dir/$ac_word; then 1064 ac_cv_prog_TEXI2HTML="texi2html" 1065 break 1066 fi 1067 done 1068 IFS="$ac_save_ifs" 1069 fi 1070 fi 1071 TEXI2HTML="$ac_cv_prog_TEXI2HTML" 1072 if test -n "$TEXI2HTML"; then 1073 echo "$ac_t""$TEXI2HTML" 1>&6 1074 else 1075 echo "$ac_t""no" 1>&6 1076 fi 1077 1078 fi 1079 if test "$ac_cv_prog_LATEX2HTML" = latex2html; then 1080 TEXI2HTML_OPTS="-l2h" 1081 else 1082 TEXI2HTML_OPTS="-expandinfo" 1083 fi 1084 932 1085 933 1086 # expand prefix and pass it to subsequent configures … … 973 1126 # check for AIX 974 1127 echo $ac_n "checking whether _AIX is defined""... $ac_c" 1>&6 975 echo "configure: 976: checking whether _AIX is defined" >&51128 echo "configure:1129: checking whether _AIX is defined" >&5 976 1129 if eval "test \"`echo '$''{'ac_cv_is_aix'+set}'`\" = set"; then 977 1130 echo $ac_n "(cached) $ac_c" 1>&6 978 1131 else 979 1132 cat > conftest.$ac_ext <<EOF 980 #line 981"configure"1133 #line 1134 "configure" 981 1134 #include "confdefs.h" 982 1135 #ifdef _AIX … … 1004 1157 1005 1158 echo $ac_n "checking for atof in -lm""... $ac_c" 1>&6 1006 echo "configure:1 007: checking for atof in -lm" >&51159 echo "configure:1160: checking for atof in -lm" >&5 1007 1160 ac_lib_var=`echo m'_'atof | sed 'y%./+-%__p_%'` 1008 1161 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then … … 1012 1165 LIBS="-lm $LIBS" 1013 1166 cat > conftest.$ac_ext <<EOF 1014 #line 1 015"configure"1167 #line 1168 "configure" 1015 1168 #include "confdefs.h" 1016 1169 /* Override any gcc2 internal prototype to avoid an error. */ … … 1023 1176 ; return 0; } 1024 1177 EOF 1025 if { (eval echo configure:1 026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then1178 if { (eval echo configure:1179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1026 1179 rm -rf conftest* 1027 1180 eval "ac_cv_lib_$ac_lib_var=yes" … … 1051 1204 1052 1205 echo $ac_n "checking for socket in -lbsd""... $ac_c" 1>&6 1053 echo "configure:1 054: checking for socket in -lbsd" >&51206 echo "configure:1207: checking for socket in -lbsd" >&5 1054 1207 ac_lib_var=`echo bsd'_'socket | sed 'y%./+-%__p_%'` 1055 1208 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then … … 1059 1212 LIBS="-lbsd $LIBS" 1060 1213 cat > conftest.$ac_ext <<EOF 1061 #line 1 062"configure"1214 #line 1215 "configure" 1062 1215 #include "confdefs.h" 1063 1216 /* Override any gcc2 internal prototype to avoid an error. */ … … 1070 1223 ; return 0; } 1071 1224 EOF 1072 if { (eval echo configure:1 073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then1225 if { (eval echo configure:1226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1073 1226 rm -rf conftest* 1074 1227 eval "ac_cv_lib_$ac_lib_var=yes" … … 1098 1251 1099 1252 echo $ac_n "checking for listen in -lsocket""... $ac_c" 1>&6 1100 echo "configure:1 101: checking for listen in -lsocket" >&51253 echo "configure:1254: checking for listen in -lsocket" >&5 1101 1254 ac_lib_var=`echo socket'_'listen | sed 'y%./+-%__p_%'` 1102 1255 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then … … 1106 1259 LIBS="-lsocket $LIBS" 1107 1260 cat > conftest.$ac_ext <<EOF 1108 #line 1 109"configure"1261 #line 1262 "configure" 1109 1262 #include "confdefs.h" 1110 1263 /* Override any gcc2 internal prototype to avoid an error. */ … … 1117 1270 ; return 0; } 1118 1271 EOF 1119 if { (eval echo configure:1 120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then1272 if { (eval echo configure:1273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1120 1273 rm -rf conftest* 1121 1274 eval "ac_cv_lib_$ac_lib_var=yes" … … 1145 1298 1146 1299 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 1147 echo "configure:1 148: checking for gethostbyname in -lnsl" >&51300 echo "configure:1301: checking for gethostbyname in -lnsl" >&5 1148 1301 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` 1149 1302 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then … … 1153 1306 LIBS="-lnsl $LIBS" 1154 1307 cat > conftest.$ac_ext <<EOF 1155 #line 1 156"configure"1308 #line 1309 "configure" 1156 1309 #include "confdefs.h" 1157 1310 /* Override any gcc2 internal prototype to avoid an error. */ … … 1164 1317 ; return 0; } 1165 1318 EOF 1166 if { (eval echo configure:1 167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then1319 if { (eval echo configure:1320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1167 1320 rm -rf conftest* 1168 1321 eval "ac_cv_lib_$ac_lib_var=yes" … … 1192 1345 1193 1346 echo $ac_n "checking for mpq_init in -lgmp""... $ac_c" 1>&6 1194 echo "configure:1 195: checking for mpq_init in -lgmp" >&51347 echo "configure:1348: checking for mpq_init in -lgmp" >&5 1195 1348 ac_lib_var=`echo gmp'_'mpq_init | sed 'y%./+-%__p_%'` 1196 1349 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then … … 1200 1353 LIBS="-lgmp $LIBS" 1201 1354 cat > conftest.$ac_ext <<EOF 1202 #line 1 203"configure"1355 #line 1356 "configure" 1203 1356 #include "confdefs.h" 1204 1357 /* Override any gcc2 internal prototype to avoid an error. */ … … 1211 1364 ; return 0; } 1212 1365 EOF 1213 if { (eval echo configure:1 214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then1366 if { (eval echo configure:1367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1214 1367 rm -rf conftest* 1215 1368 eval "ac_cv_lib_$ac_lib_var=yes" … … 1239 1392 1240 1393 echo $ac_n "checking for mpz_init in -lsmallgmp""... $ac_c" 1>&6 1241 echo "configure:1 242: checking for mpz_init in -lsmallgmp" >&51394 echo "configure:1395: checking for mpz_init in -lsmallgmp" >&5 1242 1395 ac_lib_var=`echo smallgmp'_'mpz_init | sed 'y%./+-%__p_%'` 1243 1396 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then … … 1247 1400 LIBS="-lsmallgmp $LIBS" 1248 1401 cat > conftest.$ac_ext <<EOF 1249 #line 1 250"configure"1402 #line 1403 "configure" 1250 1403 #include "confdefs.h" 1251 1404 /* Override any gcc2 internal prototype to avoid an error. */ … … 1258 1411 ; return 0; } 1259 1412 EOF 1260 if { (eval echo configure:1 261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then1413 if { (eval echo configure:1414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1261 1414 rm -rf conftest* 1262 1415 eval "ac_cv_lib_$ac_lib_var=yes" … … 1286 1439 1287 1440 echo $ac_n "checking for IMP_PutGmpInt in -lMP""... $ac_c" 1>&6 1288 echo "configure:1 289: checking for IMP_PutGmpInt in -lMP" >&51441 echo "configure:1442: checking for IMP_PutGmpInt in -lMP" >&5 1289 1442 ac_lib_var=`echo MP'_'IMP_PutGmpInt | sed 'y%./+-%__p_%'` 1290 1443 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then … … 1294 1447 LIBS="-lMP $LIBS" 1295 1448 cat > conftest.$ac_ext <<EOF 1296 #line 1 297"configure"1449 #line 1450 "configure" 1297 1450 #include "confdefs.h" 1298 1451 /* Override any gcc2 internal prototype to avoid an error. */ … … 1305 1458 ; return 0; } 1306 1459 EOF 1307 if { (eval echo configure:1 308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then1460 if { (eval echo configure:1461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1308 1461 rm -rf conftest* 1309 1462 eval "ac_cv_lib_$ac_lib_var=yes" … … 1333 1486 1334 1487 echo $ac_n "checking for MPT_GetTree in -lMPT""... $ac_c" 1>&6 1335 echo "configure:1 336: checking for MPT_GetTree in -lMPT" >&51488 echo "configure:1489: checking for MPT_GetTree in -lMPT" >&5 1336 1489 ac_lib_var=`echo MPT'_'MPT_GetTree | sed 'y%./+-%__p_%'` 1337 1490 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then … … 1341 1494 LIBS="-lMPT $LIBS" 1342 1495 cat > conftest.$ac_ext <<EOF 1343 #line 1 344"configure"1496 #line 1497 "configure" 1344 1497 #include "confdefs.h" 1345 1498 /* Override any gcc2 internal prototype to avoid an error. */ … … 1352 1505 ; return 0; } 1353 1506 EOF 1354 if { (eval echo configure:1 355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then1507 if { (eval echo configure:1508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1355 1508 rm -rf conftest* 1356 1509 eval "ac_cv_lib_$ac_lib_var=yes" … … 1380 1533 1381 1534 echo $ac_n "checking for atof in -lsingcf""... $ac_c" 1>&6 1382 echo "configure:1 383: checking for atof in -lsingcf" >&51535 echo "configure:1536: checking for atof in -lsingcf" >&5 1383 1536 ac_lib_var=`echo singcf'_'atof | sed 'y%./+-%__p_%'` 1384 1537 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then … … 1388 1541 LIBS="-lsingcf $LIBS" 1389 1542 cat > conftest.$ac_ext <<EOF 1390 #line 1 391"configure"1543 #line 1544 "configure" 1391 1544 #include "confdefs.h" 1392 1545 /* Override any gcc2 internal prototype to avoid an error. */ … … 1399 1552 ; return 0; } 1400 1553 EOF 1401 if { (eval echo configure:1 402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then1554 if { (eval echo configure:1555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1402 1555 rm -rf conftest* 1403 1556 eval "ac_cv_lib_$ac_lib_var=yes" … … 1427 1580 1428 1581 echo $ac_n "checking for atof in -lsingfac""... $ac_c" 1>&6 1429 echo "configure:1 430: checking for atof in -lsingfac" >&51582 echo "configure:1583: checking for atof in -lsingfac" >&5 1430 1583 ac_lib_var=`echo singfac'_'atof | sed 'y%./+-%__p_%'` 1431 1584 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then … … 1435 1588 LIBS="-lsingfac $LIBS" 1436 1589 cat > conftest.$ac_ext <<EOF 1437 #line 1 438"configure"1590 #line 1591 "configure" 1438 1591 #include "confdefs.h" 1439 1592 /* Override any gcc2 internal prototype to avoid an error. */ … … 1446 1599 ; return 0; } 1447 1600 EOF 1448 if { (eval echo configure:1 449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then1601 if { (eval echo configure:1602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1449 1602 rm -rf conftest* 1450 1603 eval "ac_cv_lib_$ac_lib_var=yes" … … 1478 1631 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 1479 1632 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 1480 echo "configure:1 481: checking for $ac_hdr" >&51633 echo "configure:1634: checking for $ac_hdr" >&5 1481 1634 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 1482 1635 echo $ac_n "(cached) $ac_c" 1>&6 1483 1636 else 1484 1637 cat > conftest.$ac_ext <<EOF 1485 #line 1 486"configure"1638 #line 1639 "configure" 1486 1639 #include "confdefs.h" 1487 1640 #include <$ac_hdr> 1488 1641 EOF 1489 1642 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1490 { (eval echo configure:1 491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1491 ac_err=`grep -v '^ *+' conftest.out `1643 { (eval echo configure:1644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1644 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1492 1645 if test -z "$ac_err"; then 1493 1646 rm -rf conftest* … … 1544 1697 1545 1698 1699 # Check whether --with-tmpdir or --without-tmpdir was given. 1700 if test "${with_tmpdir+set}" = set; then 1701 withval="$with_tmpdir" 1702 : 1703 fi 1704 1546 1705 # Check whether --enable-smallgmp or --disable-smallgmp was given. 1547 1706 if test "${enable_smallgmp+set}" = set; then … … 1586 1745 fi 1587 1746 1747 # Check whether --enable-Texinfo or --disable-Texinfo was given. 1748 if test "${enable_Texinfo+set}" = set; then 1749 enableval="$enable_Texinfo" 1750 : 1751 fi 1752 1588 1753 1589 1754 # Check whether --with-MP or --without-MP was given. … … 1612 1777 1613 1778 1779 echo $ac_n "checking which tmp dir to use""... $ac_c" 1>&6 1780 echo "configure:1781: checking which tmp dir to use" >&5 1781 if test "${with_tmpdir+set}" = set && test -d ${with_tmpdir}; then 1782 if (echo "${with_tmpdir}" | egrep "\." >/dev/null 2>&1) 1783 then 1784 TMP_DIR="/tmp" 1785 else 1786 TMP_DIR=${with_tmpdir} 1787 fi 1788 else 1789 TMP_DIR="/tmp" 1790 fi 1791 echo "$ac_t""$TMP_DIR" 1>&6 1792 1793 1794 echo $ac_n "checking whether to configure and build texinfo""... $ac_c" 1>&6 1795 echo "configure:1796: checking whether to configure and build texinfo" >&5 1796 if test "$enable_texinfo" != no && test -d Texinfo; then 1797 echo "$ac_t""yes" 1>&6 1798 enable_texinfo=yes 1799 CONFIG_SUBDIRS="$CONFIG_SUBDIRS Texinfo" 1800 TEXI2DVI=${bindir}/texi2dvi 1801 MAKEINFO="${bindir}/makeinfo --force" 1802 TEXINDEX=${bindir}/texindex 1803 else 1804 echo "$ac_t""no" 1>&6 1805 echo "configure: warning: Building of doc might fail. Need Texinfo" 1>&2 1806 enable_texinfo=no 1807 TEXI2DVI=texi2dvi 1808 MAKEINFO=makeinfo 1809 TEXINDEX=${bindir}/texindex 1810 fi 1811 1812 1813 1814 1815 1614 1816 echo $ac_n "checking whether to configure and build gmp lib""... $ac_c" 1>&6 1615 echo "configure:1 616: checking whether to configure and build gmp lib" >&51817 echo "configure:1818: checking whether to configure and build gmp lib" >&5 1616 1818 if test "$enable_gmp" != yes && test "$enable_gmp" != no; then 1617 1819 if test "$ac_gmp_ok" != yes && test -d gmp; then … … 1639 1841 1640 1842 echo $ac_n "checking whether to configure and build smallgmp lib""... $ac_c" 1>&6 1641 echo "configure:1 642: checking whether to configure and build smallgmp lib" >&51843 echo "configure:1844: checking whether to configure and build smallgmp lib" >&5 1642 1844 if test "$enable_smallgmp" != yes && test "$enable_smallgmp" != no; then 1643 1845 if test "$ac_smallgmp_ok" != yes && test "$ac_gmp_ok" != yes && \ … … 1678 1880 1679 1881 echo $ac_n "checking whether to configure and build MP lib""... $ac_c" 1>&6 1680 echo "configure:1 681: checking whether to configure and build MP lib" >&51882 echo "configure:1883: checking whether to configure and build MP lib" >&5 1681 1883 if test "$enable_MP" != yes && test "$enable_MP" != no; then 1682 1884 if test "$with_MP" != no && test "$ac_MP_ok" != yes && test -d MP && \ … … 1707 1909 1708 1910 echo $ac_n "checking whether to configure and build factory lib""... $ac_c" 1>&6 1709 echo "configure:1 710: checking whether to configure and build factory lib" >&51911 echo "configure:1912: checking whether to configure and build factory lib" >&5 1710 1912 if test "$enable_factory" != yes && test "$enable_factory" != no; then 1711 1913 if test "$with_factory" != no && test "$ac_factory_ok" != yes && \ … … 1732 1934 1733 1935 echo $ac_n "checking whether to configure and build libfac lib""... $ac_c" 1>&6 1734 echo "configure:1 735: checking whether to configure and build libfac lib" >&51936 echo "configure:1937: checking whether to configure and build libfac lib" >&5 1735 1937 if test "$enable_libfac" != yes && test "$enable_libfac" != no; then 1736 1938 if test "$with_libfac" != no && test "$ac_libfac_ok" != yes && \ … … 1762 1964 1763 1965 echo $ac_n "checking whether to configure and build sgroup lib""... $ac_c" 1>&6 1764 echo "configure:1 765: checking whether to configure and build sgroup lib" >&51966 echo "configure:1967: checking whether to configure and build sgroup lib" >&5 1765 1967 if test "$enable_sgroup" != yes && test "$enable_sgroup" != no; then 1766 1968 if test "$with_sgroup" != no && test "$ac_sgroup_ok" != yes && \ … … 1792 1994 1793 1995 echo $ac_n "checking whether to configure and build Singular""... $ac_c" 1>&6 1794 echo "configure:1 795: checking whether to configure and build Singular" >&51996 echo "configure:1997: checking whether to configure and build Singular" >&5 1795 1997 if test "$enable_Singular" != yes && test "$enable_Singular" != no; then 1796 1998 if test "$with_Singular" != no && test -d Singular; then … … 1817 2019 1818 2020 echo $ac_n "checking which apint package to use""... $ac_c" 1>&6 1819 echo "configure: 1820: checking which apint package to use" >&52021 echo "configure:2022: checking which apint package to use" >&5 1820 2022 if test "$with_apint" = gmp; then 1821 2023 if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then … … 1841 2043 1842 2044 echo $ac_n "checking whether to use with MP""... $ac_c" 1>&6 1843 echo "configure: 1844: checking whether to use with MP" >&52045 echo "configure:2046: checking whether to use with MP" >&5 1844 2046 if test "$with_MP" = yes; then 1845 2047 if test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then … … 1860 2062 1861 2063 echo $ac_n "checking whether to use with factory""... $ac_c" 1>&6 1862 echo "configure: 1863: checking whether to use with factory" >&52064 echo "configure:2065: checking whether to use with factory" >&5 1863 2065 if test "$with_factory" = yes; then 1864 2066 if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then … … 1879 2081 1880 2082 echo $ac_n "checking whether to use with libfac""... $ac_c" 1>&6 1881 echo "configure: 1882: checking whether to use with libfac" >&52083 echo "configure:2084: checking whether to use with libfac" >&5 1882 2084 if test "$with_libfac" = yes; then 1883 2085 if test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes; then … … 1898 2100 1899 2101 echo $ac_n "checking whether to use with Singular""... $ac_c" 1>&6 1900 echo "configure: 1901: checking whether to use with Singular" >&52102 echo "configure:2103: checking whether to use with Singular" >&5 1901 2103 if test "$with_Singular" != no && test "$with_Singular" != yes; then 1902 2104 if test "$enable_Singular" = yes; then … … 1950 2152 1951 2153 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 1952 echo "configure: 1953: checking whether ${MAKE-make} sets \${MAKE}" >&52154 echo "configure:2155: checking whether ${MAKE-make} sets \${MAKE}" >&5 1953 2155 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` 1954 2156 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then … … 2023 2225 # and sets the high bit in the cache file unless we assign to the vars. 2024 2226 (set) 2>&1 | 2025 case `(ac_space=' '; set ) 2>&1` in2227 case `(ac_space=' '; set | grep ac_space) 2>&1` in 2026 2228 *ac_space=\ *) 2027 2229 # `set' does not quote correctly, so add quotes (double-quote substitution … … 2102 2304 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; 2103 2305 -version | --version | --versio | --versi | --vers | --ver | --ve | --v) 2104 echo "$CONFIG_STATUS generated by autoconf version 2.1 2"2306 echo "$CONFIG_STATUS generated by autoconf version 2.13" 2105 2307 exit 0 ;; 2106 2308 -help | --help | --hel | --he | --h) … … 2121 2323 $ac_vpsub 2122 2324 $extrasub 2325 s%@SHELL@%$SHELL%g 2123 2326 s%@CFLAGS@%$CFLAGS%g 2124 2327 s%@CPPFLAGS@%$CPPFLAGS%g 2125 2328 s%@CXXFLAGS@%$CXXFLAGS%g 2329 s%@FFLAGS@%$FFLAGS%g 2126 2330 s%@DEFS@%$DEFS%g 2127 2331 s%@LDFLAGS@%$LDFLAGS%g … … 2144 2348 s%@SINGUNAME@%$SINGUNAME%g 2145 2349 s%@SINGULAR_VERSION@%$SINGULAR_VERSION%g 2146 s%@SINGULAR_DOS_VERSION@%$SINGULAR_DOS_VERSION%g 2350 s%@VERSION_DATE@%$VERSION_DATE%g 2351 s%@SINGULAR_SHORT_VERSION@%$SINGULAR_SHORT_VERSION%g 2147 2352 s%@CC@%$CC%g 2148 2353 s%@CPP@%$CPP%g 2149 2354 s%@PERL@%$PERL%g 2355 s%@LATEX2HTML@%$LATEX2HTML%g 2150 2356 s%@LN_S@%$LN_S%g 2357 s%@TEXI2HTML@%$TEXI2HTML%g 2358 s%@TEXI2HTML_OPTS@%$TEXI2HTML_OPTS%g 2151 2359 s%@SINGULAR@%$SINGULAR%g 2360 s%@TMP_DIR@%$TMP_DIR%g 2361 s%@TEXI2DVI@%$TEXI2DVI%g 2362 s%@MAKEINFO@%$MAKEINFO%g 2363 s%@TEXINDEX@%$TEXINDEX%g 2152 2364 s%@SET_MAKE@%$SET_MAKE%g 2153 2365 s%@SUBDIRS@%$SUBDIRS%g -
configure.in
re03e67 rf36635 2 2 AC_INIT(Singular/matpol.h) 3 3 AC_PREFIX_DEFAULT(`pwd`) 4 OUTPUT_MAKEFILES="Makefile doc/Makefile "4 OUTPUT_MAKEFILES="Makefile doc/Makefile doc/version.texi" 5 5 if test -d "mpr"; then 6 6 OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" mpr/Makefile" … … 47 47 SINGULAR_MINOR_VERSION=3 48 48 SINGULAR_SUB_VERSION=3 49 SINGULAR_VERSION="${SINGULAR_MAJOR_VERSION}${VERSION_SEP}${SINGULAR_MINOR_VERSION}${VERSION_SEP}${SINGULAR_SUB_VERSION}" 50 VERSION_DATE="May 1999" 51 SINGULAR_DOS_VERSION="${SINGULAR_MAJOR_VERSION}-${SINGULAR_MINOR_VERSION}-${SINGULAR_SUB_VERSION}" 49 SINGULAR_SHORT_VERSION="${SINGULAR_MAJOR_VERSION}${VERSION_SEP}${SINGULAR_MINOR_VERSION}" 50 SINGULAR_VERSION="${SINGULAR_SHORT_VERSION}${VERSION_SEP}${SINGULAR_SUB_VERSION}" 51 VERSION_DATE="February 1999" 52 52 53 export SINGULAR_MINOR_VERSION 53 54 export SINGULAR_MAJOR_VERSION … … 58 59 dnl substitue them into the Makefiles 59 60 AC_SUBST(SINGULAR_VERSION) 60 AC_SUBST(SINGULAR_DOS_VERSION) 61 AC_SUBST(VERSION_DATE) 62 AC_SUBST(SINGULAR_SHORT_VERSION) 61 63 62 64 dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll … … 68 70 69 71 AC_CHECK_PROGS(PERL, perl5 perl) 72 AC_CHECK_PROG(LATEX2HTML, latex2html, latex2html) 70 73 AC_PROG_LN_S 74 if test -x Texi2html/texi2html; then 75 TEXI2HTML=`pwd`/Texi2html/texi2html 76 AC_SUBST(TEXI2HTML) 77 else 78 AC_MSG_WARN(could not find Texi2html/texi2html HTML generation might fail) 79 AC_CHECK_PROG(TEXI2HTML, texi2html, texi2html) 80 fi 81 if test "$ac_cv_prog_LATEX2HTML" = latex2html; then 82 TEXI2HTML_OPTS="-l2h" 83 else 84 TEXI2HTML_OPTS="-expandinfo" 85 fi 86 AC_SUBST(TEXI2HTML_OPTS) 71 87 72 88 dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll … … 179 195 dnl Check command line arguments 180 196 dnl 197 AC_ARG_WITH(tmpdir, \ 198 [ --with-tmpdir=DIR use DIR as temporary directory]) 181 199 AC_ARG_ENABLE(smallgmp, \ 182 200 [ --enable-PACKAGE configure and build PACKAGE … … 196 214 AC_ARG_ENABLE(Singular, \ 197 215 [ Singular CAS for Polynomial Computations]) 216 AC_ARG_ENABLE(Texinfo, \ 217 [ Texinfo Texinfo for info, texi2dvi, makeinfo]) 198 218 199 219 AC_ARG_WITH(MP,\ … … 214 234 215 235 dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll 236 dnl Check what to use as tmp dir 237 dnl 238 AC_MSG_CHECKING(which tmp dir to use) 239 if test "${with_tmpdir+set}" = set && test -d ${with_tmpdir}; then 240 if (echo "${with_tmpdir}" | egrep "\." >/dev/null 2>&1) 241 then 242 TMP_DIR="/tmp" 243 else 244 TMP_DIR=${with_tmpdir} 245 fi 246 else 247 TMP_DIR="/tmp" 248 fi 249 AC_MSG_RESULT($TMP_DIR) 250 AC_SUBST(TMP_DIR) 251 252 dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll 216 253 dnl Check whether or not to configure and build various packages 217 254 dnl 255 AC_MSG_CHECKING(whether to configure and build texinfo) 256 if test "$enable_texinfo" != no && test -d Texinfo; then 257 AC_MSG_RESULT(yes) 258 enable_texinfo=yes 259 CONFIG_SUBDIRS="$CONFIG_SUBDIRS Texinfo" 260 TEXI2DVI=${bindir}/texi2dvi 261 MAKEINFO="${bindir}/makeinfo --force" 262 TEXINDEX=${bindir}/texindex 263 else 264 AC_MSG_RESULT(no) 265 AC_MSG_WARN(Building of doc might fail. Need Texinfo) 266 enable_texinfo=no 267 TEXI2DVI=texi2dvi 268 MAKEINFO=makeinfo 269 TEXINDEX=${bindir}/texindex 270 fi 271 AC_SUBST(TEXI2DVI) 272 AC_SUBST(MAKEINFO) 273 AC_SUBST(TEXINDEX) 274 275 218 276 AC_MSG_CHECKING(whether to configure and build gmp lib) 219 277 if test "$enable_gmp" != yes && test "$enable_gmp" != no; then -
doc/Makefile.in
re03e67 rf36635 14 14 prefix = @prefix@ 15 15 infodir = ${prefix}/info 16 bindir = @bindir@ 16 17 17 18 ## … … 26 27 27 28 TEX = tex 28 MAKEINFO = makeinfo 29 TEXI2DVI = texi2dvi 30 TEXINDEX = texindex 29 MAKEINFO = @MAKEINFO@ 30 TEXI2DVI = @TEXI2DVI@ 31 TEXINDEX = @TEXINDEX@ 32 TEXI2HTML = @TEXI2HTML@ 33 LATEX2HTML = @LATEX2HTML@ 31 34 DVIPS = dvips 32 35 IMAGES = contents_motif.gif index_motif.gif \ … … 36 39 invisible.xbm bg_left.gif bg_right.gif 37 40 41 # d2t stuff 38 42 SINGULAR = @SINGULAR@ 43 LIBPARSE = ${bindir}/libparse 44 D2T_SUBDIR = ./d2t_singular 45 DOC2TEX = ./doc2tex.pl -subdir ${D2T_SUBDIR} -Singular ${SINGULAR} \ 46 -libparse ${LIBPARSE} -I ../Singular/LIB 47 TMP_DIR = @TMP_DIR@ 48 TEXI2HTML_OPTS = @TEXI2HTML_OPTS@ -l2h_l2h ${LATEX2HTML} -l2h_tmp ${TMP_DIR} 39 49 ## 40 50 ## End configuration dependend stuff … … 51 61 tutor.tex examples.tex start.tex copyright.tex 52 62 63 # prepend bindir to path so that programs from there are taken first 64 export PATH := "${bindir}:${PATH}" 65 53 66 .PHONY: info dvi ps 54 67 # default target … … 60 73 singular.hlp: ${MANUAL_FILES} 61 74 - ${MAKEINFO} --no-split singular.tex 75 76 singular_all.hlp: singular_all.tex 77 - ${MAKEINFO} --no-split singular_all.tex 78 79 singular_lib.hlp: singular_lib.tex 80 - ${MAKEINFO} --no-split singular_lib.tex 62 81 63 82 # dvi stuff … … 73 92 ${TEX} $< 74 93 94 singular_all.dvi: singular_all.tex 95 ${TEXI2DVI} singular_all.tex 96 97 singular_lib.dvi: singular_lib.tex 98 ${TEXI2DVI} singular_lib.tex 99 75 100 # postscript stuff 76 101 ps: singular.ps usercard.ps … … 83 108 84 109 # html stuff 85 html: ${MANUAL_FILES} 86 test -d html || mkdir html 87 cd html && ../texi2html -I .. -menu -expandinfo -number -split_node -verbose ../singular.tex 88 test -d html/images || mkdir html/images 89 for img in ${IMAGES}; \ 90 do \ 91 echo uudecode images/$${img}.uu; \ 92 uudecode images/$${img}.uu; \ 93 done 94 touch html 110 html: html/singular.html 111 html/singular.html: ${MANUAL_FILES} t2h_singular.init t2h.init 112 ${TEXI2HTML} -init_file t2h_singular.init ${TEXI2HTML_OPTS} -subdir html singular.tex 95 113 96 114 # html stuff 97 115 html_tutor: ${TUTOR_FILES} 98 116 test -d html_tutor || mkdir html_tutor 99 cd html_tutor && ../texi2html -I .. -menu -expandinfo -number -split_node -verbose../tutor.tex117 cd html_tutor && ${TEXI2HTML} ${TEXI2HTML_OPTS} ../tutor.tex 100 118 test -d html || mkdir html 101 119 test -d html/images || mkdir html/images … … 109 127 110 128 # how to create the texinfo files 111 %.tex: %.doc doc2tex ${SINGULAR} 112 @ echo 113 @ echo "Be sure Singular is up-to-date before making the examples!" 114 @ echo 115 ./doc2tex ${SINGULAR} $* 116 - grep "error occurred" $@ 129 singular_all.tex: ${MANUAL_FILES} doc2tex.pl ${SINGULAR} ${LIBPARSE} 130 ${DOC2TEX} -lib_fun -lib_ex -o singular_all.tex singular.doc 117 131 118 doc2tex: doc2tex.c 119 $(CC) doc2tex.c -o doc2tex 132 # how to create the texinfo files 133 singular_lib.tex: ${MANUAL_FILES} doc2tex.pl ${SINGULAR} ${LIBPARSE} 134 ${DOC2TEX} -lib_fun -o singular_lib.tex singular.doc 135 136 %.tex: %.doc doc2tex.pl ${SINGULAR} ${LIBPARSE} 137 ${DOC2TEX} $* 138 139 # targets which produce stand-alone documents 140 COPYING: copyright.tex 141 ${MAKEINFO} --no-header -o COPYING copyright.tex 142 120 143 121 144 # targets concerned with maintenance … … 134 157 /bin/rm -f *.fn *.fns *.ky *.kys *.log *.pg *.pgs *.toc *.tp 135 158 /bin/rm -f *.tps *.vr *.vrs 136 /bin/rm -f doc2texsingular.hlp *.dvi *.ps ${DOC2TEX_FILES}137 /bin/rm -rf html 159 /bin/rm -f singular.hlp *.dvi *.ps ${DOC2TEX_FILES} 160 /bin/rm -rf html ${D2T_SUBDIR} 138 161 139 162 mostlyclean: clean -
doc/STYLEGUIDE
re03e67 rf36635 49 49 + Email Adressen in @email{...} notieren, URL's in @url{...} 50 50 51 + Muticolumn tables: Rows of multicolumn tables need to go in one 52 line, otherwise exi2html chockes. Space beween rows with "empty" 53 rows (c.f. texi2html), i.e., with @item @tab @tab .... 54 55 56 * tex * 57 ======= 58 + Use @math{...} as you would use $..$ in latex -- i.e., ANY 59 mathematical symbols should be within @math (or, @tex, if they 60 require special tex symbols) 61 62 + don't use \mbox, use \hbox, instead 63 64 + use \hbox only within math environment 65 66 + don't use any sophisticated tex commands (like \eqalign), restrict 67 yourself to command which latex understands, as well. 68 69 + no "@"-constructs within @tex ... @end tex 70 71 + @tex and '@end tex' should always be on separate lines 72 73 51 74 52 75 * Notationen * … … 107 130 "the ideal resp.@: module is..." schreiben. 108 131 109 + Zum Englischen: 110 "i.e.", "e.g.", "for example", "that is" usw. werden immer in Kommas 111 eingebettet: 132 + non-zero, zero-dimensional, zero-set: use hyphen; Plural of zero: 133 zeros (instead of zeroes) 134 135 + Zum Englischen: "i.e.", "e.g.", "for example", "that is", 136 "resp. ..." usw. werden immer in Kommas eingebettet: 112 137 @sc{Singular}, for example, has the ... 113 138 Nach einem Doppelpunkt schreiben wir klein weiter: … … 215 240 trennen. 216 241 242 217 243 * allgemeines * 218 244 =============== … … 222 248 223 249 ------------------------------------------------------------ 224 $Id: STYLEGUIDE,v 1.9 1998-10-26 15:05:33 obachman Exp $ 225 ------------------------------------------------------------ 250 $Id: STYLEGUIDE,v 1.10 1999-07-01 12:47:59 obachman Exp $ -
doc/copyright.tex
re03e67 rf36635 1 1 @comment -*-texinfo-*- 2 @comment $Id: copyright.tex,v 1. 19 1998-07-28 12:03:57 SingularExp $2 @comment $Id: copyright.tex,v 1.20 1999-07-01 12:47:59 obachman Exp $ 3 3 @comment this file contains the copyright notice on Singular 4 5 @c The following directives are necessary for proper compilation 6 @c with emacs (C-c C-e C-r). Please keep it as it is. Since it 7 @c is wrapped in `@ignore' and `@end ignore' it does not harm `tex' or 8 @c `makeinfo' but is a great help in editing this file (emacs 9 @c ignores the `@ignore'). 10 @ignore 11 %**start 12 \input texinfo.tex 13 @setfilename copyright.info 14 @node Top, Preface 15 @menu 16 * Preface:: 17 @end menu 18 @node Preface, General concepts, Top, Top 19 @chapter Preface 20 %**end 21 @end ignore 4 @include version.texi 22 5 23 6 @cindex copyright … … 29 12 30 13 @center @sc{Singular} version @value{VERSION} 31 @center University of Kaiserslautern32 @center Department of Mathematics and Centre for Computer Algebra33 @center Authors: G.-M. Greuel, G. Pfister, H. Schoenemann14 @center @uref{http://www.uni-kl.de/,,University of Kaiserslautern} 15 @center @uref{http://www.mathematik.uni-kl.de/,,Department of Mathematics} and @uref{http://www.mathematik.uni-kl.de/~zca/,,Centre for Computer Algebra} 16 @center Authors: @uref{http://www.mathematik.uni-kl.de/~wwwagag/E/Greuel,,G.-M. Greuel}, @uref{http://www.mathematik.uni-kl.de/~wwwagag/E/Pfister,,G. Pfister}, @uref{http://www.mathematik.uni-kl.de/~hannes,,H. Schoenemann} 34 17 35 @center Copyright @copyright{} 1986-9 8; All Rights Reserved18 @center Copyright @copyright{} 1986-99; All Rights Reserved 36 19 @sp 2 37 20 @center @strong{NOTICE} 38 21 39 22 Permission to use, copy, modify, and distribute this software or parts … … 55 38 56 39 @item 57 You have registered yourself as a Singularuser by sending email to @*40 You have registered yourself as a @sc{Singular} user by sending email to @* 58 41 @email{singular@@mathematik.uni-kl.de} 59 42 with the subject line (or, mail body) … … 75 58 results that were partly obtained using @sc{Singular}, we request that you 76 59 cite @sc{Singular} (see 77 @ur l{http://www.ma@-the@-ma@-tik.uni-kl.de/~zca/Singular/how_to_cite.html}78 on informationon how to cite Singular) and inform us about it.60 @uref{http://www.ma@-the@-ma@-tik.uni-kl.de/~zca/Singular/how_to_cite.html, for information} 61 on how to cite Singular) and inform us about it. 79 62 80 63 Please send any comments or bug reports to 81 @ email{singular@@mathematik.uni-kl.de}.64 @center @email{singular@@mathematik.uni-kl.de}. 82 65 83 66 The following parts of @sc{Singular} have their own copyright: the Gnu Multiple … … 90 73 91 74 The latest information about @sc{Singular} is always available from 92 @ur l{http://www.ma@-the@-ma@-tik.uni-kl.de/~zca/Singular}.75 @uref{http://www.ma@-the@-ma@-tik.uni-kl.de/~zca/Singular}. 93 76 @ifset singularmanual 94 77 The program @sc{Singular} and the above mentioned parts are available via … … 98 81 @copyright{} Free Software Foundation: 99 82 @code{libgmp-2.0.2.tar.gz} 100 @* @ur l{ftp://ftp.gnu.ai.mit.edu} or its mirrors83 @* @uref{ftp://ftp.gnu.ai.mit.edu} or its mirrors 101 84 @item readline 102 85 @copyright{} Free Software Foundation: 103 86 @code{libreadline-2.0.tar.gz} 104 @* @ur l{ftp://ftp.gnu.ai.mit.edu} or its mirrors87 @* @uref{ftp://ftp.gnu.ai.mit.edu} or its mirrors 105 88 @item MP 106 89 @copyright{} Gray/Kajler/Wang, Kent State University: 107 90 @code{MP-1.1.2.tar.gz}, 108 @* @ur l{http://SymbolicNet.mcs.kent.edu/areas/protocols/mp.html}91 @* @uref{http://SymbolicNet.mcs.kent.edu/areas/protocols/mp.html} 109 92 @item Factory 110 93 @copyright{} Greuel/Stobbe, University of Kaiserslautern: … … 122 105 @* Contact @email{michael@@math.uni-sb.de} for details on libfac. 123 106 @item @sc{Singular} binaries 124 @ur l{ftp://www.mathematik.uni-kl.de/pub/Math/Singular/} or via a107 @uref{ftp://www.mathematik.uni-kl.de/pub/Math/Singular/} or via a 125 108 WWW brow@-ser from 126 @ur l{http://www.mathematik.uni-kl.de/ftp/pub/Math/@-Singular/}109 @uref{http://www.mathematik.uni-kl.de/ftp/pub/Math/@-Singular/} 127 110 @end table 128 111 @end ifset -
doc/singular_toc.html
re03e67 rf36635 1 1 <HTML> 2 2 <HEAD> 3 <!-- This HTML file has been created by texi2html 1.5 44 from ../singular.tex on 19 June 1998-->3 <!-- This HTML file has been created by texi2html 1.51 4 from singular.tex on 14 March 1999 --> 5 5 6 6 <TITLE>Singular Manual - Table of Contents</TITLE> 7 8 7 </HEAD> 9 <BODY background="images/bg_right.gif"> 8 <BODY> 9 <H1>Singular Manual</H1> 10 <ADDRESS>Fachbereich Mathematik</ADDRESS> 11 <ADDRESS>und</ADDRESS> 12 <ADDRESS>Zentrum fuer Computeralgebra</ADDRESS> 13 <ADDRESS>Universitaet Kaiserslautern</ADDRESS> 14 <ADDRESS>D-67653 Kaiserslautern</ADDRESS> 15 <P> 10 16 <P><HR><P> 11 <CENTER><A HREF="http://www.mathematik.uni-kl.de/~zca/Singular" TARGET="_parent">12 <IMG SRC="images/singular.jpg"></A></CENTER><BR>13 <P>14 <H1><CENTER>Singular - Manual</CENTER></H1>15 <H3><CENTER>Version 1.2</CENTER></H3>16 <H3><CENTER>A Computer Algebra System for Polynomial Computations</CENTER></H3>17 <P>18 <CENTER><A HREF="http://www.uni-kl.de/" TARGET="_parent"><TT>University of Kaiserslautern</TT></A></CENTER>19 <CENTER><A HREF="http://www.mathematik.uni-kl.de/" TARGET="_parent"><TT>Department of Mathematics</TT></A></CENTER>20 <CENTER>and</CENTER>21 <CENTER><A HREF="http://www.mathematik.uni-kl.de/~zca/" TARGET="_parent"><TT>Centre for Computer Algebra</TT></A></CENTER>22 23 17 <UL> 24 <LI><A HREF="singular_1.html#SEC1">Preface</A> 25 <LI><A HREF="singular_2.html#SEC4">Introduction</A> 26 <LI><A HREF="singular_12.html#SEC14">General concepts</A> 27 <LI><A HREF="singular_48.html#SEC49">Data types</A> 28 <LI><A HREF="singular_132.html#SEC133">Functions and system variables</A> 29 <LI><A HREF="singular_279.html#SEC280">Tricks and pitfalls</A> 30 <LI><A HREF="singular_291.html#SEC285">Examples</A> 31 <LI><A HREF="singular_319.html#SEC313">Polynomial data</A> 32 <LI><A HREF="singular_328.html#SEC322">Mathematical background</A> 33 <LI><A HREF="singular_334.html#SEC328">SINGULAR libraries</A> 34 <LI><A HREF="singular_354.html#SEC348">Library function index</A> 35 <LI><A HREF="singular_355.html#SEC349">Index</A> 18 <LI><A NAME="TOC1" HREF="singular.html#SEC1">Preface</A> 19 <LI><A NAME="TOC2" HREF="singular.html#SEC2">Introduction</A> 20 <LI><A NAME="TOC3" HREF="singular.html#SEC3">General concepts</A> 21 <LI><A NAME="TOC4" HREF="singular.html#SEC4">Data types</A> 22 <LI><A NAME="TOC5" HREF="singular.html#SEC5">Functions and system variables</A> 23 <LI><A NAME="TOC6" HREF="singular.html#SEC6">Tricks and pitfalls</A> 24 <UL> 25 <LI><A NAME="TOC7" HREF="singular.html#SEC7">Limitations</A> 26 <LI><A NAME="TOC8" HREF="singular.html#SEC8">Major differences to the C programming language</A> 27 <UL> 28 <LI><A NAME="TOC9" HREF="singular.html#SEC9">No rvalue of increments and assignments</A> 29 <LI><A NAME="TOC10" HREF="singular.html#SEC10">Evaluation of logical expressions</A> 30 <LI><A NAME="TOC11" HREF="singular.html#SEC11">No case or switch statement</A> 31 <LI><A NAME="TOC12" HREF="singular.html#SEC12">Usage of commas</A> 32 <LI><A NAME="TOC13" HREF="singular.html#SEC13">Usage of brackets</A> 33 <LI><A NAME="TOC14" HREF="singular.html#SEC14">Behaviour of continue</A> 34 <LI><A NAME="TOC15" HREF="singular.html#SEC15">Return type of procedures</A> 35 </UL> 36 <LI><A NAME="TOC16" HREF="singular.html#SEC16">Miscellaneous oddities</A> 37 <LI><A NAME="TOC17" HREF="singular.html#SEC17">Identifier resolution</A> 38 </UL> 39 <LI><A NAME="TOC18" HREF="singular.html#SEC18">Examples</A> 40 <LI><A NAME="TOC19" HREF="singular.html#SEC19">Polynomial data</A> 41 <LI><A NAME="TOC20" HREF="singular.html#SEC20">Mathematical background</A> 42 <LI><A NAME="TOC21" HREF="singular.html#SEC21">SINGULAR libraries</A> 43 <UL> 44 <LI><A NAME="TOC22" HREF="singular.html#SEC22">standard_lib</A> 45 <LI><A NAME="TOC23" HREF="singular.html#SEC23">all_lib</A> 46 <LI><A NAME="TOC24" HREF="singular.html#SEC24">general_lib</A> 47 <LI><A NAME="TOC25" HREF="singular.html#SEC25">matrix_lib</A> 48 <LI><A NAME="TOC26" HREF="singular.html#SEC26">sing_lib</A> 49 <LI><A NAME="TOC27" HREF="singular.html#SEC27">elim_lib</A> 50 <LI><A NAME="TOC28" HREF="singular.html#SEC28">inout_lib</A> 51 <LI><A NAME="TOC29" HREF="singular.html#SEC29">random_lib</A> 52 <LI><A NAME="TOC30" HREF="singular.html#SEC30">deform_lib</A> 53 <LI><A NAME="TOC31" HREF="singular.html#SEC31">homolog_lib</A> 54 <LI><A NAME="TOC32" HREF="singular.html#SEC32">poly_lib</A> 55 <LI><A NAME="TOC33" HREF="singular.html#SEC33">ring_lib</A> 56 <LI><A NAME="TOC34" HREF="singular.html#SEC34">finvar_lib</A> 57 <LI><A NAME="TOC35" HREF="singular.html#SEC35">primdec_lib</A> 58 <LI><A NAME="TOC36" HREF="singular.html#SEC36">invar_lib</A> 59 <LI><A NAME="TOC37" HREF="singular.html#SEC37">latex_lib</A> 60 <LI><A NAME="TOC38" HREF="singular.html#SEC38">hnoether_lib</A> 61 <LI><A NAME="TOC39" HREF="singular.html#SEC39">classify_lib</A> 62 <LI><A NAME="TOC40" HREF="singular.html#SEC40">graphics_lib</A> 63 <LI><A NAME="TOC41" HREF="singular.html#SEC41">normal_lib</A> 64 </UL> 65 <LI><A NAME="TOC42" HREF="singular.html#SEC42">Library function index</A> 66 <LI><A NAME="TOC43" HREF="singular.html#SEC43">Index</A> 36 67 </UL> 37 68 <P><HR><P> 38 <H6>This document was generated on 19 June 1998 using the 39 <A HREF="http://wwwcn.cern.ch/dci/texi2html/" TARGET="_parent">texi2html</A> 40 translator version 1.51a.</H6> 41 <H6>Modified by the Singular-Team 19.6.1998</H6> 69 This document was generated on 14 March 1999 using the 70 <A HREF="http://wwwcn.cern.ch/dci/texi2html/">texi2html</A> 71 translator version 1.51.</P> 42 72 </BODY> 43 73 </HTML> -
doc/texinfo.tex
re03e67 rf36635 1 %% TeX macros to handle Texinfo files. 2 %% $Id: texinfo.tex,v 1.3 1998-06-19 13:09:19 krueger Exp $ 3 4 % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 5 % 94, 95, 96, 97 Free Software Foundation, Inc. 6 7 %This texinfo.tex file is free software; you can redistribute it and/or 8 %modify it under the terms of the GNU General Public License as 9 %published by the Free Software Foundation; either version 2, or (at 10 %your option) any later version. 11 12 %This texinfo.tex file is distributed in the hope that it will be 13 %useful, but WITHOUT ANY WARRANTY; without even the implied warranty 14 %of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 %General Public License for more details. 16 17 %You should have received a copy of the GNU General Public License 18 %along with this texinfo.tex file; see the file COPYING. If not, write 19 %to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 %Boston, MA 02111-1307, USA. 21 22 23 %In other words, you are welcome to use, share and improve this program. 24 %You are forbidden to forbid anyone else to use, share and improve 25 %what you give them. Help stamp out software-hoarding! 26 27 28 % Send bug reports to bug-texinfo@prep.ai.mit.edu. 29 % Please include a *precise* test case in each bug report. 30 31 32 % Make it possible to create a .fmt file just by loading this file: 33 % if the underlying format is not loaded, start by loading it now. 34 % Added by gildea November 1993. 1 % texinfo.tex -- TeX macros to handle Texinfo files. 2 % 3 % Load plain if necessary, i.e., if running under initex. 35 4 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi 36 37 % This automatically updates the version number based on RCS. 38 \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}} 39 \deftexinfoversion$Revision: 1.3 $ 40 \message{Loading texinfo package [Version \texinfoversion]:} 5 % 6 \def\texinfoversion{1999-02-21.16}% 7 % 8 % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 9 % Free Software Foundation, Inc. 10 % 11 % This texinfo.tex file is free software; you can redistribute it and/or 12 % modify it under the terms of the GNU General Public License as 13 % published by the Free Software Foundation; either version 2, or (at 14 % your option) any later version. 15 % 16 % This texinfo.tex file is distributed in the hope that it will be 17 % useful, but WITHOUT ANY WARRANTY; without even the implied warranty 18 % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 % General Public License for more details. 20 % 21 % You should have received a copy of the GNU General Public License 22 % along with this texinfo.tex file; see the file COPYING. If not, write 23 % to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 24 % Boston, MA 02111-1307, USA. 25 % 26 % In other words, you are welcome to use, share and improve this program. 27 % You are forbidden to forbid anyone else to use, share and improve 28 % what you give them. Help stamp out software-hoarding! 29 % 30 % Please try the latest version of texinfo.tex before submitting bug 31 % reports; you can get the latest version from: 32 % ftp://ftp.gnu.org/pub/gnu/texinfo.tex 33 % (and all GNU mirrors, see http://www.gnu.org/order/ftp.html) 34 % ftp://tug.org/tex/texinfo.tex 35 % ftp://ctan.org/macros/texinfo/texinfo.tex 36 % (and all CTAN mirrors, finger ctan@ctan.org for a list). 37 % /home/gd/gnu/doc/texinfo.tex on the GNU machines. 38 % The texinfo.tex in any given Texinfo distribution could well be out 39 % of date, so if that's what you're using, please check. 40 % There is a small home page for Texinfo at http://texinfo.org/. 41 % 42 % Send bug reports to bug-texinfo@gnu.org. Please include including a 43 % complete document in each bug report with which we can reproduce the 44 % problem. Patches are, of course, greatly appreciated. 45 % 46 % To process a Texinfo manual with TeX, it's most reliable to use the 47 % texi2dvi shell script that comes with the distribution. For a simple 48 % manual foo.texi, however, you can get away with this: 49 % tex foo.texi 50 % texindex foo.?? 51 % tex foo.texi 52 % tex foo.texi 53 % dvips foo.dvi -o # or whatever, to process the dvi file; this makes foo.ps. 54 % The extra runs of TeX get the cross-reference information correct. 55 % Sometimes one run after texindex suffices, and sometimes you need more 56 % than two; texi2dvi does it as many times as necessary. 57 % 58 % It is possible to adapt texinfo.tex for other languages. You can get 59 % the existing language-specific files from ftp://ftp.gnu.org/gnu/texinfo/. 60 61 \message{Loading texinfo [version \texinfoversion]:} 41 62 42 63 % If in a .fmt file, print the version number 43 64 % and turn on active characters that we couldn't do earlier because 44 65 % they might have appeared in the input file name. 45 \everyjob{\message{[Texinfo version \texinfoversion]} \message{}66 \everyjob{\message{[Texinfo version \texinfoversion]}% 46 67 \catcode`+=\active \catcode`\_=\active} 47 68 … … 55 76 \let\ptexdots=\dots 56 77 \let\ptexend=\end 57 \let\ptexequiv = \equiv 78 \let\ptexequiv=\equiv 79 \let\ptexexclam=\! 58 80 \let\ptexi=\i 59 81 \let\ptexlbrace=\{ … … 62 84 \let\ptext=\t 63 85 64 % Be sure we're in horizontal mode when doing a tie, since we make space 65 % equivalent to this in @example-like environments. Otherwise, a space 66 % at the beginning of a line will start with \penalty -- and 67 % since \penalty is valid in vertical mode, we'd end up putting the 68 % penalty on the vertical list instead of in the new paragraph. 69 {\catcode`@ = 11 70 % Avoid using \@M directly, because that causes trouble 71 % if the definition is written into an index file. 72 \global\let\tiepenalty = \@M 73 \gdef\tie{\leavevmode\penalty\tiepenalty\ } 74 } 86 % We never want plain's outer \+ definition in Texinfo. 87 % For @tex, we can use \tabalign. 88 \let\+ = \relax 75 89 76 90 … … 82 96 \newlinechar = `^^J 83 97 84 % Set up fixed words for English. 85 \ifx\putwordChapter\undefined{\gdef\putwordChapter{Chapter}}\fi% 86 \def\putwordInfo{Info}% 87 \ifx\putwordSee\undefined{\gdef\putwordSee{See}}\fi% 88 \ifx\putwordsee\undefined{\gdef\putwordsee{see}}\fi% 89 \ifx\putwordfile\undefined{\gdef\putwordfile{file}}\fi% 90 \ifx\putwordpage\undefined{\gdef\putwordpage{page}}\fi% 91 \ifx\putwordsection\undefined{\gdef\putwordsection{section}}\fi% 92 \ifx\putwordSection\undefined{\gdef\putwordSection{Section}}\fi% 93 \ifx\putwordTableofContents\undefined{\gdef\putwordTableofContents{Table of Contents}}\fi% 94 \ifx\putwordShortContents\undefined{\gdef\putwordShortContents{Short Contents}}\fi% 95 \ifx\putwordAppendix\undefined{\gdef\putwordAppendix{Appendix}}\fi% 98 % Set up fixed words for English if not already set. 99 \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi 100 \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi 101 \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi 102 \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi 103 \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi 104 \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi 105 \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi 106 \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi 107 \ifx\putwordof\undefined \gdef\putwordof{of}\fi 108 \ifx\putwordon\undefined \gdef\putwordon{on}\fi 109 \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi 110 \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi 111 \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi 112 \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi 113 \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi 114 \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi 115 \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi 116 % 117 \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi 118 \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi 119 \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi 120 \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi 121 \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi 122 \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi 123 \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi 124 \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi 125 \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi 126 \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi 127 \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi 128 \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi 129 % 130 \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi 131 \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi 132 \ifx\putwordDefivar\undefined \gdef\putwordDefivar{Instance Variable}\fi 133 \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi 134 \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi 135 \ifx\putwordDeftypevar\undefined\gdef\putwordDeftypevar{Variable}\fi 136 \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi 137 \ifx\putwordDeftypefun\undefined\gdef\putwordDeftypefun{Function}\fi 96 138 97 139 % Ignore a token. … … 102 144 \hyphenation{mini-buf-fer mini-buf-fers} 103 145 \hyphenation{eshell} 146 \hyphenation{white-space} 104 147 105 148 % Margin to add to right of even pages, to left of odd pages. … … 113 156 % 114 157 \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% 158 \ifx\eTeXversion\undefined 115 159 \def\loggingall{\tracingcommands2 \tracingstats2 116 160 \tracingpages1 \tracingoutput1 \tracinglostchars1 … … 118 162 \showboxbreadth\maxdimen\showboxdepth\maxdimen 119 163 }% 120 121 %---------------------Begin change----------------------- 122 % 123 %%%% For @cropmarks command. 124 % Dimensions to add cropmarks at corners Added by P. A. MacKay, 12 Nov. 1986 125 % 126 \newdimen\cornerlong \newdimen\cornerthick 127 \newdimen \topandbottommargin 128 \newdimen \outerhsize \newdimen \outervsize 129 \cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks 130 \outerhsize=7in 131 %\outervsize=9.5in 132 % Alternative @smallbook page size is 9.25in 133 \outervsize=9.25in 134 \topandbottommargin=.75in 135 % 136 %---------------------End change----------------------- 164 \else 165 \def\loggingall{\tracingcommands3 \tracingstats2 166 \tracingpages1 \tracingoutput1 \tracinglostchars1 167 \tracingmacros2 \tracingparagraphs1 \tracingrestores1 168 \tracingscantokens1 \tracingassigns1 \tracingifs1 169 \tracinggroups1 \tracingnesting2 170 \showboxbreadth\maxdimen\showboxdepth\maxdimen 171 }% 172 \fi 173 174 % For @cropmarks command. 175 % Do @cropmarks to get crop marks. 176 % 177 \newif\ifcropmarks 178 \let\cropmarks = \cropmarkstrue 179 % 180 % Dimensions to add cropmarks at corners. 181 % Added by P. A. MacKay, 12 Nov. 1986 182 % 183 \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines 184 \newdimen\cornerlong \cornerlong=1pc 185 \newdimen\cornerthick \cornerthick=.3pt 186 \newdimen\topandbottommargin \topandbottommargin=.75in 137 187 138 188 % Main output routine. … … 140 190 \output = {\onepageout{\pagecontents\PAGE}} 141 191 142 \newbox\headlinebox \newbox\footlinebox 192 \newbox\headlinebox 193 \newbox\footlinebox 143 194 144 195 % \onepageout takes a vbox as an argument. Note that \pagecontents 145 196 % does insertions, but you have to call it yourself. 146 197 \def\onepageout#1{% 147 \hoffset=\normaloffset 198 \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi 199 % 148 200 \ifodd\pageno \advance\hoffset by \bindingoffset 149 201 \else \advance\hoffset by -\bindingoffset\fi … … 164 216 % the page break happens to be in the middle of an example. 165 217 \shipout\vbox{% 218 \ifcropmarks \vbox to \outervsize\bgroup 219 \hsize = \outerhsize 220 \vskip-\topandbottommargin 221 \vtop to0pt{% 222 \line{\ewtop\hfil\ewtop}% 223 \nointerlineskip 224 \line{% 225 \vbox{\moveleft\cornerthick\nstop}% 226 \hfill 227 \vbox{\moveright\cornerthick\nstop}% 228 }% 229 \vss}% 230 \vskip\topandbottommargin 231 \line\bgroup 232 \hfil % center the page within the outer (page) hsize. 233 \ifodd\pageno\hskip\bindingoffset\fi 234 \vbox\bgroup 235 \fi 236 % 166 237 \unvbox\headlinebox 167 238 \pagebody{#1}% 168 \unvbox\footlinebox 169 }% 170 }% 239 \ifdim\ht\footlinebox > 0pt 240 % Only leave this space if the footline is nonempty. 241 % (We lessened \vsize for it in \oddfootingxxx.) 242 % The \baselineskip=24pt in plain's \makefootline has no effect. 243 \vskip 2\baselineskip 244 \unvbox\footlinebox 245 \fi 246 % 247 \ifcropmarks 248 \egroup % end of \vbox\bgroup 249 \hfil\egroup % end of (centering) \line\bgroup 250 \vskip\topandbottommargin plus1fill minus1fill 251 \boxmaxdepth = \cornerthick 252 \vbox to0pt{\vss 253 \line{% 254 \vbox{\moveleft\cornerthick\nsbot}% 255 \hfill 256 \vbox{\moveright\cornerthick\nsbot}% 257 }% 258 \nointerlineskip 259 \line{\ewbot\hfil\ewbot}% 260 }% 261 \egroup % \vbox from first cropmarks clause 262 \fi 263 }% end of \shipout\vbox 264 }% end of group with \turnoffactive 171 265 \advancepageno 172 266 \ifnum\outputpenalty>-20000 \else\dosupereject\fi 173 267 } 174 175 %%%% For @cropmarks command %%%%176 177 % Here is a modification of the main output routine for Near East Publications178 % This provides right-angle cropmarks at all four corners.179 % The contents of the page are centerlined into the cropmarks,180 % and any desired binding offset is added as an \hskip on either181 % site of the centerlined box. (P. A. MacKay, 12 November, 1986)182 %183 \def\croppageout#1{\hoffset=0pt % make sure this doesn't mess things up184 {\escapechar=`\\\relax % makes sure backslash is used in output files.185 \shipout186 \vbox to \outervsize{\hsize=\outerhsize187 \vbox{\line{\ewtop\hfill\ewtop}}188 \nointerlineskip189 \line{\vbox{\moveleft\cornerthick\nstop}190 \hfill191 \vbox{\moveright\cornerthick\nstop}}192 \vskip \topandbottommargin193 \centerline{\ifodd\pageno\hskip\bindingoffset\fi194 \vbox{195 {\let\hsize=\pagewidth \makeheadline}196 \pagebody{#1}197 {\let\hsize=\pagewidth \makefootline}}198 \ifodd\pageno\else\hskip\bindingoffset\fi}199 \vskip \topandbottommargin plus1fill minus1fill200 \boxmaxdepth\cornerthick201 \line{\vbox{\moveleft\cornerthick\nsbot}202 \hfill203 \vbox{\moveright\cornerthick\nsbot}}204 \nointerlineskip205 \vbox{\line{\ewbot\hfill\ewbot}}206 }}207 \advancepageno208 \ifnum\outputpenalty>-20000 \else\dosupereject\fi}209 %210 % Do @cropmarks to get crop marks211 \def\cropmarks{\let\onepageout=\croppageout }212 268 213 269 \newinsert\margin \dimen\margin=\maxdimen … … 224 280 } 225 281 226 %227 282 % Here are the rules for the cropmarks. Note that they are 228 283 % offset so that the space between them is truly \outerhsize or \outervsize … … 319 374 \newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi} 320 375 \def\ENVcheck{% 321 \ifENV\errmessage{Still within an environment . Type Return to continue.}376 \ifENV\errmessage{Still within an environment; press RETURN to continue} 322 377 \endgroup\fi} % This is not perfect, but it should reduce lossage 323 378 324 379 % @begin foo is the same as @foo, for now. 325 \newhelp\EMsimple{ Type <Return>to continue.}380 \newhelp\EMsimple{Press RETURN to continue.} 326 381 327 382 \outer\def\begin{\parsearg\beginxxx} … … 382 437 % @@ prints an @ 383 438 % Kludge this until the fonts are right (grr). 384 \def\@{{\tt \char '100}}439 \def\@{{\tt\char64}} 385 440 386 441 % This is turned off because it was never documented … … 392 447 393 448 % Used to generate quoted braces. 394 \def\mylbrace {{\tt \char '173}}395 \def\myrbrace {{\tt \char '175}}449 \def\mylbrace {{\tt\char123}} 450 \def\myrbrace {{\tt\char125}} 396 451 \let\{=\mylbrace 397 452 \let\}=\myrbrace … … 430 485 } 431 486 487 % Be sure we're in horizontal mode when doing a tie, since we make space 488 % equivalent to this in @example-like environments. Otherwise, a space 489 % at the beginning of a line will start with \penalty -- and 490 % since \penalty is valid in vertical mode, we'd end up putting the 491 % penalty on the vertical list instead of in the new paragraph. 492 {\catcode`@ = 11 493 % Avoid using \@M directly, because that causes trouble 494 % if the definition is written into an index file. 495 \global\let\tiepenalty = \@M 496 \gdef\tie{\leavevmode\penalty\tiepenalty\ } 497 } 498 432 499 % @: forces normal size whitespace following. 433 500 \def\:{\spacefactor=1000 } … … 439 506 \def\.{.\spacefactor=3000 } 440 507 441 % @enddots{} is an end-of-sentence ellipsis.442 \gdef\enddots{$\mathinner{\ldotp\ldotp\ldotp\ldotp}$\spacefactor=3000}443 444 508 % @! is an end-of-sentence bang. 445 \ gdef\!{!\spacefactor=3000 }509 \def\!{!\spacefactor=3000 } 446 510 447 511 % @? is an end-of-sentence query. 448 \ gdef\?{?\spacefactor=3000 }512 \def\?{?\spacefactor=3000 } 449 513 450 514 % @w prevents a word break. Without the \leavevmode, @w at the … … 530 594 %% if the depth of the box does not fit. 531 595 %{\baselineskip=0pt% 532 %\vtop to #1\mil{\vfil}\kern -#1\mil\ penalty 10000596 %\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak 533 597 %\prevdepth=-1000pt 534 598 %}} … … 571 635 \let\br = \par 572 636 573 % @dots{} output some dots 574 575 \def\dots{$\ldots$} 637 % @dots{} output an ellipsis using the current font. 638 % We do .5em per period so that it has the same spacing in a typewriter 639 % font as three actual period characters. 640 % 641 \def\dots{% 642 \leavevmode 643 \hbox to 1.5em{% 644 \hskip 0pt plus 0.25fil minus 0.25fil 645 .\hss.\hss.% 646 \hskip 0pt plus 0.5fil minus 0.5fil 647 }% 648 } 649 650 % @enddots{} is an end-of-sentence ellipsis. 651 % 652 \def\enddots{% 653 \leavevmode 654 \hbox to 2em{% 655 \hskip 0pt plus 0.25fil minus 0.25fil 656 .\hss.\hss.\hss.% 657 \hskip 0pt plus 0.5fil minus 0.5fil 658 }% 659 \spacefactor=3000 660 } 661 576 662 577 663 % @page forces the start of a new page 578 664 % 579 665 \def\page{\par\vfill\supereject} 580 666 … … 643 729 % @ignore ... @end ignore is another way to write a comment 644 730 645 \def\comment{\ catcode 64=\other \catcode 123=\other \catcode 125=\other%646 \ parsearg \commentxxx}647 648 \def\commentxxx #1{\catcode 64=0 \catcode 123=1 \catcode 125=2}731 \def\comment{\begingroup \catcode`\^^M=\other% 732 \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% 733 \commentxxx} 734 {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} 649 735 650 736 \let\c=\comment 651 737 652 % @paragraphindent is defined for the Info formatting commands only. 653 \let\paragraphindent=\comment 654 738 % @paragraphindent NCHARS 739 % We'll use ems for NCHARS, close enough. 740 % We cannot implement @paragraphindent asis, though. 741 % 742 \def\asisword{asis} % no translation, these are keywords 743 \def\noneword{none} 744 % 745 \def\paragraphindent{\parsearg\doparagraphindent} 746 \def\doparagraphindent#1{% 747 \def\temp{#1}% 748 \ifx\temp\asisword 749 \else 750 \ifx\temp\noneword 751 \defaultparindent = 0pt 752 \else 753 \defaultparindent = #1em 754 \fi 755 \fi 756 \parindent = \defaultparindent 757 } 758 759 % @asis just yields its argument. Used with @table, for example. 760 % 761 \def\asis#1{#1} 762 763 % @math means output in math mode. 764 % We don't use $'s directly in the definition of \math because control 765 % sequences like \math are expanded when the toc file is written. Then, 766 % we read the toc file back, the $'s will be normal characters (as they 767 % should be, according to the definition of Texinfo). So we must use a 768 % control sequence to switch into and out of math mode. 769 % 770 % This isn't quite enough for @math to work properly in indices, but it 771 % seems unlikely it will ever be needed there. 772 % 773 \let\implicitmath = $ 774 \def\math#1{\implicitmath #1\implicitmath} 775 776 % @bullet and @minus need the same treatment as @math, just above. 777 \def\bullet{\implicitmath\ptexbullet\implicitmath} 778 \def\minus{\implicitmath-\implicitmath} 779 780 % @refill is a no-op. 781 \let\refill=\relax 782 783 % If working on a large document in chapters, it is convenient to 784 % be able to disable indexing, cross-referencing, and contents, for test runs. 785 % This is done with @novalidate (before @setfilename). 786 % 787 \newif\iflinks \linkstrue % by default we want the aux files. 788 \let\novalidate = \linksfalse 789 790 % @setfilename is done at the beginning of every texinfo file. 791 % So open here the files we need to have open while reading the input. 792 % This makes it possible to make a .fmt file for texinfo. 793 \def\setfilename{% 794 \iflinks 795 \readauxfile 796 \fi % \openindices needs to do some work in any case. 797 \openindices 798 \fixbackslash % Turn off hack to swallow `\input texinfo'. 799 \global\let\setfilename=\comment % Ignore extra @setfilename cmds. 800 % 801 % If texinfo.cnf is present on the system, read it. 802 % Useful for site-wide @afourpaper, etc. 803 % Just to be on the safe side, close the input stream before the \input. 804 \openin 1 texinfo.cnf 805 \ifeof1 \let\temp=\relax \else \def\temp{\input texinfo.cnf }\fi 806 \closein1 807 \temp 808 % 809 \comment % Ignore the actual filename. 810 } 811 812 % Called from \setfilename. 813 % 814 \def\openindices{% 815 \newindex{cp}% 816 \newcodeindex{fn}% 817 \newcodeindex{vr}% 818 \newcodeindex{tp}% 819 \newcodeindex{ky}% 820 \newcodeindex{pg}% 821 } 822 823 % @bye. 824 \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} 825 826 827 \message{fonts,} 828 % Font-change commands. 829 830 % Texinfo sort of supports the sans serif font style, which plain TeX does not. 831 % So we set up a \sf analogous to plain's \rm, etc. 832 \newfam\sffam 833 \def\sf{\fam=\sffam \tensf} 834 \let\li = \sf % Sometimes we call it \li, not \sf. 835 836 % We don't need math for this one. 837 \def\ttsl{\tenttsl} 838 839 % Use Computer Modern fonts at \magstephalf (11pt). 840 \newcount\mainmagstep 841 \mainmagstep=\magstephalf 842 843 % Set the font macro #1 to the font named #2, adding on the 844 % specified font prefix (normally `cm'). 845 % #3 is the font's design size, #4 is a scale factor 846 \def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4} 847 848 % Use cm as the default font prefix. 849 % To specify the font prefix, you must define \fontprefix 850 % before you read in texinfo.tex. 851 \ifx\fontprefix\undefined 852 \def\fontprefix{cm} 853 \fi 854 % Support font families that don't use the same naming scheme as CM. 855 \def\rmshape{r} 856 \def\rmbshape{bx} %where the normal face is bold 857 \def\bfshape{b} 858 \def\bxshape{bx} 859 \def\ttshape{tt} 860 \def\ttbshape{tt} 861 \def\ttslshape{sltt} 862 \def\itshape{ti} 863 \def\itbshape{bxti} 864 \def\slshape{sl} 865 \def\slbshape{bxsl} 866 \def\sfshape{ss} 867 \def\sfbshape{ss} 868 \def\scshape{csc} 869 \def\scbshape{csc} 870 871 \ifx\bigger\relax 872 \let\mainmagstep=\magstep1 873 \setfont\textrm\rmshape{12}{1000} 874 \setfont\texttt\ttshape{12}{1000} 875 \else 876 \setfont\textrm\rmshape{10}{\mainmagstep} 877 \setfont\texttt\ttshape{10}{\mainmagstep} 878 \fi 879 % Instead of cmb10, you many want to use cmbx10. 880 % cmbx10 is a prettier font on its own, but cmb10 881 % looks better when embedded in a line with cmr10. 882 \setfont\textbf\bfshape{10}{\mainmagstep} 883 \setfont\textit\itshape{10}{\mainmagstep} 884 \setfont\textsl\slshape{10}{\mainmagstep} 885 \setfont\textsf\sfshape{10}{\mainmagstep} 886 \setfont\textsc\scshape{10}{\mainmagstep} 887 \setfont\textttsl\ttslshape{10}{\mainmagstep} 888 \font\texti=cmmi10 scaled \mainmagstep 889 \font\textsy=cmsy10 scaled \mainmagstep 890 891 % A few fonts for @defun, etc. 892 \setfont\defbf\bxshape{10}{\magstep1} %was 1314 893 \setfont\deftt\ttshape{10}{\magstep1} 894 \def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf} 895 896 % Fonts for indices and small examples (9pt). 897 % We actually use the slanted font rather than the italic, 898 % because texinfo normally uses the slanted fonts for that. 899 % Do not make many font distinctions in general in the index, since they 900 % aren't very useful. 901 \setfont\ninett\ttshape{9}{1000} 902 \setfont\ninettsl\ttslshape{10}{900} 903 \setfont\indrm\rmshape{9}{1000} 904 \setfont\indit\itshape{9}{1000} 905 \setfont\indsl\slshape{9}{1000} 906 \let\indtt=\ninett 907 \let\indttsl=\ninettsl 908 \let\indsf=\indrm 909 \let\indbf=\indrm 910 \setfont\indsc\scshape{10}{900} 911 \font\indi=cmmi9 912 \font\indsy=cmsy9 913 914 % Fonts for title page: 915 \setfont\titlerm\rmbshape{12}{\magstep3} 916 \setfont\titleit\itbshape{10}{\magstep4} 917 \setfont\titlesl\slbshape{10}{\magstep4} 918 \setfont\titlett\ttbshape{12}{\magstep3} 919 \setfont\titlettsl\ttslshape{10}{\magstep4} 920 \setfont\titlesf\sfbshape{17}{\magstep1} 921 \let\titlebf=\titlerm 922 \setfont\titlesc\scbshape{10}{\magstep4} 923 \font\titlei=cmmi12 scaled \magstep3 924 \font\titlesy=cmsy10 scaled \magstep4 925 \def\authorrm{\secrm} 926 927 % Chapter (and unnumbered) fonts (17.28pt). 928 \setfont\chaprm\rmbshape{12}{\magstep2} 929 \setfont\chapit\itbshape{10}{\magstep3} 930 \setfont\chapsl\slbshape{10}{\magstep3} 931 \setfont\chaptt\ttbshape{12}{\magstep2} 932 \setfont\chapttsl\ttslshape{10}{\magstep3} 933 \setfont\chapsf\sfbshape{17}{1000} 934 \let\chapbf=\chaprm 935 \setfont\chapsc\scbshape{10}{\magstep3} 936 \font\chapi=cmmi12 scaled \magstep2 937 \font\chapsy=cmsy10 scaled \magstep3 938 939 % Section fonts (14.4pt). 940 \setfont\secrm\rmbshape{12}{\magstep1} 941 \setfont\secit\itbshape{10}{\magstep2} 942 \setfont\secsl\slbshape{10}{\magstep2} 943 \setfont\sectt\ttbshape{12}{\magstep1} 944 \setfont\secttsl\ttslshape{10}{\magstep2} 945 \setfont\secsf\sfbshape{12}{\magstep1} 946 \let\secbf\secrm 947 \setfont\secsc\scbshape{10}{\magstep2} 948 \font\seci=cmmi12 scaled \magstep1 949 \font\secsy=cmsy10 scaled \magstep2 950 951 % \setfont\ssecrm\bxshape{10}{\magstep1} % This size an font looked bad. 952 % \setfont\ssecit\itshape{10}{\magstep1} % The letters were too crowded. 953 % \setfont\ssecsl\slshape{10}{\magstep1} 954 % \setfont\ssectt\ttshape{10}{\magstep1} 955 % \setfont\ssecsf\sfshape{10}{\magstep1} 956 957 %\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx. 958 %\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than 959 %\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1. 960 %\setfont\ssectt\ttshape{10}{1315} 961 %\setfont\ssecsf\sfshape{10}{1315} 962 963 %\let\ssecbf=\ssecrm 964 965 % Subsection fonts (13.15pt). 966 \setfont\ssecrm\rmbshape{12}{\magstephalf} 967 \setfont\ssecit\itbshape{10}{1315} 968 \setfont\ssecsl\slbshape{10}{1315} 969 \setfont\ssectt\ttbshape{12}{\magstephalf} 970 \setfont\ssecttsl\ttslshape{10}{1315} 971 \setfont\ssecsf\sfbshape{12}{\magstephalf} 972 \let\ssecbf\ssecrm 973 \setfont\ssecsc\scbshape{10}{\magstep1} 974 \font\sseci=cmmi12 scaled \magstephalf 975 \font\ssecsy=cmsy10 scaled 1315 976 % The smallcaps and symbol fonts should actually be scaled \magstep1.5, 977 % but that is not a standard magnification. 978 979 % In order for the font changes to affect most math symbols and letters, 980 % we have to define the \textfont of the standard families. Since 981 % texinfo doesn't allow for producing subscripts and superscripts, we 982 % don't bother to reset \scriptfont and \scriptscriptfont (which would 983 % also require loading a lot more fonts). 984 % 985 \def\resetmathfonts{% 986 \textfont0 = \tenrm \textfont1 = \teni \textfont2 = \tensy 987 \textfont\itfam = \tenit \textfont\slfam = \tensl \textfont\bffam = \tenbf 988 \textfont\ttfam = \tentt \textfont\sffam = \tensf 989 } 990 991 992 % The font-changing commands redefine the meanings of \tenSTYLE, instead 993 % of just \STYLE. We do this so that font changes will continue to work 994 % in math mode, where it is the current \fam that is relevant in most 995 % cases, not the current font. Plain TeX does \def\bf{\fam=\bffam 996 % \tenbf}, for example. By redefining \tenbf, we obviate the need to 997 % redefine \bf itself. 998 \def\textfonts{% 999 \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl 1000 \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc 1001 \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl 1002 \resetmathfonts} 1003 \def\titlefonts{% 1004 \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl 1005 \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc 1006 \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy 1007 \let\tenttsl=\titlettsl 1008 \resetmathfonts \setleading{25pt}} 1009 \def\titlefont#1{{\titlefonts\rm #1}} 1010 \def\chapfonts{% 1011 \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl 1012 \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc 1013 \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl 1014 \resetmathfonts \setleading{19pt}} 1015 \def\secfonts{% 1016 \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl 1017 \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc 1018 \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl 1019 \resetmathfonts \setleading{16pt}} 1020 \def\subsecfonts{% 1021 \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl 1022 \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc 1023 \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl 1024 \resetmathfonts \setleading{15pt}} 1025 \let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf? 1026 \def\indexfonts{% 1027 \let\tenrm=\indrm \let\tenit=\indit \let\tensl=\indsl 1028 \let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc 1029 \let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy \let\tenttsl=\indttsl 1030 \resetmathfonts \setleading{12pt}} 1031 1032 % Set up the default fonts, so we can use them for creating boxes. 1033 % 1034 \textfonts 1035 1036 % Define these so they can be easily changed for other fonts. 1037 \def\angleleft{$\langle$} 1038 \def\angleright{$\rangle$} 1039 1040 % Count depth in font-changes, for error checks 1041 \newcount\fontdepth \fontdepth=0 1042 1043 % Fonts for short table of contents. 1044 \setfont\shortcontrm\rmshape{12}{1000} 1045 \setfont\shortcontbf\bxshape{12}{1000} 1046 \setfont\shortcontsl\slshape{12}{1000} 1047 1048 %% Add scribe-like font environments, plus @l for inline lisp (usually sans 1049 %% serif) and @ii for TeX italic 1050 1051 % \smartitalic{ARG} outputs arg in italics, followed by an italic correction 1052 % unless the following character is such as not to need one. 1053 \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi} 1054 \def\smartslanted#1{{\sl #1}\futurelet\next\smartitalicx} 1055 \def\smartitalic#1{{\it #1}\futurelet\next\smartitalicx} 1056 1057 \let\i=\smartitalic 1058 \let\var=\smartslanted 1059 \let\dfn=\smartslanted 1060 \let\emph=\smartitalic 1061 \let\cite=\smartslanted 1062 1063 \def\b#1{{\bf #1}} 1064 \let\strong=\b 1065 1066 % We can't just use \exhyphenpenalty, because that only has effect at 1067 % the end of a paragraph. Restore normal hyphenation at the end of the 1068 % group within which \nohyphenation is presumably called. 1069 % 1070 \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} 1071 \def\restorehyphenation{\hyphenchar\font = `- } 1072 1073 \def\t#1{% 1074 {\tt \rawbackslash \frenchspacing #1}% 1075 \null 1076 } 1077 \let\ttfont=\t 1078 \def\samp#1{`\tclose{#1}'\null} 1079 \setfont\smallrm\rmshape{8}{1000} 1080 \font\smallsy=cmsy9 1081 \def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{% 1082 \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% 1083 \vbox{\hrule\kern-0.4pt 1084 \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% 1085 \kern-0.4pt\hrule}% 1086 \kern-.06em\raise0.4pt\hbox{\angleright}}}} 1087 % The old definition, with no lozenge: 1088 %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} 1089 \def\ctrl #1{{\tt \rawbackslash \hat}#1} 1090 1091 % @file, @option are the same as @samp. 1092 \let\file=\samp 1093 \let\option=\samp 1094 1095 % @code is a modification of @t, 1096 % which makes spaces the same size as normal in the surrounding text. 1097 \def\tclose#1{% 1098 {% 1099 % Change normal interword space to be same as for the current font. 1100 \spaceskip = \fontdimen2\font 1101 % 1102 % Switch to typewriter. 1103 \tt 1104 % 1105 % But `\ ' produces the large typewriter interword space. 1106 \def\ {{\spaceskip = 0pt{} }}% 1107 % 1108 % Turn off hyphenation. 1109 \nohyphenation 1110 % 1111 \rawbackslash 1112 \frenchspacing 1113 #1% 1114 }% 1115 \null 1116 } 1117 1118 % We *must* turn on hyphenation at `-' and `_' in \code. 1119 % Otherwise, it is too hard to avoid overfull hboxes 1120 % in the Emacs manual, the Library manual, etc. 1121 1122 % Unfortunately, TeX uses one parameter (\hyphenchar) to control 1123 % both hyphenation at - and hyphenation within words. 1124 % We must therefore turn them both off (\tclose does that) 1125 % and arrange explicitly to hyphenate at a dash. 1126 % -- rms. 1127 { 1128 \catcode`\-=\active 1129 \catcode`\_=\active 1130 % 1131 \global\def\code{\begingroup 1132 \catcode`\-=\active \let-\codedash 1133 \catcode`\_=\active \let_\codeunder 1134 \codex 1135 } 1136 % 1137 % If we end up with any active - characters when handling the index, 1138 % just treat them as a normal -. 1139 \global\def\indexbreaks{\catcode`\-=\active \let-\realdash} 1140 } 1141 1142 \def\realdash{-} 1143 \def\codedash{-\discretionary{}{}{}} 1144 \def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}} 1145 \def\codex #1{\tclose{#1}\endgroup} 1146 1147 %\let\exp=\tclose %Was temporary 1148 1149 % @kbd is like @code, except that if the argument is just one @key command, 1150 % then @kbd has no effect. 1151 1152 % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), 1153 % `example' (@kbd uses ttsl only inside of @example and friends), 1154 % or `code' (@kbd uses normal tty font always). 1155 \def\kbdinputstyle{\parsearg\kbdinputstylexxx} 1156 \def\kbdinputstylexxx#1{% 1157 \def\arg{#1}% 1158 \ifx\arg\worddistinct 1159 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% 1160 \else\ifx\arg\wordexample 1161 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% 1162 \else\ifx\arg\wordcode 1163 \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% 1164 \fi\fi\fi 1165 } 1166 \def\worddistinct{distinct} 1167 \def\wordexample{example} 1168 \def\wordcode{code} 1169 1170 % Default is kbdinputdistinct. (Too much of a hassle to call the macro, 1171 % the catcodes are wrong for parsearg to work.) 1172 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl} 1173 1174 \def\xkey{\key} 1175 \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% 1176 \ifx\one\xkey\ifx\threex\three \key{#2}% 1177 \else{\tclose{\kbdfont\look}}\fi 1178 \else{\tclose{\kbdfont\look}}\fi} 1179 1180 % For @url, @env, @command quotes seem unnecessary, so use \code. 1181 \let\url=\code 1182 \let\env=\code 1183 \let\command=\code 1184 1185 % @uref (abbreviation for `urlref') takes an optional (comma-separated) 1186 % second argument specifying the text to display and an optional third 1187 % arg as text to display instead of (rather than in addition to) the url 1188 % itself. First (mandatory) arg is the url. Perhaps eventually put in 1189 % a hypertex \special here. 1190 % 1191 \def\uref#1{\douref #1,,,\finish} 1192 \def\douref#1,#2,#3,#4\finish{% 1193 \setbox0 = \hbox{\ignorespaces #3}% 1194 \ifdim\wd0 > 0pt 1195 \unhbox0 % third arg given, show only that 1196 \else 1197 \setbox0 = \hbox{\ignorespaces #2}% 1198 \ifdim\wd0 > 0pt 1199 \unhbox0\ (\code{#1})% second arg given, show both it and url 1200 \else 1201 \code{#1}% only url given, so show it 1202 \fi 1203 \fi 1204 } 1205 1206 % rms does not like the angle brackets --karl, 17may97. 1207 % So now @email is just like @uref. 1208 %\def\email#1{\angleleft{\tt #1}\angleright} 1209 \let\email=\uref 1210 1211 % Check if we are currently using a typewriter font. Since all the 1212 % Computer Modern typewriter fonts have zero interword stretch (and 1213 % shrink), and it is reasonable to expect all typewriter fonts to have 1214 % this property, we can check that font parameter. 1215 % 1216 \def\ifmonospace{\ifdim\fontdimen3\font=0pt } 1217 1218 % Typeset a dimension, e.g., `in' or `pt'. The only reason for the 1219 % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. 1220 % 1221 \def\dmn#1{\thinspace #1} 1222 1223 \def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} 1224 1225 % @l was never documented to mean ``switch to the Lisp font'', 1226 % and it is not used as such in any manual I can find. We need it for 1227 % Polish suppressed-l. --karl, 22sep96. 1228 %\def\l#1{{\li #1}\null} 1229 1230 % Explicit font changes: @r, @sc, undocumented @ii. 1231 \def\r#1{{\rm #1}} % roman font 1232 \def\sc#1{{\smallcaps#1}} % smallcaps font 1233 \def\ii#1{{\it #1}} % italic font 1234 1235 % @acronym downcases the argument and prints in smallcaps. 1236 \def\acronym#1{{\smallcaps \lowercase{#1}}} 1237 1238 % @pounds{} is a sterling sign. 1239 \def\pounds{{\it\$}} 1240 1241 1242 \message{page headings,} 1243 1244 \newskip\titlepagetopglue \titlepagetopglue = 1.5in 1245 \newskip\titlepagebottomglue \titlepagebottomglue = 2pc 1246 1247 % First the title page. Must do @settitle before @titlepage. 1248 \newif\ifseenauthor 1249 \newif\iffinishedtitlepage 1250 1251 % Do an implicit @contents or @shortcontents after @end titlepage if the 1252 % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. 1253 % 1254 \newif\ifsetcontentsaftertitlepage 1255 \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue 1256 \newif\ifsetshortcontentsaftertitlepage 1257 \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue 1258 1259 \def\shorttitlepage{\parsearg\shorttitlepagezzz} 1260 \def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% 1261 \endgroup\page\hbox{}\page} 1262 1263 \def\titlepage{\begingroup \parindent=0pt \textfonts 1264 \let\subtitlerm=\tenrm 1265 \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}% 1266 % 1267 \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}% 1268 % 1269 % Leave some space at the very top of the page. 1270 \vglue\titlepagetopglue 1271 % 1272 % Now you can print the title using @title. 1273 \def\title{\parsearg\titlezzz}% 1274 \def\titlezzz##1{\leftline{\titlefonts\rm ##1} 1275 % print a rule at the page bottom also. 1276 \finishedtitlepagefalse 1277 \vskip4pt \hrule height 4pt width \hsize \vskip4pt}% 1278 % No rule at page bottom unless we print one at the top with @title. 1279 \finishedtitlepagetrue 1280 % 1281 % Now you can put text using @subtitle. 1282 \def\subtitle{\parsearg\subtitlezzz}% 1283 \def\subtitlezzz##1{{\subtitlefont \rightline{##1}}}% 1284 % 1285 % @author should come last, but may come many times. 1286 \def\author{\parsearg\authorzzz}% 1287 \def\authorzzz##1{\ifseenauthor\else\vskip 0pt plus 1filll\seenauthortrue\fi 1288 {\authorfont \leftline{##1}}}% 1289 % 1290 % Most title ``pages'' are actually two pages long, with space 1291 % at the top of the second. We don't want the ragged left on the second. 1292 \let\oldpage = \page 1293 \def\page{% 1294 \iffinishedtitlepage\else 1295 \finishtitlepage 1296 \fi 1297 \oldpage 1298 \let\page = \oldpage 1299 \hbox{}}% 1300 % \def\page{\oldpage \hbox{}} 1301 } 1302 1303 \def\Etitlepage{% 1304 \iffinishedtitlepage\else 1305 \finishtitlepage 1306 \fi 1307 % It is important to do the page break before ending the group, 1308 % because the headline and footline are only empty inside the group. 1309 % If we use the new definition of \page, we always get a blank page 1310 % after the title page, which we certainly don't want. 1311 \oldpage 1312 \endgroup 1313 % 1314 % If they want short, they certainly want long too. 1315 \ifsetshortcontentsaftertitlepage 1316 \shortcontents 1317 \contents 1318 \global\let\shortcontents = \relax 1319 \global\let\contents = \relax 1320 \fi 1321 % 1322 \ifsetcontentsaftertitlepage 1323 \contents 1324 \global\let\contents = \relax 1325 \global\let\shortcontents = \relax 1326 \fi 1327 % 1328 \HEADINGSon 1329 } 1330 1331 \def\finishtitlepage{% 1332 \vskip4pt \hrule height 2pt width \hsize 1333 \vskip\titlepagebottomglue 1334 \finishedtitlepagetrue 1335 } 1336 1337 %%% Set up page headings and footings. 1338 1339 \let\thispage=\folio 1340 1341 \newtoks\evenheadline % headline on even pages 1342 \newtoks\oddheadline % headline on odd pages 1343 \newtoks\evenfootline % footline on even pages 1344 \newtoks\oddfootline % footline on odd pages 1345 1346 % Now make Tex use those variables 1347 \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline 1348 \else \the\evenheadline \fi}} 1349 \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline 1350 \else \the\evenfootline \fi}\HEADINGShook} 1351 \let\HEADINGShook=\relax 1352 1353 % Commands to set those variables. 1354 % For example, this is what @headings on does 1355 % @evenheading @thistitle|@thispage|@thischapter 1356 % @oddheading @thischapter|@thispage|@thistitle 1357 % @evenfooting @thisfile|| 1358 % @oddfooting ||@thisfile 1359 1360 \def\evenheading{\parsearg\evenheadingxxx} 1361 \def\oddheading{\parsearg\oddheadingxxx} 1362 \def\everyheading{\parsearg\everyheadingxxx} 1363 1364 \def\evenfooting{\parsearg\evenfootingxxx} 1365 \def\oddfooting{\parsearg\oddfootingxxx} 1366 \def\everyfooting{\parsearg\everyfootingxxx} 1367 1368 {\catcode`\@=0 % 1369 1370 \gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish} 1371 \gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{% 1372 \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} 1373 1374 \gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish} 1375 \gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{% 1376 \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} 1377 1378 \gdef\everyheadingxxx#1{\oddheadingxxx{#1}\evenheadingxxx{#1}}% 1379 1380 \gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish} 1381 \gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{% 1382 \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} 1383 1384 \gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish} 1385 \gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{% 1386 \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% 1387 % 1388 % Leave some space for the footline. Hopefully ok to assume 1389 % @evenfooting will not be used by itself. 1390 \global\advance\pageheight by -\baselineskip 1391 \global\advance\vsize by -\baselineskip 1392 } 1393 1394 \gdef\everyfootingxxx#1{\oddfootingxxx{#1}\evenfootingxxx{#1}} 1395 % 1396 }% unbind the catcode of @. 1397 1398 % @headings double turns headings on for double-sided printing. 1399 % @headings single turns headings on for single-sided printing. 1400 % @headings off turns them off. 1401 % @headings on same as @headings double, retained for compatibility. 1402 % @headings after turns on double-sided headings after this page. 1403 % @headings doubleafter turns on double-sided headings after this page. 1404 % @headings singleafter turns on single-sided headings after this page. 1405 % By default, they are off at the start of a document, 1406 % and turned `on' after @end titlepage. 1407 1408 \def\headings #1 {\csname HEADINGS#1\endcsname} 1409 1410 \def\HEADINGSoff{ 1411 \global\evenheadline={\hfil} \global\evenfootline={\hfil} 1412 \global\oddheadline={\hfil} \global\oddfootline={\hfil}} 1413 \HEADINGSoff 1414 % When we turn headings on, set the page number to 1. 1415 % For double-sided printing, put current file name in lower left corner, 1416 % chapter name on inside top of right hand pages, document 1417 % title on inside top of left hand pages, and page numbers on outside top 1418 % edge of all pages. 1419 \def\HEADINGSdouble{ 1420 \global\pageno=1 1421 \global\evenfootline={\hfil} 1422 \global\oddfootline={\hfil} 1423 \global\evenheadline={\line{\folio\hfil\thistitle}} 1424 \global\oddheadline={\line{\thischapter\hfil\folio}} 1425 \global\let\contentsalignmacro = \chapoddpage 1426 } 1427 \let\contentsalignmacro = \chappager 1428 1429 % For single-sided printing, chapter title goes across top left of page, 1430 % page number on top right. 1431 \def\HEADINGSsingle{ 1432 \global\pageno=1 1433 \global\evenfootline={\hfil} 1434 \global\oddfootline={\hfil} 1435 \global\evenheadline={\line{\thischapter\hfil\folio}} 1436 \global\oddheadline={\line{\thischapter\hfil\folio}} 1437 \global\let\contentsalignmacro = \chappager 1438 } 1439 \def\HEADINGSon{\HEADINGSdouble} 1440 1441 \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} 1442 \let\HEADINGSdoubleafter=\HEADINGSafter 1443 \def\HEADINGSdoublex{% 1444 \global\evenfootline={\hfil} 1445 \global\oddfootline={\hfil} 1446 \global\evenheadline={\line{\folio\hfil\thistitle}} 1447 \global\oddheadline={\line{\thischapter\hfil\folio}} 1448 \global\let\contentsalignmacro = \chapoddpage 1449 } 1450 1451 \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} 1452 \def\HEADINGSsinglex{% 1453 \global\evenfootline={\hfil} 1454 \global\oddfootline={\hfil} 1455 \global\evenheadline={\line{\thischapter\hfil\folio}} 1456 \global\oddheadline={\line{\thischapter\hfil\folio}} 1457 \global\let\contentsalignmacro = \chappager 1458 } 1459 1460 % Subroutines used in generating headings 1461 % Produces Day Month Year style of output. 1462 \def\today{% 1463 \number\day\space 1464 \ifcase\month 1465 \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr 1466 \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug 1467 \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec 1468 \fi 1469 \space\number\year} 1470 1471 % @settitle line... specifies the title of the document, for headings. 1472 % It generates no output of its own. 1473 \def\thistitle{\putwordNoTitle} 1474 \def\settitle{\parsearg\settitlezzz} 1475 \def\settitlezzz #1{\gdef\thistitle{#1}} 1476 1477 1478 \message{tables,} 1479 % Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x). 1480 1481 % default indentation of table text 1482 \newdimen\tableindent \tableindent=.8in 1483 % default indentation of @itemize and @enumerate text 1484 \newdimen\itemindent \itemindent=.3in 1485 % margin between end of table item and start of table text. 1486 \newdimen\itemmargin \itemmargin=.1in 1487 1488 % used internally for \itemindent minus \itemmargin 1489 \newdimen\itemmax 1490 1491 % Note @table, @vtable, and @vtable define @item, @itemx, etc., with 1492 % these defs. 1493 % They also define \itemindex 1494 % to index the item name in whatever manner is desired (perhaps none). 1495 1496 \newif\ifitemxneedsnegativevskip 1497 1498 \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} 1499 1500 \def\internalBitem{\smallbreak \parsearg\itemzzz} 1501 \def\internalBitemx{\itemxpar \parsearg\itemzzz} 1502 1503 \def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz} 1504 \def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \itemxpar \parsearg\xitemzzz} 1505 1506 \def\internalBkitem{\smallbreak \parsearg\kitemzzz} 1507 \def\internalBkitemx{\itemxpar \parsearg\kitemzzz} 1508 1509 \def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}% 1510 \itemzzz {#1}} 1511 1512 \def\xitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \xitemsubtopic}}% 1513 \itemzzz {#1}} 1514 1515 \def\itemzzz #1{\begingroup % 1516 \advance\hsize by -\rightskip 1517 \advance\hsize by -\tableindent 1518 \setbox0=\hbox{\itemfont{#1}}% 1519 \itemindex{#1}% 1520 \nobreak % This prevents a break before @itemx. 1521 % 1522 % If the item text does not fit in the space we have, put it on a line 1523 % by itself, and do not allow a page break either before or after that 1524 % line. We do not start a paragraph here because then if the next 1525 % command is, e.g., @kindex, the whatsit would get put into the 1526 % horizontal list on a line by itself, resulting in extra blank space. 1527 \ifdim \wd0>\itemmax 1528 % 1529 % Make this a paragraph so we get the \parskip glue and wrapping, 1530 % but leave it ragged-right. 1531 \begingroup 1532 \advance\leftskip by-\tableindent 1533 \advance\hsize by\tableindent 1534 \advance\rightskip by0pt plus1fil 1535 \leavevmode\unhbox0\par 1536 \endgroup 1537 % 1538 % We're going to be starting a paragraph, but we don't want the 1539 % \parskip glue -- logically it's part of the @item we just started. 1540 \nobreak \vskip-\parskip 1541 % 1542 % Stop a page break at the \parskip glue coming up. Unfortunately 1543 % we can't prevent a possible page break at the following 1544 % \baselineskip glue. 1545 \nobreak 1546 \endgroup 1547 \itemxneedsnegativevskipfalse 1548 \else 1549 % The item text fits into the space. Start a paragraph, so that the 1550 % following text (if any) will end up on the same line. 1551 \noindent 1552 % Do this with kerns and \unhbox so that if there is a footnote in 1553 % the item text, it can migrate to the main vertical list and 1554 % eventually be printed. 1555 \nobreak\kern-\tableindent 1556 \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 1557 \unhbox0 1558 \nobreak\kern\dimen0 1559 \endgroup 1560 \itemxneedsnegativevskiptrue 1561 \fi 1562 } 1563 1564 \def\item{\errmessage{@item while not in a table}} 1565 \def\itemx{\errmessage{@itemx while not in a table}} 1566 \def\kitem{\errmessage{@kitem while not in a table}} 1567 \def\kitemx{\errmessage{@kitemx while not in a table}} 1568 \def\xitem{\errmessage{@xitem while not in a table}} 1569 \def\xitemx{\errmessage{@xitemx while not in a table}} 1570 1571 % Contains a kludge to get @end[description] to work. 1572 \def\description{\tablez{\dontindex}{1}{}{}{}{}} 1573 1574 % @table, @ftable, @vtable. 1575 \def\table{\begingroup\inENV\obeylines\obeyspaces\tablex} 1576 {\obeylines\obeyspaces% 1577 \gdef\tablex #1^^M{% 1578 \tabley\dontindex#1 \endtabley}} 1579 1580 \def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex} 1581 {\obeylines\obeyspaces% 1582 \gdef\ftablex #1^^M{% 1583 \tabley\fnitemindex#1 \endtabley 1584 \def\Eftable{\endgraf\afterenvbreak\endgroup}% 1585 \let\Etable=\relax}} 1586 1587 \def\vtable{\begingroup\inENV\obeylines\obeyspaces\vtablex} 1588 {\obeylines\obeyspaces% 1589 \gdef\vtablex #1^^M{% 1590 \tabley\vritemindex#1 \endtabley 1591 \def\Evtable{\endgraf\afterenvbreak\endgroup}% 1592 \let\Etable=\relax}} 1593 1594 \def\dontindex #1{} 1595 \def\fnitemindex #1{\doind {fn}{\code{#1}}}% 1596 \def\vritemindex #1{\doind {vr}{\code{#1}}}% 1597 1598 {\obeyspaces % 1599 \gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup% 1600 \tablez{#1}{#2}{#3}{#4}{#5}{#6}}} 1601 1602 \def\tablez #1#2#3#4#5#6{% 1603 \aboveenvbreak % 1604 \begingroup % 1605 \def\Edescription{\Etable}% Necessary kludge. 1606 \let\itemindex=#1% 1607 \ifnum 0#3>0 \advance \leftskip by #3\mil \fi % 1608 \ifnum 0#4>0 \tableindent=#4\mil \fi % 1609 \ifnum 0#5>0 \advance \rightskip by #5\mil \fi % 1610 \def\itemfont{#2}% 1611 \itemmax=\tableindent % 1612 \advance \itemmax by -\itemmargin % 1613 \advance \leftskip by \tableindent % 1614 \exdentamount=\tableindent 1615 \parindent = 0pt 1616 \parskip = \smallskipamount 1617 \ifdim \parskip=0pt \parskip=2pt \fi% 1618 \def\Etable{\endgraf\afterenvbreak\endgroup}% 1619 \let\item = \internalBitem % 1620 \let\itemx = \internalBitemx % 1621 \let\kitem = \internalBkitem % 1622 \let\kitemx = \internalBkitemx % 1623 \let\xitem = \internalBxitem % 1624 \let\xitemx = \internalBxitemx % 1625 } 1626 1627 % This is the counter used by @enumerate, which is really @itemize 1628 1629 \newcount \itemno 1630 1631 \def\itemize{\parsearg\itemizezzz} 1632 1633 \def\itemizezzz #1{% 1634 \begingroup % ended by the @end itemize 1635 \itemizey {#1}{\Eitemize} 1636 } 1637 1638 \def\itemizey #1#2{% 1639 \aboveenvbreak % 1640 \itemmax=\itemindent % 1641 \advance \itemmax by -\itemmargin % 1642 \advance \leftskip by \itemindent % 1643 \exdentamount=\itemindent 1644 \parindent = 0pt % 1645 \parskip = \smallskipamount % 1646 \ifdim \parskip=0pt \parskip=2pt \fi% 1647 \def#2{\endgraf\afterenvbreak\endgroup}% 1648 \def\itemcontents{#1}% 1649 \let\item=\itemizeitem} 1650 1651 % Set sfcode to normal for the chars that usually have another value. 1652 % These are `.?!:;,' 1653 \def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=1000 1654 \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 } 1655 1656 % \splitoff TOKENS\endmark defines \first to be the first token in 1657 % TOKENS, and \rest to be the remainder. 1658 % 1659 \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% 1660 1661 % Allow an optional argument of an uppercase letter, lowercase letter, 1662 % or number, to specify the first label in the enumerated list. No 1663 % argument is the same as `1'. 1664 % 1665 \def\enumerate{\parsearg\enumeratezzz} 1666 \def\enumeratezzz #1{\enumeratey #1 \endenumeratey} 1667 \def\enumeratey #1 #2\endenumeratey{% 1668 \begingroup % ended by the @end enumerate 1669 % 1670 % If we were given no argument, pretend we were given `1'. 1671 \def\thearg{#1}% 1672 \ifx\thearg\empty \def\thearg{1}\fi 1673 % 1674 % Detect if the argument is a single token. If so, it might be a 1675 % letter. Otherwise, the only valid thing it can be is a number. 1676 % (We will always have one token, because of the test we just made. 1677 % This is a good thing, since \splitoff doesn't work given nothing at 1678 % all -- the first parameter is undelimited.) 1679 \expandafter\splitoff\thearg\endmark 1680 \ifx\rest\empty 1681 % Only one token in the argument. It could still be anything. 1682 % A ``lowercase letter'' is one whose \lccode is nonzero. 1683 % An ``uppercase letter'' is one whose \lccode is both nonzero, and 1684 % not equal to itself. 1685 % Otherwise, we assume it's a number. 1686 % 1687 % We need the \relax at the end of the \ifnum lines to stop TeX from 1688 % continuing to look for a <number>. 1689 % 1690 \ifnum\lccode\expandafter`\thearg=0\relax 1691 \numericenumerate % a number (we hope) 1692 \else 1693 % It's a letter. 1694 \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax 1695 \lowercaseenumerate % lowercase letter 1696 \else 1697 \uppercaseenumerate % uppercase letter 1698 \fi 1699 \fi 1700 \else 1701 % Multiple tokens in the argument. We hope it's a number. 1702 \numericenumerate 1703 \fi 1704 } 1705 1706 % An @enumerate whose labels are integers. The starting integer is 1707 % given in \thearg. 1708 % 1709 \def\numericenumerate{% 1710 \itemno = \thearg 1711 \startenumeration{\the\itemno}% 1712 } 1713 1714 % The starting (lowercase) letter is in \thearg. 1715 \def\lowercaseenumerate{% 1716 \itemno = \expandafter`\thearg 1717 \startenumeration{% 1718 % Be sure we're not beyond the end of the alphabet. 1719 \ifnum\itemno=0 1720 \errmessage{No more lowercase letters in @enumerate; get a bigger 1721 alphabet}% 1722 \fi 1723 \char\lccode\itemno 1724 }% 1725 } 1726 1727 % The starting (uppercase) letter is in \thearg. 1728 \def\uppercaseenumerate{% 1729 \itemno = \expandafter`\thearg 1730 \startenumeration{% 1731 % Be sure we're not beyond the end of the alphabet. 1732 \ifnum\itemno=0 1733 \errmessage{No more uppercase letters in @enumerate; get a bigger 1734 alphabet} 1735 \fi 1736 \char\uccode\itemno 1737 }% 1738 } 1739 1740 % Call itemizey, adding a period to the first argument and supplying the 1741 % common last two arguments. Also subtract one from the initial value in 1742 % \itemno, since @item increments \itemno. 1743 % 1744 \def\startenumeration#1{% 1745 \advance\itemno by -1 1746 \itemizey{#1.}\Eenumerate\flushcr 1747 } 1748 1749 % @alphaenumerate and @capsenumerate are abbreviations for giving an arg 1750 % to @enumerate. 1751 % 1752 \def\alphaenumerate{\enumerate{a}} 1753 \def\capsenumerate{\enumerate{A}} 1754 \def\Ealphaenumerate{\Eenumerate} 1755 \def\Ecapsenumerate{\Eenumerate} 1756 1757 % Definition of @item while inside @itemize. 1758 1759 \def\itemizeitem{% 1760 \advance\itemno by 1 1761 {\let\par=\endgraf \smallbreak}% 1762 \ifhmode \errmessage{In hmode at itemizeitem}\fi 1763 {\parskip=0in \hskip 0pt 1764 \hbox to 0pt{\hss \itemcontents\hskip \itemmargin}% 1765 \vadjust{\penalty 1200}}% 1766 \flushcr} 1767 1768 % @multitable macros 1769 % Amy Hendrickson, 8/18/94, 3/6/96 1770 % 1771 % @multitable ... @end multitable will make as many columns as desired. 1772 % Contents of each column will wrap at width given in preamble. Width 1773 % can be specified either with sample text given in a template line, 1774 % or in percent of \hsize, the current width of text on page. 1775 1776 % Table can continue over pages but will only break between lines. 1777 1778 % To make preamble: 1779 % 1780 % Either define widths of columns in terms of percent of \hsize: 1781 % @multitable @columnfractions .25 .3 .45 1782 % @item ... 1783 % 1784 % Numbers following @columnfractions are the percent of the total 1785 % current hsize to be used for each column. You may use as many 1786 % columns as desired. 1787 1788 1789 % Or use a template: 1790 % @multitable {Column 1 template} {Column 2 template} {Column 3 template} 1791 % @item ... 1792 % using the widest term desired in each column. 1793 % 1794 % For those who want to use more than one line's worth of words in 1795 % the preamble, break the line within one argument and it 1796 % will parse correctly, i.e., 1797 % 1798 % @multitable {Column 1 template} {Column 2 template} {Column 3 1799 % template} 1800 % Not: 1801 % @multitable {Column 1 template} {Column 2 template} 1802 % {Column 3 template} 1803 1804 % Each new table line starts with @item, each subsequent new column 1805 % starts with @tab. Empty columns may be produced by supplying @tab's 1806 % with nothing between them for as many times as empty columns are needed, 1807 % ie, @tab@tab@tab will produce two empty columns. 1808 1809 % @item, @tab, @multitable or @end multitable do not need to be on their 1810 % own lines, but it will not hurt if they are. 1811 1812 % Sample multitable: 1813 1814 % @multitable {Column 1 template} {Column 2 template} {Column 3 template} 1815 % @item first col stuff @tab second col stuff @tab third col 1816 % @item 1817 % first col stuff 1818 % @tab 1819 % second col stuff 1820 % @tab 1821 % third col 1822 % @item first col stuff @tab second col stuff 1823 % @tab Many paragraphs of text may be used in any column. 1824 % 1825 % They will wrap at the width determined by the template. 1826 % @item@tab@tab This will be in third column. 1827 % @end multitable 1828 1829 % Default dimensions may be reset by user. 1830 % @multitableparskip is vertical space between paragraphs in table. 1831 % @multitableparindent is paragraph indent in table. 1832 % @multitablecolmargin is horizontal space to be left between columns. 1833 % @multitablelinespace is space to leave between table items, baseline 1834 % to baseline. 1835 % 0pt means it depends on current normal line spacing. 1836 % 1837 \newskip\multitableparskip 1838 \newskip\multitableparindent 1839 \newdimen\multitablecolspace 1840 \newskip\multitablelinespace 1841 \multitableparskip=0pt 1842 \multitableparindent=6pt 1843 \multitablecolspace=12pt 1844 \multitablelinespace=0pt 1845 1846 % Macros used to set up halign preamble: 1847 % 1848 \let\endsetuptable\relax 1849 \def\xendsetuptable{\endsetuptable} 1850 \let\columnfractions\relax 1851 \def\xcolumnfractions{\columnfractions} 1852 \newif\ifsetpercent 1853 1854 % #1 is the part of the @columnfraction before the decimal point, which 1855 % is presumably either 0 or the empty string (but we don't check, we 1856 % just throw it away). #2 is the decimal part, which we use as the 1857 % percent of \hsize for this column. 1858 \def\pickupwholefraction#1.#2 {% 1859 \global\advance\colcount by 1 1860 \expandafter\xdef\csname col\the\colcount\endcsname{.#2\hsize}% 1861 \setuptable 1862 } 1863 1864 \newcount\colcount 1865 \def\setuptable#1{% 1866 \def\firstarg{#1}% 1867 \ifx\firstarg\xendsetuptable 1868 \let\go = \relax 1869 \else 1870 \ifx\firstarg\xcolumnfractions 1871 \global\setpercenttrue 1872 \else 1873 \ifsetpercent 1874 \let\go\pickupwholefraction 1875 \else 1876 \global\advance\colcount by 1 1877 \setbox0=\hbox{#1\unskip }% Add a normal word space as a separator; 1878 % typically that is always in the input, anyway. 1879 \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% 1880 \fi 1881 \fi 1882 \ifx\go\pickupwholefraction 1883 % Put the argument back for the \pickupwholefraction call, so 1884 % we'll always have a period there to be parsed. 1885 \def\go{\pickupwholefraction#1}% 1886 \else 1887 \let\go = \setuptable 1888 \fi% 1889 \fi 1890 \go 1891 } 1892 1893 % multitable syntax 1894 \def\tab{&\hskip1sp\relax} % 2/2/96 1895 % tiny skip here makes sure this column space is 1896 % maintained, even if it is never used. 1897 1898 % @multitable ... @end multitable definitions: 1899 % 1900 \def\multitable{\parsearg\dotable} 1901 \def\dotable#1{\bgroup 1902 \vskip\parskip 1903 \let\item\crcr 1904 \tolerance=9500 1905 \hbadness=9500 1906 \setmultitablespacing 1907 \parskip=\multitableparskip 1908 \parindent=\multitableparindent 1909 \overfullrule=0pt 1910 \global\colcount=0 1911 \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}% 1912 % 1913 % To parse everything between @multitable and @item: 1914 \setuptable#1 \endsetuptable 1915 % 1916 % \everycr will reset column counter, \colcount, at the end of 1917 % each line. Every column entry will cause \colcount to advance by one. 1918 % The table preamble 1919 % looks at the current \colcount to find the correct column width. 1920 \everycr{\noalign{% 1921 % 1922 % \filbreak%% keeps underfull box messages off when table breaks over pages. 1923 % Maybe so, but it also creates really weird page breaks when the table 1924 % breaks over pages. Wouldn't \vfil be better? Wait until the problem 1925 % manifests itself, so it can be fixed for real --karl. 1926 \global\colcount=0\relax}}% 1927 % 1928 % This preamble sets up a generic column definition, which will 1929 % be used as many times as user calls for columns. 1930 % \vtop will set a single line and will also let text wrap and 1931 % continue for many paragraphs if desired. 1932 \halign\bgroup&\global\advance\colcount by 1\relax 1933 \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname 1934 % 1935 % In order to keep entries from bumping into each other 1936 % we will add a \leftskip of \multitablecolspace to all columns after 1937 % the first one. 1938 % 1939 % If a template has been used, we will add \multitablecolspace 1940 % to the width of each template entry. 1941 % 1942 % If the user has set preamble in terms of percent of \hsize we will 1943 % use that dimension as the width of the column, and the \leftskip 1944 % will keep entries from bumping into each other. Table will start at 1945 % left margin and final column will justify at right margin. 1946 % 1947 % Make sure we don't inherit \rightskip from the outer environment. 1948 \rightskip=0pt 1949 \ifnum\colcount=1 1950 % The first column will be indented with the surrounding text. 1951 \advance\hsize by\leftskip 1952 \else 1953 \ifsetpercent \else 1954 % If user has not set preamble in terms of percent of \hsize 1955 % we will advance \hsize by \multitablecolspace. 1956 \advance\hsize by \multitablecolspace 1957 \fi 1958 % In either case we will make \leftskip=\multitablecolspace: 1959 \leftskip=\multitablecolspace 1960 \fi 1961 % Ignoring space at the beginning and end avoids an occasional spurious 1962 % blank line, when TeX decides to break the line at the space before the 1963 % box from the multistrut, so the strut ends up on a line by itself. 1964 % For example: 1965 % @multitable @columnfractions .11 .89 1966 % @item @code{#} 1967 % @tab Legal holiday which is valid in major parts of the whole country. 1968 % Is automatically provided with highlighting sequences respectively marking 1969 % characters. 1970 \noindent\ignorespaces##\unskip\multistrut}\cr 1971 } 1972 1973 \def\setmultitablespacing{% test to see if user has set \multitablelinespace. 1974 % If so, do nothing. If not, give it an appropriate dimension based on 1975 % current baselineskip. 1976 \ifdim\multitablelinespace=0pt 1977 %% strut to put in table in case some entry doesn't have descenders, 1978 %% to keep lines equally spaced 1979 \let\multistrut = \strut 1980 %% Test to see if parskip is larger than space between lines of 1981 %% table. If not, do nothing. 1982 %% If so, set to same dimension as multitablelinespace. 1983 \else 1984 \gdef\multistrut{\vrule height\multitablelinespace depth\dp0 1985 width0pt\relax} \fi 1986 \ifdim\multitableparskip>\multitablelinespace 1987 \global\multitableparskip=\multitablelinespace 1988 \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller 1989 %% than skip between lines in the table. 1990 \fi% 1991 \ifdim\multitableparskip=0pt 1992 \global\multitableparskip=\multitablelinespace 1993 \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller 1994 %% than skip between lines in the table. 1995 \fi} 1996 1997 1998 \message{conditionals,} 655 1999 % Prevent errors for section commands. 656 2000 % Used in @ignore and in failing conditionals. 657 2001 \def\ignoresections{% 658 \let\chapter=\relax659 \let\unnumbered=\relax660 \let\top=\relax661 \let\unnumberedsec=\relax662 \let\unnumberedsection=\relax663 \let\unnumberedsubsec=\relax664 \let\unnumberedsubsection=\relax665 \let\unnumberedsubsubsec=\relax666 \let\unnumberedsubsubsection=\relax667 \let\section=\relax668 \let\subsec=\relax669 \let\subsubsec=\relax670 \let\subsection=\relax671 \let\subsubsection=\relax672 \let\appendix=\relax673 \let\appendixsec=\relax674 \let\appendixsection=\relax675 \let\appendixsubsec=\relax676 \let\appendixsubsection=\relax677 \let\appendixsubsubsec=\relax678 \let\appendixsubsubsection=\relax679 \let\contents=\relax680 \let\smallbook=\relax681 \let\titlepage=\relax2002 \let\chapter=\relax 2003 \let\unnumbered=\relax 2004 \let\top=\relax 2005 \let\unnumberedsec=\relax 2006 \let\unnumberedsection=\relax 2007 \let\unnumberedsubsec=\relax 2008 \let\unnumberedsubsection=\relax 2009 \let\unnumberedsubsubsec=\relax 2010 \let\unnumberedsubsubsection=\relax 2011 \let\section=\relax 2012 \let\subsec=\relax 2013 \let\subsubsec=\relax 2014 \let\subsection=\relax 2015 \let\subsubsection=\relax 2016 \let\appendix=\relax 2017 \let\appendixsec=\relax 2018 \let\appendixsection=\relax 2019 \let\appendixsubsec=\relax 2020 \let\appendixsubsection=\relax 2021 \let\appendixsubsubsec=\relax 2022 \let\appendixsubsubsection=\relax 2023 \let\contents=\relax 2024 \let\smallbook=\relax 2025 \let\titlepage=\relax 682 2026 } 683 2027 … … 734 2078 \def\ignore{\doignore{ignore}} 735 2079 736 % Also ignore @ifinfo, @ifhtml, @html, @menu, and @direntry text.2080 % Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text. 737 2081 % 738 2082 \def\ifinfo{\doignore{ifinfo}} … … 743 2087 \def\direntry{\doignore{direntry}} 744 2088 745 % Also ignore @macro ... @end macro. The user must run texi2dvi,746 % which runs makeinfo to do macro expansion. Ignore @unmacro, too.747 \def\macro{\doignore{macro}}748 \let\unmacro = \comment749 750 751 2089 % @dircategory CATEGORY -- specify a category of the dir file 752 2090 % which this file should belong to. Ignore this in TeX. … … 760 2098 % 761 2099 % Define a command to swallow text until we reach `@end #1'. 762 \long\def\doignoretext##1\end #1{\enddoignore}% 2100 % This @ is a catcode 12 token (that is the normal catcode of @ in 2101 % this texinfo.tex file). We change the catcode of @ below to match. 2102 \long\def\doignoretext##1@end #1{\enddoignore}% 763 2103 % 764 2104 % Make sure that spaces turn into tokens that match what \doignoretext wants. 765 2105 \catcode32 = 10 2106 % 2107 % Ignore braces, too, so mismatched braces don't cause trouble. 2108 \catcode`\{ = 9 2109 \catcode`\} = 9 2110 % 2111 % We must not have @c interpreted as a control sequence. 2112 \catcode`\@ = 12 2113 % 2114 % Make the letter c a comment character so that the rest of the line 2115 % will be ignored. This way, the document can have (for example) 2116 % @c @end ifinfo 2117 % and the @end ifinfo will be properly ignored. 2118 % (We've just changed @ to catcode 12.) 2119 \catcode`\c = 14 766 2120 % 767 2121 % And now expand that command. … … 779 2133 % This uses \immediate\write16 rather than \message to get newlines. 780 2134 \immediate\write16{} 781 \immediate\write16{ ***WARNING***for users of Unix TeX 3.0!}2135 \immediate\write16{WARNING: for users of Unix TeX 3.0!} 782 2136 \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).} 783 2137 \immediate\write16{If you are running another version of TeX, relax.} 784 2138 \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.} 785 2139 \immediate\write16{ Then upgrade your TeX installation if you can.} 786 \immediate\write16{ (See ftp://ftp.gnu. ai.mit.edu/pub/gnu/TeX.README.)}2140 \immediate\write16{ (See ftp://ftp.gnu.org/pub/gnu/TeX.README.)} 787 2141 \immediate\write16{If you are stuck with version 3.0, run the} 788 2142 \immediate\write16{ script ``tex3patch'' from the Texinfo distribution} … … 856 2210 % 857 2211 % Do not execute instructions in @tex 858 \def\tex{\doignore{tex}} 2212 \def\tex{\doignore{tex}}% 2213 % Do not execute macro definitions. 2214 % `c' is a comment character, so the word `macro' will get cut off. 2215 \def\macro{\doignore{ma}}% 859 2216 } 860 2217 … … 890 2247 891 2248 % @value{foo} gets the text saved in variable foo. 892 % 893 \def\value{\begingroup 894 \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR. 895 \valuexxx} 896 \def\valuexxx#1{% 2249 { 2250 \catcode`\_ = \active 2251 % 2252 % We might end up with active _ or - characters in the argument if 2253 % we're called from @code, as @code{@value{foo-bar_}}. So \let any 2254 % such active characters to their normal equivalents. 2255 \gdef\value{\begingroup 2256 \catcode`\-=12 \catcode`\_=12 2257 \indexbreaks \let_\normalunderscore 2258 \valuexxx} 2259 } 2260 \def\valuexxx#1{\expandablevalue{#1}\endgroup} 2261 2262 % We have this subroutine so that we can handle at least some @value's 2263 % properly in indexes (we \let\value to this in \indexdummies). Ones 2264 % whose names contain - or _ still won't work, but we can't do anything 2265 % about that. The command has to be fully expandable, since the result 2266 % winds up in the index file. This means that if the variable's value 2267 % contains other Texinfo commands, it's almost certain it will fail 2268 % (although perhaps we could fix that with sufficient work to do a 2269 % one-level expansion on the result, instead of complete). 2270 % 2271 \def\expandablevalue#1{% 897 2272 \expandafter\ifx\csname SET#1\endcsname\relax 898 { \{No value for ``#1''\}}%2273 {[No value for ``#1'']}% 899 2274 \else 900 2275 \csname SET#1\endcsname 901 2276 \fi 902 \endgroup}2277 } 903 2278 904 2279 % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined … … 932 2307 \defineunmatchedend{ifclear} 933 2308 934 % @iftex always succeeds; we read the text following, through @end 935 % iftex). But `@end iftex' should be valid only after an @iftex. 2309 % @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text 2310 % following, through the first @end iftex (etc.). Make `@end iftex' 2311 % (etc.) valid only after an @iftex. 936 2312 % 937 2313 \def\iftex{\conditionalsucceed{iftex}} … … 965 2341 \def\nece#1{\expandafter\noexpand\csname#1\endcsname} 966 2342 967 % @asis just yields its argument. Used with @table, for example. 968 % 969 \def\asis#1{#1} 970 971 % @math means output in math mode. 972 % We don't use $'s directly in the definition of \math because control 973 % sequences like \math are expanded when the toc file is written. Then, 974 % we read the toc file back, the $'s will be normal characters (as they 975 % should be, according to the definition of Texinfo). So we must use a 976 % control sequence to switch into and out of math mode. 977 % 978 % This isn't quite enough for @math to work properly in indices, but it 979 % seems unlikely it will ever be needed there. 980 % 981 \let\implicitmath = $ 982 \def\math#1{\implicitmath #1\implicitmath} 983 984 % @bullet and @minus need the same treatment as @math, just above. 985 \def\bullet{\implicitmath\ptexbullet\implicitmath} 986 \def\minus{\implicitmath-\implicitmath} 987 988 \def\node{\ENVcheck\parsearg\nodezzz} 989 \def\nodezzz#1{\nodexxx [#1,]} 990 \def\nodexxx[#1,#2]{\gdef\lastnode{#1}} 991 \let\nwnode=\node 992 \let\lastnode=\relax 993 994 \def\donoderef{\ifx\lastnode\relax\else 995 \expandafter\expandafter\expandafter\setref{\lastnode}\fi 996 \global\let\lastnode=\relax} 997 998 \def\unnumbnoderef{\ifx\lastnode\relax\else 999 \expandafter\expandafter\expandafter\unnumbsetref{\lastnode}\fi 1000 \global\let\lastnode=\relax} 1001 1002 \def\appendixnoderef{\ifx\lastnode\relax\else 1003 \expandafter\expandafter\expandafter\appendixsetref{\lastnode}\fi 1004 \global\let\lastnode=\relax} 1005 1006 % @refill is a no-op. 1007 \let\refill=\relax 1008 1009 % @setfilename is done at the beginning of every texinfo file. 1010 % So open here the files we need to have open while reading the input. 1011 % This makes it possible to make a .fmt file for texinfo. 1012 \def\setfilename{% 1013 \readauxfile 1014 \opencontents 1015 \openindices 1016 \fixbackslash % Turn off hack to swallow `\input texinfo'. 1017 \global\let\setfilename=\comment % Ignore extra @setfilename cmds. 1018 \comment % Ignore the actual filename. 1019 } 1020 1021 % @bye. 1022 \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} 1023 1024 % \def\macro#1{\begingroup\ignoresections\catcode`\#=6\def\macrotemp{#1}\parsearg\macroxxx} 1025 % \def\macroxxx#1#2 \end macro{% 1026 % \expandafter\gdef\macrotemp#1{#2}% 1027 % \endgroup} 1028 1029 %\def\linemacro#1{\begingroup\ignoresections\catcode`\#=6\def\macrotemp{#1}\parsearg\linemacroxxx} 1030 %\def\linemacroxxx#1#2 \end linemacro{% 1031 %\let\parsearg=\relax 1032 %\edef\macrotempx{\csname M\butfirst\expandafter\string\macrotemp\endcsname}% 1033 %\expandafter\xdef\macrotemp{\parsearg\macrotempx}% 1034 %\expandafter\gdef\macrotempx#1{#2}% 1035 %\endgroup} 1036 1037 %\def\butfirst#1{} 1038 1039 1040 \message{fonts,} 1041 1042 % Font-change commands. 1043 1044 % Texinfo supports the sans serif font style, which plain TeX does not. 1045 % So we set up a \sf analogous to plain's \rm, etc. 1046 \newfam\sffam 1047 \def\sf{\fam=\sffam \tensf} 1048 \let\li = \sf % Sometimes we call it \li, not \sf. 1049 1050 % We don't need math for this one. 1051 \def\ttsl{\tenttsl} 1052 1053 %% Try out Computer Modern fonts at \magstephalf 1054 \let\mainmagstep=\magstephalf 1055 1056 % Set the font macro #1 to the font named #2, adding on the 1057 % specified font prefix (normally `cm'). 1058 % #3 is the font's design size, #4 is a scale factor 1059 \def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4} 1060 1061 % Use cm as the default font prefix. 1062 % To specify the font prefix, you must define \fontprefix 1063 % before you read in texinfo.tex. 1064 \ifx\fontprefix\undefined 1065 \def\fontprefix{cm} 1066 \fi 1067 % Support font families that don't use the same naming scheme as CM. 1068 \def\rmshape{r} 1069 \def\rmbshape{bx} %where the normal face is bold 1070 \def\bfshape{b} 1071 \def\bxshape{bx} 1072 \def\ttshape{tt} 1073 \def\ttbshape{tt} 1074 \def\ttslshape{sltt} 1075 \def\itshape{ti} 1076 \def\itbshape{bxti} 1077 \def\slshape{sl} 1078 \def\slbshape{bxsl} 1079 \def\sfshape{ss} 1080 \def\sfbshape{ss} 1081 \def\scshape{csc} 1082 \def\scbshape{csc} 1083 1084 \ifx\bigger\relax 1085 \let\mainmagstep=\magstep1 1086 \setfont\textrm\rmshape{12}{1000} 1087 \setfont\texttt\ttshape{12}{1000} 1088 \else 1089 \setfont\textrm\rmshape{10}{\mainmagstep} 1090 \setfont\texttt\ttshape{10}{\mainmagstep} 1091 \fi 1092 % Instead of cmb10, you many want to use cmbx10. 1093 % cmbx10 is a prettier font on its own, but cmb10 1094 % looks better when embedded in a line with cmr10. 1095 \setfont\textbf\bfshape{10}{\mainmagstep} 1096 \setfont\textit\itshape{10}{\mainmagstep} 1097 \setfont\textsl\slshape{10}{\mainmagstep} 1098 \setfont\textsf\sfshape{10}{\mainmagstep} 1099 \setfont\textsc\scshape{10}{\mainmagstep} 1100 \setfont\textttsl\ttslshape{10}{\mainmagstep} 1101 \font\texti=cmmi10 scaled \mainmagstep 1102 \font\textsy=cmsy10 scaled \mainmagstep 1103 1104 % A few fonts for @defun, etc. 1105 \setfont\defbf\bxshape{10}{\magstep1} %was 1314 1106 \setfont\deftt\ttshape{10}{\magstep1} 1107 \def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf} 1108 1109 % Fonts for indices and small examples (9pt). 1110 % We actually use the slanted font rather than the italic, 1111 % because texinfo normally uses the slanted fonts for that. 1112 % Do not make many font distinctions in general in the index, since they 1113 % aren't very useful. 1114 \setfont\ninett\ttshape{9}{1000} 1115 \setfont\indrm\rmshape{9}{1000} 1116 \setfont\indit\slshape{9}{1000} 1117 \let\indsl=\indit 1118 \let\indtt=\ninett 1119 \let\indttsl=\ninett 1120 \let\indsf=\indrm 1121 \let\indbf=\indrm 1122 \setfont\indsc\scshape{10}{900} 1123 \font\indi=cmmi9 1124 \font\indsy=cmsy9 1125 1126 % Chapter (and unnumbered) fonts (17.28pt). 1127 \setfont\chaprm\rmbshape{12}{\magstep2} 1128 \setfont\chapit\itbshape{10}{\magstep3} 1129 \setfont\chapsl\slbshape{10}{\magstep3} 1130 \setfont\chaptt\ttbshape{12}{\magstep2} 1131 \setfont\chapttsl\ttslshape{10}{\magstep3} 1132 \setfont\chapsf\sfbshape{12}{\magstep2} 1133 \let\chapbf=\chaprm 1134 \setfont\chapsc\scbshape{10}{\magstep3} 1135 \font\chapi=cmmi12 scaled \magstep2 1136 \font\chapsy=cmsy10 scaled \magstep3 1137 1138 % Section fonts (14.4pt). 1139 \setfont\secrm\rmbshape{12}{\magstep1} 1140 \setfont\secit\itbshape{10}{\magstep2} 1141 \setfont\secsl\slbshape{10}{\magstep2} 1142 \setfont\sectt\ttbshape{12}{\magstep1} 1143 \setfont\secttsl\ttslshape{10}{\magstep2} 1144 \setfont\secsf\sfbshape{12}{\magstep1} 1145 \let\secbf\secrm 1146 \setfont\secsc\scbshape{10}{\magstep2} 1147 \font\seci=cmmi12 scaled \magstep1 1148 \font\secsy=cmsy10 scaled \magstep2 1149 1150 % \setfont\ssecrm\bxshape{10}{\magstep1} % This size an font looked bad. 1151 % \setfont\ssecit\itshape{10}{\magstep1} % The letters were too crowded. 1152 % \setfont\ssecsl\slshape{10}{\magstep1} 1153 % \setfont\ssectt\ttshape{10}{\magstep1} 1154 % \setfont\ssecsf\sfshape{10}{\magstep1} 1155 1156 %\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx. 1157 %\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than 1158 %\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1. 1159 %\setfont\ssectt\ttshape{10}{1315} 1160 %\setfont\ssecsf\sfshape{10}{1315} 1161 1162 %\let\ssecbf=\ssecrm 1163 1164 % Subsection fonts (13.15pt). 1165 \setfont\ssecrm\rmbshape{12}{\magstephalf} 1166 \setfont\ssecit\itbshape{10}{1315} 1167 \setfont\ssecsl\slbshape{10}{1315} 1168 \setfont\ssectt\ttbshape{12}{\magstephalf} 1169 \setfont\ssecttsl\ttslshape{10}{\magstep1} 1170 \setfont\ssecsf\sfbshape{12}{\magstephalf} 1171 \let\ssecbf\ssecrm 1172 \setfont\ssecsc\scbshape{10}{\magstep1} 1173 \font\sseci=cmmi12 scaled \magstephalf 1174 \font\ssecsy=cmsy10 scaled \magstep1 1175 % The smallcaps and symbol fonts should actually be scaled \magstep1.5, 1176 % but that is not a standard magnification. 1177 1178 % Fonts for title page: 1179 \setfont\titlerm\rmbshape{12}{\magstep3} 1180 \let\authorrm = \secrm 1181 1182 % In order for the font changes to affect most math symbols and letters, 1183 % we have to define the \textfont of the standard families. Since 1184 % texinfo doesn't allow for producing subscripts and superscripts, we 1185 % don't bother to reset \scriptfont and \scriptscriptfont (which would 1186 % also require loading a lot more fonts). 1187 % 1188 \def\resetmathfonts{% 1189 \textfont0 = \tenrm \textfont1 = \teni \textfont2 = \tensy 1190 \textfont\itfam = \tenit \textfont\slfam = \tensl \textfont\bffam = \tenbf 1191 \textfont\ttfam = \tentt \textfont\sffam = \tensf 1192 } 1193 1194 1195 % The font-changing commands redefine the meanings of \tenSTYLE, instead 1196 % of just \STYLE. We do this so that font changes will continue to work 1197 % in math mode, where it is the current \fam that is relevant in most 1198 % cases, not the current font. Plain TeX does \def\bf{\fam=\bffam 1199 % \tenbf}, for example. By redefining \tenbf, we obviate the need to 1200 % redefine \bf itself. 1201 \def\textfonts{% 1202 \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl 1203 \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc 1204 \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl 1205 \resetmathfonts} 1206 \def\chapfonts{% 1207 \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl 1208 \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc 1209 \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl 1210 \resetmathfonts \setleading{19pt}} 1211 \def\secfonts{% 1212 \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl 1213 \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc 1214 \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl 1215 \resetmathfonts \setleading{16pt}} 1216 \def\subsecfonts{% 1217 \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl 1218 \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc 1219 \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl 1220 \resetmathfonts \setleading{15pt}} 1221 \let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf? 1222 \def\indexfonts{% 1223 \let\tenrm=\indrm \let\tenit=\indit \let\tensl=\indsl 1224 \let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc 1225 \let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy \let\tenttsl=\indttsl 1226 \resetmathfonts \setleading{12pt}} 1227 1228 % Set up the default fonts, so we can use them for creating boxes. 1229 % 1230 \textfonts 1231 1232 % Count depth in font-changes, for error checks 1233 \newcount\fontdepth \fontdepth=0 1234 1235 % Fonts for short table of contents. 1236 \setfont\shortcontrm\rmshape{12}{1000} 1237 \setfont\shortcontbf\bxshape{12}{1000} 1238 \setfont\shortcontsl\slshape{12}{1000} 1239 1240 %% Add scribe-like font environments, plus @l for inline lisp (usually sans 1241 %% serif) and @ii for TeX italic 1242 1243 % \smartitalic{ARG} outputs arg in italics, followed by an italic correction 1244 % unless the following character is such as not to need one. 1245 \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi} 1246 \def\smartitalic#1{{\sl #1}\futurelet\next\smartitalicx} 1247 1248 \let\i=\smartitalic 1249 \let\var=\smartitalic 1250 \let\dfn=\smartitalic 1251 \let\emph=\smartitalic 1252 \let\cite=\smartitalic 1253 1254 \def\b#1{{\bf #1}} 1255 \let\strong=\b 1256 1257 % We can't just use \exhyphenpenalty, because that only has effect at 1258 % the end of a paragraph. Restore normal hyphenation at the end of the 1259 % group within which \nohyphenation is presumably called. 1260 % 1261 \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} 1262 \def\restorehyphenation{\hyphenchar\font = `- } 1263 1264 \def\t#1{% 1265 {\tt \rawbackslash \frenchspacing #1}% 1266 \null 1267 } 1268 \let\ttfont=\t 1269 \def\samp #1{`\tclose{#1}'\null} 1270 \setfont\smallrm\rmshape{8}{1000} 1271 \font\smallsy=cmsy9 1272 \def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{% 1273 \raise0.4pt\hbox{$\langle$}\kern-.08em\vtop{% 1274 \vbox{\hrule\kern-0.4pt 1275 \hbox{\raise0.4pt\hbox{\vphantom{$\langle$}}#1}}% 1276 \kern-0.4pt\hrule}% 1277 \kern-.06em\raise0.4pt\hbox{$\rangle$}}}} 1278 % The old definition, with no lozenge: 1279 %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} 1280 \def\ctrl #1{{\tt \rawbackslash \hat}#1} 1281 1282 \let\file=\samp 1283 %\let\url=\samp % perhaps include a hypertex \special eventually 1284 %\def\email#1{$\langle${\tt #1}$\rangle$} 1285 1286 % @code is a modification of @t, 1287 % which makes spaces the same size as normal in the surrounding text. 1288 \def\tclose#1{% 1289 {% 1290 % Change normal interword space to be same as for the current font. 1291 \spaceskip = \fontdimen2\font 1292 % 1293 % Switch to typewriter. 1294 \tt 1295 % 1296 % But `\ ' produces the large typewriter interword space. 1297 \def\ {{\spaceskip = 0pt{} }}% 1298 % 1299 % Turn off hyphenation. 1300 \nohyphenation 1301 % 1302 \rawbackslash 1303 \frenchspacing 1304 #1% 1305 }% 1306 \null 1307 } 1308 1309 % We *must* turn on hyphenation at `-' and `_' in \code. 1310 % Otherwise, it is too hard to avoid overfull hboxes 1311 % in the Emacs manual, the Library manual, etc. 1312 1313 % Unfortunately, TeX uses one parameter (\hyphenchar) to control 1314 % both hyphenation at - and hyphenation within words. 1315 % We must therefore turn them both off (\tclose does that) 1316 % and arrange explicitly to hyphenate at a dash. 1317 % -- rms. 1318 { 1319 \catcode`\-=\active 1320 \catcode`\_=\active 1321 \catcode`\|=\active 1322 \global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex} 1323 % The following is used by \doprintindex to insure that long function names 1324 % wrap around. It is necessary for - and _ to be active before the index is 1325 % read from the file, as \entry parses the arguments long before \code is 1326 % ever called. -- mycroft 1327 % _ is always active; and it shouldn't be \let = to an _ that is a 1328 % subscript character anyway. Then, @cindex @samp{_} (for example) 1329 % fails. --karl 1330 \global\def\indexbreaks{% 1331 \catcode`\-=\active \let-\realdash 1332 } 1333 } 1334 1335 \def\realdash{-} 1336 \def\codedash{-\discretionary{}{}{}} 1337 \def\codeunder{\normalunderscore\discretionary{}{}{}} 1338 \def\codex #1{\tclose{#1}\endgroup} 1339 1340 %\let\exp=\tclose %Was temporary 1341 1342 % @kbd is like @code, except that if the argument is just one @key command, 1343 % then @kbd has no effect. 1344 % 1345 \def\xkey{\key} 1346 \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% 1347 \ifx\one\xkey\ifx\threex\three \key{#2}% 1348 \else{\tclose{\ttsl\look}}\fi 1349 \else{\tclose{\ttsl\look}}\fi} 1350 1351 % @url. Quotes do not seem necessary, so use \code. 1352 \let\url=\code 1353 1354 % @uref (abbreviation for `urlref') takes an optional second argument 1355 % specifying the text to display. First (mandatory) arg is the url. 1356 % Perhaps eventually put in a hypertex \special here. 1357 % 1358 \def\uref#1{\urefxxx #1,,\finish} 1359 \def\urefxxx#1,#2,#3\finish{% 1360 \setbox0 = \hbox{\ignorespaces #2}% 1361 \ifdim\wd0 > 0pt 1362 \unhbox0\ (\code{#1})% 1363 \else 1364 \code{#1}% 1365 \fi 1366 } 1367 1368 % rms does not like the angle brackets --karl, 17may97. 1369 % So now @email is just like @uref. 1370 %\def\email#1{\angleleft{\tt #1}\angleright} 1371 \let\email=\uref 1372 1373 % Check if we are currently using a typewriter font. Since all the 1374 % Computer Modern typewriter fonts have zero interword stretch (and 1375 % shrink), and it is reasonable to expect all typewriter fonts to have 1376 % this property, we can check that font parameter. 1377 % 1378 \def\ifmonospace{\ifdim\fontdimen3\font=0pt } 1379 1380 % Typeset a dimension, e.g., `in' or `pt'. The only reason for the 1381 % argument is to make the input look right: @dmn{pt} instead of 1382 % @dmn{}pt. 1383 % 1384 \def\dmn#1{\thinspace #1} 1385 1386 \def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} 1387 1388 % @l was never documented to mean ``switch to the Lisp font'', 1389 % and it is not used as such in any manual I can find. We need it for 1390 % Polish suppressed-l. --karl, 22sep96. 1391 %\def\l#1{{\li #1}\null} 1392 1393 \def\r#1{{\rm #1}} % roman font 1394 % Use of \lowercase was suggested. 1395 \def\sc#1{{\smallcaps#1}} % smallcaps font 1396 \def\ii#1{{\it #1}} % italic font 1397 1398 % @pounds{} is a sterling sign. 1399 \def\pounds{{\it\$}} 1400 1401 1402 \message{page headings,} 1403 1404 \newskip\titlepagetopglue \titlepagetopglue = 1.5in 1405 \newskip\titlepagebottomglue \titlepagebottomglue = 2pc 1406 1407 % First the title page. Must do @settitle before @titlepage. 1408 \def\titlefont#1{{\titlerm #1}} 1409 1410 \newif\ifseenauthor 1411 \newif\iffinishedtitlepage 1412 1413 \def\shorttitlepage{\parsearg\shorttitlepagezzz} 1414 \def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% 1415 \endgroup\page\hbox{}\page} 1416 1417 \def\titlepage{\begingroup \parindent=0pt \textfonts 1418 \let\subtitlerm=\tenrm 1419 % I deinstalled the following change because \cmr12 is undefined. 1420 % This change was not in the ChangeLog anyway. --rms. 1421 % \let\subtitlerm=\cmr12 1422 \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}% 1423 % 1424 \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}% 1425 % 1426 % Leave some space at the very top of the page. 1427 \vglue\titlepagetopglue 1428 % 1429 % Now you can print the title using @title. 1430 \def\title{\parsearg\titlezzz}% 1431 \def\titlezzz##1{\leftline{\titlefont{##1}} 1432 % print a rule at the page bottom also. 1433 \finishedtitlepagefalse 1434 \vskip4pt \hrule height 4pt width \hsize \vskip4pt}% 1435 % No rule at page bottom unless we print one at the top with @title. 1436 \finishedtitlepagetrue 1437 % 1438 % Now you can put text using @subtitle. 1439 \def\subtitle{\parsearg\subtitlezzz}% 1440 \def\subtitlezzz##1{{\subtitlefont \rightline{##1}}}% 1441 % 1442 % @author should come last, but may come many times. 1443 \def\author{\parsearg\authorzzz}% 1444 \def\authorzzz##1{\ifseenauthor\else\vskip 0pt plus 1filll\seenauthortrue\fi 1445 {\authorfont \leftline{##1}}}% 1446 % 1447 % Most title ``pages'' are actually two pages long, with space 1448 % at the top of the second. We don't want the ragged left on the second. 1449 \let\oldpage = \page 1450 \def\page{% 1451 \iffinishedtitlepage\else 1452 \finishtitlepage 1453 \fi 1454 \oldpage 1455 \let\page = \oldpage 1456 \hbox{}}% 1457 % \def\page{\oldpage \hbox{}} 1458 } 1459 1460 \def\Etitlepage{% 1461 \iffinishedtitlepage\else 1462 \finishtitlepage 1463 \fi 1464 % It is important to do the page break before ending the group, 1465 % because the headline and footline are only empty inside the group. 1466 % If we use the new definition of \page, we always get a blank page 1467 % after the title page, which we certainly don't want. 1468 \oldpage 1469 \endgroup 1470 \HEADINGSon 1471 } 1472 1473 \def\finishtitlepage{% 1474 \vskip4pt \hrule height 2pt width \hsize 1475 \vskip\titlepagebottomglue 1476 \finishedtitlepagetrue 1477 } 1478 1479 %%% Set up page headings and footings. 1480 1481 \let\thispage=\folio 1482 1483 \newtoks \evenheadline % Token sequence for heading line of even pages 1484 \newtoks \oddheadline % Token sequence for heading line of odd pages 1485 \newtoks \evenfootline % Token sequence for footing line of even pages 1486 \newtoks \oddfootline % Token sequence for footing line of odd pages 1487 1488 % Now make Tex use those variables 1489 \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline 1490 \else \the\evenheadline \fi}} 1491 \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline 1492 \else \the\evenfootline \fi}\HEADINGShook} 1493 \let\HEADINGShook=\relax 1494 1495 % Commands to set those variables. 1496 % For example, this is what @headings on does 1497 % @evenheading @thistitle|@thispage|@thischapter 1498 % @oddheading @thischapter|@thispage|@thistitle 1499 % @evenfooting @thisfile|| 1500 % @oddfooting ||@thisfile 1501 1502 \def\evenheading{\parsearg\evenheadingxxx} 1503 \def\oddheading{\parsearg\oddheadingxxx} 1504 \def\everyheading{\parsearg\everyheadingxxx} 1505 1506 \def\evenfooting{\parsearg\evenfootingxxx} 1507 \def\oddfooting{\parsearg\oddfootingxxx} 1508 \def\everyfooting{\parsearg\everyfootingxxx} 1509 1510 {\catcode`\@=0 % 1511 1512 \gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish} 1513 \gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{% 1514 \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} 1515 1516 \gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish} 1517 \gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{% 1518 \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} 1519 1520 \gdef\everyheadingxxx #1{\everyheadingyyy #1@|@|@|@|\finish} 1521 \gdef\everyheadingyyy #1@|#2@|#3@|#4\finish{% 1522 \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}} 1523 \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} 1524 1525 \gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish} 1526 \gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{% 1527 \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} 1528 1529 \gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish} 1530 \gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{% 1531 \global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} 1532 1533 \gdef\everyfootingxxx #1{\everyfootingyyy #1@|@|@|@|\finish} 1534 \gdef\everyfootingyyy #1@|#2@|#3@|#4\finish{% 1535 \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}} 1536 \global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} 1537 % 1538 }% unbind the catcode of @. 1539 1540 % @headings double turns headings on for double-sided printing. 1541 % @headings single turns headings on for single-sided printing. 1542 % @headings off turns them off. 1543 % @headings on same as @headings double, retained for compatibility. 1544 % @headings after turns on double-sided headings after this page. 1545 % @headings doubleafter turns on double-sided headings after this page. 1546 % @headings singleafter turns on single-sided headings after this page. 1547 % By default, they are off at the start of a document, 1548 % and turned `on' after @end titlepage. 1549 1550 \def\headings #1 {\csname HEADINGS#1\endcsname} 1551 1552 \def\HEADINGSoff{ 1553 \global\evenheadline={\hfil} \global\evenfootline={\hfil} 1554 \global\oddheadline={\hfil} \global\oddfootline={\hfil}} 1555 \HEADINGSoff 1556 % When we turn headings on, set the page number to 1. 1557 % For double-sided printing, put current file name in lower left corner, 1558 % chapter name on inside top of right hand pages, document 1559 % title on inside top of left hand pages, and page numbers on outside top 1560 % edge of all pages. 1561 \def\HEADINGSdouble{ 1562 \global\pageno=1 1563 \global\evenfootline={\hfil} 1564 \global\oddfootline={\hfil} 1565 \global\evenheadline={\line{\folio\hfil\thistitle}} 1566 \global\oddheadline={\line{\thischapter\hfil\folio}} 1567 \global\let\contentsalignmacro = \chapoddpage 1568 } 1569 \let\contentsalignmacro = \chappager 1570 1571 % For single-sided printing, chapter title goes across top left of page, 1572 % page number on top right. 1573 \def\HEADINGSsingle{ 1574 \global\pageno=1 1575 \global\evenfootline={\hfil} 1576 \global\oddfootline={\hfil} 1577 \global\evenheadline={\line{\thischapter\hfil\folio}} 1578 \global\oddheadline={\line{\thischapter\hfil\folio}} 1579 \global\let\contentsalignmacro = \chappager 1580 } 1581 \def\HEADINGSon{\HEADINGSdouble} 1582 1583 \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} 1584 \let\HEADINGSdoubleafter=\HEADINGSafter 1585 \def\HEADINGSdoublex{% 1586 \global\evenfootline={\hfil} 1587 \global\oddfootline={\hfil} 1588 \global\evenheadline={\line{\folio\hfil\thistitle}} 1589 \global\oddheadline={\line{\thischapter\hfil\folio}} 1590 \global\let\contentsalignmacro = \chapoddpage 1591 } 1592 1593 \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} 1594 \def\HEADINGSsinglex{% 1595 \global\evenfootline={\hfil} 1596 \global\oddfootline={\hfil} 1597 \global\evenheadline={\line{\thischapter\hfil\folio}} 1598 \global\oddheadline={\line{\thischapter\hfil\folio}} 1599 \global\let\contentsalignmacro = \chappager 1600 } 1601 1602 % Subroutines used in generating headings 1603 % Produces Day Month Year style of output. 1604 \def\today{\number\day\space 1605 \ifcase\month\or 1606 January\or February\or March\or April\or May\or June\or 1607 July\or August\or September\or October\or November\or December\fi 1608 \space\number\year} 1609 1610 % Use this if you want the Month Day, Year style of output. 1611 %\def\today{\ifcase\month\or 1612 %January\or February\or March\or April\or May\or June\or 1613 %July\or August\or September\or October\or November\or December\fi 1614 %\space\number\day, \number\year} 1615 1616 % @settitle line... specifies the title of the document, for headings 1617 % It generates no output of its own 1618 1619 \def\thistitle{No Title} 1620 \def\settitle{\parsearg\settitlezzz} 1621 \def\settitlezzz #1{\gdef\thistitle{#1}} 1622 1623 1624 \message{tables,} 1625 1626 % @tabs -- simple alignment 1627 1628 % These don't work. For one thing, \+ is defined as outer. 1629 % So these macros cannot even be defined. 1630 1631 %\def\tabs{\parsearg\tabszzz} 1632 %\def\tabszzz #1{\settabs\+#1\cr} 1633 %\def\tabline{\parsearg\tablinezzz} 1634 %\def\tablinezzz #1{\+#1\cr} 1635 %\def\&{&} 1636 1637 % Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x). 1638 1639 % default indentation of table text 1640 \newdimen\tableindent \tableindent=.8in 1641 % default indentation of @itemize and @enumerate text 1642 \newdimen\itemindent \itemindent=.3in 1643 % margin between end of table item and start of table text. 1644 \newdimen\itemmargin \itemmargin=.1in 1645 1646 % used internally for \itemindent minus \itemmargin 1647 \newdimen\itemmax 1648 1649 % Note @table, @vtable, and @vtable define @item, @itemx, etc., with 1650 % these defs. 1651 % They also define \itemindex 1652 % to index the item name in whatever manner is desired (perhaps none). 1653 1654 \newif\ifitemxneedsnegativevskip 1655 1656 \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} 1657 1658 \def\internalBitem{\smallbreak \parsearg\itemzzz} 1659 \def\internalBitemx{\itemxpar \parsearg\itemzzz} 1660 1661 \def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz} 1662 \def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \itemxpar \parsearg\xitemzzz} 1663 1664 \def\internalBkitem{\smallbreak \parsearg\kitemzzz} 1665 \def\internalBkitemx{\itemxpar \parsearg\kitemzzz} 1666 1667 \def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}% 1668 \itemzzz {#1}} 1669 1670 \def\xitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \xitemsubtopic}}% 1671 \itemzzz {#1}} 1672 1673 \def\itemzzz #1{\begingroup % 1674 \advance\hsize by -\rightskip 1675 \advance\hsize by -\tableindent 1676 \setbox0=\hbox{\itemfont{#1}}% 1677 \itemindex{#1}% 1678 \nobreak % This prevents a break before @itemx. 1679 % 1680 % Be sure we are not still in the middle of a paragraph. 1681 %{\parskip = 0in 1682 %\par 1683 %}% 1684 % 1685 % If the item text does not fit in the space we have, put it on a line 1686 % by itself, and do not allow a page break either before or after that 1687 % line. We do not start a paragraph here because then if the next 1688 % command is, e.g., @kindex, the whatsit would get put into the 1689 % horizontal list on a line by itself, resulting in extra blank space. 1690 \ifdim \wd0>\itemmax 1691 % 1692 % Make this a paragraph so we get the \parskip glue and wrapping, 1693 % but leave it ragged-right. 1694 \begingroup 1695 \advance\leftskip by-\tableindent 1696 \advance\hsize by\tableindent 1697 \advance\rightskip by0pt plus1fil 1698 \leavevmode\unhbox0\par 1699 \endgroup 1700 % 1701 % We're going to be starting a paragraph, but we don't want the 1702 % \parskip glue -- logically it's part of the @item we just started. 1703 \nobreak \vskip-\parskip 1704 % 1705 % Stop a page break at the \parskip glue coming up. Unfortunately 1706 % we can't prevent a possible page break at the following 1707 % \baselineskip glue. 1708 \nobreak 1709 \endgroup 1710 \itemxneedsnegativevskipfalse 1711 \else 1712 % The item text fits into the space. Start a paragraph, so that the 1713 % following text (if any) will end up on the same line. Since that 1714 % text will be indented by \tableindent, we make the item text be in 1715 % a zero-width box. 1716 \noindent 1717 \rlap{\hskip -\tableindent\box0}\ignorespaces% 1718 \endgroup% 1719 \itemxneedsnegativevskiptrue% 1720 \fi 1721 } 1722 1723 \def\item{\errmessage{@item while not in a table}} 1724 \def\itemx{\errmessage{@itemx while not in a table}} 1725 \def\kitem{\errmessage{@kitem while not in a table}} 1726 \def\kitemx{\errmessage{@kitemx while not in a table}} 1727 \def\xitem{\errmessage{@xitem while not in a table}} 1728 \def\xitemx{\errmessage{@xitemx while not in a table}} 1729 1730 %% Contains a kludge to get @end[description] to work 1731 \def\description{\tablez{\dontindex}{1}{}{}{}{}} 1732 1733 \def\table{\begingroup\inENV\obeylines\obeyspaces\tablex} 1734 {\obeylines\obeyspaces% 1735 \gdef\tablex #1^^M{% 1736 \tabley\dontindex#1 \endtabley}} 1737 1738 \def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex} 1739 {\obeylines\obeyspaces% 1740 \gdef\ftablex #1^^M{% 1741 \tabley\fnitemindex#1 \endtabley 1742 \def\Eftable{\endgraf\afterenvbreak\endgroup}% 1743 \let\Etable=\relax}} 1744 1745 \def\vtable{\begingroup\inENV\obeylines\obeyspaces\vtablex} 1746 {\obeylines\obeyspaces% 1747 \gdef\vtablex #1^^M{% 1748 \tabley\vritemindex#1 \endtabley 1749 \def\Evtable{\endgraf\afterenvbreak\endgroup}% 1750 \let\Etable=\relax}} 1751 1752 \def\dontindex #1{} 1753 \def\fnitemindex #1{\doind {fn}{\code{#1}}}% 1754 \def\vritemindex #1{\doind {vr}{\code{#1}}}% 1755 1756 {\obeyspaces % 1757 \gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup% 1758 \tablez{#1}{#2}{#3}{#4}{#5}{#6}}} 1759 1760 \def\tablez #1#2#3#4#5#6{% 1761 \aboveenvbreak % 1762 \begingroup % 1763 \def\Edescription{\Etable}% Necessary kludge. 1764 \let\itemindex=#1% 1765 \ifnum 0#3>0 \advance \leftskip by #3\mil \fi % 1766 \ifnum 0#4>0 \tableindent=#4\mil \fi % 1767 \ifnum 0#5>0 \advance \rightskip by #5\mil \fi % 1768 \def\itemfont{#2}% 1769 \itemmax=\tableindent % 1770 \advance \itemmax by -\itemmargin % 1771 \advance \leftskip by \tableindent % 1772 \exdentamount=\tableindent 1773 \parindent = 0pt 1774 \parskip = \smallskipamount 1775 \ifdim \parskip=0pt \parskip=2pt \fi% 1776 \def\Etable{\endgraf\afterenvbreak\endgroup}% 1777 \let\item = \internalBitem % 1778 \let\itemx = \internalBitemx % 1779 \let\kitem = \internalBkitem % 1780 \let\kitemx = \internalBkitemx % 1781 \let\xitem = \internalBxitem % 1782 \let\xitemx = \internalBxitemx % 1783 } 1784 1785 % This is the counter used by @enumerate, which is really @itemize 1786 1787 \newcount \itemno 1788 1789 \def\itemize{\parsearg\itemizezzz} 1790 1791 \def\itemizezzz #1{% 1792 \begingroup % ended by the @end itemsize 1793 \itemizey {#1}{\Eitemize} 1794 } 1795 1796 \def\itemizey #1#2{% 1797 \aboveenvbreak % 1798 \itemmax=\itemindent % 1799 \advance \itemmax by -\itemmargin % 1800 \advance \leftskip by \itemindent % 1801 \exdentamount=\itemindent 1802 \parindent = 0pt % 1803 \parskip = \smallskipamount % 1804 \ifdim \parskip=0pt \parskip=2pt \fi% 1805 \def#2{\endgraf\afterenvbreak\endgroup}% 1806 \def\itemcontents{#1}% 1807 \let\item=\itemizeitem} 1808 1809 % Set sfcode to normal for the chars that usually have another value. 1810 % These are `.?!:;,' 1811 \def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=1000 1812 \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 } 1813 1814 % \splitoff TOKENS\endmark defines \first to be the first token in 1815 % TOKENS, and \rest to be the remainder. 1816 % 1817 \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% 1818 1819 % Allow an optional argument of an uppercase letter, lowercase letter, 1820 % or number, to specify the first label in the enumerated list. No 1821 % argument is the same as `1'. 1822 % 1823 \def\enumerate{\parsearg\enumeratezzz} 1824 \def\enumeratezzz #1{\enumeratey #1 \endenumeratey} 1825 \def\enumeratey #1 #2\endenumeratey{% 1826 \begingroup % ended by the @end enumerate 1827 % 1828 % If we were given no argument, pretend we were given `1'. 1829 \def\thearg{#1}% 1830 \ifx\thearg\empty \def\thearg{1}\fi 1831 % 1832 % Detect if the argument is a single token. If so, it might be a 1833 % letter. Otherwise, the only valid thing it can be is a number. 1834 % (We will always have one token, because of the test we just made. 1835 % This is a good thing, since \splitoff doesn't work given nothing at 1836 % all -- the first parameter is undelimited.) 1837 \expandafter\splitoff\thearg\endmark 1838 \ifx\rest\empty 1839 % Only one token in the argument. It could still be anything. 1840 % A ``lowercase letter'' is one whose \lccode is nonzero. 1841 % An ``uppercase letter'' is one whose \lccode is both nonzero, and 1842 % not equal to itself. 1843 % Otherwise, we assume it's a number. 1844 % 1845 % We need the \relax at the end of the \ifnum lines to stop TeX from 1846 % continuing to look for a <number>. 1847 % 1848 \ifnum\lccode\expandafter`\thearg=0\relax 1849 \numericenumerate % a number (we hope) 1850 \else 1851 % It's a letter. 1852 \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax 1853 \lowercaseenumerate % lowercase letter 1854 \else 1855 \uppercaseenumerate % uppercase letter 1856 \fi 1857 \fi 1858 \else 1859 % Multiple tokens in the argument. We hope it's a number. 1860 \numericenumerate 1861 \fi 1862 } 1863 1864 % An @enumerate whose labels are integers. The starting integer is 1865 % given in \thearg. 1866 % 1867 \def\numericenumerate{% 1868 \itemno = \thearg 1869 \startenumeration{\the\itemno}% 1870 } 1871 1872 % The starting (lowercase) letter is in \thearg. 1873 \def\lowercaseenumerate{% 1874 \itemno = \expandafter`\thearg 1875 \startenumeration{% 1876 % Be sure we're not beyond the end of the alphabet. 1877 \ifnum\itemno=0 1878 \errmessage{No more lowercase letters in @enumerate; get a bigger 1879 alphabet}% 1880 \fi 1881 \char\lccode\itemno 1882 }% 1883 } 1884 1885 % The starting (uppercase) letter is in \thearg. 1886 \def\uppercaseenumerate{% 1887 \itemno = \expandafter`\thearg 1888 \startenumeration{% 1889 % Be sure we're not beyond the end of the alphabet. 1890 \ifnum\itemno=0 1891 \errmessage{No more uppercase letters in @enumerate; get a bigger 1892 alphabet} 1893 \fi 1894 \char\uccode\itemno 1895 }% 1896 } 1897 1898 % Call itemizey, adding a period to the first argument and supplying the 1899 % common last two arguments. Also subtract one from the initial value in 1900 % \itemno, since @item increments \itemno. 1901 % 1902 \def\startenumeration#1{% 1903 \advance\itemno by -1 1904 \itemizey{#1.}\Eenumerate\flushcr 1905 } 1906 1907 % @alphaenumerate and @capsenumerate are abbreviations for giving an arg 1908 % to @enumerate. 1909 % 1910 \def\alphaenumerate{\enumerate{a}} 1911 \def\capsenumerate{\enumerate{A}} 1912 \def\Ealphaenumerate{\Eenumerate} 1913 \def\Ecapsenumerate{\Eenumerate} 1914 1915 % Definition of @item while inside @itemize. 1916 1917 \def\itemizeitem{% 1918 \advance\itemno by 1 1919 {\let\par=\endgraf \smallbreak}% 1920 \ifhmode \errmessage{\in hmode at itemizeitem}\fi 1921 {\parskip=0in \hskip 0pt 1922 \hbox to 0pt{\hss \itemcontents\hskip \itemmargin}% 1923 \vadjust{\penalty 1200}}% 1924 \flushcr} 1925 1926 % @multitable macros 1927 % Amy Hendrickson, 8/18/94, 3/6/96 1928 % 1929 % @multitable ... @end multitable will make as many columns as desired. 1930 % Contents of each column will wrap at width given in preamble. Width 1931 % can be specified either with sample text given in a template line, 1932 % or in percent of \hsize, the current width of text on page. 1933 1934 % Table can continue over pages but will only break between lines. 1935 1936 % To make preamble: 1937 % 1938 % Either define widths of columns in terms of percent of \hsize: 1939 % @multitable @columnfractions .25 .3 .45 1940 % @item ... 1941 % 1942 % Numbers following @columnfractions are the percent of the total 1943 % current hsize to be used for each column. You may use as many 1944 % columns as desired. 1945 1946 1947 % Or use a template: 1948 % @multitable {Column 1 template} {Column 2 template} {Column 3 template} 1949 % @item ... 1950 % using the widest term desired in each column. 1951 % 1952 % For those who want to use more than one line's worth of words in 1953 % the preamble, break the line within one argument and it 1954 % will parse correctly, i.e., 1955 % 1956 % @multitable {Column 1 template} {Column 2 template} {Column 3 1957 % template} 1958 % Not: 1959 % @multitable {Column 1 template} {Column 2 template} 1960 % {Column 3 template} 1961 1962 % Each new table line starts with @item, each subsequent new column 1963 % starts with @tab. Empty columns may be produced by supplying @tab's 1964 % with nothing between them for as many times as empty columns are needed, 1965 % ie, @tab@tab@tab will produce two empty columns. 1966 1967 % @item, @tab, @multitable or @end multitable do not need to be on their 1968 % own lines, but it will not hurt if they are. 1969 1970 % Sample multitable: 1971 1972 % @multitable {Column 1 template} {Column 2 template} {Column 3 template} 1973 % @item first col stuff @tab second col stuff @tab third col 1974 % @item 1975 % first col stuff 1976 % @tab 1977 % second col stuff 1978 % @tab 1979 % third col 1980 % @item first col stuff @tab second col stuff 1981 % @tab Many paragraphs of text may be used in any column. 1982 % 1983 % They will wrap at the width determined by the template. 1984 % @item@tab@tab This will be in third column. 1985 % @end multitable 1986 1987 % Default dimensions may be reset by user. 1988 % @multitableparskip is vertical space between paragraphs in table. 1989 % @multitableparindent is paragraph indent in table. 1990 % @multitablecolmargin is horizontal space to be left between columns. 1991 % @multitablelinespace is space to leave between table items, baseline 1992 % to baseline. 1993 % 0pt means it depends on current normal line spacing. 1994 1995 %%%% 1996 % Dimensions 1997 1998 \newskip\multitableparskip 1999 \newskip\multitableparindent 2000 \newdimen\multitablecolspace 2001 \newskip\multitablelinespace 2002 \multitableparskip=0pt 2003 \multitableparindent=6pt 2004 \multitablecolspace=12pt 2005 \multitablelinespace=0pt 2006 2007 %%%% 2008 % Macros used to set up halign preamble: 2009 \let\endsetuptable\relax 2010 \def\xendsetuptable{\endsetuptable} 2011 \let\columnfractions\relax 2012 \def\xcolumnfractions{\columnfractions} 2013 \newif\ifsetpercent 2014 2015 %% 2/1/96, to allow fractions to be given with more than one digit. 2016 \def\pickupwholefraction#1 {\global\advance\colcount by1 % 2017 \expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}% 2018 \setuptable} 2019 2020 \newcount\colcount 2021 \def\setuptable#1{\def\firstarg{#1}% 2022 \ifx\firstarg\xendsetuptable\let\go\relax% 2023 \else 2024 \ifx\firstarg\xcolumnfractions\global\setpercenttrue% 2025 \else 2026 \ifsetpercent 2027 \let\go\pickupwholefraction % In this case arg of setuptable 2028 % is the decimal point before the 2029 % number given in percent of hsize. 2030 % We don't need this so we don't use it. 2031 \else 2032 \global\advance\colcount by1 2033 \setbox0=\hbox{#1 }% Add a normal word space as a separator; 2034 % typically that is always in the input, anyway. 2035 \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% 2036 \fi% 2037 \fi% 2038 \ifx\go\pickupwholefraction\else\let\go\setuptable\fi% 2039 \fi\go} 2040 2041 %%%% 2042 % multitable syntax 2043 \def\tab{&\hskip1sp\relax} % 2/2/96 2044 % tiny skip here makes sure this column space is 2045 % maintained, even if it is never used. 2046 2047 2048 %%%% 2049 % @multitable ... @end multitable definitions: 2050 2051 \def\multitable{\parsearg\dotable} 2052 2053 \def\dotable#1{\bgroup 2054 \let\item\cr 2055 \tolerance=9500 2056 \hbadness=9500 2057 \setmultitablespacing 2058 \parskip=\multitableparskip 2059 \parindent=\multitableparindent 2060 \overfullrule=0pt 2061 \global\colcount=0\relax% 2062 \def\Emultitable{\global\setpercentfalse\global\everycr{}\cr\egroup\egroup}% 2063 % To parse everything between @multitable and @item : 2064 \setuptable#1 \endsetuptable 2065 % Need to reset this to 0 after \setuptable. 2066 \global\colcount=0\relax% 2067 % 2068 % This preamble sets up a generic column definition, which will 2069 % be used as many times as user calls for columns. 2070 % \vtop will set a single line and will also let text wrap and 2071 % continue for many paragraphs if desired. 2072 \halign\bgroup&\global\advance\colcount by 1\relax% 2073 \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname 2074 % In order to keep entries from bumping into each other 2075 % we will add a \leftskip of \multitablecolspace to all columns after 2076 % the first one. 2077 % If a template has been used, we will add \multitablecolspace 2078 % to the width of each template entry. 2079 % If user has set preamble in terms of percent of \hsize 2080 % we will use that dimension as the width of the column, and 2081 % the \leftskip will keep entries from bumping into each other. 2082 % Table will start at left margin and final column will justify at 2083 % right margin. 2084 \ifnum\colcount=1 2085 \else 2086 \ifsetpercent 2087 \else 2088 % If user has <not> set preamble in terms of percent of \hsize 2089 % we will advance \hsize by \multitablecolspace 2090 \advance\hsize by \multitablecolspace 2091 \fi 2092 % In either case we will make \leftskip=\multitablecolspace: 2093 \leftskip=\multitablecolspace 2094 \fi 2095 % Ignoring space at the beginning and end avoids an occasional spurious 2096 % blank line, when TeX decides to break the line at the space before the 2097 % box from the multistrut, so the strut ends up on a line by itself. 2098 % For example: 2099 % @multitable @columnfractions .11 .89 2100 % @item @code{#} 2101 % @tab Legal holiday which is valid in major parts of the whole country. 2102 % Is automatically provided with highlighting sequences respectively marking 2103 % characters. 2104 \noindent\ignorespaces##\unskip\multistrut}\cr 2105 % \everycr will reset column counter, \colcount, at the end of 2106 % each line. Every column entry will cause \colcount to advance by one. 2107 % The table preamble 2108 % looks at the current \colcount to find the correct column width. 2109 \global\everycr{\noalign{% 2110 % \filbreak%% keeps underfull box messages off when table breaks over pages. 2111 % Maybe so, but it also creates really weird page breaks when the table 2112 % breaks over pages Wouldn't \vfil be better? Wait until the problem 2113 % manifests itself, so it can be fixed for real --karl. 2114 \global\colcount=0\relax}} 2115 } 2116 2117 \def\setmultitablespacing{% test to see if user has set \multitablelinespace. 2118 % If so, do nothing. If not, give it an appropriate dimension based on 2119 % current baselineskip. 2120 \ifdim\multitablelinespace=0pt 2121 %% strut to put in table in case some entry doesn't have descenders, 2122 %% to keep lines equally spaced 2123 \let\multistrut = \strut 2124 %% Test to see if parskip is larger than space between lines of 2125 %% table. If not, do nothing. 2126 %% If so, set to same dimension as multitablelinespace. 2127 \else 2128 \gdef\multistrut{\vrule height\multitablelinespace depth\dp0 2129 width0pt\relax} \fi 2130 \ifdim\multitableparskip>\multitablelinespace 2131 \global\multitableparskip=\multitablelinespace 2132 \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller 2133 %% than skip between lines in the table. 2134 \fi% 2135 \ifdim\multitableparskip=0pt 2136 \global\multitableparskip=\multitablelinespace 2137 \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller 2138 %% than skip between lines in the table. 2139 \fi} 2343 % @defininfoenclose. 2344 \let\definfoenclose=\comment 2140 2345 2141 2346 … … 2155 2360 % The name of an index should be no more than 2 characters long 2156 2361 % for the sake of vms. 2157 2158 \def\newindex #1{ 2159 \expandafter\newwrite \csname#1indfile\endcsname% Define number for output file 2160 \openout \csname#1indfile\endcsname \jobname.#1 % Open the file 2161 \expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex 2162 \noexpand\doindex {#1}} 2362 % 2363 \def\newindex#1{% 2364 \iflinks 2365 \expandafter\newwrite \csname#1indfile\endcsname 2366 \openout \csname#1indfile\endcsname \jobname.#1 % Open the file 2367 \fi 2368 \expandafter\xdef\csname#1index\endcsname{% % Define @#1index 2369 \noexpand\doindex{#1}} 2163 2370 } 2164 2371 … … 2169 2376 % Define @defcodeindex, like @defindex except put all entries in @code. 2170 2377 2171 \def\newcodeindex #1{ 2172 \expandafter\newwrite \csname#1indfile\endcsname% Define number for output file 2173 \openout \csname#1indfile\endcsname \jobname.#1 % Open the file 2174 \expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex 2175 \noexpand\docodeindex {#1}} 2378 \def\newcodeindex#1{% 2379 \iflinks 2380 \expandafter\newwrite \csname#1indfile\endcsname 2381 \openout \csname#1indfile\endcsname \jobname.#1 2382 \fi 2383 \expandafter\xdef\csname#1index\endcsname{% 2384 \noexpand\docodeindex{#1}} 2176 2385 } 2177 2386 … … 2180 2389 % @synindex foo bar makes index foo feed into index bar. 2181 2390 % Do this instead of @defindex foo if you don't want it as a separate index. 2182 \def\synindex #1 #2 {% 2183 \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname 2184 \expandafter\let\csname#1indfile\endcsname=\synindexfoo 2185 \expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex 2186 \noexpand\doindex {#2}}% 2391 % The \closeout helps reduce unnecessary open files; the limit on the 2392 % Acorn RISC OS is a mere 16 files. 2393 \def\synindex#1 #2 {% 2394 \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname 2395 \expandafter\closeout\csname#1indfile\endcsname 2396 \expandafter\let\csname#1indfile\endcsname=\synindexfoo 2397 \expandafter\xdef\csname#1index\endcsname{% define \xxxindex 2398 \noexpand\doindex{#2}}% 2187 2399 } 2188 2400 2189 2401 % @syncodeindex foo bar similar, but put all entries made for index foo 2190 2402 % inside @code. 2191 \def\syncodeindex #1 #2 {% 2192 \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname 2193 \expandafter\let\csname#1indfile\endcsname=\synindexfoo 2194 \expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex 2195 \noexpand\docodeindex {#2}}% 2403 \def\syncodeindex#1 #2 {% 2404 \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname 2405 \expandafter\closeout\csname#1indfile\endcsname 2406 \expandafter\let\csname#1indfile\endcsname=\synindexfoo 2407 \expandafter\xdef\csname#1index\endcsname{% define \xxxindex 2408 \noexpand\docodeindex{#2}}% 2196 2409 } 2197 2410 … … 2214 2427 2215 2428 \def\indexdummies{% 2429 \def\ { }% 2216 2430 % Take care of the plain tex accent commands. 2217 2431 \def\"{\realbackslash "}% … … 2243 2457 % laboriously list every single command here.) 2244 2458 \def\@{@}% will be @@ when we switch to @ as escape char. 2245 %\let\{ = \lbracecmd 2246 %\let\} = \rbracecmd 2459 % Need these in case \tex is in effect and \{ is a \delimiter again. 2460 % But can't use \lbracecmd and \rbracecmd because texindex assumes 2461 % braces and backslashes are used only as delimiters. 2462 \let\{ = \mylbrace 2463 \let\} = \myrbrace 2247 2464 \def\_{{\realbackslash _}}% 2248 2465 \def\w{\realbackslash w }% … … 2255 2472 \def\less{\realbackslash less}% 2256 2473 \def\hat{\realbackslash hat}% 2257 %\def\char{\realbackslash char}%2258 2474 \def\TeX{\realbackslash TeX}% 2259 2475 \def\dots{\realbackslash dots }% 2260 \def\copyright{\realbackslash copyright }% 2476 \def\result{\realbackslash result}% 2477 \def\equiv{\realbackslash equiv}% 2478 \def\expansion{\realbackslash expansion}% 2479 \def\print{\realbackslash print}% 2480 \def\error{\realbackslash error}% 2481 \def\point{\realbackslash point}% 2482 \def\copyright{\realbackslash copyright}% 2261 2483 \def\tclose##1{\realbackslash tclose {##1}}% 2262 2484 \def\code##1{\realbackslash code {##1}}% 2485 \def\uref##1{\realbackslash uref {##1}}% 2486 \def\url##1{\realbackslash url {##1}}% 2487 \def\env##1{\realbackslash env {##1}}% 2488 \def\command##1{\realbackslash command {##1}}% 2489 \def\option##1{\realbackslash option {##1}}% 2263 2490 \def\dotless##1{\realbackslash dotless {##1}}% 2264 2491 \def\samp##1{\realbackslash samp {##1}}% … … 2268 2495 \def\i##1{\realbackslash i {##1}}% 2269 2496 \def\b##1{\realbackslash b {##1}}% 2497 \def\sc##1{\realbackslash sc {##1}}% 2270 2498 \def\cite##1{\realbackslash cite {##1}}% 2271 2499 \def\key##1{\realbackslash key {##1}}% … … 2275 2503 \def\dfn##1{\realbackslash dfn {##1}}% 2276 2504 \def\emph##1{\realbackslash emph {##1}}% 2505 \def\acronym##1{\realbackslash acronym {##1}}% 2506 % 2507 % Handle some cases of @value -- where the variable name does not 2508 % contain - or _, and the value does not contain any 2509 % (non-fully-expandable) commands. 2510 \let\value = \expandablevalue 2511 % 2277 2512 \unsepspaces 2513 % Turn off macro expansion 2514 \turnoffmacros 2278 2515 } 2279 2516 … … 2332 2569 \let\tclose=\indexdummyfont 2333 2570 \let\code=\indexdummyfont 2571 \let\url=\indexdummyfont 2572 \let\uref=\indexdummyfont 2573 \let\env=\indexdummyfont 2574 \let\command=\indexdummyfont 2575 \let\option=\indexdummyfont 2334 2576 \let\file=\indexdummyfont 2335 2577 \let\samp=\indexdummyfont … … 2347 2589 2348 2590 {\catcode`\@=0 \catcode`\\=\other 2349 @gdef@realbackslash{\}}2591 @gdef@realbackslash{\}} 2350 2592 2351 2593 \let\indexbackslash=0 %overridden during \printindex. 2352 2353 \let\SETmarginindex=\relax %initialize! 2354 % workhorse for all \fooindexes 2355 % #1 is name of index, #2 is stuff to put there 2356 \def\doind #1#2{% 2594 \let\SETmarginindex=\relax % put index entries in margin (undocumented)? 2595 2596 % For \ifx comparisons. 2597 \def\emptymacro{\empty} 2598 2599 % Most index entries go through here, but \dosubind is the general case. 2600 % 2601 \def\doind#1#2{\dosubind{#1}{#2}\empty} 2602 2603 % Workhorse for all \fooindexes. 2604 % #1 is name of index, #2 is stuff to put there, #3 is subentry -- 2605 % \empty if called from \doind, as we usually are. The main exception 2606 % is with defuns, which call us directly. 2607 % 2608 \def\dosubind#1#2#3{% 2357 2609 % Put the index entry in the margin if desired. 2358 2610 \ifx\SETmarginindex\relax\else … … 2365 2617 \escapechar=`\\ 2366 2618 {% 2367 \let\folio =0% We will expand all macros now EXCEPT \folio.2619 \let\folio = 0% We will expand all macros now EXCEPT \folio. 2368 2620 \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now 2369 2621 % so it will be output as is; and it will print as backslash. 2370 2622 % 2371 % First process the index-string with all font commands turned off 2372 % to get the string to sort by. 2373 {\indexnofonts \xdef\indexsorttmp{#2}}% 2623 \def\thirdarg{#3}% 2374 2624 % 2375 % Now produce the complete index entry, with both the sort key and the 2376 % original text, including any font commands. 2625 % If third arg is present, precede it with space in sort key. 2626 \ifx\thirdarg\emptymacro 2627 \let\subentry = \empty 2628 \else 2629 \def\subentry{ #3}% 2630 \fi 2631 % 2632 % First process the index entry with all font commands turned 2633 % off to get the string to sort by. 2634 {\indexnofonts \xdef\indexsorttmp{#2\subentry}}% 2635 % 2636 % Now the real index entry with the fonts. 2377 2637 \toks0 = {#2}% 2638 % 2639 % If third (subentry) arg is present, add it to the index 2640 % string. And include a space. 2641 \ifx\thirdarg\emptymacro \else 2642 \toks0 = \expandafter{\the\toks0 \space #3}% 2643 \fi 2644 % 2645 % Set up the complete index entry, with both the sort key 2646 % and the original text, including any font commands. We write 2647 % three arguments to \entry to the .?? file, texindex reduces to 2648 % two when writing the .??s sorted result. 2378 2649 \edef\temp{% 2379 2650 \write\csname#1indfile\endcsname{% 2380 2651 \realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}% 2381 2652 }% 2382 \temp 2653 % 2654 % If a skip is the last thing on the list now, preserve it 2655 % by backing up by \lastskip, doing the \write, then inserting 2656 % the skip again. Otherwise, the whatsit generated by the 2657 % \write will make \lastskip zero. The result is that sequences 2658 % like this: 2659 % @end defun 2660 % @tindex whatever 2661 % @defun ... 2662 % will have extra space inserted, because the \medbreak in the 2663 % start of the @defun won't see the skip inserted by the @end of 2664 % the previous defun. 2665 % 2666 % But don't do any of this if we're not in vertical mode. We 2667 % don't want to do a \vskip and prematurely end a paragraph. 2668 % 2669 % Avoid page breaks due to these extra skips, too. 2670 % 2671 \iflinks 2672 \ifvmode 2673 \skip0 = \lastskip 2674 \ifdim\lastskip = 0pt \else \nobreak\vskip-\lastskip \fi 2675 \fi 2676 % 2677 \temp % do the write 2678 % 2679 % 2680 \ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi 2681 \fi 2383 2682 }% 2384 2683 }% … … 2386 2685 }% 2387 2686 } 2388 2389 \def\dosubind #1#2#3{%2390 {\count10=\lastpenalty %2391 {\indexdummies % Must do this here, since \bf, etc expand at this stage2392 \escapechar=`\\%2393 {\let\folio=0%2394 \def\rawbackslashxx{\indexbackslash}%2395 %2396 % Now process the index-string once, with all font commands turned off,2397 % to get the string to sort the index by.2398 {\indexnofonts2399 \xdef\temp1{#2 #3}%2400 }%2401 % Now produce the complete index entry. We process the index-string again,2402 % this time with font commands expanded, to get what to print in the index.2403 \edef\temp{%2404 \write \csname#1indfile\endcsname{%2405 \realbackslash entry {\temp1}{\folio}{#2}{#3}}}%2406 \temp }%2407 }\penalty\count10}}2408 2687 2409 2688 % The index entry written in the file actually looks like … … 2439 2718 % Define the macros used in formatting output of the sorted index material. 2440 2719 2441 % This is what you call to cause a particular index to get printed. 2442 % Write 2443 % @unnumbered Function Index 2444 % @printindex fn 2445 2720 % @printindex causes a particular index (the ??s file) to get printed. 2721 % It does not print any chapter heading (usually an @unnumbered). 2722 % 2446 2723 \def\printindex{\parsearg\doprintindex} 2447 2448 2724 \def\doprintindex#1{\begingroup 2449 2725 \dobreak \chapheadingskip{10000}% … … 2452 2728 \tolerance = 9500 2453 2729 \indexbreaks 2454 \def\indexbackslash{\rawbackslashxx}% 2455 % Index files are almost Texinfo source, but we use \ as the escape 2456 % character. It would be better to use @, but that's too big a change 2457 % to make right now. 2458 \catcode`\\ = 0 2730 % 2731 % See if the index file exists and is nonempty. 2732 % Change catcode of @ here so that if the index file contains 2733 % \initial {@} 2734 % as its first line, TeX doesn't complain about mismatched braces 2735 % (because it thinks @} is a control sequence). 2459 2736 \catcode`\@ = 11 2460 \escapechar = `\\2461 \begindoublecolumns2462 %2463 % See if the index file exists and is nonempty.2464 2737 \openin 1 \jobname.#1s 2465 2738 \ifeof 1 … … 2468 2741 % index. The easiest way to prevent this problem is to make sure 2469 2742 % there is some text. 2470 (Index is nonexistent)2743 \putwordIndexNonexistent 2471 2744 \else 2472 2745 % … … 2476 2749 \read 1 to \temp 2477 2750 \ifeof 1 2478 (Index is empty)2751 \putwordIndexIsEmpty 2479 2752 \else 2753 % Index files are almost Texinfo source, but we use \ as the escape 2754 % character. It would be better to use @, but that's too big a change 2755 % to make right now. 2756 \def\indexbackslash{\rawbackslashxx}% 2757 \catcode`\\ = 0 2758 \escapechar = `\\ 2759 \begindoublecolumns 2480 2760 \input \jobname.#1s 2761 \enddoublecolumns 2481 2762 \fi 2482 2763 \fi 2483 2764 \closein 1 2484 \enddoublecolumns2485 2765 \endgroup} 2486 2766 … … 2488 2768 % Change them to control the appearance of the index. 2489 2769 2490 % Same as \bigskipamount except no shrink. 2491 % \balancecolumns gets confused if there is any shrink. 2492 \newskip\initialskipamount \initialskipamount 12pt plus4pt 2493 2494 \def\initial #1{% 2495 {\let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt 2496 \ifdim\lastskip<\initialskipamount 2497 \removelastskip \penalty-200 \vskip \initialskipamount\fi 2498 \line{\secbf#1\hfill}\kern 2pt\penalty10000}} 2770 \def\initial#1{{% 2771 % Some minor font changes for the special characters. 2772 \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt 2773 % 2774 % Remove any glue we may have, we'll be inserting our own. 2775 \removelastskip 2776 % 2777 % We like breaks before the index initials, so insert a bonus. 2778 \penalty -300 2779 % 2780 % Typeset the initial. Making this add up to a whole number of 2781 % baselineskips increases the chance of the dots lining up from column 2782 % to column. It still won't often be perfect, because of the stretch 2783 % we need before each entry, but it's better. 2784 % 2785 % No shrink because it confuses \balancecolumns. 2786 \vskip 1.67\baselineskip plus .5\baselineskip 2787 \leftline{\secbf #1}% 2788 \vskip .33\baselineskip plus .1\baselineskip 2789 % 2790 % Do our best not to break after the initial. 2791 \nobreak 2792 }} 2499 2793 2500 2794 % This typesets a paragraph consisting of #1, dot leaders, and then #2 … … 2502 2796 % entries. The paragraph is indented by \leftskip. 2503 2797 % 2504 \def\entry 2798 \def\entry#1#2{\begingroup 2505 2799 % 2506 2800 % Start a new paragraph if necessary, so our assignments below can't … … 2525 2819 % \hangafter is reset to 1 (which is the value we want) at the start 2526 2820 % of each paragraph, so we need not do anything with that. 2527 \hangindent =2em2821 \hangindent = 2em 2528 2822 % 2529 2823 % When the entry text needs to be broken, just fill out the first line 2530 2824 % with blank space. 2531 2825 \rightskip = 0pt plus1fil 2826 % 2827 % A bit of stretch before each entry for the benefit of balancing columns. 2828 \vskip 0pt plus1pt 2532 2829 % 2533 2830 % Start a ``paragraph'' for the index entry so the line breaking … … 2584 2881 \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns 2585 2882 % Grab any single-column material above us. 2586 \output = {\global\setbox\partialpage 2587 =\vbox{\unvbox255\kern -\topskip \kern \baselineskip}}% 2588 \eject 2589 % 2590 % Now switch to the double-column output routine. 2591 \output={\doublecolumnout}% 2883 \output = {% 2884 % 2885 % Here is a possibility not foreseen in manmac: if we accumulate a 2886 % whole lot of material, we might end up calling this \output 2887 % routine twice in a row (see the doublecol-lose test, which is 2888 % essentially a couple of indexes with @setchapternewpage off). In 2889 % that case we just ship out what is in \partialpage with the normal 2890 % output routine. Generally, \partialpage will be empty when this 2891 % runs and this will be a no-op. See the indexspread.tex test case. 2892 \ifvoid\partialpage \else 2893 \onepageout{\pagecontents\partialpage}% 2894 \fi 2895 % 2896 \global\setbox\partialpage = \vbox{% 2897 % Unvbox the main output page. 2898 \unvbox\PAGE 2899 \kern-\topskip \kern\baselineskip 2900 }% 2901 }% 2902 \eject % run that output routine to set \partialpage 2903 % 2904 % Use the double-column output routine for subsequent pages. 2905 \output = {\doublecolumnout}% 2592 2906 % 2593 2907 % Change the page size parameters. We could do this once outside this … … 2595 2909 % format, but then we repeat the same computation. Repeating a couple 2596 2910 % of assignments once per index is clearly meaningless for the 2597 % execution time, so we may as well do it once.2911 % execution time, so we may as well do it in one place. 2598 2912 % 2599 2913 % First we halve the line length, less a little for the gutter between 2600 2914 % the columns. We compute the gutter based on the line length, so it 2601 2915 % changes automatically with the paper format. The magic constant 2602 % below is chosen so that the gutter has the same value (well, +- <2603 % 1pt)as it did when we hard-coded it.2916 % below is chosen so that the gutter has the same value (well, +-<1pt) 2917 % as it did when we hard-coded it. 2604 2918 % 2605 2919 % We put the result in a separate register, \doublecolumhsize, so we … … 2614 2928 % Double the \vsize as well. (We don't need a separate register here, 2615 2929 % since nobody clobbers \vsize.) 2930 \advance\vsize by -\ht\partialpage 2616 2931 \vsize = 2\vsize 2617 2932 } 2933 2934 % The double-column output routine for all double-column pages except 2935 % the last. 2936 % 2618 2937 \def\doublecolumnout{% 2619 2938 \splittopskip=\topskip \splitmaxdepth=\maxdepth … … 2621 2940 % (undoubled) page height minus any material left over from the 2622 2941 % previous page. 2623 \dimen@=\pageheight \advance\dimen@ by-\ht\partialpage 2624 % box0 will be the left-hand column, box1 the right. 2942 \dimen@ = \vsize 2943 \divide\dimen@ by 2 2944 % 2945 % box0 will be the left-hand column, box2 the right. 2625 2946 \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ 2626 2947 \onepageout\pagesofar 2627 \unvbox255 \penalty\outputpenalty 2948 \unvbox255 2949 \penalty\outputpenalty 2628 2950 } 2629 2951 \def\pagesofar{% 2630 % The contents of the output page -- any previous material,2631 % followed by the two boxes we just split .2952 % Re-output the contents of the output page -- any previous material, 2953 % followed by the two boxes we just split, in box0 and box2. 2632 2954 \unvbox\partialpage 2955 % 2633 2956 \hsize = \doublecolumnhsize 2634 \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% 2957 \wd0=\hsize \wd2=\hsize 2958 \hbox to\pagewidth{\box0\hfil\box2}% 2635 2959 } 2636 2960 \def\enddoublecolumns{% 2637 \output={\balancecolumns}\eject % split what we have 2638 \endgroup 2639 % Back to normal single-column typesetting, but take account of the 2640 % fact that we just accumulated some stuff on the output page. 2641 \pagegoal=\vsize 2961 \output = {% 2962 % Split the last of the double-column material. Leave it on the 2963 % current page, no automatic page break. 2964 \balancecolumns 2965 % 2966 % If we end up splitting too much material for the current page, 2967 % though, there will be another page break right after this \output 2968 % invocation ends. Having called \balancecolumns once, we do not 2969 % want to call it again. Therefore, reset \output to its normal 2970 % definition right away. (We hope \balancecolumns will never be 2971 % called on to balance too much material, but if it is, this makes 2972 % the output somewhat more palatable.) 2973 \global\output = {\onepageout{\pagecontents\PAGE}}% 2974 }% 2975 \eject 2976 \endgroup % started in \begindoublecolumns 2977 % 2978 % \pagegoal was set to the doubled \vsize above, since we restarted 2979 % the current page. We're now back to normal single-column 2980 % typesetting, so reset \pagegoal to the normal \vsize (after the 2981 % \endgroup where \vsize got restored). 2982 \pagegoal = \vsize 2642 2983 } 2643 2984 \def\balancecolumns{% 2644 % Called on the last pageof the double column material.2645 \setbox0 =\vbox{\unvbox255}%2985 % Called at the end of the double column material. 2986 \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. 2646 2987 \dimen@ = \ht0 2647 2988 \advance\dimen@ by \topskip 2648 2989 \advance\dimen@ by-\baselineskip 2649 \divide\dimen@ by 2 2990 \divide\dimen@ by 2 % target to split to 2991 %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% 2650 2992 \splittopskip = \topskip 2651 2993 % Loop until we get a decent breakpoint. 2652 {\vbadness=10000 \loop \global\setbox3=\copy0 2653 \global\setbox1=\vsplit3 to\dimen@ 2654 \ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt \repeat}% 2994 {% 2995 \vbadness = 10000 2996 \loop 2997 \global\setbox3 = \copy0 2998 \global\setbox1 = \vsplit3 to \dimen@ 2999 \ifdim\ht3>\dimen@ 3000 \global\advance\dimen@ by 1pt 3001 \repeat 3002 }% 3003 %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% 2655 3004 \setbox0=\vbox to\dimen@{\unvbox1}% 2656 3005 \setbox2=\vbox to\dimen@{\unvbox3}% 3006 % 2657 3007 \pagesofar 2658 3008 } 2659 \catcode `\@=\other3009 \catcode`\@ = \other 2660 3010 2661 3011 … … 2663 3013 % Define chapters, sections, etc. 2664 3014 2665 \newcount 2666 \newcount 2667 \newcount 2668 \newcount 3015 \newcount\chapno 3016 \newcount\secno \secno=0 3017 \newcount\subsecno \subsecno=0 3018 \newcount\subsubsecno \subsubsecno=0 2669 3019 2670 3020 % This counter is funny since it counts through charcodes of letters A, B, ... 2671 \newcount 3021 \newcount\appendixno \appendixno = `\@ 2672 3022 \def\appendixletter{\char\the\appendixno} 2673 3023 2674 \newwrite \contentsfile2675 % This is called from \setfilename.2676 \def\opencontents{\openout \contentsfile = \jobname.toc}2677 2678 3024 % Each @chapter defines this as the name of the chapter. 2679 % page headings and footings can use it. @section does likewise 2680 2681 \def\thischapter{} \def\thissection{} 2682 \def\seccheck#1{\if \pageno<0 % 2683 \errmessage{@#1 not allowed after generating table of contents}\fi 2684 % 2685 } 2686 2687 \def\chapternofonts{% 2688 \let\rawbackslash=\relax% 2689 \let\frenchspacing=\relax% 2690 \def\result{\realbackslash result} 2691 \def\equiv{\realbackslash equiv} 2692 \def\expansion{\realbackslash expansion} 2693 \def\print{\realbackslash print} 2694 \def\TeX{\realbackslash TeX} 2695 \def\dots{\realbackslash dots} 2696 \def\copyright{\realbackslash copyright} 2697 \def\tt{\realbackslash tt} 2698 \def\bf{\realbackslash bf } 2699 \def\w{\realbackslash w} 2700 \def\less{\realbackslash less} 2701 \def\gtr{\realbackslash gtr} 2702 \def\hat{\realbackslash hat} 2703 \def\char{\realbackslash char} 2704 \def\tclose##1{\realbackslash tclose {##1}} 2705 \def\code##1{\realbackslash code {##1}} 2706 \def\samp##1{\realbackslash samp {##1}} 2707 \def\r##1{\realbackslash r {##1}} 2708 \def\b##1{\realbackslash b {##1}} 2709 \def\key##1{\realbackslash key {##1}} 2710 \def\file##1{\realbackslash file {##1}} 2711 \def\kbd##1{\realbackslash kbd {##1}} 2712 % These are redefined because @smartitalic wouldn't work inside xdef. 2713 \def\i##1{\realbackslash i {##1}} 2714 \def\cite##1{\realbackslash cite {##1}} 2715 \def\var##1{\realbackslash var {##1}} 2716 \def\emph##1{\realbackslash emph {##1}} 2717 \def\dfn##1{\realbackslash dfn {##1}} 2718 } 3025 % page headings and footings can use it. @section does likewise. 3026 \def\thischapter{} 3027 \def\thissection{} 2719 3028 2720 3029 \newcount\absseclevel % used to calculate proper heading level … … 2788 3097 } 2789 3098 2790 3099 % @chapter, @appendix, @unnumbered. 2791 3100 \def\thischaptername{No Chapter Title} 2792 3101 \outer\def\chapter{\parsearg\chapteryyy} 2793 3102 \def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz 2794 \def\chapterzzz #1{ \seccheck{chapter}%3103 \def\chapterzzz #1{% 2795 3104 \secno=0 \subsecno=0 \subsubsecno=0 2796 \global\advance \chapno by 1 \message{\putwordChapter \the\chapno}%3105 \global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}% 2797 3106 \chapmacro {#1}{\the\chapno}% 2798 3107 \gdef\thissection{#1}% … … 2801 3110 % because we don't want its macros evaluated now. 2802 3111 \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% 2803 {\chapternofonts%2804 \edef\temp{ {\realbackslash chapentry {#1}{\the\chapno}{\noexpand\folio}}}%2805 \escapechar=`\\%2806 \ write \contentsfile \temp %2807 \donoderef %3112 \toks0 = {#1}% 3113 \edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}% 3114 {\the\chapno}}}% 3115 \temp 3116 \donoderef 2808 3117 \global\let\section = \numberedsec 2809 3118 \global\let\subsection = \numberedsubsec 2810 3119 \global\let\subsubsection = \numberedsubsubsec 2811 } }3120 } 2812 3121 2813 3122 \outer\def\appendix{\parsearg\appendixyyy} 2814 3123 \def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz 2815 \def\appendixzzz #1{ \seccheck{appendix}%3124 \def\appendixzzz #1{% 2816 3125 \secno=0 \subsecno=0 \subsubsecno=0 2817 \global\advance \appendixno by 1 \message{Appendix \appendixletter}% 3126 \global\advance \appendixno by 1 3127 \message{\putwordAppendix\space \appendixletter}% 2818 3128 \chapmacro {#1}{\putwordAppendix{} \appendixletter}% 2819 3129 \gdef\thissection{#1}% 2820 3130 \gdef\thischaptername{#1}% 2821 3131 \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% 2822 {\chapternofonts% 2823 \edef\temp{{\realbackslash chapentry 2824 {#1}{\putwordAppendix{} \appendixletter}{\noexpand\folio}}}% 2825 \escapechar=`\\% 2826 \write \contentsfile \temp % 2827 \appendixnoderef % 3132 \toks0 = {#1}% 3133 \edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}% 3134 {\putwordAppendix{} \appendixletter}}}% 3135 \temp 3136 \appendixnoderef 2828 3137 \global\let\section = \appendixsec 2829 3138 \global\let\subsection = \appendixsubsec 2830 3139 \global\let\subsubsection = \appendixsubsubsec 2831 } }3140 } 2832 3141 2833 3142 % @centerchap is like @unnumbered, but the heading is centered. … … 2835 3144 \def\centerchapyyy #1{{\let\unnumbchapmacro=\centerchapmacro \unnumberedyyy{#1}}} 2836 3145 3146 % @top is like @unnumbered. 2837 3147 \outer\def\top{\parsearg\unnumberedyyy} 3148 2838 3149 \outer\def\unnumbered{\parsearg\unnumberedyyy} 2839 3150 \def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz 2840 \def\unnumberedzzz #1{ \seccheck{unnumbered}%3151 \def\unnumberedzzz #1{% 2841 3152 \secno=0 \subsecno=0 \subsubsecno=0 2842 3153 % … … 2850 3161 % as a result of the \message, we just want `@cite' itself. We use 2851 3162 % \the<toks register> to achieve this: TeX expands \the<toks> only once, 2852 % simply yielding the contents of the <toks register>. 3163 % simply yielding the contents of <toks register>. (We also do this for 3164 % the toc entries.) 2853 3165 \toks0 = {#1}\message{(\the\toks0)}% 2854 3166 % 2855 3167 \unnumbchapmacro {#1}% 2856 3168 \gdef\thischapter{#1}\gdef\thissection{#1}% 2857 {\chapternofonts% 2858 \edef\temp{{\realbackslash unnumbchapentry {#1}{\noexpand\folio}}}% 2859 \escapechar=`\\% 2860 \write \contentsfile \temp % 2861 \unnumbnoderef % 3169 \toks0 = {#1}% 3170 \edef\temp{\noexpand\writetocentry{\realbackslash unnumbchapentry{\the\toks0}}}% 3171 \temp 3172 \unnumbnoderef 2862 3173 \global\let\section = \unnumberedsec 2863 3174 \global\let\subsection = \unnumberedsubsec 2864 3175 \global\let\subsubsection = \unnumberedsubsubsec 2865 }} 2866 3176 } 3177 3178 % Sections. 2867 3179 \outer\def\numberedsec{\parsearg\secyyy} 2868 3180 \def\secyyy #1{\numhead1{#1}} % normally calls seczzz 2869 \def\seczzz #1{ \seccheck{section}%3181 \def\seczzz #1{% 2870 3182 \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % 2871 3183 \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% 2872 {\chapternofonts% 2873 \edef\temp{{\realbackslash secentry % 2874 {#1}{\the\chapno}{\the\secno}{\noexpand\folio}}}% 2875 \escapechar=`\\% 2876 \write \contentsfile \temp % 2877 \donoderef % 2878 \penalty 10000 % 2879 }} 3184 \toks0 = {#1}% 3185 \edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}% 3186 {\the\chapno}{\the\secno}}}% 3187 \temp 3188 \donoderef 3189 \nobreak 3190 } 2880 3191 2881 3192 \outer\def\appendixsection{\parsearg\appendixsecyyy} 2882 3193 \outer\def\appendixsec{\parsearg\appendixsecyyy} 2883 3194 \def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz 2884 \def\appendixsectionzzz #1{ \seccheck{appendixsection}%3195 \def\appendixsectionzzz #1{% 2885 3196 \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % 2886 3197 \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% 2887 {\chapternofonts% 2888 \edef\temp{{\realbackslash secentry % 2889 {#1}{\appendixletter}{\the\secno}{\noexpand\folio}}}% 2890 \escapechar=`\\% 2891 \write \contentsfile \temp % 2892 \appendixnoderef % 2893 \penalty 10000 % 2894 }} 3198 \toks0 = {#1}% 3199 \edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}% 3200 {\appendixletter}{\the\secno}}}% 3201 \temp 3202 \appendixnoderef 3203 \nobreak 3204 } 2895 3205 2896 3206 \outer\def\unnumberedsec{\parsearg\unnumberedsecyyy} 2897 3207 \def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz 2898 \def\unnumberedseczzz #1{ \seccheck{unnumberedsec}%3208 \def\unnumberedseczzz #1{% 2899 3209 \plainsecheading {#1}\gdef\thissection{#1}% 2900 {\chapternofonts%2901 \edef\temp{ {\realbackslash unnumbsecentry{#1}{\noexpand\folio}}}%2902 \ escapechar=`\\%2903 \ write \contentsfile \temp %2904 \ unnumbnoderef %2905 \penalty 10000 % 2906 }} 2907 3210 \toks0 = {#1}% 3211 \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry{\the\toks0}}}% 3212 \temp 3213 \unnumbnoderef 3214 \nobreak 3215 } 3216 3217 % Subsections. 2908 3218 \outer\def\numberedsubsec{\parsearg\numberedsubsecyyy} 2909 3219 \def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz 2910 \def\numberedsubseczzz #1{ \seccheck{subsection}%3220 \def\numberedsubseczzz #1{% 2911 3221 \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % 2912 3222 \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% 2913 {\chapternofonts% 2914 \edef\temp{{\realbackslash subsecentry % 2915 {#1}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}% 2916 \escapechar=`\\% 2917 \write \contentsfile \temp % 2918 \donoderef % 2919 \penalty 10000 % 2920 }} 3223 \toks0 = {#1}% 3224 \edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}% 3225 {\the\chapno}{\the\secno}{\the\subsecno}}}% 3226 \temp 3227 \donoderef 3228 \nobreak 3229 } 2921 3230 2922 3231 \outer\def\appendixsubsec{\parsearg\appendixsubsecyyy} 2923 3232 \def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz 2924 \def\appendixsubseczzz #1{ \seccheck{appendixsubsec}%3233 \def\appendixsubseczzz #1{% 2925 3234 \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % 2926 3235 \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% 2927 {\chapternofonts% 2928 \edef\temp{{\realbackslash subsecentry % 2929 {#1}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}% 2930 \escapechar=`\\% 2931 \write \contentsfile \temp % 2932 \appendixnoderef % 2933 \penalty 10000 % 2934 }} 3236 \toks0 = {#1}% 3237 \edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}% 3238 {\appendixletter}{\the\secno}{\the\subsecno}}}% 3239 \temp 3240 \appendixnoderef 3241 \nobreak 3242 } 2935 3243 2936 3244 \outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy} 2937 3245 \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz 2938 \def\unnumberedsubseczzz #1{ \seccheck{unnumberedsubsec}%3246 \def\unnumberedsubseczzz #1{% 2939 3247 \plainsubsecheading {#1}\gdef\thissection{#1}% 2940 {\chapternofonts% 2941 \edef\temp{{\realbackslash unnumbsubsecentry{#1}{\noexpand\folio}}}% 2942 \escapechar=`\\% 2943 \write \contentsfile \temp % 2944 \unnumbnoderef % 2945 \penalty 10000 % 2946 }} 2947 3248 \toks0 = {#1}% 3249 \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsecentry% 3250 {\the\toks0}}}% 3251 \temp 3252 \unnumbnoderef 3253 \nobreak 3254 } 3255 3256 % Subsubsections. 2948 3257 \outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy} 2949 3258 \def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz 2950 \def\numberedsubsubseczzz #1{ \seccheck{subsubsection}%3259 \def\numberedsubsubseczzz #1{% 2951 3260 \gdef\thissection{#1}\global\advance \subsubsecno by 1 % 2952 3261 \subsubsecheading {#1} 2953 3262 {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% 2954 {\chapternofonts% 2955 \edef\temp{{\realbackslash subsubsecentry % 2956 {#1} 2957 {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno} 2958 {\noexpand\folio}}}% 2959 \escapechar=`\\% 2960 \write \contentsfile \temp % 2961 \donoderef % 2962 \penalty 10000 % 2963 }} 3263 \toks0 = {#1}% 3264 \edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}% 3265 {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% 3266 \temp 3267 \donoderef 3268 \nobreak 3269 } 2964 3270 2965 3271 \outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy} 2966 3272 \def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz 2967 \def\appendixsubsubseczzz #1{ \seccheck{appendixsubsubsec}%3273 \def\appendixsubsubseczzz #1{% 2968 3274 \gdef\thissection{#1}\global\advance \subsubsecno by 1 % 2969 3275 \subsubsecheading {#1} 2970 3276 {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% 2971 {\chapternofonts% 2972 \edef\temp{{\realbackslash subsubsecentry{#1}% 2973 {\appendixletter} 2974 {\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}% 2975 \escapechar=`\\% 2976 \write \contentsfile \temp % 2977 \appendixnoderef % 2978 \penalty 10000 % 2979 }} 3277 \toks0 = {#1}% 3278 \edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}% 3279 {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% 3280 \temp 3281 \appendixnoderef 3282 \nobreak 3283 } 2980 3284 2981 3285 \outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy} 2982 3286 \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz 2983 \def\unnumberedsubsubseczzz #1{ \seccheck{unnumberedsubsubsec}%3287 \def\unnumberedsubsubseczzz #1{% 2984 3288 \plainsubsubsecheading {#1}\gdef\thissection{#1}% 2985 {\chapternofonts%2986 \edef\temp{ {\realbackslash unnumbsubsubsecentry{#1}{\noexpand\folio}}}%2987 \escapechar=`\\%2988 \ write \contentsfile \temp %2989 \unnumbnoderef %2990 \ penalty 10000 %2991 } }3289 \toks0 = {#1}% 3290 \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsubsecentry% 3291 {\the\toks0}}}% 3292 \temp 3293 \unnumbnoderef 3294 \nobreak 3295 } 2992 3296 2993 3297 % These are variants which are not "outer", so they can appear in @ifinfo. … … 3018 3322 % Define @majorheading, @heading and @subheading 3019 3323 3020 % NOTE on use of \vbox for chapter headings, section headings, and 3021 % such: 3324 % NOTE on use of \vbox for chapter headings, section headings, and such: 3022 3325 % 1) We use \vbox rather than the earlier \line to permit 3023 3326 % overlong headings to fold. … … 3066 3369 \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} 3067 3370 3068 \def\CHAPPAGoff{ 3371 \def\CHAPPAGoff{% 3069 3372 \global\let\contentsalignmacro = \chappager 3070 3373 \global\let\pchapsepmacro=\chapbreak 3071 3374 \global\let\pagealignmacro=\chappager} 3072 3375 3073 \def\CHAPPAGon{ 3376 \def\CHAPPAGon{% 3074 3377 \global\let\contentsalignmacro = \chappager 3075 3378 \global\let\pchapsepmacro=\chappager … … 3125 3428 \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 3126 3429 \parindent=0pt\raggedright 3127 \rm #1\hfill}}\bigskip \par\ penalty 10000 %3430 \rm #1\hfill}}\bigskip \par\nobreak 3128 3431 } 3129 3432 … … 3136 3439 \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 3137 3440 \parindent=0pt 3138 \hfill {\rm #1}\hfill}}\bigskip \par\ penalty 10000 %3441 \hfill {\rm #1}\hfill}}\bigskip \par\nobreak 3139 3442 } 3140 3443 … … 3189 3492 3190 3493 3191 \message{toc printing,} 3494 \message{toc,} 3495 \newwrite\tocfile 3496 3497 % Write an entry to the toc file, opening it if necessary. 3498 % Called from @chapter, etc. We supply {\folio} at the end of the 3499 % argument, which will end up as the last argument to the \...entry macro. 3500 % 3501 % We open the .toc file here instead of at @setfilename or any other 3502 % given time so that @contents can be put in the document anywhere. 3503 % 3504 \newif\iftocfileopened 3505 \def\writetocentry#1{% 3506 \iftocfileopened\else 3507 \immediate\openout\tocfile = \jobname.toc 3508 \global\tocfileopenedtrue 3509 \fi 3510 \iflinks \write\tocfile{#1{\folio}}\fi 3511 } 3512 3513 \newskip\contentsrightmargin \contentsrightmargin=1in 3514 \newcount\savepageno 3515 \newcount\lastnegativepageno \lastnegativepageno = -1 3516 3192 3517 % Finish up the main text and prepare to read what we've written 3193 % to \contentsfile. 3194 3195 \newskip\contentsrightmargin \contentsrightmargin=1in 3518 % to \tocfile. 3519 % 3196 3520 \def\startcontents#1{% 3197 3521 % If @setchapternewpage on, and @headings double, the contents should … … 3200 3524 % From: Torbjorn Granlund <tege@matematik.su.se> 3201 3525 \contentsalignmacro 3202 \immediate\closeout \contentsfile 3203 \ifnum \pageno>0 3204 \pageno = -1 % Request roman numbered pages. 3205 \fi 3526 \immediate\closeout\tocfile 3527 % 3206 3528 % Don't need to put `Contents' or `Short Contents' in the headline. 3207 3529 % It is abundantly clear what they are. 3208 3530 \unnumbchapmacro{#1}\def\thischapter{}% 3531 \savepageno = \pageno 3209 3532 \begingroup % Set up to handle contents files properly. 3210 3533 \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 3211 \catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi 3534 % We can't do this, because then an actual ^ in a section 3535 % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97. 3536 %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi 3212 3537 \raggedbottom % Worry more about breakpoints than the bottom. 3213 3538 \advance\hsize by -\contentsrightmargin % Don't use the full line length. 3539 % 3540 % Roman numerals for page numbers. 3541 \ifnum \pageno>0 \pageno = \lastnegativepageno \fi 3214 3542 } 3215 3543 3216 3544 3217 3545 % Normal (long) toc. 3218 \outer\def\contents{% 3219 \startcontents{\putwordTableofContents}% 3220 \input \jobname.toc 3546 \def\contents{% 3547 \startcontents{\putwordTOC}% 3548 \openin 1 \jobname.toc 3549 \ifeof 1 \else 3550 \closein 1 3551 \input \jobname.toc 3552 \fi 3553 \vfill \eject 3554 \contentsalignmacro % in case @setchapternewpage odd is in effect 3221 3555 \endgroup 3222 \vfill \eject 3556 \lastnegativepageno = \pageno 3557 \pageno = \savepageno 3223 3558 } 3224 3559 3225 3560 % And just the chapters. 3226 \ outer\def\summarycontents{%3227 \startcontents{\putwordShort Contents}%3561 \def\summarycontents{% 3562 \startcontents{\putwordShortTOC}% 3228 3563 % 3229 3564 \let\chapentry = \shortchapentry … … 3241 3576 \def\subsubsecentry ##1##2##3##4##5##6{} 3242 3577 \def\unnumbsubsubsecentry ##1##2{} 3243 \input \jobname.toc 3578 \openin 1 \jobname.toc 3579 \ifeof 1 \else 3580 \closein 1 3581 \input \jobname.toc 3582 \fi 3583 \vfill \eject 3584 \contentsalignmacro % in case @setchapternewpage odd is in effect 3244 3585 \endgroup 3245 \vfill \eject 3586 \lastnegativepageno = \pageno 3587 \pageno = \savepageno 3246 3588 } 3247 3589 \let\shortcontents = \summarycontents … … 3334 3676 % can't do that in the \entry macro, since index entries might consist 3335 3677 % of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.) 3336 %3337 % \turnoffactive is for the sake of @" used for umlauts.3338 3678 \def\tocentry#1#2{\begingroup 3339 3679 \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks 3340 \entry{\turnoffactive #1}{\turnoffactive #2}% 3680 % Do not use \turnoffactive in these arguments. Since the toc is 3681 % typeset in cmr, so characters such as _ would come out wrong; we 3682 % have to do the usual translation tricks. 3683 \entry{#1}{#2}% 3341 3684 \endgroup} 3342 3685 … … 3404 3747 3405 3748 \def\tex{\begingroup 3406 \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 3407 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 3408 \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie 3409 \catcode `\%=14 3410 \catcode 43=12 % plus 3411 \catcode`\"=12 3412 \catcode`\==12 3413 \catcode`\|=12 3414 \catcode`\<=12 3415 \catcode`\>=12 3416 \escapechar=`\\ 3417 % 3418 \let\,=\ptexcomma 3419 \let\{=\ptexlbrace 3420 \let\}=\ptexrbrace 3421 \let\.=\ptexdot 3422 \let\*=\ptexstar 3423 \let\dots=\ptexdots 3424 \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% 3425 \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% 3426 \def\@{@}% 3427 \let\bullet=\ptexbullet 3428 \let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext 3429 % 3749 \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 3750 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 3751 \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie 3752 \catcode `\%=14 3753 \catcode 43=12 % plus 3754 \catcode`\"=12 3755 \catcode`\==12 3756 \catcode`\|=12 3757 \catcode`\<=12 3758 \catcode`\>=12 3759 \escapechar=`\\ 3760 % 3761 \let\b=\ptexb 3762 \let\bullet=\ptexbullet 3763 \let\c=\ptexc 3764 \let\,=\ptexcomma 3765 \let\.=\ptexdot 3766 \let\dots=\ptexdots 3767 \let\equiv=\ptexequiv 3768 \let\!=\ptexexclam 3769 \let\i=\ptexi 3770 \let\{=\ptexlbrace 3771 \let\+=\tabalign 3772 \let\}=\ptexrbrace 3773 \let\*=\ptexstar 3774 \let\t=\ptext 3775 % 3776 \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% 3777 \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% 3778 \def\@{@}% 3430 3779 \let\Etex=\endgroup} 3431 3780 … … 3472 3821 \let\nonarrowing=\relax 3473 3822 3474 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3475 % \cartouche: draw rectangle w/rounded corners around argument3823 % @cartouche ... @end cartouche: draw rectangle w/rounded corners around 3824 % environment contents. 3476 3825 \font\circle=lcircle10 3477 3826 \newdimen\circthick … … 3500 3849 \advance\cartinner by-\rskip 3501 3850 \cartouter=\hsize 3502 \advance\cartouter by 18 pt % allow for 3pt kerns on either3851 \advance\cartouter by 18.4pt % allow for 3pt kerns on either 3503 3852 % side, and for 6pt waste from 3504 % each corner char 3853 % each corner char, and rule thickness 3505 3854 \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip 3506 3855 % Flag to tell @lisp, etc., not to narrow margin. … … 3556 3905 } 3557 3906 3558 % To ending an @example-like environment, we first end the paragraph 3559 % (via \afterenvbreak's vertical glue), and then the group. That way we 3560 % keep the zero \parskip that the environments set -- \parskip glue 3561 % will be inserted at the beginning of the next paragraph in the 3562 % document, after the environment. 3563 % 3564 \def\nonfillfinish{\afterenvbreak\endgroup}% 3565 3566 % This macro is 3907 % Define the \E... control sequence only if we are inside the particular 3908 % environment, so the error checking in \end will work. 3909 % 3910 % To end an @example-like environment, we first end the paragraph (via 3911 % \afterenvbreak's vertical glue), and then the group. That way we keep 3912 % the zero \parskip that the environments set -- \parskip glue will be 3913 % inserted at the beginning of the next paragraph in the document, after 3914 % the environment. 3915 % 3916 \def\nonfillfinish{\afterenvbreak\endgroup} 3917 3918 % @lisp: indented, narrowed, typewriter font. 3567 3919 \def\lisp{\begingroup 3568 3920 \nonfillstart 3569 3921 \let\Elisp = \nonfillfinish 3570 3922 \tt 3571 \rawbackslash % have \ input char produce \ char from current font 3572 \gobble 3573 } 3574 3575 % Define the \E... control sequence only if we are inside the 3576 % environment, so the error checking in \end will work. 3577 % 3578 % We must call \lisp last in the definition, since it reads the 3579 % return following the @example (or whatever) command. 3580 % 3923 \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. 3924 \gobble % eat return 3925 } 3926 3927 % @example: Same as @lisp. 3581 3928 \def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp} 3582 \def\smallexample{\begingroup \def\Esmallexample{\nonfillfinish\endgroup}\lisp} 3583 \def\smalllisp{\begingroup \def\Esmalllisp{\nonfillfinish\endgroup}\lisp} 3584 3585 % @smallexample and @smalllisp. This is not used unless the @smallbook 3586 % command is given. Originally contributed by Pavel@xerox. 3587 % 3929 3930 % @small... is usually equivalent to the non-small (@smallbook 3931 % redefines). We must call \example (or whatever) last in the 3932 % definition, since it reads the return following the @example (or 3933 % whatever) command. 3934 % 3935 % This actually allows (for example) @end display inside an 3936 % @smalldisplay. Too bad, but makeinfo will catch the error anyway. 3937 % 3938 \def\smalldisplay{\begingroup\def\Esmalldisplay{\nonfillfinish\endgroup}\display} 3939 \def\smallexample{\begingroup\def\Esmallexample{\nonfillfinish\endgroup}\lisp} 3940 \def\smallformat{\begingroup\def\Esmallformat{\nonfillfinish\endgroup}\format} 3941 \def\smalllisp{\begingroup\def\Esmalllisp{\nonfillfinish\endgroup}\lisp} 3942 3943 % Real @smallexample and @smalllisp (when @smallbook): use smaller fonts. 3944 % Originally contributed by Pavel@xerox. 3588 3945 \def\smalllispx{\begingroup 3589 \nonfillstart 3590 \let\Esmalllisp = \nonfillfinish 3591 \let\Esmallexample = \nonfillfinish 3592 % 3593 % Smaller fonts for small examples. 3594 \indexfonts \tt 3595 \rawbackslash % make \ output the \ character from the current font (tt) 3596 \gobble 3597 } 3598 3599 % This is @display; same as @lisp except use roman font. 3946 \def\Esmalllisp{\nonfillfinish\endgroup}% 3947 \def\Esmallexample{\nonfillfinish\endgroup}% 3948 \indexfonts 3949 \lisp 3950 } 3951 3952 % @display: same as @lisp except keep current font. 3600 3953 % 3601 3954 \def\display{\begingroup … … 3605 3958 } 3606 3959 3607 % This is @format; same as @display except don't narrow margins. 3960 % @smalldisplay (when @smallbook): @display plus smaller fonts. 3961 % 3962 \def\smalldisplayx{\begingroup 3963 \def\Esmalldisplay{\nonfillfinish\endgroup}% 3964 \indexfonts \rm 3965 \display 3966 } 3967 3968 % @format: same as @display except don't narrow margins. 3608 3969 % 3609 3970 \def\format{\begingroup … … 3614 3975 } 3615 3976 3616 % @flushleft (same as @format) and @flushright. 3617 % 3618 \def\flushleft{\begingroup 3619 \let\nonarrowing = t 3620 \nonfillstart 3621 \let\Eflushleft = \nonfillfinish 3622 \gobble 3623 } 3977 % @smallformat (when @smallbook): @format plus smaller fonts. 3978 % 3979 \def\smallformatx{\begingroup 3980 \def\Esmallformat{\nonfillfinish\endgroup}% 3981 \indexfonts \rm 3982 \format 3983 } 3984 3985 % @flushleft (same as @format). 3986 % 3987 \def\flushleft{\begingroup \def\Eflushleft{\nonfillfinish\endgroup}\format} 3988 3989 % @flushright. 3990 % 3624 3991 \def\flushright{\begingroup 3625 3992 \let\nonarrowing = t … … 3627 3994 \let\Eflushright = \nonfillfinish 3628 3995 \advance\leftskip by 0pt plus 1fill 3629 \gobble} 3996 \gobble 3997 } 3630 3998 3631 3999 % @quotation does normal linebreaking (hence we can't use \nonfillstart) … … 3650 4018 } 3651 4019 4020 3652 4021 \message{defuns,} 3653 4022 % Define formatter for defuns … … 3686 4055 % Definitions of (, ) and & used in args for functions. 3687 4056 % This is the definition of ( outside of all parentheses. 3688 \gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested % 3689 \global\advance\parencount by 1 } 4057 \gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested 4058 \global\advance\parencount by 1 4059 } 3690 4060 % 3691 4061 % This is the definition of ( when already inside a level of parens. … … 3693 4063 % 3694 4064 \gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0. 3695 % also in that case restore the outer-level definition of (.3696 \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi3697 \global\advance \parencount by -1 }4065 % also in that case restore the outer-level definition of (. 4066 \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi 4067 \global\advance \parencount by -1 } 3698 4068 % If we encounter &foo, then turn on ()-hacking afterwards 3699 4069 \gdef\amprm#1 {{\rm\}\let(=\oprm \let)=\clrm\ } … … 3703 4073 %% These parens (in \boldbrax) actually are a little bolder than the 3704 4074 %% contained text. This is especially needed for [ and ] 3705 \def\opnr{{\sf\char`\(}} \def\clnr{{\sf\char`\)}} \def\ampnr{\&} 3706 \def\lbrb{{\bf\char`\[}} \def\rbrb{{\bf\char`\]}} 4075 \def\opnr{{\sf\char`\(}\global\advance\parencount by 1 } 4076 \def\clnr{{\sf\char`\)}\global\advance\parencount by -1 } 4077 \def\ampnr{\&} 4078 \def\lbrb{{\bf\char`\[}} 4079 \def\rbrb{{\bf\char`\]}} 3707 4080 3708 4081 % First, defname, which formats the header line itself. … … 3715 4088 \dimen2=\leftskip 3716 4089 \advance\dimen2 by -\defbodyindent 3717 \dimen3=\rightskip 3718 \advance\dimen3 by -\defbodyindent 3719 \noindent % 4090 \noindent 3720 4091 \setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}% 3721 4092 \dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line 3722 4093 \dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations 3723 \parshape 2 0in \dimen0 \defargsindent \dimen1 %4094 \parshape 2 0in \dimen0 \defargsindent \dimen1 3724 4095 % Now output arg 2 ("Function" or some such) 3725 4096 % ending at \deftypemargin from the right margin, … … 3727 4098 {% Adjust \hsize to exclude the ambient margins, 3728 4099 % so that \rightline will obey them. 3729 \advance \hsize by -\dimen2 \advance \hsize by -\dimen33730 \rlap{\rightline{{\rm #2}\hskip \deftypemargin}}}%4100 \advance \hsize by -\dimen2 4101 \rlap{\rightline{{\rm #2}\hskip -1.25pc }}}% 3731 4102 % Make all lines underfull and no complaints: 3732 4103 \tolerance=10000 \hbadness=10000 … … 3749 4120 \def#2{\begingroup\obeylines\activeparens\spacesplit#3}% 3750 4121 \parindent=0in 3751 \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent4122 \advance\leftskip by \defbodyindent 3752 4123 \exdentamount=\defbodyindent 3753 4124 \begingroup % … … 3755 4126 \obeylines\activeparens\spacesplit#3} 3756 4127 3757 \def\defmethparsebody #1#2#3#4 {\begingroup\inENV % 4128 % #1 is the \E... control sequence to end the definition (which we define). 4129 % #2 is the \...x control sequence for consecutive fns (which we define). 4130 % #3 is the control sequence to call to resume processing. 4131 % #4, delimited by the space, is the class name. 4132 % 4133 \def\defmethparsebody#1#2#3#4 {\begingroup\inENV % 3758 4134 \medbreak % 3759 4135 % Define the end token that this defining construct specifies … … 3762 4138 \def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}% 3763 4139 \parindent=0in 3764 \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent4140 \advance\leftskip by \defbodyindent 3765 4141 \exdentamount=\defbodyindent 3766 4142 \begingroup\obeylines\activeparens\spacesplit{#3{#4}}} 4143 4144 % @deftypemethod has an extra argument that nothing else does. Sigh. 4145 % #1 is the \E... control sequence to end the definition (which we define). 4146 % #2 is the \...x control sequence for consecutive fns (which we define). 4147 % #3 is the control sequence to call to resume processing. 4148 % #4, delimited by the space, is the class name. 4149 % #5 is the method's return type. 4150 % 4151 \def\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV % 4152 \medbreak % 4153 % Define the end token that this defining construct specifies 4154 % so that it will exit this group. 4155 \def#1{\endgraf\endgroup\medbreak}% 4156 \def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}% 4157 \parindent=0in 4158 \advance\leftskip by \defbodyindent 4159 \exdentamount=\defbodyindent 4160 \begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}} 3767 4161 3768 4162 \def\defopparsebody #1#2#3#4#5 {\begingroup\inENV % … … 3774 4168 \begingroup\obeylines\activeparens\spacesplit{#3{##2}}}% 3775 4169 \parindent=0in 3776 \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent4170 \advance\leftskip by \defbodyindent 3777 4171 \exdentamount=\defbodyindent 3778 4172 \begingroup\obeylines\activeparens\spacesplit{#3{#5}}} … … 3789 4183 \def#2{\begingroup\obeylines\spacesplit#3}% 3790 4184 \parindent=0in 3791 \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent4185 \advance\leftskip by \defbodyindent 3792 4186 \exdentamount=\defbodyindent 3793 4187 \begingroup % … … 3806 4200 \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}% 3807 4201 \parindent=0in 3808 \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent4202 \advance\leftskip by \defbodyindent 3809 4203 \exdentamount=\defbodyindent 3810 4204 \begingroup\obeylines … … 3851 4245 \begingroup\obeylines\spacesplit{#3{##2}}}% 3852 4246 \parindent=0in 3853 \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent4247 \advance\leftskip by \defbodyindent 3854 4248 \exdentamount=\defbodyindent 3855 4249 \begingroup\obeylines\spacesplit{#3{#5}}} … … 3881 4275 #1% 3882 4276 \hyphenchar\tensl=45 3883 \ifnum\parencount=0 \else \errmessage{ unbalanced parens in @def arguments}\fi%4277 \ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi% 3884 4278 \interlinepenalty=10000 3885 4279 \advance\rightskip by 0pt plus 1fil 3886 \endgraf\ penalty 10000\vskip -\parskip\penalty 10000%4280 \endgraf\nobreak\vskip -\parskip\nobreak 3887 4281 } 3888 4282 … … 3895 4289 \interlinepenalty=10000 3896 4290 \advance\rightskip by 0pt plus 1fil 3897 \endgraf\ penalty 10000\vskip -\parskip\penalty 10000%4291 \endgraf\nobreak\vskip -\parskip\nobreak 3898 4292 } 3899 4293 … … 3914 4308 3915 4309 \def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index 3916 \begingroup\defname {#1}{ Function}%4310 \begingroup\defname {#1}{\putwordDeffunc}% 3917 4311 \defunargs {#2}\endgroup % 3918 4312 \catcode 61=\other % Turn off change made in \defparsebody … … 3928 4322 \def\deftypefunheaderx #1#2 #3\relax{% 3929 4323 \doind {fn}{\code{#2}}% Make entry in function index 3930 \begingroup\defname {\defheaderxcond#1\relax$$$#2}{ Function}%4324 \begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypefun}% 3931 4325 \deftypefunargs {#3}\endgroup % 3932 4326 \catcode 61=\other % Turn off change made in \defparsebody … … 3959 4353 3960 4354 \def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index 3961 \begingroup\defname {#1}{ Macro}%4355 \begingroup\defname {#1}{\putwordDefmac}% 3962 4356 \defunargs {#2}\endgroup % 3963 4357 \catcode 61=\other % Turn off change made in \defparsebody … … 3969 4363 3970 4364 \def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index 3971 \begingroup\defname {#1}{ Special Form}%4365 \begingroup\defname {#1}{\putwordDefspec}% 3972 4366 \defunargs {#2}\endgroup % 3973 4367 \catcode 61=\other % Turn off change made in \defparsebody … … 3982 4376 \def\defspecx #1 {\errmessage{@defspecx in invalid context}} 3983 4377 \def\deftypefnx #1 {\errmessage{@deftypefnx in invalid context}} 3984 \def\deftypeunx #1 {\errmessage{@deftypeunx in invalid context}} 4378 \def\deftypemethodx #1 {\errmessage{@deftypemethodx in invalid context}} 4379 \def\deftypefunx #1 {\errmessage{@deftypefunx in invalid context}} 3985 4380 3986 4381 % @defmethod, and so on 3987 4382 3988 % @defop {Funny Method} foo-class frobnicate argument4383 % @defop CATEGORY CLASS OPERATION ARG... 3989 4384 3990 4385 \def\defop #1 {\def\defoptype{#1}% … … 3992 4387 3993 4388 \def\defopheader #1#2#3{% 3994 \dosubind {fn}{\code{#2}}{ on#1}% Make entry in function index3995 \begingroup\defname {#2}{\defoptype{} on#1}%4389 \dosubind {fn}{\code{#2}}{\putwordon\ #1}% Make entry in function index 4390 \begingroup\defname {#2}{\defoptype{}\putwordon\ #1}% 3996 4391 \defunargs {#3}\endgroup % 3997 4392 } 3998 4393 4394 % @deftypemethod CLASS RETURN-TYPE METHOD ARG... 4395 % 4396 \def\deftypemethod{% 4397 \deftypemethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader} 4398 % 4399 % #1 is the class name, #2 the data type, #3 the method name, #4 the args. 4400 \def\deftypemethodheader#1#2#3#4{% 4401 \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index 4402 \begingroup 4403 \defname{\defheaderxcond#2\relax$$$#3}{\putwordMethodon\ \code{#1}}% 4404 \deftypefunargs{#4}% 4405 \endgroup 4406 } 4407 3999 4408 % @defmethod == @defop Method 4000 4409 % 4001 4410 \def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader} 4002 4003 \def\defmethodheader #1#2#3{% 4004 \dosubind {fn}{\code{#2}}{on #1}% entry in function index 4005 \begingroup\defname {#2}{Method on #1}% 4006 \defunargs {#3}\endgroup % 4411 % 4412 % #1 is the class name, #2 the method name, #3 the args. 4413 \def\defmethodheader#1#2#3{% 4414 \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% entry in function index 4415 \begingroup 4416 \defname{#2}{\putwordMethodon\ \code{#1}}% 4417 \defunargs{#3}% 4418 \endgroup 4007 4419 } 4008 4420 … … 4013 4425 4014 4426 \def\defcvarheader #1#2#3{% 4015 \dosubind {vr}{\code{#2}}{ of#1}% Make entry in var index4016 \begingroup\defname {#2}{\defcvtype {} of#1}%4427 \dosubind {vr}{\code{#2}}{\putwordof\ #1}% Make entry in var index 4428 \begingroup\defname {#2}{\defcvtype\ \putwordof\ #1}% 4017 4429 \defvarargs {#3}\endgroup % 4018 4430 } … … 4023 4435 4024 4436 \def\defivarheader #1#2#3{% 4025 \dosubind {vr}{\code{#2}}{ of#1}% Make entry in var index4026 \begingroup\defname {#2}{ Instance Variable of#1}%4437 \dosubind {vr}{\code{#2}}{\putwordof\ #1}% Make entry in var index 4438 \begingroup\defname {#2}{\putwordDefivar\ \putwordof\ #1}% 4027 4439 \defvarargs {#3}\endgroup % 4028 4440 } … … 4043 4455 \def\defvarargs #1{\normalparens #1% 4044 4456 \interlinepenalty=10000 4045 \endgraf\ penalty 10000\vskip -\parskip\penalty 10000}4457 \endgraf\nobreak\vskip -\parskip\nobreak} 4046 4458 4047 4459 % @defvr Counter foo-count … … 4057 4469 4058 4470 \def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index 4059 \begingroup\defname {#1}{ Variable}%4471 \begingroup\defname {#1}{\putwordDefvar}% 4060 4472 \defvarargs {#2}\endgroup % 4061 4473 } … … 4066 4478 4067 4479 \def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index 4068 \begingroup\defname {#1}{ User Option}%4480 \begingroup\defname {#1}{\putwordDefopt}% 4069 4481 \defvarargs {#2}\endgroup % 4070 4482 } … … 4078 4490 \def\deftypevarheader #1#2{% 4079 4491 \dovarind#2 \relax% Make entry in variables index 4080 \begingroup\defname {\defheaderxcond#1\relax$$$#2}{ Variable}%4492 \begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypevar}% 4081 4493 \interlinepenalty=10000 4082 \endgraf\ penalty 10000\vskip -\parskip\penalty 100004494 \endgraf\nobreak\vskip -\parskip\nobreak 4083 4495 \endgroup} 4084 4496 \def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}} … … 4091 4503 \begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1} 4092 4504 \interlinepenalty=10000 4093 \endgraf\ penalty 10000\vskip -\parskip\penalty 100004505 \endgraf\nobreak\vskip -\parskip\nobreak 4094 4506 \endgroup} 4095 4507 … … 4121 4533 4122 4534 4123 \message{cross reference,} 4124 % Define cross-reference macros 4125 \newwrite \auxfile 4126 4127 \newif\ifhavexrefs % True if xref values are known. 4535 \message{macros,} 4536 % @macro. 4537 4538 % To do this right we need a feature of e-TeX, \scantokens, 4539 % which we arrange to emulate with a temporary file in ordinary TeX. 4540 \ifx\eTeXversion\undefined 4541 \newwrite\macscribble 4542 \def\scanmacro#1{% 4543 \begingroup \newlinechar`\^^M 4544 % Undo catcode changes of \startcontents and \doprintindex 4545 \catcode`\@=0 \catcode`\\=12 \escapechar=`\@ 4546 % Append \endinput to make sure that TeX does not see the ending newline. 4547 \toks0={#1\endinput}% 4548 \immediate\openout\macscribble=\jobname.tmp 4549 \immediate\write\macscribble{\the\toks0}% 4550 \immediate\closeout\macscribble 4551 \let\xeatspaces\eatspaces 4552 \input \jobname.tmp 4553 \endgroup 4554 } 4555 \else 4556 \def\scanmacro#1{% 4557 \begingroup \newlinechar`\^^M 4558 % Undo catcode changes of \startcontents and \doprintindex 4559 \catcode`\@=0 \catcode`\\=12 \escapechar=`\@ 4560 \let\xeatspaces\eatspaces\scantokens{#1\endinput}\endgroup} 4561 \fi 4562 4563 \newcount\paramno % Count of parameters 4564 \newtoks\macname % Macro name 4565 \newif\ifrecursive % Is it recursive? 4566 \def\macrolist{} % List of all defined macros in the form 4567 % \do\macro1\do\macro2... 4568 4569 % Utility routines. 4570 % Thisdoes \let #1 = #2, except with \csnames. 4571 \def\cslet#1#2{% 4572 \expandafter\expandafter 4573 \expandafter\let 4574 \expandafter\expandafter 4575 \csname#1\endcsname 4576 \csname#2\endcsname} 4577 4578 % Trim leading and trailing spaces off a string. 4579 % Concepts from aro-bend problem 15 (see CTAN). 4580 {\catcode`\@=11 4581 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} 4582 \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} 4583 \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} 4584 \def\unbrace#1{#1} 4585 \unbrace{\gdef\trim@@@ #1 } #2@{#1} 4586 } 4587 4588 % Trim a single trailing ^^M off a string. 4589 {\catcode`\^^M=12\catcode`\Q=3% 4590 \gdef\eatcr #1{\eatcra #1Q^^MQ}% 4591 \gdef\eatcra#1^^MQ{\eatcrb#1Q}% 4592 \gdef\eatcrb#1Q#2Q{#1}% 4593 } 4594 4595 % Macro bodies are absorbed as an argument in a context where 4596 % all characters are catcode 10, 11 or 12, except \ which is active 4597 % (as in normal texinfo). It is necessary to change the definition of \. 4598 4599 % It's necessary to have hard CRs when the macro is executed. This is 4600 % done by making ^^M (\endlinechar) catcode 12 when reading the macro 4601 % body, and then making it the \newlinechar in \scanmacro. 4602 4603 \def\macrobodyctxt{% 4604 \catcode`\~=12 4605 \catcode`\^=12 4606 \catcode`\_=12 4607 \catcode`\|=12 4608 \catcode`\<=12 4609 \catcode`\>=12 4610 \catcode`\+=12 4611 \catcode`\{=12 4612 \catcode`\}=12 4613 \catcode`\@=12 4614 \catcode`\^^M=12 4615 \usembodybackslash} 4616 4617 \def\macroargctxt{% 4618 \catcode`\~=12 4619 \catcode`\^=12 4620 \catcode`\_=12 4621 \catcode`\|=12 4622 \catcode`\<=12 4623 \catcode`\>=12 4624 \catcode`\+=12 4625 \catcode`\@=12 4626 \catcode`\\=12} 4627 4628 % \mbodybackslash is the definition of \ in @macro bodies. 4629 % It maps \foo\ => \csname macarg.foo\endcsname => #N 4630 % where N is the macro parameter number. 4631 % We define \csname macarg.\endcsname to be \realbackslash, so 4632 % \\ in macro replacement text gets you a backslash. 4633 4634 {\catcode`@=0 @catcode`@\=@active 4635 @gdef@usembodybackslash{@let\=@mbodybackslash} 4636 @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} 4637 } 4638 \expandafter\def\csname macarg.\endcsname{\realbackslash} 4639 4640 \def\macro{\recursivefalse\parsearg\macroxxx} 4641 \def\rmacro{\recursivetrue\parsearg\macroxxx} 4642 4643 \def\macroxxx#1{% 4644 \getargs{#1}% now \macname is the macname and \argl the arglist 4645 \ifx\argl\empty % no arguments 4646 \paramno=0% 4647 \else 4648 \expandafter\parsemargdef \argl;% 4649 \fi 4650 \if1\csname ismacro.\the\macname\endcsname 4651 \message{Warning: redefining \the\macname}% 4652 \else 4653 \expandafter\ifx\csname \the\macname\endcsname \relax 4654 \else \errmessage{The name \the\macname\space is reserved}\fi 4655 \global\cslet{macsave.\the\macname}{\the\macname}% 4656 \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% 4657 % Add the macroname to \macrolist 4658 \toks0 = \expandafter{\macrolist\do}% 4659 \xdef\macrolist{\the\toks0 4660 \expandafter\noexpand\csname\the\macname\endcsname}% 4661 \fi 4662 \begingroup \macrobodyctxt 4663 \ifrecursive \expandafter\parsermacbody 4664 \else \expandafter\parsemacbody 4665 \fi} 4666 4667 \def\unmacro{\parsearg\unmacroxxx} 4668 \def\unmacroxxx#1{% 4669 \if1\csname ismacro.#1\endcsname 4670 \global\cslet{#1}{macsave.#1}% 4671 \global\expandafter\let \csname ismacro.#1\endcsname=0% 4672 % Remove the macro name from \macrolist 4673 \begingroup 4674 \edef\tempa{\expandafter\noexpand\csname#1\endcsname}% 4675 \def\do##1{% 4676 \def\tempb{##1}% 4677 \ifx\tempa\tempb 4678 % remove this 4679 \else 4680 \toks0 = \expandafter{\newmacrolist\do}% 4681 \edef\newmacrolist{\the\toks0\expandafter\noexpand\tempa}% 4682 \fi}% 4683 \def\newmacrolist{}% 4684 % Execute macro list to define \newmacrolist 4685 \macrolist 4686 \global\let\macrolist\newmacrolist 4687 \endgroup 4688 \else 4689 \errmessage{Macro #1 not defined}% 4690 \fi 4691 } 4692 4693 % This makes use of the obscure feature that if the last token of a 4694 % <parameter list> is #, then the preceding argument is delimited by 4695 % an opening brace, and that opening brace is not consumed. 4696 \def\getargs#1{\getargsxxx#1{}} 4697 \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} 4698 \def\getmacname #1 #2\relax{\macname={#1}} 4699 \def\getmacargs#1{\def\argl{#1}} 4700 4701 % Parse the optional {params} list. Set up \paramno and \paramlist 4702 % so \defmacro knows what to do. Define \macarg.blah for each blah 4703 % in the params list, to be ##N where N is the position in that list. 4704 % That gets used by \mbodybackslash (above). 4705 4706 % We need to get `macro parameter char #' into several definitions. 4707 % The technique used is stolen from LaTeX: let \hash be something 4708 % unexpandable, insert that wherever you need a #, and then redefine 4709 % it to # just before using the token list produced. 4710 % 4711 % The same technique is used to protect \eatspaces till just before 4712 % the macro is used. 4713 4714 \def\parsemargdef#1;{\paramno=0\def\paramlist{}% 4715 \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,} 4716 \def\parsemargdefxxx#1,{% 4717 \if#1;\let\next=\relax 4718 \else \let\next=\parsemargdefxxx 4719 \advance\paramno by 1% 4720 \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname 4721 {\xeatspaces{\hash\the\paramno}}% 4722 \edef\paramlist{\paramlist\hash\the\paramno,}% 4723 \fi\next} 4724 4725 % These two commands read recursive and nonrecursive macro bodies. 4726 % (They're different since rec and nonrec macros end differently.) 4727 4728 \long\def\parsemacbody#1@end macro% 4729 {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% 4730 \long\def\parsermacbody#1@end rmacro% 4731 {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% 4732 4733 % This defines the macro itself. There are six cases: recursive and 4734 % nonrecursive macros of zero, one, and many arguments. 4735 % Much magic with \expandafter here. 4736 % \xdef is used so that macro definitions will survive the file 4737 % they're defined in; @include reads the file inside a group. 4738 \def\defmacro{% 4739 \let\hash=##% convert placeholders to macro parameter chars 4740 \ifrecursive 4741 \ifcase\paramno 4742 % 0 4743 \expandafter\xdef\csname\the\macname\endcsname{% 4744 \noexpand\scanmacro{\temp}}% 4745 \or % 1 4746 \expandafter\xdef\csname\the\macname\endcsname{% 4747 \bgroup\noexpand\macroargctxt 4748 \noexpand\braceorline 4749 \expandafter\noexpand\csname\the\macname xxx\endcsname}% 4750 \expandafter\xdef\csname\the\macname xxx\endcsname##1{% 4751 \egroup\noexpand\scanmacro{\temp}}% 4752 \else % many 4753 \expandafter\xdef\csname\the\macname\endcsname{% 4754 \bgroup\noexpand\macroargctxt 4755 \noexpand\csname\the\macname xx\endcsname}% 4756 \expandafter\xdef\csname\the\macname xx\endcsname##1{% 4757 \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% 4758 \expandafter\expandafter 4759 \expandafter\xdef 4760 \expandafter\expandafter 4761 \csname\the\macname xxx\endcsname 4762 \paramlist{\egroup\noexpand\scanmacro{\temp}}% 4763 \fi 4764 \else 4765 \ifcase\paramno 4766 % 0 4767 \expandafter\xdef\csname\the\macname\endcsname{% 4768 \noexpand\norecurse{\the\macname}% 4769 \noexpand\scanmacro{\temp}\egroup}% 4770 \or % 1 4771 \expandafter\xdef\csname\the\macname\endcsname{% 4772 \bgroup\noexpand\macroargctxt 4773 \noexpand\braceorline 4774 \expandafter\noexpand\csname\the\macname xxx\endcsname}% 4775 \expandafter\xdef\csname\the\macname xxx\endcsname##1{% 4776 \egroup 4777 \noexpand\norecurse{\the\macname}% 4778 \noexpand\scanmacro{\temp}\egroup}% 4779 \else % many 4780 \expandafter\xdef\csname\the\macname\endcsname{% 4781 \bgroup\noexpand\macroargctxt 4782 \expandafter\noexpand\csname\the\macname xx\endcsname}% 4783 \expandafter\xdef\csname\the\macname xx\endcsname##1{% 4784 \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% 4785 \expandafter\expandafter 4786 \expandafter\xdef 4787 \expandafter\expandafter 4788 \csname\the\macname xxx\endcsname 4789 \paramlist{% 4790 \egroup 4791 \noexpand\norecurse{\the\macname}% 4792 \noexpand\scanmacro{\temp}\egroup}% 4793 \fi 4794 \fi} 4795 4796 \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} 4797 4798 % \braceorline decides whether the next nonwhitespace character is a 4799 % {. If so it reads up to the closing }, if not, it reads the whole 4800 % line. Whatever was read is then fed to the next control sequence 4801 % as an argument (by \parsebrace or \parsearg) 4802 \def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx} 4803 \def\braceorlinexxx{% 4804 \ifx\nchar\bgroup\else 4805 \expandafter\parsearg 4806 \fi \next} 4807 4808 % We mant to disable all macros during \shipout so that they are not 4809 % expanded by \write. 4810 \def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=\relax}% 4811 \edef\next{\macrolist}\expandafter\endgroup\next} 4812 4813 4814 % @alias. 4815 \def\alias#1=#2{\gdef#1{#2}} 4816 4817 4818 \message{cross references,} 4819 \newwrite\auxfile 4820 4821 \newif\ifhavexrefs % True if xref values are known. 4128 4822 \newif\ifwarnedxrefs % True if we warned once that they aren't known. 4129 4823 4130 % @inforef is simple.4824 % @inforef is relatively simple. 4131 4825 \def\inforef #1{\inforefzzz #1,,,,**} 4132 4826 \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, 4133 4827 node \samp{\ignorespaces#1{}}} 4134 4828 4135 % \setref{foo} defines a cross-reference point named foo. 4136 4137 \def\setref#1{% 4138 \dosetq{#1-title}{Ytitle}% 4139 \dosetq{#1-pg}{Ypagenumber}% 4140 \dosetq{#1-snt}{Ysectionnumberandtype}} 4141 4142 \def\unnumbsetref#1{% 4143 \dosetq{#1-title}{Ytitle}% 4144 \dosetq{#1-pg}{Ypagenumber}% 4145 \dosetq{#1-snt}{Ynothing}} 4146 4147 \def\appendixsetref#1{% 4148 \dosetq{#1-title}{Ytitle}% 4149 \dosetq{#1-pg}{Ypagenumber}% 4150 \dosetq{#1-snt}{Yappendixletterandtype}} 4151 4152 % \xref, \pxref, and \ref generate cross-references to specified points. 4153 % For \xrefX, #1 is the node name, #2 the name of the Info 4154 % cross-reference, #3 the printed node name, #4 the name of the Info 4155 % file, #5 the name of the printed manual. All but the node name can be 4156 % omitted. 4829 % @node's job is to define \lastnode. 4830 \def\node{\ENVcheck\parsearg\nodezzz} 4831 \def\nodezzz#1{\nodexxx [#1,]} 4832 \def\nodexxx[#1,#2]{\gdef\lastnode{#1}} 4833 \let\nwnode=\node 4834 \let\lastnode=\relax 4835 4836 % The sectioning commands (@chapter, etc.) call these. 4837 \def\donoderef{% 4838 \ifx\lastnode\relax\else 4839 \expandafter\expandafter\expandafter\setref{\lastnode}% 4840 {Ysectionnumberandtype}% 4841 \global\let\lastnode=\relax 4842 \fi 4843 } 4844 \def\unnumbnoderef{% 4845 \ifx\lastnode\relax\else 4846 \expandafter\expandafter\expandafter\setref{\lastnode}{Ynothing}% 4847 \global\let\lastnode=\relax 4848 \fi 4849 } 4850 \def\appendixnoderef{% 4851 \ifx\lastnode\relax\else 4852 \expandafter\expandafter\expandafter\setref{\lastnode}% 4853 {Yappendixletterandtype}% 4854 \global\let\lastnode=\relax 4855 \fi 4856 } 4857 4858 4859 % @anchor{NAME} -- define xref target at arbitrary point. 4860 % 4861 \def\anchor#1{\setref{#1}{Ynothing}} 4862 4863 4864 % \setref{NAME}{SNT} defines a cross-reference point NAME, namely 4865 % NAME-title, NAME-pg, and NAME-SNT. Called from \foonoderef. We have 4866 % to set \indexdummies so commands such as @code in a section title 4867 % aren't expanded. It would be nicer not to expand the titles in the 4868 % first place, but there's so many layers that that is hard to do. 4869 % 4870 \def\setref#1#2{{% 4871 \indexdummies 4872 \dosetq{#1-title}{Ytitle}% 4873 \dosetq{#1-pg}{Ypagenumber}% 4874 \dosetq{#1-snt}{#2}% 4875 }} 4876 4877 % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is 4878 % the node name, #2 the name of the Info cross-reference, #3 the printed 4879 % node name, #4 the name of the Info file, #5 the name of the printed 4880 % manual. All but the node name can be omitted. 4157 4881 % 4158 4882 \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} … … 4172 4896 % Use the actual chapter/section title appear inside 4173 4897 % the square brackets. Use the real section title if we have it. 4174 \ifdim \wd1 >0pt%4898 \ifdim \wd1 > 0pt 4175 4899 % It is in another manual, so we don't have it. 4176 4900 \def\printednodename{\ignorespaces #1}% … … 4201 4925 % printing. So we \turnoffactive for the \refx-snt, back on for the 4202 4926 % printing, back off for the \refx-pg. 4203 {\turnoffactive \refx{#1-snt}{}}% 4204 \space [\printednodename],\space 4927 {\normalturnoffactive 4928 % Only output a following space if the -snt ref is nonempty; for 4929 % @unnumbered and @anchor, it won't be. 4930 \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% 4931 \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi 4932 }% 4933 % [mynode], 4934 [\printednodename],\space 4935 % page 3 4205 4936 \turnoffactive \putwordpage\tie\refx{#1-pg}{}% 4206 4937 \fi … … 4209 4940 % \dosetq is the interface for calls from other macros 4210 4941 4211 % Use \turnoffactive so that punctuation chars such as underscore 4212 % work in node names. 4213 \def\dosetq #1#2{{\let\folio=0 \turnoffactive 4214 \edef\next{\write\auxfile{\internalsetq {#1}{#2}}}% 4215 \next}} 4942 % Use \normalturnoffactive so that punctuation chars such as underscore 4943 % and backslash work in node names. (\turnoffactive doesn't do \.) 4944 \def\dosetq#1#2{% 4945 {\let\folio=0 4946 \normalturnoffactive 4947 \edef\next{\write\auxfile{\internalsetq{#1}{#2}}}% 4948 \iflinks 4949 \next 4950 \fi 4951 }% 4952 } 4216 4953 4217 4954 % \internalsetq {foo}{page} expands into … … 4264 5001 \expandafter\ifx\csname X#1\endcsname\relax 4265 5002 % If not defined, say something at least. 4266 $\langle$un\-de\-fined$\rangle$% 4267 \ifhavexrefs 4268 \message{\linenumber Undefined cross reference `#1'.}% 4269 \else 4270 \ifwarnedxrefs\else 4271 \global\warnedxrefstrue 4272 \message{Cross reference values unknown; you must run TeX again.}% 5003 \angleleft un\-de\-fined\angleright 5004 \iflinks 5005 \ifhavexrefs 5006 \message{\linenumber Undefined cross reference `#1'.}% 5007 \else 5008 \ifwarnedxrefs\else 5009 \global\warnedxrefstrue 5010 \message{Cross reference values unknown; you must run TeX again.}% 5011 \fi 4273 5012 \fi 4274 5013 \fi … … 4281 5020 4282 5021 % This is the macro invoked by entries in the aux file. 4283 \def\xrdef #1#2{{% 4284 \catcode`\'=\other 4285 \expandafter\gdef\csname X#1\endcsname{#2}% 4286 }} 5022 % 5023 \def\xrdef#1{\begingroup 5024 % Reenable \ as an escape while reading the second argument. 5025 \catcode`\\ = 0 5026 \afterassignment\endgroup 5027 \expandafter\gdef\csname X#1\endcsname 5028 } 4287 5029 4288 5030 % Read the last existing aux file, if any. No error if none exists. 4289 5031 \def\readauxfile{\begingroup 4290 5032 \catcode`\^^@=\other 4291 \catcode`\ =\other4292 \catcode`\ =\other5033 \catcode`\^^A=\other 5034 \catcode`\^^B=\other 4293 5035 \catcode`\^^C=\other 4294 5036 \catcode`\^^D=\other … … 4297 5039 \catcode`\^^G=\other 4298 5040 \catcode`\^^H=\other 4299 \catcode`\ 4300 =\other 5041 \catcode`\^^K=\other 4301 5042 \catcode`\^^L=\other 4302 \catcode`\=\other 4303 \catcode`\=\other 4304 \catcode`\=\other 4305 \catcode`\=\other 4306 \catcode`\=\other 4307 \catcode`\=\other 4308 \catcode`\=\other 4309 \catcode`\=\other 4310 \catcode`\=\other 4311 \catcode`\=\other 4312 \catcode`\=\other 4313 \catcode`\=\other 4314 \catcode26=\other 5043 \catcode`\^^N=\other 5044 \catcode`\^^P=\other 5045 \catcode`\^^Q=\other 5046 \catcode`\^^R=\other 5047 \catcode`\^^S=\other 5048 \catcode`\^^T=\other 5049 \catcode`\^^U=\other 5050 \catcode`\^^V=\other 5051 \catcode`\^^W=\other 5052 \catcode`\^^X=\other 5053 \catcode`\^^Z=\other 4315 5054 \catcode`\^^[=\other 4316 5055 \catcode`\^^\=\other … … 4344 5083 \catcode`\#=\other 4345 5084 \catcode`\&=\other 4346 % `\+ does not work, so use 43. 4347 \catcode43=\other 5085 \catcode`+=\other % avoid \+ for paranoia even though we've turned it off 4348 5086 % Make the characters 128-255 be printing characters 4349 5087 {% … … 4390 5128 \def\supereject{\par\penalty -20000\footnoteno =0 } 4391 5129 4392 % @footnotestyle is meaningful for info output only. .5130 % @footnotestyle is meaningful for info output only. 4393 5131 \let\footnotestyle=\comment 4394 5132 … … 4505 5243 \def\finalout{\overfullrule=0pt} 4506 5244 4507 4508 % End of control word definitions. 4509 4510 \message{and turning on texinfo input format.} 4511 4512 \def\openindices{% 4513 \newindex{cp}% 4514 \newcodeindex{fn}% 4515 \newcodeindex{vr}% 4516 \newcodeindex{tp}% 4517 \newcodeindex{ky}% 4518 \newcodeindex{pg}% 4519 } 4520 4521 % Set some numeric style parameters, for 8.5 x 11 format. 4522 4523 \hsize = 6in 4524 \hoffset = .25in 5245 % @image. We use the macros from epsf.tex to support this. 5246 % If epsf.tex is not installed and @image is used, we complain. 5247 % 5248 % Check for and read epsf.tex up front. If we read it only at @image 5249 % time, we might be inside a group, and then its definitions would get 5250 % undone and the next image would fail. 5251 \openin 1 = epsf.tex 5252 \ifeof 1 \else 5253 \closein 1 5254 % Do not bother showing banner with post-v2.7 epsf.tex (available in 5255 % doc/epsf.tex until it shows up on ctan). 5256 \def\epsfannounce{\toks0 = }% 5257 \input epsf.tex 5258 \fi 5259 % 5260 \newif\ifwarnednoepsf 5261 \newhelp\noepsfhelp{epsf.tex must be installed for images to 5262 work. It is also included in the Texinfo distribution, or you can get 5263 it from ftp://tug.org/tex/epsf.tex.} 5264 % 5265 % Only complain once about lack of epsf.tex. 5266 \def\image#1{% 5267 \ifx\pdfoutput\undefined 5268 \ifx\epsfbox\undefined 5269 \ifwarnednoepsf \else 5270 \errhelp = \noepsfhelp 5271 \errmessage{epsf.tex not found, images will be ignored}% 5272 \global\warnednoepsftrue 5273 \fi 5274 \else 5275 \imagexxx #1,,,\finish 5276 \fi 5277 \else 5278 \centerline{\pdfimage #1.pdf}% 5279 \fi 5280 } 5281 % 5282 % Arguments to @image: 5283 % #1 is (mandatory) image filename; we tack on .eps extension. 5284 % #2 is (optional) width, #3 is (optional) height. 5285 % #4 is just the usual extra ignored arg for parsing this stuff. 5286 \def\imagexxx#1,#2,#3,#4\finish{% 5287 % \epsfbox itself resets \epsf?size at each figure. 5288 \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi 5289 \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi 5290 % If the image is by itself, center it. 5291 \ifvmode 5292 \nobreak\medskip 5293 \nobreak 5294 \centerline{\epsfbox{#1.eps}}% 5295 \bigbreak 5296 \else 5297 % In the middle of a paragraph, no extra space. 5298 \epsfbox{#1.eps}% 5299 \fi 5300 } 5301 5302 5303 \message{localization,} 5304 5305 % @documentlanguage is usually given very early, just after 5306 % @setfilename. If done too late, it may not override everything 5307 % properly. Single argument is the language abbreviation. 5308 % It would be nice if we could set up a hyphenation file here. 5309 % 5310 \def\documentlanguage{\parsearg\dodocumentlanguage} 5311 \def\dodocumentlanguage#1{% 5312 \tex % read txi-??.tex file in plain TeX. 5313 % Read the file if it exists. 5314 \openin 1 txi-#1.tex 5315 \ifeof1 5316 \errhelp = \nolanghelp 5317 \errmessage{Cannot read language file txi-#1.tex}% 5318 \let\temp = \relax 5319 \else 5320 \def\temp{\input txi-#1.tex }% 5321 \fi 5322 \temp 5323 \endgroup 5324 } 5325 \newhelp\nolanghelp{The given language definition file cannot be found or 5326 is empty. Maybe you need to install it? In the current directory 5327 should work if nowhere else does.} 5328 5329 5330 % @documentencoding should change something in TeX eventually, most 5331 % likely, but for now just recognize it. 5332 \let\documentencoding = \comment 5333 5334 5335 % Page size parameters. 5336 % 4525 5337 \newdimen\defaultparindent \defaultparindent = 15pt 4526 \parindent = \defaultparindent4527 \parskip 3pt plus 2pt minus 1pt4528 \setleading{13.2pt}4529 \advance\topskip by 1.2cm4530 5338 4531 5339 \chapheadingskip = 15pt plus 4pt minus 2pt … … 4534 5342 4535 5343 % Prevent underfull vbox error messages. 4536 \vbadness=10000 5344 \vbadness = 10000 5345 5346 % Don't be so finicky about underfull hboxes, either. 5347 \hbadness = 2000 4537 5348 4538 5349 % Following George Bush, just get rid of widows and orphans. … … 4543 5354 % using an old version of TeX, don't do anything. We want the amount of 4544 5355 % stretch added to depend on the line length, hence the dependence on 4545 % \hsize. This makes it come to about 9pt for the 8.5x11 format. 4546 % 4547 \ifx\emergencystretch\thisisundefined 4548 % Allow us to assign to \emergencystretch anyway. 4549 \def\emergencystretch{\dimen0}% 4550 \else 4551 \emergencystretch = \hsize 4552 \divide\emergencystretch by 45 4553 \fi 4554 4555 % Use @smallbook to reset parameters for 7x9.5 format (or else 7x9.25) 4556 \def\smallbook{ 4557 \global\chapheadingskip = 15pt plus 4pt minus 2pt 4558 \global\secheadingskip = 12pt plus 3pt minus 2pt 4559 \global\subsecheadingskip = 9pt plus 2pt minus 2pt 4560 % 4561 \global\lispnarrowing = 0.3in 4562 \setleading{12pt} 4563 \advance\topskip by -1cm 4564 \global\parskip 2pt plus 1pt 4565 \global\hsize = 5in 4566 \global\vsize=7.5in 4567 \global\tolerance=700 4568 \global\hfuzz=1pt 4569 \global\contentsrightmargin=0pt 4570 \global\deftypemargin=0pt 4571 \global\defbodyindent=.5cm 4572 % 4573 \global\pagewidth=\hsize 4574 \global\pageheight=\vsize 4575 % 4576 \global\let\smalllisp=\smalllispx 4577 \global\let\smallexample=\smalllispx 4578 \global\def\Esmallexample{\Esmalllisp} 4579 } 5356 % \hsize. We call this whenever the paper size is set. 5357 % 5358 \def\setemergencystretch{% 5359 \ifx\emergencystretch\thisisundefined 5360 % Allow us to assign to \emergencystretch anyway. 5361 \def\emergencystretch{\dimen0}% 5362 \else 5363 \emergencystretch = \hsize 5364 \divide\emergencystretch by 40 5365 \fi 5366 } 5367 5368 % Parameters in order: 1) textheight; 2) textwidth; 3) voffset; 5369 % 4) hoffset; 5) binding offset; 6) topskip. Then whoever calls us can 5370 % set \parskip and call \setleading for \baselineskip. 5371 % 5372 \def\internalpagesizes#1#2#3#4#5#6{% 5373 \voffset = #3\relax 5374 \topskip = #6\relax 5375 \splittopskip = \topskip 5376 % 5377 \vsize = #1\relax 5378 \advance\vsize by \topskip 5379 \outervsize = \vsize 5380 \advance\outervsize by 2\topandbottommargin 5381 \pageheight = \vsize 5382 % 5383 \hsize = #2\relax 5384 \outerhsize = \hsize 5385 \advance\outerhsize by 0.5in 5386 \pagewidth = \hsize 5387 % 5388 \normaloffset = #4\relax 5389 \bindingoffset = #5\relax 5390 % 5391 \parindent = \defaultparindent 5392 \setemergencystretch 5393 } 5394 5395 % @letterpaper (the default). 5396 \def\letterpaper{{\globaldefs = 1 5397 \parskip = 3pt plus 2pt minus 1pt 5398 \setleading{13.2pt}% 5399 % 5400 % If page is nothing but text, make it come out even. 5401 \internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}% 5402 }} 5403 5404 % Use @smallbook to reset parameters for 7x9.5 (or so) format. 5405 \def\smallbook{{\globaldefs = 1 5406 \parskip = 2pt plus 1pt 5407 \setleading{12pt}% 5408 % 5409 \internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}% 5410 % 5411 \lispnarrowing = 0.3in 5412 \tolerance = 700 5413 \hfuzz = 1pt 5414 \contentsrightmargin = 0pt 5415 \deftypemargin = 0pt 5416 \defbodyindent = .5cm 5417 % 5418 \let\smalldisplay = \smalldisplayx 5419 \let\smallexample = \smalllispx 5420 \let\smallformat = \smallformatx 5421 \let\smalllisp = \smalllispx 5422 }} 4580 5423 4581 5424 % Use @afourpaper to print on European A4 paper. 4582 \def\afourpaper{ 4583 \global\tolerance=700 4584 \global\hfuzz=1pt 4585 \setleading{12pt} 4586 \global\parskip 15pt plus 1pt 4587 4588 \global\vsize= 53\baselineskip 4589 \advance\vsize by \topskip 4590 %\global\hsize= 5.85in % A4 wide 10pt 4591 \global\hsize= 6.5in 4592 \global\outerhsize=\hsize 4593 \global\advance\outerhsize by 0.5in 4594 \global\outervsize=\vsize 4595 \global\advance\outervsize by 0.6in 4596 4597 \global\pagewidth=\hsize 4598 \global\pageheight=\vsize 4599 } 4600 4601 \bindingoffset=0pt 4602 \normaloffset=\hoffset 4603 \pagewidth=\hsize 4604 \pageheight=\vsize 4605 4606 % Allow control of the text dimensions. Parameters in order: textheight; 4607 % textwidth; voffset; hoffset; binding offset; topskip. 4608 % All require a dimension; 4609 % header is additional; added length extends the bottom of the page. 4610 4611 \def\changepagesizes#1#2#3#4#5#6{ 4612 \global\vsize= #1 4613 \global\topskip= #6 4614 \advance\vsize by \topskip 4615 \global\voffset= #3 4616 \global\hsize= #2 4617 \global\outerhsize=\hsize 4618 \global\advance\outerhsize by 0.5in 4619 \global\outervsize=\vsize 4620 \global\advance\outervsize by 0.6in 4621 \global\pagewidth=\hsize 4622 \global\pageheight=\vsize 4623 \global\normaloffset= #4 4624 \global\bindingoffset= #5} 5425 \def\afourpaper{{\globaldefs = 1 5426 \setleading{12pt}% 5427 \parskip = 3pt plus 2pt minus 1pt 5428 % 5429 \internalpagesizes{53\baselineskip}{160mm}{\voffset}{4mm}{\bindingoffset}{44pt}% 5430 % 5431 \tolerance = 700 5432 \hfuzz = 1pt 5433 }} 4625 5434 4626 5435 % A specific text layout, 24x15cm overall, intended for A4 paper. Top margin 4627 5436 % 29mm, hence bottom margin 28mm, nominal side margin 3cm. 4628 \def\afourlatex 4629 {\global\tolerance=7004630 \global\hfuzz=1pt4631 \setleading{12pt}4632 \global\parskip 15pt plus 1pt4633 \advance\baselineskip by 1.6pt4634 \changepagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}4635 5437 \def\afourlatex{{\globaldefs = 1 5438 \setleading{13.6pt}% 5439 % 5440 \afourpaper 5441 \internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}% 5442 % 5443 \globaldefs = 0 5444 }} 4636 5445 4637 5446 % Use @afourwide to print on European A4 paper in wide format. 4638 \def\afourwide{\afourpaper 4639 \changepagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}} 5447 \def\afourwide{% 5448 \afourpaper 5449 \internalpagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}% 5450 % 5451 \globaldefs = 0 5452 } 5453 5454 % @pagesizes TEXTHEIGHT[,TEXTWIDTH] 5455 % Perhaps we should allow setting the margins, \topskip, \parskip, 5456 % and/or leading, also. Or perhaps we should compute them somehow. 5457 % 5458 \def\pagesizes{\parsearg\pagesizesxxx} 5459 \def\pagesizesxxx#1{\pagesizesyyy #1,,\finish} 5460 \def\pagesizesyyy#1,#2,#3\finish{{% 5461 \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi 5462 \globaldefs = 1 5463 % 5464 \parskip = 3pt plus 2pt minus 1pt 5465 \setleading{13.2pt}% 5466 % 5467 \internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}% 5468 }} 5469 5470 % Set default to letter. 5471 % 5472 \letterpaper 5473 5474 \message{and turning on texinfo input format.} 4640 5475 4641 5476 % Define macros to output various characters with catcode for normal text. … … 4674 5509 4675 5510 \catcode`\"=\active 4676 \def\activedoublequote{{\tt \char '042}}5511 \def\activedoublequote{{\tt\char34}} 4677 5512 \let"=\activedoublequote 4678 5513 \catcode`\~=\active 4679 \def~{{\tt \char '176}}5514 \def~{{\tt\char126}} 4680 5515 \chardef\hat=`\^ 4681 5516 \catcode`\^=\active … … 4688 5523 4689 5524 \catcode`\|=\active 4690 \def|{{\tt \char '174}}5525 \def|{{\tt\char124}} 4691 5526 \chardef \less=`\< 4692 5527 \catcode`\<=\active … … 4775 5610 @catcode`+=@active @catcode`@_=@active} 4776 5611 4777 % %These look ok in all fonts, so just make them not special. The @rm below4778 % %makes sure that the current font starts out as the newly loaded cmr105612 % These look ok in all fonts, so just make them not special. The @rm below 5613 % makes sure that the current font starts out as the newly loaded cmr10 4779 5614 @catcode`@$=@other @catcode`@%=@other @catcode`@&=@other @catcode`@#=@other 4780 5615 … … 4783 5618 4784 5619 @c Local variables: 5620 @c eval: (add-hook 'write-file-hooks 'time-stamp) 4785 5621 @c page-delimiter: "^\\\\message" 5622 @c time-stamp-start: "def\\\\texinfoversion{" 5623 @c time-stamp-format: "%:y-%02m-%02d.%H" 5624 @c time-stamp-end: "}" 4786 5625 @c End:
Note: See TracChangeset
for help on using the changeset viewer.