diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/hypertex/hypertex |
Initial commit
Diffstat (limited to 'support/hypertex/hypertex')
24 files changed, 2348 insertions, 0 deletions
diff --git a/support/hypertex/hypertex/X/Mosaic b/support/hypertex/hypertex/X/Mosaic new file mode 100644 index 0000000000..0d75e4f6d8 --- /dev/null +++ b/support/hypertex/hypertex/X/Mosaic @@ -0,0 +1,6 @@ +#!/bin/sh -- +WWWBROWSER=${WWWBROWSER-/usr/local/bin/callmosaic} \ +PATH=/usr/ucb:$PATH \ +NNTPSERVER=${NNTPSERVER-newshost} \ +WWW_wais_GATEWAY=${WWW_wais_GATEWAY-http://www.ncsa.uiuc.edu:8001} \ +/usr/local/bin/newpg 0 $0.binary $* diff --git a/support/hypertex/hypertex/X/callmosaic b/support/hypertex/hypertex/X/callmosaic new file mode 100644 index 0000000000..a0eec1463b --- /dev/null +++ b/support/hypertex/hypertex/X/callmosaic @@ -0,0 +1,36 @@ +#!/bin/sh -- +# This is a generic shell script for messaging Mosaic written by +# tanmoy@lanl.gov based on an idea by Paul F. Mende and +# an implementation by krobison@nucleus.harvard.edu +# +# It takes two params: an URL and a base URL to interpret it with +# respect to. It currently ignores this second parameter. +# +# stdout to stderr anyway +exec >&2 +# Note that it sets PATH to null to avoid security +# problems. +PATH= +MOSAIC=/usr/local/bin/Mosaic +# Find my invoking Mosaic. (pid with our pgid) +mypid=`/bin/ps -jx$$ | /usr/ucb/tail -1 | /bin/cut -c 12-17` +mypid=`/bin/expr $mypid` +if /bin/ps -lww$mypid | /bin/grep Mosaic > /dev/null; then /bin/true; +else + if [ -r ${HOME}/.mosaicpid ]; then + mypid=`/bin/cat ${HOME}/.mosaicpid` + mypid=`/bin/expr $mypid` + if /bin/ps -lww$mypid | /bin/grep Mosaic > /dev/null; then /bin/true; + else + ${MOSAIC} "$1" & + exit 0 + fi + else + ${MOSAIC} "$1" & + exit 0 + fi +fi +/bin/rm -f /tmp/Mosaic.$mypid +/bin/echo goto >/tmp/Mosaic.$mypid +/bin/echo "$1" >>/tmp/Mosaic.$mypid +/bin/kill -USR1 $mypid diff --git a/support/hypertex/hypertex/X/index.html b/support/hypertex/hypertex/X/index.html new file mode 100644 index 0000000000..1451189154 --- /dev/null +++ b/support/hypertex/hypertex/X/index.html @@ -0,0 +1,103 @@ +<header><title>external URL's under X</title></header> +<h1>external URL's under X</h1> +<pre> +Date: Sat, 16 Jul 94 12:49:47 MDT +From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya) +To: ginsparg@qfwfq.lanl.gov +Subject: more things needed +</pre> +The script for Mosaic is not really that good right now: and we should +probably think a bit more, and probably should talk to the Mosaic guys +as well. That is why I do not yet want to publish it. We can put it up +as an example of how it can be done within the present framework +itself: not as a way in which we think these should be done. +<p> +At the minimum we need Mosaic (and any other www client) +to set two environmentvariables containing respectively: +(1) its own pid, and (2) The URL of the document it is calling, +and should accept by `remote control' either (a) an absolute URL, OR +(b) a relative URL and a BASE HREF. <br> +(Instead of using an environment variable for (2), it could instead put +the URL into a file and name the file in the environment. +[Does mac have environment variables? It is easy to overflow +IBM PC environment space].) +<hr> +Anyway, here is how the system on nqcd works. No portability issues +had been considered when writing them: I have tried to express my +concerns below. + +<ol> +<li> There is a c-program +<a href="newpg.c">newpg.c</a> which takes 2 or more parameters. +<ol> +<li> <b>if</b> the first parameter is non-zero, +it sets its pgid to the first parameter, +<b>else</b> it sets its pgid to its pid. +<li> it replaces itself (without changing pid's) with the program + named by its second parameter and passes the rest of the + arguments to it. +<li>Note that it requires ANSI C, the header <sys/types.h> to define pid_t, and + the routines setpgid (I haven't checked to see if it exists in + SYSV) and execvp. +</ol> + +<li>The actual Mosaic is renamed Mosaic.binary + +<li> <a href="Mosaic">Mosaic</a> + is a script that calls the c-program (newpg) which starts the + actual Mosaic. (It also provides default values to a few environment + variables: only WWWBROWSER is relevant to this project). It should + work on all unices unchanged provided $0 gets correctly translated, + and the paths are corrected. + +<li> <a href="callmosaic">callmosaic</a> takes two parameters and does the + following: + <ol> + <li> Ignores the second parameter. See later. + <li> It clears the PATH environment variable, and changes the MOSAIC + environment variable, if present, to /usr/local/bin/Mosaic. (As + a result it uses absolute paths for all system programs, + bringing in system dependencies). It redirects standard output + to standard error. (should it?) + <li> gets its own pgid. (call it x) Doing this from shell is + extremely machine dependent. (depends on exact format of ps + output! On some machines like IBM Risc stations, may be next to + impossible). Should be done with a two line C program instead. + <li> checks process with PID x to see if it exists and its + identification as returned by ps contains the string + `Mosaic'. If so, goes to step 6. (There may be differences + between BSD and SYSV ps calls). Probably should also check the + DISPLAY environment variable, but no sure way of doing that + unless one call call a process which has group kmem + permissions. (Unless pstat, which is such a process gives us a + way of doing it: I do not know). A less than perfect way does + exist with ps -e. + <li> checks to see if ${HOME}/.mosaicpid exists and is readable. + If so, call the pid in it as x (probably crash if file not in + right format), else go to step 6. + <li> checks to see if process with PID x exists and its + identification as returned by ps contains the string + `Mosaic'. If so goto step 6. (BSD and SYSV ps calls may + differ). (Note that it does not check to see if the DISPLAY is + the same! See point 2) + <li> Start a Mosaic passing it the first parameter; and exit when + that exits. (should probably `exec' the Mosaic instead. Should + it also try a ps -x and check for an unique Mosaic on this + display before it starts a new one? See point 2 about + display). (The redirection of standard output to standard error + stays!) (What happens if the parameter contains backquotes? + Haven't checked!) + <li> Creates /tmp/Mosaic.x (x being the aforementioned pid) and + writes two lines into it (probably crashes if it cannot): the + first being `goto' and the second contains whatever came in as + the first parameter. Then it signals USR1 to x, and + exits. (probably should write the second parameter as a third + line.) (What happens if the parameter contains backquotes? + Haven't checked!) + <li> Note that the second parameter is always ignored. (It is supposed + to be the BASE HREF of the document which is calling callmosaic). + </ol> + +</ol> + +</body> diff --git a/support/hypertex/hypertex/X/newpg.c b/support/hypertex/hypertex/X/newpg.c new file mode 100644 index 0000000000..d17832f49e --- /dev/null +++ b/support/hypertex/hypertex/X/newpg.c @@ -0,0 +1,37 @@ +#include <stdlib.h> +#include <stdio.h> +#include <sys/types.h> + +#ifndef EXIT_FAILURE + #define EXIT_FAILURE 1 +#endif + +#define abrt() return EXIT_FAILURE + +int main(int argc, char *argv[]) +{ + pid_t pgid, pid=0; int arg1; + + if (argc < 3) { + fprintf(stderr,"Usage: %s pgid command args\n",argv[0]); + abrt(); + } + + if(sscanf(argv[1],"%d",&arg1)!=1) { + fprintf(stderr,"Usage: %s pgid command args\n",argv[0]); + abrt(); + } + pgid = arg1; + + if (setpgid(0,pgid)) { + fprintf(stderr,"Error changing pgid\n"); + abrt(); + } + + if(execvp(argv[2],&argv[2])) { + fprintf(stderr,"Error execvping\n"); + abrt(); + } + + return 0; /* Impossible */ +} diff --git a/support/hypertex/hypertex/binaries/index.html b/support/hypertex/hypertex/binaries/index.html new file mode 100644 index 0000000000..a247e10812 --- /dev/null +++ b/support/hypertex/hypertex/binaries/index.html @@ -0,0 +1,43 @@ +<header><title>xhdvi precompiled binaries</title></header> +<body> +<h1>xhdvi precompiled binaries</h1> + +xhdvi binaries precompiled for the following machines: +<ul> +<li> for Sun OS 4.1: <a href="xhdvi_sun_4.1.tar.gz">xhdvi_sun_4.1.tar.gz</a> +<li> for HPUX 9.05: <a href="xhdvi_hpux_9.05.tar.gz">xhdvi_hpux_9.05.tar.gz</a> +<li> for SGI: <a href="xhdvi_iris_5.2.tar.gz">xhdvi_iris_5.2.tar.gz</a> +<li> for ibm risc 6000: +<a href="ftp://snorri.chem.washington.edu/pub/hypertex/xhdvi.RS6000">xhdvi.RS6000</a> +<li> X on nExtstep (see also the nExtstep native +<a href="../HyperTeXview.tar.gz">HyperTeXview</a>): + <ul> + <li> +<a href="ftp://snorri.chem.washington.edu/pub/hypertex/xhdvi.NextIntel">xhdvi.NextIntel</a> + <li> +<a href="ftp://snorri.chem.washington.edu/pub/hypertex/xhdvi.NextNext">xhdvi.NextNext</a> +(not currently available) + </ul> +</ul> +<b>Warning:</b> These have been compiled with the following font paths:<br> +<blockquote> +DEFAULT_FONT_PATH=/usr/local/lib/tex/fonts/pk<br> +DEFAULT_SUBDIR_PATH=/usr/local/lib/tex/fonts/**<br> +DEFAULT_VF_PATH=/usr/local/lib/tex/fonts/vf +</blockquote> +If your fonts reside in a different location, you either need to install a +symbolic link, e.g.<br> +<blockquote> +ln -s /some/font/directory /usr/local/lib/tex/fonts/pk +</blockquote> +or set the environment variables, e.g.<br> +<blockquote> +setenv XDVIFONTS /some/font/directory +</blockquote> +(The environment variables corresponding to the other two above precompiled +options are TEXFONTS_SUBDIR and XDVIVFS ) +<p> +If all else fails, return to the <a href="../#xhdvisource">xhdvi source</a> +<p> +<h3>Return to <a href="../">HyperTeX</a></h3> +</body> diff --git a/support/hypertex/hypertex/binaries/xhdvi_iris_5.2/Makefile b/support/hypertex/hypertex/binaries/xhdvi_iris_5.2/Makefile new file mode 100644 index 0000000000..bad00d8ea1 --- /dev/null +++ b/support/hypertex/hypertex/binaries/xhdvi_iris_5.2/Makefile @@ -0,0 +1,74 @@ +# +# Makefile for dvi previewer. +# +# +DEFAULT_FONT_PATH=/usr/local/lib/tex/fonts/pk +DEFAULT_SUBDIR_PATH=/usr/local/lib/tex/fonts/** +DEFAULT_VF_PATH=/usr/local/lib/tex/fonts/vf +DEFAULT_FONT_SIZES=150:240:300:328.6:360:432:450:518:622:746 +DEFS=-DUSE_PK -DMSBITFIRST -DBMSHORT -DHAVE_GETWD -DSYSV -DBUTTONS -DSEARCH_SUBDIRECTORIES # -DGREY +### -DBUTTONS -DSEARCH_SUBDIRECTORIES +FONTDEFINES=-DDEFAULT_FONT_PATH=\"$(DEFAULT_FONT_PATH)\" \ + -DDEFAULT_VF_PATH=\"$(DEFAULT_VF_PATH)\" \ + -DDEFAULT_FONT_SIZES=\"$(DEFAULT_FONT_SIZES)\" \ + -DDEFAULT_SUBDIR_PATH=\"$(DEFAULT_SUBDIR_PATH)\" +TOP=/usr/X11 +INCDIR=$(TOP)/include +LIBDIR=$(TOP)/lib +XMULIB=-lXmu +EXTENSIONLIB=-lXext +DESTDIR=/usr/local +BINDIR=$(DESTDIR)/bin +MANDIR=$(DESTDIR)/man +INCLUDES=-I$(INCDIR) +CFLAGS=-g $(INCLUDES) $(DEFS) +#CFLAGS=-O -g $(INCLUDES) $(DEFS) +LIBS=-L/usr/lib/X11 -lXaw $(XMULIB) -lXt $(EXTENSIONLIB) -lX11 -lm +#LIBS=-L$(LIBDIR) -lX11 -lm +LDFLAGS= +SRCS=xhdvi.c dvi_init.c dvi_draw.c fontfmts.c vf.c util.c font_open.c tpic.c\ + hypertex.c +OBJS=xhdvi.o dvi_init.o dvi_draw.o fontfmts.o vf.o util.o font_open.o tpic.o\ + hypertex.o +CC=gcc +LINT=lint +# LINT=$(CC) -c -Wall -Wshadow -Wpointer-arith +# also maybe -Wcast-qual -Wwrite-strings +RM=rm -f + +.c.o: + $(CC) -c $(CFLAGS) $*.c + +xhdvi: $(OBJS) + $(CC) $(CFLAGS) -o xhdvi $(OBJS) $(LIBS) + chmod go+rx xhdvi + +xhdvi.o: xhdvi.h patchlevel.h xhdvi.icon +dvi_init.o:xhdvi.h dvi.h +dvi_draw.o:xhdvi.h dvi.h +tpic.o: xhdvi.h +fontfmts.o: xhdvi.h pk.c gf.c pxl.c +util.o: xhdvi.h + +font_open.o: font_open.c xhdvi.h + $(CC) -c $(CFLAGS) $(FONTDEFINES) font_open.c + +xhdvi.man: xhdvi_man.sed mksedscript + chmod u+x mksedscript + ./mksedscript $(DEFAULT_FONT_PATH) $(DEFAULT_FONT_SIZES) \ + ""$(DEFAULT_VF_PATH) $(DEFS) > sedscript + sed -f sedscript < xhdvi_man.sed > xhdvi.man + +install: xhdvi xhdvi.man + install -c -s -m 755 xhdvi $(BINDIR) + install -c -m 644 xhdvi.man $(MANDIR)/man1/xhdvi.1 + install -c -m 644 XHdvi.app-default /usr/lib/X11/app-defaults/XHdvi + +tar: + tar cvf xhdvi.tar *.c *.h Makefile ChangeLog TODO XHdvi.* *.icon *sed* + +clean: + $(RM) *.o *.BAK *.CKP sedscript xhdvi.man xhdvi a.out core errs *~ + +lint: + $(LINT) $(INCLUDES) $(DEFS) $(FONTDEFINES) $(SRCS) -lm diff --git a/support/hypertex/hypertex/binaries/xhdvi_iris_5.2/Makefile2 b/support/hypertex/hypertex/binaries/xhdvi_iris_5.2/Makefile2 new file mode 100644 index 0000000000..bad00d8ea1 --- /dev/null +++ b/support/hypertex/hypertex/binaries/xhdvi_iris_5.2/Makefile2 @@ -0,0 +1,74 @@ +# +# Makefile for dvi previewer. +# +# +DEFAULT_FONT_PATH=/usr/local/lib/tex/fonts/pk +DEFAULT_SUBDIR_PATH=/usr/local/lib/tex/fonts/** +DEFAULT_VF_PATH=/usr/local/lib/tex/fonts/vf +DEFAULT_FONT_SIZES=150:240:300:328.6:360:432:450:518:622:746 +DEFS=-DUSE_PK -DMSBITFIRST -DBMSHORT -DHAVE_GETWD -DSYSV -DBUTTONS -DSEARCH_SUBDIRECTORIES # -DGREY +### -DBUTTONS -DSEARCH_SUBDIRECTORIES +FONTDEFINES=-DDEFAULT_FONT_PATH=\"$(DEFAULT_FONT_PATH)\" \ + -DDEFAULT_VF_PATH=\"$(DEFAULT_VF_PATH)\" \ + -DDEFAULT_FONT_SIZES=\"$(DEFAULT_FONT_SIZES)\" \ + -DDEFAULT_SUBDIR_PATH=\"$(DEFAULT_SUBDIR_PATH)\" +TOP=/usr/X11 +INCDIR=$(TOP)/include +LIBDIR=$(TOP)/lib +XMULIB=-lXmu +EXTENSIONLIB=-lXext +DESTDIR=/usr/local +BINDIR=$(DESTDIR)/bin +MANDIR=$(DESTDIR)/man +INCLUDES=-I$(INCDIR) +CFLAGS=-g $(INCLUDES) $(DEFS) +#CFLAGS=-O -g $(INCLUDES) $(DEFS) +LIBS=-L/usr/lib/X11 -lXaw $(XMULIB) -lXt $(EXTENSIONLIB) -lX11 -lm +#LIBS=-L$(LIBDIR) -lX11 -lm +LDFLAGS= +SRCS=xhdvi.c dvi_init.c dvi_draw.c fontfmts.c vf.c util.c font_open.c tpic.c\ + hypertex.c +OBJS=xhdvi.o dvi_init.o dvi_draw.o fontfmts.o vf.o util.o font_open.o tpic.o\ + hypertex.o +CC=gcc +LINT=lint +# LINT=$(CC) -c -Wall -Wshadow -Wpointer-arith +# also maybe -Wcast-qual -Wwrite-strings +RM=rm -f + +.c.o: + $(CC) -c $(CFLAGS) $*.c + +xhdvi: $(OBJS) + $(CC) $(CFLAGS) -o xhdvi $(OBJS) $(LIBS) + chmod go+rx xhdvi + +xhdvi.o: xhdvi.h patchlevel.h xhdvi.icon +dvi_init.o:xhdvi.h dvi.h +dvi_draw.o:xhdvi.h dvi.h +tpic.o: xhdvi.h +fontfmts.o: xhdvi.h pk.c gf.c pxl.c +util.o: xhdvi.h + +font_open.o: font_open.c xhdvi.h + $(CC) -c $(CFLAGS) $(FONTDEFINES) font_open.c + +xhdvi.man: xhdvi_man.sed mksedscript + chmod u+x mksedscript + ./mksedscript $(DEFAULT_FONT_PATH) $(DEFAULT_FONT_SIZES) \ + ""$(DEFAULT_VF_PATH) $(DEFS) > sedscript + sed -f sedscript < xhdvi_man.sed > xhdvi.man + +install: xhdvi xhdvi.man + install -c -s -m 755 xhdvi $(BINDIR) + install -c -m 644 xhdvi.man $(MANDIR)/man1/xhdvi.1 + install -c -m 644 XHdvi.app-default /usr/lib/X11/app-defaults/XHdvi + +tar: + tar cvf xhdvi.tar *.c *.h Makefile ChangeLog TODO XHdvi.* *.icon *sed* + +clean: + $(RM) *.o *.BAK *.CKP sedscript xhdvi.man xhdvi a.out core errs *~ + +lint: + $(LINT) $(INCLUDES) $(DEFS) $(FONTDEFINES) $(SRCS) -lm diff --git a/support/hypertex/hypertex/binaries/xhdvi_iris_5.2/xhdvi b/support/hypertex/hypertex/binaries/xhdvi_iris_5.2/xhdvi Binary files differnew file mode 100644 index 0000000000..9e70e488fa --- /dev/null +++ b/support/hypertex/hypertex/binaries/xhdvi_iris_5.2/xhdvi diff --git a/support/hypertex/hypertex/binaries/xhdvi_iris_5.2/xhdvi.old b/support/hypertex/hypertex/binaries/xhdvi_iris_5.2/xhdvi.old Binary files differnew file mode 100644 index 0000000000..5f24290982 --- /dev/null +++ b/support/hypertex/hypertex/binaries/xhdvi_iris_5.2/xhdvi.old diff --git a/support/hypertex/hypertex/bugs.html b/support/hypertex/hypertex/bugs.html new file mode 100644 index 0000000000..907476f667 --- /dev/null +++ b/support/hypertex/hypertex/bugs.html @@ -0,0 +1,28 @@ +<head><title>ToBeDone</title></head> +<body> +<h1>ToBeDone</h1> +(this page under construction) +<p> +There are still known bugs and enhancements needed in the above dvi +previewers. +<ul> +<li>Neither handles hot text with intervening line/page breaks properly +(though this never happened in any of the automated examples, since the +hot text is typically quite short, e.g. equation, ref, or section number.) +<li>neither xhdvi nor TeXview allows a full set of in-lines as in www, e.g. +.gif, .jpg, .xbm, ...). +<li>TeXview needs to maintain a full history of followed links (so that one can +backtrack arbitrarily, not just one back as currently), +<li> and also needs some way of +examining links before following them (as in www clients). +<li>xhdvi needs to implement multiple windows -- at the moment it +is necessary to spawn multiple copies of the app (just as multiple copies +of xv are spawned under X, here at least the virtual memory used is only +1/10 the size) +<li>relative url's remain a problem for both clients (see www page) until the +"<a href="http://info.cern.ch/hypertext/WWW/Organization/Consortium/W3OSignature.html">WWW +consortium</a>" imposes a standard for the next generation of www +clients to give us more sophisticated in/out messaging to the html +transport object (as separated from the html viewing capability). +</ul> +</body> diff --git a/support/hypertex/hypertex/dospecial.c b/support/hypertex/hypertex/dospecial.c new file mode 100644 index 0000000000..5293a22431 --- /dev/null +++ b/support/hypertex/hypertex/dospecial.c @@ -0,0 +1,689 @@ +Date: Thu, 4 Aug 1994 17:23:12 -0400 (EDT) +From: GOLDEN@huhept.harvard.edu +To: ginsparg@qfwfq.lanl.gov +Cc: GOLDEN@huhept.harvard.edu +Subject: P.S. + +If you post that on xxx, be sure to tell people that the new version of dvips +may not work with the old version (as of 5.491) of tex.pro. (I found out the +hard way that the old version of dvips doesn't work with the new tex.pro.) +They really should do a full install. +------------------------------------------------------- + +From: HUHEPL::GOLDEN 3-AUG-1994 17:41:35.70 +To: SMTP%"rokicki@cs.stanford.edu" +CC: GOLDEN +Subj: html specials in dvips + +I have made a modification to dospecial.c in dvips so that it now ignores the +"html:" special. This is a new \special command that is used to create +hypertext links in TeX documents. The present version, 5.55 or earlier, +produce errors when such specials come up. I would like this to be included in +a new version of dvips. + +The file below is the modified version. + + - Mitch Golden + golden@physics.harvard.edu +---------------------------------------------------------------------------- +/* + * This routine handles special commands; + * predospecial() is for the prescan, dospecial() for the real thing. + */ +#include "dvips.h" /* The copyright notice in that file is included too! */ + +#include <ctype.h> +extern int atoi(); +extern void fil2ps(); +extern FILE *search(); +extern int system(); +/* + * These are the external routines called: + */ +/**/ +#ifdef TPIC +/* + * Fri Mar 9 1990 jourdan@minos.inria.fr (MJ) + * Upgraded to accommodate tpic release 2.0 extended output language. + * Should prove upward compatible! + */ +/* + * Wed Aug 3 1994 golden@physics.harvard.edu (MG) + * Now ignores html: specials, for use with hypertex files + */ +extern void setPenSize(); +extern void flushPath(); +extern void flushDashed(); +extern void flushDashed(); +extern void addPath(); +extern void arc(); +extern void flushSpline(); +extern void shadeLast(); +extern void whitenLast(); +extern void blackenLast(); +extern void SetShade() ; +#endif +extern shalfword dvibyte() ; +extern int add_header() ; +extern void hvpos() ; +extern void figcopyfile() ; +extern void nlcmdout() ; +extern void cmdout() ; +extern void numout() ; +extern void scout() ; +extern void stringend() ; +extern void error() ; +extern void psflush() ; +extern void emspecial() ; +/* IBM: color - begin */ +extern void pushcolor() ; +extern void popcolor() ; +extern void resetcolorstack() ; +extern void background() ; +/* IBM: color - end */ +extern char errbuf[] ; +extern shalfword linepos; +extern Boolean usesspecial ; +extern Boolean usescolor ; /* IBM: color */ +extern int landscape ; +extern char *paperfmt ; +extern char *nextstring; +extern char *maxstring; +extern char *oname; +extern FILE *bitfile; +extern int quiet; +extern fontdesctype *curfnt ; +extern int actualdpi ; +extern int vactualdpi ; +extern integer hh, vv; +extern int lastfont ; +extern real conv ; +extern real vconv ; +extern integer hpapersize, vpapersize ; +extern Boolean pprescan ; +extern char *figpath ; +extern int prettycolumn ; +extern Boolean disablecomments ; + +#ifdef DEBUG +extern integer debug_flag; +#endif +extern void scanfontcomments() ; +extern void handlepapersize() ; + +static int specialerrors = 20 ; + +struct bangspecial { + struct bangspecial *next ; + char actualstuff[1] ; /* more space will actually be allocated */ +} *bangspecials = NULL ; + +void specerror(s) +char *s ; +{ + if (specialerrors > 0) { + error(s) ; + specialerrors-- ; + } else if (specialerrors == 0) { + error("more errors in special, being ignored . . .") ; + specialerrors-- ; + } +} + +static void trytobreakout(p) +register char *p ; +{ + register int i ; + register int instring = 0 ; + int lastc = 0 ; + + i = 0 ; + (void)putc('\n', bitfile) ; + while (*p) { + if (i > 65 && *p == ' ' && instring == 0) { + (void)putc('\n', bitfile) ; + i = 0 ; + } else { + (void)putc(*p, bitfile) ; + i++ ; + } + if (*p == '(' && lastc != '\\') + instring = 1 ; + else if (*p == ')' && lastc != '\\') + instring = 0 ; + lastc = *p ; + p++ ; + } + (void)putc('\n', bitfile) ; +} + +static void dobs(q) +register struct bangspecial *q ; +{ + if (q) { + dobs(q->next) ; + trytobreakout(q->actualstuff) ; + } +} + +void +outbangspecials() { + if (bangspecials) { + cmdout("TeXDict") ; + cmdout("begin") ; + cmdout("@defspecial\n") ; + dobs(bangspecials) ; + cmdout("\n@fedspecial") ; + cmdout("end") ; + } +} + +/* We recommend that new specials be handled by the following general + * (and extensible) scheme, in which the user specifies one or more + * `key=value' pairs separated by spaces. + * The known keys are given in KeyTab; they take values + * of one of the following types: + * + * None: no value, just a keyword (in which case the = sign is omitted) + * String: the value should be "<string without double-quotes" + * or '<string without single-quotes' + * Integer: the value should be a decimal integer (%d format) + * Number: the value should be a decimal integer or real (%f format) + * Dimension: like Number, but will be multiplied by the scaledsize + * of the current font and converted to default PostScript units + * (Actually, strings are allowed in all cases; the delimiting quotes + * are simply stripped off if present.) + * + */ + +typedef enum {None, String, Integer, Number, Dimension} ValTyp; +typedef struct { + char *Entry; + ValTyp Type; +} KeyDesc; + +#define NKEYS (sizeof(KeyTab)/sizeof(KeyTab[0])) + +KeyDesc KeyTab[] = {{"psfile", String}, /* j==0 in the routine below */ + {"ifffile", String}, /* j==1 */ + {"tekfile", String}, /* j==2 */ + {"hsize", Number}, + {"vsize", Number}, + {"hoffset", Number}, + {"voffset", Number}, + {"hscale", Number}, + {"vscale", Number}, + {"angle", Number}, + {"llx", Number}, + {"lly", Number}, + {"urx", Number}, + {"ury", Number}, + {"rwi", Number}, + {"rhi", Number}, + {"clip", None}}; + +#ifdef VMS +#ifndef __GNUC__ /* GNUC tolower is too simple */ +#define Tolower tolower +#endif +#else +#ifdef VMCMS /* IBM: VM/CMS */ +#define Tolower __tolower +#else +#ifdef MVSXA /* IBM: MVS/XA */ +#define Tolower __tolower +#else +/* + * compare strings, ignore case + */ +char Tolower(c) +register char c ; +{ + if ('A' <= c && c <= 'Z') + return(c+32) ; + else + return(c) ; +} +#endif +#endif /* IBM: VM/CMS */ +#endif +int IsSame(a, b) +char *a, *b; +{ + for( ; *a != '\0'; ) { + if( Tolower(*a) != Tolower(*b) ) + return( 0 ); + a++ ; + b++ ; + } + return( *b == '\0' ); +} + +char *KeyStr, *ValStr ; /* Key and String values found */ +long ValInt ; /* Integer value found */ +float ValNum ; /* Number or Dimension value found */ + +char *GetKeyVal(str,tno) /* returns NULL if none found, else next scan point */ + char *str ; /* starting point for scan */ + int *tno ; /* table entry number of keyword, or -1 if keyword not found */ +{ + register char *s ; + register int i ; + register char t ; + + for (s=str; *s <= ' ' && *s; s++) ; /* skip over blanks */ + if (*s == '\0') + return (NULL) ; + KeyStr = s ; + while (*s>' ' && *s!='=') s++ ; + if (0 != (t = *s)) + *s++ = 0 ; + + for(i=0; i<NKEYS; i++) + if( IsSame(KeyStr, KeyTab[i].Entry) ) + goto found ; + *tno = -1; + return (s) ; + +found: *tno = i ; + if (KeyTab[i].Type == None) + return (s) ; + + if (t && t <= ' ') { + for (; *s <= ' ' && *s; s++) ; /* now look for the value part */ + if ((t = *s)=='=') + s++ ; + } + ValStr = "" ; + if ( t == '=' ) { + while (*s <= ' ' && *s) + s++ ; + if (*s=='\'' || *s=='\"') + t = *s++ ; /* get string delimiter */ + else t = ' ' ; + ValStr = s ; + while (*s!=t && *s) + s++ ; + if (*s) + *s++ = 0 ; + } + switch (KeyTab[i].Type) { + case Integer: + if(sscanf(ValStr,"%ld",&ValInt)!=1) { + sprintf(errbuf,"Non-integer value (%s) given for keyword %s", + ValStr, KeyStr) ; + specerror(errbuf) ; + ValInt = 0 ; + } + break ; + case Number: + case Dimension: + if(sscanf(ValStr,"%f",&ValNum)!=1) { + sprintf(errbuf,"Non-numeric value (%s) given for keyword %s", + ValStr, KeyStr) ; + specerror(errbuf) ; + ValNum = 0.0 ; + } + if (KeyTab[i].Type==Dimension) { + if (curfnt==NULL) + error("! No font selected") ; + ValNum = ValNum * ((double)curfnt->scaledsize) * conv * 72 / DPI ; + } + break ; + default: break ; + } + return (s) ; +} + +/* + * Now our routines. We get the number of bytes specified and place them + * into the string buffer, and then parse it. Numerous conventions are + * supported here for historical reasons. + */ + +void predospecial(numbytes, scanning) +integer numbytes ; +Boolean scanning ; +{ + register char *p = nextstring ; + register int i = 0 ; + int j ; + + if (nextstring + numbytes > maxstring) + error("! out of string space in predospecial") ; + for (i=numbytes; i>0; i--) +#ifdef VMCMS /* IBM: VM/CMS */ + *p++ = ascii2ebcdic[(char)dvibyte()] ; +#else +#ifdef MVSXA /* IBM: MVS/XA */ + *p++ = ascii2ebcdic[(char)dvibyte()] ; +#else + *p++ = (char)dvibyte() ; +#endif /* IBM: VM/CMS */ +#endif + if (pprescan) + return ; + while (p[-1] <= ' ' && p > nextstring) + p-- ; /* trim trailing blanks */ + if (p==nextstring) return ; /* all blank is no-op */ + *p = 0 ; + p = nextstring ; + while (*p <= ' ') + p++ ; +#ifdef DEBUG + if (dd(D_SPECIAL)) + (void)fprintf(stderr, "Preprocessing special: %s\n", p) ; +#endif + +/* + * We use strncmp() here to also pass things like landscape() + * or landscape: or such. + */ + + if (strncmp(p, "landscape", 9)==0) { + if (hpapersize || vpapersize) + error( + "both landscape and papersize specified: ignoring landscape") ; + else + landscape = 1 ; + return ; + } else if (strncmp(p, "papersize", 9)==0) { + p += 9 ; + while (*p == '=' || *p == ' ') + p++ ; + if (hpapersize == 0 || vpapersize == 0) { + if (landscape) { + error( + "both landscape and papersize specified: ignoring landscape") ; + landscape = 0 ; + } + handlepapersize(p, &hpapersize, &vpapersize) ; + } + return ; + } + if (strncmp(p, "xtex:", 5)==0) return ; + /* Don't do anything with html specials - MG 8/3/94 */ + if (strncmp(p, "html:", 5)==0) return ; + usesspecial = 1 ; /* now the special prolog will be sent */ + if (strncmp(p, "header", 6)==0) { + char *q ; + p += 6 ; + while ((*p <= ' ' || *p == '=' || *p == '(') && *p != 0) + p++ ; + q = p ; /* we will remove enclosing parentheses */ + p = p + strlen(p) - 1 ; + while ((*p <= ' ' || *p == ')') && p >= q) + p-- ; + p[1] = 0 ; + if (p >= q) + (void)add_header(q) ; + } +/* IBM: color - added section here for color header and color history */ + if (strncmp(p, "background", 10) == 0) { + usescolor = 1 ; + p +=11 ; + while ( *p <= ' ' ) p++ ; + background(p) ; + } + if (strncmp(p, "color", 5) == 0) { + usescolor = 1 ; + p += 6 ; + while ( *p <= ' ' ) p++ ; + if (strncmp(p, "push", 4) == 0 ) { + p += 5 ; + while ( *p <= ' ' ) p++ ; + pushcolor(p, 0) ; + } else if (strncmp(p, "pop", 3) == 0 ) { + popcolor(0) ; + } else { + resetcolorstack(p,0) ; + } + } /* IBM: color - end changes */ + else if (*p == '!') { + register struct bangspecial *q ; + p++ ; + q = (struct bangspecial *)mymalloc((integer) + (sizeof(struct bangspecial) + strlen(p))) ; + (void)strcpy(q->actualstuff, p) ; + q->next = bangspecials ; + bangspecials = q ; + } else if (scanning && *p != '"' && + (p=GetKeyVal(p, &j)) != NULL && j==0) + scanfontcomments(ValStr) ; +} + +int maccess(s) +char *s ; +{ + FILE *f = search(figpath, s, "r") ; + if (f) + fclose(f) ; + return (f != 0) ; +} + +char *tasks[] = { 0, "iff2ps", "tek2ps" } ; + +static char psfile[511] ; +void dospecial(numbytes) +integer numbytes ; +{ + register char *p = nextstring ; + register int i = 0 ; + int j, systemtype = 0 ; + register char *q ; + Boolean psfilewanted = 1 ; + char *task = 0 ; + char cmdbuf[111] ; + + if (nextstring + i > maxstring) + error("! out of string space in dospecial") ; + for (i=numbytes; i>0; i--) +#ifdef VMCMS /* IBM: VM/CMS */ + *p++ = ascii2ebcdic[(char)dvibyte()] ; +#else +#ifdef MVSXA /* IBM: MVS/XA */ + *p++ = ascii2ebcdic[(char)dvibyte()] ; +#else + *p++ = (char)dvibyte() ; +#endif /* IBM: VM/CMS */ +#endif + while (p[-1] <= ' ' && p > nextstring) + p-- ; /* trim trailing blanks */ + if (p==nextstring) return ; /* all blank is no-op */ + *p = 0 ; + p = nextstring ; + while (*p <= ' ') + p++ ; +#ifdef DEBUG + if (dd(D_SPECIAL)) + (void)fprintf(stderr, "Processing special: %s\n", p) ; +#endif + + if (strncmp(p, "em:", 3)==0) { /* emTeX specials in emspecial.c */ + emspecial(p); + return; + } + + if (strncmp(p, "ps:", 3)==0) { + psflush() ; /* now anything can happen. */ + if (p[3]==':') { + if (strncmp(p+4, "[begin]", 7) == 0) { + hvpos() ; + trytobreakout(&p[11]); + } else if (strncmp(p+4, "[end]", 5) == 0) + trytobreakout(&p[9]); + else trytobreakout(&p[4]); + } else if (strncmp(p+3, " plotfile ", 10) == 0) { + char *sfp ; + hvpos() ; + p += 13; + /* + * Fixed to allow popen input for plotfile + * TJD 10/20/91 + */ + while (*p == ' ') p++; + if (*p == '"') { + p++; + for (sfp = p; *sfp && *sfp != '"'; sfp++) ; + } else { + for (sfp = p; *sfp && *sfp != ' '; sfp++) ; + } + *sfp = '\0'; + if (*p == '`') + figcopyfile(p+1, 1); + else + figcopyfile (p, 0); + /* End TJD changes */ + } else { + hvpos() ; + trytobreakout(&p[3]); + psflush() ; + hvpos() ; + } + return; + } + if (strncmp(p, "landscape", 9)==0 || strncmp(p, "header", 6)==0 || + strncmp(p, "html:", 5)==0 || /* Ignore! - MG 8/3/94 */ + strncmp(p, "papersize", 9)==0 || *p=='!') + return ; /* already handled in prescan */ +/* IBM: color - begin changes */ + if ( strncmp(p, "background", 10) == 0 ) + return ; /* already handled in prescan */ + if (strncmp(p, "color", 5) == 0) { + p += 6 ; + while ( *p <= ' ' ) p++ ; + if (strncmp(p, "push", 4) == 0 ) { + p += 4 ; + while ( *p <= ' ' ) p++ ; + pushcolor(p,1); + } else if (strncmp(p, "pop", 3) == 0 ) { + popcolor(1) ; + } else { + resetcolorstack(p,1) ; + } + return ; + } /* IBM: color - end changes*/ +#ifdef TPIC +/* ordered as in tpic 2.0 documentation for ease of cross-referencing */ + if (strncmp(p, "pn ", 3) == 0) {setPenSize(p+2); return;} + if (strncmp(p, "pa ", 3) == 0) {addPath(p+2); return;} + if (strcmp(p, "fp") == 0) {flushPath(0); return;} + if (strcmp(p, "ip") == 0) {flushPath(1); return;} /* tpic 2.0 */ + if (strncmp(p, "da ", 3) == 0) {flushDashed(p+2, 0); return;} + if (strncmp(p, "dt ", 3) == 0) {flushDashed(p+2, 1); return;} + if (strcmp(p, "sp") == 0) {flushSpline(p+2); return;} /* tpic 2.0 */ + if (strncmp(p, "sp ", 3) == 0) {flushSpline(p+3); return;} /* tpic 2.0 */ + if (strncmp(p, "ar ", 3) == 0) {arc(p+2, 0); return;} /* tpic 2.0 */ + if (strncmp(p, "ia ", 3) == 0) {arc(p+2, 1); return;} /* tpic 2.0 */ + if (strcmp(p, "sh") == 0) {shadeLast(p+2); return;} /* tpic 2.0 */ + if (strncmp(p, "sh ", 3) == 0) {shadeLast(p+3); return;} /* tpic 2.0 */ + if (strcmp(p, "wh") == 0) {whitenLast(); return;} + if (strcmp(p, "bk") == 0) {blackenLast(); return;} + if (strncmp(p, "tx ", 3) == 0) {SetShade(p+3); return;} +#endif + if (*p == '"') { + hvpos() ; + cmdout("@beginspecial") ; + cmdout("@setspecial") ; + trytobreakout(p+1) ; + cmdout("\n@endspecial") ; + return ; + } + +/* At last we get to the key/value conventions */ + psfile[0] = '\0'; + hvpos(); + cmdout("@beginspecial"); + + while( (p=GetKeyVal(p,&j)) != NULL ) + switch (j) { + case -1: /* for compatability with old conventions, we allow a file name + * to be given without the 'psfile=' keyword */ + if (!psfile[0] && maccess(KeyStr)==0) /* yes we can read it */ + (void)strcpy(psfile,KeyStr) ; + else { + sprintf(errbuf, "Unknown keyword (%s) in \\special will be ignored", + KeyStr) ; + specerror(errbuf) ; + } + break ; + case 0: case 1: case 2: /* psfile */ + if (psfile[0]) { + sprintf(errbuf, "More than one \\special %s given; %s ignored", + "psfile", ValStr) ; + specerror(errbuf) ; + } + else (void)strcpy(psfile,ValStr) ; + task = tasks[j] ; + break ; + default: /* most keywords are output as PostScript procedure calls */ + if (KeyTab[j].Type == Integer) + numout((integer)ValInt); + else if (KeyTab[j].Type == String) + for (q=ValStr; *q; q++) + scout(*q) ; + else if (KeyTab[j].Type == None) ; + else { /* Number or Dimension */ + ValInt = (integer)(ValNum<0? ValNum-0.5 : ValNum+0.5) ; + if (ValInt-ValNum < 0.001 && ValInt-ValNum > -0.001) + numout((integer)ValInt) ; + else { + (void)sprintf(cmdbuf, "%f", ValNum) ; + cmdout(cmdbuf) ; + } + } + (void)sprintf(cmdbuf, "@%s", KeyStr); + cmdout(cmdbuf) ; + } + + cmdout("@setspecial"); + + if(psfile[0]) { + if (task == 0) { + systemtype = (psfile[0]=='`') ; + figcopyfile(psfile+systemtype, systemtype); + } else { + fil2ps(task, psfile) ; + } + } else if (psfilewanted) + specerror("No \\special psfile was given; figure will be blank") ; + + cmdout("@endspecial"); +} + +extern char realnameoffile[] ; +extern char *pictpath ; + +void fil2ps(task, iname) +char *task, *iname ; +{ + char cmd[400] ; + FILE *f ; + if (0 != (f=search(pictpath, iname, "r"))) { + fclose(f) ; + } else { + fprintf(stderr, " couldn't open %s\n", iname) ; + return ; + } + if (!quiet) { + fprintf(stderr, " [%s", realnameoffile) ; + fflush(stderr) ; + } + if (oname && oname[0] && oname[0] != '-') { + putc(10, bitfile) ; + fclose(bitfile) ; + sprintf(cmd, "%s -f %s %s", task, realnameoffile, oname) ; + system(cmd) ; + if ((bitfile=fopen(oname, "a"))==NULL) + error("! couldn't reopen PostScript file") ; + linepos = 0 ; + } else { + sprintf(cmd, "%s -f %s", task, realnameoffile) ; + system(cmd) ; + } + if (!quiet) + fprintf(stderr, "]") ; +} + + + diff --git a/support/hypertex/hypertex/hharvsamp.dvi b/support/hypertex/hypertex/hharvsamp.dvi Binary files differnew file mode 100644 index 0000000000..a697862bfe --- /dev/null +++ b/support/hypertex/hypertex/hharvsamp.dvi diff --git a/support/hypertex/hypertex/hharvsamp.tex b/support/hypertex/hypertex/hharvsamp.tex new file mode 100644 index 0000000000..f61436faa2 --- /dev/null +++ b/support/hypertex/hypertex/hharvsamp.tex @@ -0,0 +1,347 @@ +\input lanlmac +\def\href#1#2{\special{html:<a href="#1">}{#2}\special{html:</a>}} + +\Title{HUTP-91/A000}{This is the Template} + +%For more complicated situations, substitute for {\it either\/} argument: +%\Title{\vbox{\baselineskip12pt\hbox{HUTP-88/A000}\hbox{SLAC-PUB 88-001} +% \hbox{photocopy at own risk}}} +%{\vbox{\centerline{This title is too long to fit} +% \vskip2pt\centerline{comfortably on one line*}}} +% \footnote{}{*optional footnote on title} + +\centerline{Author One and Author Two\footnote{$^\dagger$} +{(author@huhepl.hepnet, \ @huhepl.bitnet, \ or \ @huhepl.harvard.edu)}} +\bigskip\centerline{Lyman Laboratory of Physics} +\centerline{Harvard University}\centerline{Cambridge, MA 02138} + +%if too many authors for abstract on same page, say \vfill\eject\pageno0 + +\vskip .3in +This modified version of the file harvsamp.tex shows the use +of the package lanlmac, which is a version of harvmac modified for use with +hyperdvi previewers. It shows how the ordinary harvmac macros can produce +automatic hyperlinks. +Here is a gratuitous network hyperlink to \href{http://xxx.lanl.gov/}{xxx}. + +This sample is produced by the file `sample.tex' in the directory +tex\$macros and is intended to exhibit the conventions used +in the file `harvmac.tex' also in this directory, as inputted above. +{\it (You do not need to copy {\rm tex\$macros:harvmac.tex} into your own +directory\/}, nor do you need to explicitly specify its directory as +long as there is no harvmac.tex in your default directory.) +The vskips, etc., on this title page have been chosen to give +a reasonable looking HUTP style preprint in either full-sized or reduced +format (selected by typing b or $\ell$ in response to the big/little query +from the macro). Note that the `Title' and `Date' macros should be used +together to choose fonts and horizontal size appropriately, suppress first +page number, etc., for `big' and `little' formats with title page. One may +most easily start a new paper by making a copy of this sample and then +replacing the dummy text with something potentially more interesting. It is +useful to read pp.~1--54, 127--201 of Knuth's {\it Texbook\/}. + +\Date{4/91} %replace this line by \draft for preliminary versions + %or specify \draftmode at some point + +%if you want double-space, use e.g. \baselineskip=20pt plus 2pt minus 2pt + +\listtoc\writetoc %(if desired, takes 2 passes) + +Here is another gratuitous network +hyperlink, this time to \href{http://xxx.lanl.gov/hypertex/}{xxx hypertex}, +again to check messaging to your www client. + +\newsec{Introduction} + +Sections are begun +\def\\#1 {{\tt\char'134#1} }% (defines \\ to single backslash in macro names) +using the macro \\newsec as above. For papers without separate sections, +leave out \\newsec and equations will automatically be numbered consecutively +(without section numbers). + +References are done using the macro \\ref as follows\ref +\rIi{John Q. Physicist, Phys. Rev. D20 (1980) 1234.}\ref\rIii{Author +One and Author Two, Nucl. Phys. B52 (1975) 439.}. +The labels on the references\rIi\ and \rIii\ (which include the brackets, +note the second backslash to provide a space) can then be used to refer +back to them\rIi. (note no extra backslash needed before period\rIii, or +before comma.) Here is how to put two papers in one reference\ref +\rAG{L. Alvarez-Gaum\'e and P. Ginsparg, ``The Structure of +Gauge and Gravitational Anomalies,'' Harvard preprint HUTP-84/A016, +to appear in Ann. Phys.\semi +L. Alvarez-Gaum\'e and P. Ginsparg, Nucl. Phys. B243 (1984) 449.}. +Note the use of the macro \\semi %(= ;\hfil\break) +to separate them (the macro \\nref can be used to suppress the immediate +appearance of the bracketed reference number in the text if desired\ref +\rSP{Seminal Paper.}% +\nref\rMIF{Moderately Interesting Follow-ups.}% +--\ref\rCUR{Completely Useless Ripoffs.}). The references are listed in the +file refs.tmp, and can be of arbitrary length. + +The macro \\foot is used for footnotes.\foot{like this} They also get +automatically numbered\foot{consecutively} throughout the paper. + +To do equations we use the macro \\eqn +% +\eqn\eIi{R^a{}_b=d\om ab+\om ac\wedge\om cb} +% +and +% +\eqn\eIii{\om a{{b,\mu}}\equiv e^a{}_\nu\grad\mu e_b{}^\nu= +-e_b{}^\nu\grad\mu e^a{}_\nu.} +% +The equations are then referred to (see \eIi\ or \eIii) using the +label (which includes the parentheses). In draftmode, the equation +labels appear in the right margin next to the equation. + +%To start in the middle of text, initialize for example with +%\pageno=5\secno=3\meqno=2\startrefs{24}%\draftmode + +\newsec{Body} + +Ordinarily one uses equations with internal eqaligns: +% +\eqn\eIIx{\eqalign{&d=2+2=4\cr +&d=2\times 2=4.\cr}} +% +(How could Nature fail to avail herself of such a fine opportunity to base +herself on the remarkable numerical coincidence embodied in eqn.~\eIIx?) +To specify equation numbers in aligned equations and/or equations +specified with a's, b's, etc., just tag the equation numbers first +using the macro \\eqnn or \\eqna and then use \\eqalignno +\eqna\eIIi %(only for equation labels with a,b type argument) +\eqnn\eIIii +% +$$\eqalignno{\left(\int_{-\infty}^\infty e^{-x^2}\,dx\right)^2 +&={\rm something}&\eIIi a\cr +&={\rm something\ else}\cr +&=\pi&\eIIi b\cr +&=2\pi/2.&\eIIii\cr}$$ +% +We can then easily refer back to \eIIii\ or \eIIi{a}\ or \eIIi{a,b}\ +or even \eIIi{a\hbox{--}c}\ (\\eqna defines a label which takes an argument +$\{a,b,\ldots\}$ when used to refer back; it could be used instead of +\\eqnn if one remembers to type $\{\}$ after the label when referring +back, e.g., \eIIi{}\ ). (Note also that \\nref and \\eqnn can always be +used to simulate macro packages that require a separate macro to define +labels in advance of using them.) + +To list the references, use the macro \\listrefs as at the end of +this file\foot{In draftmode reference labels appear in left margin +next to reference.}. + +\newsec{Conclusion} + +\seclab\sconcl % (defines a section label for later use) +To call Tex on a source file filename.tex, issue the command +$$\hbox{\$ tex filename}$$ +which creates a file filename.dvi (and also a filename.log file). +The macro package will ask you whether you want ``big'' +output, ordinary typewritten pages, or ``little,'' reduced two-column pages +suitable for preprinting. +(Default is for postscript laserprinters. In order to print out in +reduced format on qms printer at HEPL, you need to specify \\qms +after inputting the macros.) + +\subsec{At Lyman} + +After eliminating any tex errors in your manuscript, issue the command +% +$$\hbox{\$ lw filename}$$ +% +to convert the .dvi file to a postscript file that is then automatically +sent to the lyman laserwriter. +(To process only selected portions of a .dvi file, +type instead \ \$ dvips filename --- then type i for interactive [or +? for help at any time]. +\$ lw filename.ps with explicit .ps extension then sends the .ps +file to the Lyman laserwriter.) + +\subsec{At HEPL} + +\subseclab\shepl % (defines a subsection label for later use) +(at hepl, use instead +% +$$\hbox{\$ qmstex filename}$$ +% +to convert the .dvi file to a .qms file that is then automatically +sent to the hepl laserprinter). Before logging off, it is +probably preferable to get rid of any .ps, .dvi, .qms, and .log files. + + +\bigbreak\bigskip\bigskip\centerline{{\bf Acknowledgements}}\nobreak +This work was supported in part by various colleagues. We also thank +NSF contract PHY-82-15249 for discussions. + +\appendix{A}{} + +Everything same as before, now equations appear as (A.1), etc. +Appendix A has no title. + +\appendix{B}{Enhancements added, 11/88} + +For fancier treatment of multiple references, say \refs{\rSP{--}\rCUR}, +\refs{\rIii,\rSP}, or even \refs{\rIi,\rIii,\rAG{--}\rCUR}. (The arguments +have to be previously defined references, so use \\nref before for any +first occurrences.) To strip off the brackets from a single reference for +some reason, use \\xref to give \xref\rIi\ instead of \rIi. + +To refer to equations (or references) that occur much later in the +paper, add \\writedefs after inputting macros. +This redefines the equation and reference macros so they write all the +label definitions to a file labeldefs.tmp. Then tex a second time with a +line inputting this file. To start from the middle of a paper, tex +the first part with \\writedefs and \\writestop %i.e. \writedefs\writestop +(the latter adds to labeldefs a line with the pagenumber, section number, +etc., at the point \\listrefs was called). Inputting labeldefs.tmp then +starts the continuation where the previous left off, and allows referring +to any of the previously defined reference and equation labels. + +The subsection option in section 3 above is also new. + +Another macro, \\footend, redefines \\foot so that it writes the footnotes +in a file foots.tmp, which is then automatically called in by \\listrefs +before the references. For journals that prefer the footnotes at the +end, one can thus add \\footend after inputting harvmac, +with no other changes necessary. + +A new macro \\fig (also \\nfig, \\figs, \\xfig) works for figures just +as does \\ref. The label is defined to include the abbreviation fig. +For papers with thousands of figures, the macro +\fig\flabel{This is the figure caption}. This works exactly as does +\ref\rlabel{For a compendium of references missing here, see M. Green, +J. Schwarz, and E. Witten, {\it Superstring theory\/}, Vols. I,II, +Cambridge Univ. Press (1987).}, with the label defined to include the +abbreviation `fig.~'. The macro \\nfig suppresses immediate appearance of +`fig.~x', \nfig\flabi{second dummy figure}\nfig\flabii{third dummy figure}% +so that one can instead say, for example, \figs{\flabi,\flabii}\ +using the macro \\figs. %(here gives figs.~2,3) +\\xfig strips off the `fig.~' to leave just the figure number, +i.e.\ \xfig\flabel, if necessary for some reason. +The figure captions are written in a file figs.tmp that is called in by +saying \\listfigs after \\listrefs. +(Note that the formerly used macro \\figures need not be used if +\\fig is instead used in conjunction with \\listfigs.) + +% Instead of \listfigs, if \fig not used in text, after \listrefs say +% +%\figures % former version, still supported +%\fig{1}{This is the first figure caption.} +%\fig{2}{This is the second figure caption.} +%\fig{3}{Note that \\fig automatically types a colon and lines up the +%text properly.} +% +%\parindent=20pt + +\appendix{C}{Enhancements added, 6/89} +\applab\appC + +A macro \\seclab sets a label equal to the current section number, useful +for referring back to the section, e.g.\ as used in section \sconcl\ above +(also there's \\applab for appendices, as in see appendix~\appC). +Similarly, \\subseclab sets a label equal to the current +section.subsection, as in the definition of subsection \shepl\ in the ``at +HEPL'' subsection above (and \\subseclab as well works within subsections +of appendices). +(Using \\writedefs, these definitions will appear in labeldefs.tmp so can +be used as well to refer forward. In draftmode, the definitions appear in +the right margin.) + +A macro \\writetoc writes a file \\jobname.toc that contains section and +subsection numbers and headings with the pagenumbers on which they appear. +The macro \\listtoc writes the heading {\bf Contents} and inputs the file +(if it exists). +%(Note that the pagenumbers will not come out properly in ``little'' mode +% --- the easiest (and least elegant) way around this is to set +% \output={\plainoutput} (after harvmac input) to produce toc.tmp, +% then remove and tex again with \\listtoc to produce final .dvi file. + +\appendix{D}{Enhancements added, 1/91} + +A macro \\lref (same syntax as \\ref and \\nref) +\lref\reflabel{Another reference.} +defines the reflabel to be a macro that calls \\ref on itself. +This allows making a list of references via \\lref (in any order) at the +beginning of a file and only those used in the text will actually appear +(automatically listed in correct order of first appearance by \\listrefs). +(In principle \\lref can be used to compile a long standard reference file +to input, although this might eventually cause problems due to clogging up tex +memory with too many unused definitions.) + +\lref\riii{extra ref three.} +\lref\rii{extra ref two.} +\lref\ri{extra ref one.} +\\refs is defined to not display reference labels that appear in succession +(i.e.\ without intervening delimiter), so that e.g.\ \refs{\ri\rii{--}\riii} +can expand the middle reference \rii\ if it hasn't already appeared. +\\refs will also accept reflabels that are not previously defined so that it is +possible to tex preliminary versions without inputting full reference list +(For this mode, even individual refs, e.g.\ \refs{\reflabel}, need to be +called via \\refs.) + +The macro \\sequentialequations inserted at beginning causes +equations to be numbered sequentially (1)--(n) throughout paper +(rather than with section numbers (2.1)$\ldots$). + +\appendix{E}{Hypertex, 7/94 (hyperbasics.tex macros written by Tanmoy)} + +This modified version of the file harvsamp.tex shows the use +of the macropackage lanlmac, +which is a version of harvmac modified for use with +hyperdvi previewers (and ultimately pdf viewers, where pdf is Adobe's +modification of ps to incorporate a hyperlink overlay). +It shows how the ordinary harvmac macros can produce +automatic hyperlinks by appropriate use of the macros from the +underlying hyperbasics.tex. + +In addition to the automated linkages, +one can explicitly define a \hyperdef\mysymbol +{usersymbol}{1}{target} or link (e.g.\ \hyperref{}{appendix}{E}{to E}) +using the \\hyperdef and \\hyperref macros. +\goodbreak + +The \\hyperdef macro takes four parameters: +\item{\bf\#1} A macro name (label) which is defined so that + \\hyperref can refer back. +\item{\bf\#2} A category for the target: So as to not conflict with + predefined categories (page, reference, section, etc.), use a category + whose name starts with {\tt user}. +\item{\bf\#3} A unique name inside the category. +\item{\bf\#4} The text which is to be target of the link. + +\def\\#1 {{\tt\char'134#1}} +The above target was created using +{\tt \\hyperdef \\mysymbol $\{$usersymbol$\}\{1\}\{$target$\}$}. +So, one can point back to it from \hyperref\mysymbol{here} by invoking +{\tt \\hyperref \\mysymbol $\{$here$\}$}. + +A different use of \\hyperref \ is to refer to a target of +any category inside a dvi file. In such a use, it takes four arguments: + \item{\bf\#1} A file name. This parameter should be $\{\}$ to refer to + the current file. + \item{\bf\#2} A category name. So far the categories used are: {\tt section, + subsection, appendix, equation, footnote, reference, + figure, table, and page}. + Users can of course define additional categories. + \item{\bf\#3} A unique name inside the category. The attempt has been + to use the printed label as the unique name whenever + possible. + \item{\bf\#4} The text below the link. + +\noindent +Thus \hyperref{}{reference}{7}{this link} was generated using {\tt \\hyperref +$\{\}\{$reference$\}\{7\}\{$this link$\}$}. +\bigskip +Other macros defined are \\href \ (analogous to +html's $<$a href="URL"$>$text$<$/a$>$ +and useful for external URL's, e.g.\ +link to {\tt \\href $\{$http://xxx.lanl.gov/$\}\{$xxx$\}$} as used above +the \hyperref{}{section}{1}{introduction}), and +\\hname , which allows defining a custom +{\tt \\hname $\{$target$\}\{$some text$\}$} +(analogous to html's $<$a name="target"$>$some text$<$/a$>$ ). + + +\listrefs +\listfigs %(if necessary) +\bye diff --git a/support/hypertex/hypertex/hypertex.gif b/support/hypertex/hypertex/hypertex.gif Binary files differnew file mode 100644 index 0000000000..57811640ed --- /dev/null +++ b/support/hypertex/hypertex/hypertex.gif diff --git a/support/hypertex/hypertex/index.html b/support/hypertex/hypertex/index.html new file mode 100644 index 0000000000..b2ba8909ce --- /dev/null +++ b/support/hypertex/hypertex/index.html @@ -0,0 +1,345 @@ +<html><head><title>HyperTeX</title></head><body> +<h1><img src="hypertex.gif"> HyperTeX</h1> + +<ul> +<li><a href="#dvi">dvi Previewers</a> and +<a href="#hyperps">hyperPS</a> (11/94) +<li><a href="#pdf">Acrobat (.pdf)</a> +<li><a href="#more">Modified Macropackages</a> +<li><a href="#examples">Example .dvi files</a> +<li><a href="#external">External and relative URL's</a> +<li><a href="#added">Additional clarifying comments</a> +<li><a href="#questions">contacts for questions</a> +<li>hypertex + <a href="ftp://snorri.chem.washington.edu/hypertex/hypertex-faq">FAQ</a> +<li><a href="/faq/tarfaq.html">Instructions</a> for downloading .tar.gz files +</ul> +<form action="/form/hep-th"><ul> +<li> back to <a href="/">xxx</a> <input type="submit" value="form interface"> +</ul> +</form> +<hr> +It is easier to add hypertext capability to TeX than to simulate +the TeX typesetting environment within www browsers. (And for scientific +text, total author control over formatting and fonts is frequently preferred.) +The standard promoted here is to insert \special commands that add the +necessary structure to the .dvi file. For <a name="burble">example</a>, +<blockquote> +\def\href#1#2{\special{html:<a href="#1">}{#2}\special{html:</a>}} +</blockquote> +allows one to surround text with the necessary specials, so that +<blockquote> +Here is a link to \href{http://xxx.lanl.gov/}{xxx}. +</blockquote> +will insert the desired anchored text. The link can be to an arbitrary +network URL (including e.g. photos, movies, sound files, mathematica files, +etc.) Downward compatibility is ensured, since dvi drivers that +do not recognize the \specials will ignore them (although some, such as dvips, +will currently issue warnings at each occurrence). +<p> +The object is not only +to provide hyperlink functionality to external (network) resources, but also +to provide a means of transmitting much of the +important structural and contextual information (sections, subsections, +equations, references, ...) <a href="#more">already</a> contained in the +underlying .tex for suitable gui postprocessing, whether directly +by .dvi previewer or after higher level translation +(e.g. to .<a href="#pdf">pdf</a>). + +<h2><a name="dvi">dvi Previewers</a></h2> +Two dvi previewers are currently under development to implement this +functionality: +<ul> +<li>The source code for xhdvi, the modified X windows dvi previewer, is +available via anonymous ftp at <A HREF="ftp://snorri.chem.washington.edu/pub/hypertex/">snorri.chem.washington.edu:/pub/hypertex</A>, +courtesy of Arthur Smith (asmith@bigsky.chem.washington.edu). +The latest version at the time of this (18 Jun 95) was +<a href="ftp://snorri.chem.washington.edu/pub/hypertex" name="xhdvisource">xhdvi_0.8a</a>, and it +was tested on sun, hp, and sgi -- by popular request, here are some precompiled +<a href="ftp://snorri.chem.washington.edu/hypertex/xhdvi_binaries">xhdvi binaries</a> and +<a href="ftp://snorri.chem.washington.edu/pub/hypertex/Install_Notes"> +Install_Notes</a>. +<li>A compiled version of TeXview.app, the nExtstep dvi previewer +augmented for hypertex, was originally provided by +Dmitri Linde (dmitri@physics.stanford.edu [also the author of +InstantTeX.app]). +<!--This version (dating from the summer of 1994) is <a +href="HyperTeXview.tar.gz">HyperTeXview 1.0beta3</a> +(also available via anonymous ftp from xxx.lanl.gov as +<a href="ftp://xxx.lanl.gov/pub/hypertex/HyperTeXview.tar.gz">/pub/hypertex/HyperTeXview.tar.gz</a>).--> +<a href="http://nqcd.lanl.gov/people/doyle/doyle.html">Mark +Doyle</a> has significantly extended Dmitri's original version with the +addition of multiple views and multiple documents. The <a +href="http://nqcd.lanl.gov/people/doyle/HyperTeXview/README_HTA.txt">README</a> +gives a more complete overview of the current features and known bugs. +The latest binary (as of 29 March 1995) is available at +<a href="http://nqcd.lanl.gov/people/doyle/HyperTeXview/HyperTeXview.tar.gz"> +HyperTeXview0.1beta1</a> or via ftp at +<a href="ftp://gita.lanl.gov/people/doyle/HyperTeXview/HyperTeXview.tar.gz"> +this URL</a>. NeXT TeX users might also be interested in <a href= +"http://www.nmr.embl-heidelberg.de/eduStep/Subjects/Publishing/Projects/Projects.html">NeXTTeX 2000</a>. + +</ul> +(There are still some known minor <a href="bugs.html">bugs</a> and desired +enhancements for the above two.) + +<h3><a name="pdf">pdf</a></h3> +Adobe has implemented a modification of Postscript called Acrobat +(with file extension .pdf = portable document format). It is essentially +a version of uuencoded compressed postscript with a full hyperlink overlay. +(There are now .pdf viewers for Unix, pc Windows, and Macintosh; though +some still in beta, available via anonymous ftp from +<a href="ftp://ftp.adobe.com/pub/adobe/Applications/Acrobat/">ftp.adobe.com</a>) +In addition, pdf files are <i>searchable and indexable</i>. The +<a href="http://nqcd.lanl.gov/people/doyle/README_HPS.txt">dvihps driver</a> +(generalizing dvips in the obvious way) +allows passing the hypertext information from the .dvi to the .ps file +in the form of pdf marks that are picked up by the Acrobat distiller, +giving a most powerful method for producing automatically hyperlinked .pdf. +(Then the relation of hyper .dvi to hyper .ps or .pdf is the same as is +currently the relation between .dvi and .ps; with ultimate translation to +hyper .ps or .pdf giving a more portable final hyperlinked format.) Indeed +this was the original motivation for hypertex -- when I saw Acrobat Exchange +demo'ed in fall '93, it seemed auspicious to have all of the hyperlink +capability but horrifying to contemplate armies of people adding hyperlink +overlays "by hand" after the fact, especially when much of the contextual +structure is already present in the .tex source, only to be lost in the +conversion to .dvi then e.g. to postscript. +We decided then that \special's were the natural means to pass this +structure out from the .tex source to be picked up from the .dvi level +by subsequent drivers. (For some updated comments on pdf [10/94], see +this <a href="pdfcomments.txt">mail message</a>.) + +<h2><a name="hyperps">hyperPS</a> and hyperhacked Ghostview</h2> + +For information on the above mentioned modified dvips driver (written by +Mark Doyle) that picks up the embedded hyperlink info from the .dvi file, +see this +<a href="http://nqcd.lanl.gov/people/doyle/README_HPS.txt">README_HPS</a>. +<p> +For information on a modified version of ghostview (written by Tanmoy +Bhattacharya) that interprets the embedded hyperPS commands (i.e. without +necessity of passing to Adobe's ps -> pdf distiller), see this +<a +href="http://nqcd.lanl.gov/people/tanmoy/hypertex/README-ghostview-mods.html">README-ghosthview</a>. +Note that the next version of ghostscript (now undergoing beta testing +[6/95]) will incorporate this functionality. + +<h2>But wait, there's <a name="more">more...</a></h2> +Since latex and other standard macropackages are already highly structured, +by simple modification of the underlying macros it is possible to add +extensive hypertext capabilities to <i>pre-existing</i> .tex source +(i.e., for equations, figures, references, pagenumbers, etc.). +Moreover these macro redefinitions insert standardized <a name=""> +anchors that allow reference to <i>third party</i> papers in standard form +(if compiled using the same macropackages), e.g. by appending +#equation.2.3, #page.7, #figure.4, #table.2, etc., to the associated URL. +<p> +<a +href="http://nqcd.lanl.gov/people/tanmoy/hypertex/hyperbasics.tex">hyperbasics.tex</a> +are simple low level hypertext macros (as in the example at the top of this +page), written by Tanmoy Bhattacharya (tanmoy@qcd.lanl.gov) that implement +the standard format for external reference. +They can be used directly or can be called by straightforward modifications +of existing macropackages. Tested macropackages include: +<ul> +<li><a href="lanlmac.tex">lanlmac.tex</a>: +My modified version of harvmac.tex (last updated 7/26/94), +works seamlessly to convert pre-existing harvmac-based source to hypertex +(see examples <a href="#harvsamp">below</a>). +<li> +<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/hyperlatex.tex">hyperlatex.tex</a>: +(Somewhat outdated and for LaTeX 2.09 only) +For latex-based source, +automatically upgrades latex macros to hyperlatex (install in tex/inputs +directory). +This file is input before the \documentstyle +when using LaTeX, and will automatically cause the relevant .hty files +(if present) to be included after the associated .sty file. +Some .hty files to install in tex/inputs (each containing modifications +to the corresponding .sty file) are: +<ul> +<li> +<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/aps.hty">aps.hty</a>, +<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/prabib.hty">prabib.hty</a>, +<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/revtex.hty">revtex.hty</a>, +<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/espcrc2.hty">espcrc2.hty</a>, +<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/article.hty">article.hty</a>, +<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/book.hty">book.hty</a>, +<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/report.hty">report.hty</a>, +<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/fleqn.hty">fleqn.hty</a>, +<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/vanilla.hty">vanilla.hty</a> +<li> +To define a convenient hlatex format using a format (.fmt) file, use +<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/hlatex.tex">hlatex.tex</a> +to generate hlatex.fmt +(e.g. on unix systems, use: <code>initex \&latex hlatex.tex</code>) +and install in tex/formats directory. +This format will automatically \input hyperlatex at the +beginning of all documents. Command line use of hlatex.fmt +is system dependent: on unix systems, +create a link (e.g. <code>ln -s latex hlatex</code>), then the command +<code>hlatex file</code> replaces <code>latex file</code> +to produce automatic hyperlatex. + </ul> +<li> +<a href="ftp://ftp.shsu.edu/tex-archive/macros/latex/contrib/supported/hyperref">hyperref</a>: A well-maintained LaTeX2e hyper package by Sebastian Rahtz. +Available from your friendly CTAN sites in +/tex-archive/macros/latex/contrib/supported/hyperref. +<li> Your preferred macropackage (Just do it.) +</ul> +<h2><a name="examples">Example .dvi files</a></h2> +It has been an impressive exercise to grab files from the e-print archives +and hypertex them using the above modified macros. +All examples have essentially "just worked". Here are a few example files: +<ul> +<li><a href="hharvsamp.dvi" name="harvsamp">harvsamp.dvi</a> : +A sample file illustrating the modified harvmac macros, +with source <a href="hharvsamp.tex">harvsamp.tex</a>. +<li> +<a href="hyperlh88.tar.gz">hyperlh88.tar.gz</a>: by popular demand, +dvi file plus figures for my 1988 Les Houches lectures +"Applied Conformal Field Theory" (266kb .gz file gunzips to 911kb). +Good example of pre-existing source that painlessly retexs with new macros +(harvmac/lanlmac) into much more functional form with large numbers of +internal links to sections, subsections, eqns, refs, figs, etc. +<li> +<a href="hypertasi92.tar.gz">hypertasi92.tar.gz</a>: dvi file plus figures +from hep-th/9304011 [<a href="/abs/hep-th/9304011">abs</a>], 200 page +set of lecture notes using harvmac/lanlmac. (note that 392kb .gz +file gunzips to 1.6Mb -- but worthwhile as another impressive example of +pre-existing source that automatically recompiles with <i>thousands</i> of +internal linkages [couldn't be faked...].) +<li> +<a href="emdual.tar.gz">emdual.tar.gz</a> dvi plus two figures from +hep-th/9407087 [<a href="/abs/hep-th/9407087">abs</a>], a random +paper (just received, by Seiberg and Witten) that also uses harvmac. +<li> +<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/examples/ambjorn.dvi">ambjorn.dvi</a>: +The dvi file from hep-lat/9405022 [<a href="/abs/hep-lat/9405022">abs</a>], +an example file from the e-print archives using latex (article style). +<li><a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/examples/Anomalkap.dvi">anomalkap.dvi</a>: The dvi file from hep-lat/9309014 +[<a href="/abs/hep-lat/9309014">abs</a>], an example file from +the e-print archives using revtex. +</ul> + +Some more examples of hyperdvi files can be found in +tanmoy's <A HREF="http://nqcd.lanl.gov/people/tanmoy/hyperdvi/">hyperdvi</A> +directory. These files are mainly documentation about TeX, automatically +generated from the web files. He has also made available +<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/hyperwebmac.tex">hyperwebmac.tex</a> +(modified version of webmac.tex that is used to process .tex generated from +.web by weave), +<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/hypercwebmac.tex">hypercwebmac.tex</a> +(modified version of cwebmac.tex [version 2.1] that is used to process .tex +generated from .w by cweave), and +<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/hyperncwebmac.tex">hyperncwebmac.tex</a> +(same as above for cwebmac.tex version 3.0). +<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/LaTeX2e.conf">LaTeX2e.conf</a> +is (untested) contributed software or latex2e users. + +<h2><a name="external">External and relative URL's</a></h2> + +The above macros are set up to generate automatically only +linkages internal to files. +External URL's can easily be added by hand (as in the +<a href="#burble">example</a> at the top of this page), others +could be added automatically (e.g. references to arch-ive/papernum +could easily be parsed to +<a href="http://xxx.lanl.gov/e-print/arch-ive/papernum"> ). +Eventually various conventions used in writing will change (e.g. +figures will typically be small thumbnail images linked to external +viewers, and similarly for other resources; and the text itself will +be restructured to take advantage of branched exposition). +<p> +Currently the nExtstep HyperTeXview.app is set up to message external +URL's to OmniWeb.app (soon will support +<a href="http://sente.epfl.ch/~swoman/">SpiderWoman</a>, the first browser +to support base/relative URL pairs), and +works well for absolute URL's under NS3.2 (uses the "open URL" service exported +by OmniWeb, some examples inserted in <a href="#harvsamp">harvsamp</a>). +On X, messaging from xhdvi to e.g. Mosaic can be implemented using the +primitive Mosaic +"<a href="http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/Docs/remote-control.html">remote +control</a>" (xhdvi calls the executable specified by the +environment variable $WWWBROWSER on any URL it does not understand). +An implementation for opening e.g. external dvi files from within dvi +files exists (see +<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/X/">xhdvi/mosaic</a> on nqcd), +but needs simplification pending improved www client capabilities. +<p> +It is clearly silly to reproduce html transport capabilities within .dvi +(or .pdf) viewers, but the current generation of www clients does not +allow very sophisticated in/out messaging. Ideally, +when a www client opens a .dvi (or .pdf) viewer on a file, it should +pass a "base URL" to the viewer. When the viewer encounters a relative +URL, it should be able to message its base URL together with the relative +URL back to the www client which will parse and retrieve. +Currently, however, www clients such as Mosaic for X allow neither passing +a URL to an external browser nor sophisticated messaging back. It is hoped +that the next generation of www clients will separate the html transport +from the html viewing and allow more generalized messaging to/from the +transport object. (Perhaps this is a job for the +"<a href="http://info.cern.ch/hypertext/WWW/Organization/Consortium/W3OSignature.html">WWW +consortium</a>".) +<p> +For the time being, however, use of absolute URL's still provides +impressive hypertex functionality. +<h2><a name="added">Additional clarifying comments</a></h2> +In answer to some early questions raised, the following +comments are paraphrased +From: asmith@bigsky.chem.washington.edu (Arthur Smith), +Date: Wed, 27 Jul 94 00:14:07 -0700 : +<p> +Note that hypertex is not intended as a replacement to HTML, +nor are the viewers intended as a replacement to Mosaic or +other www browser --- +it is intended more to represent an early generation of +alternative document viewer with closer ties to the Web +(somewhat along the lines of the ghostscript or xv viewers currently used, +but with the added benefit of hypertext within the TeX/dvi/pdf +documents themselves). +<p> +The advantages are: no need for complex conversions of pre-existing +TeX files into HTML, and no need to wait for a future version of html +with support for equations. In addition, the macro capabilities of TeX +allow hypertext to be created with little or no effort on the part +of the author. It is anticipated that this will be ideal for +scientists and mathematicians who already use TeX. +We hope that the tools will be sufficiently popular to motivate +improvements that may allow TeX documents (whether in dvi format or pdf) to +be tied even more closely to the Web than is possible with our first +generation set of tools. They are now at least sufficiently +usable to allow a single line change of a TeX file to create +the hyperdvi files on the server side, a single +button click on a Web browser to bring up a hyperdvi document, and +with a little more initial effort on the author's side, a single button +click in the dvi viewer on the reader's side to bring up related documents. +<hr> +This directory is also available via anonymous ftp at +<a href="ftp://xxx.lanl.gov/pub/hypertex/">xxx.lanl.gov:/pub/hypertex/</a> .<br> +Tanmoy's files are instead available via anonymous ftp at +<a href="ftp://gita.lanl.gov/people/tanmoy/">gita.lanl.gov:/people/tanmoy/</a> . +<br> +Mark's files are also available via anonymous ftp at +<a href="ftp://gita.lanl.gov/people/doyle/">gita.lanl.gov:/people/doyle/</a> . +<br> +Hypertex announcements are also archived in hypermail format at +<a href="http://math.albany.edu:8800/hm/ht/a/">http://math.albany.edu:8800/hm/ht/a/</a>. +<p> +<ul> +<li><a name="questions">questions</a> on xhdvi + To: <a href="mailto:asmith@bigsky.chem.washington.edu">Arthur Smith</a> + (who also maintains the hypertex mailing list, and the hypertex + <a href="ftp://snorri.chem.washington.edu/hypertex/hypertex-faq">FAQ</a>) +<li>questions on HyperTeXview and HyperPS To: +<a href="mailto:doyle@mmm.lanl.gov">Mark Doyle</a> +<li>questions on macros and hyperhacked ghostview To: +<a href="mailto:tanmoy@qcd.lanl.gov">Tanmoy Bhattacharya</a> +<li>uninformed complaints To: <a href="mailto:nobody@xxx.lanl.gov">nobody</a> +</ul> + +<address> +<a href="/pg.html">pg</a>@<a href="/">xxx</a>.<a href="http://www.lanl.gov">lanl</a>.<a href="/legal/disclaimer.html">gov</a> +</address> +</BODY> diff --git a/support/hypertex/hypertex/lanlmac.tex b/support/hypertex/hypertex/lanlmac.tex new file mode 100644 index 0000000000..9904d3efe7 --- /dev/null +++ b/support/hypertex/hypertex/lanlmac.tex @@ -0,0 +1,402 @@ +%%%%%%%%%%%%%%%%%% tex macros for preprints, cm version %%%%%%%%%%%%%% +% (P. Ginsparg <ginsparg@lanl.gov>, last updated 7/94) +% if confused, type `b' in response to query +% hypertex extensions (still provisional), 7/26/94 +% +%---------------------------------------------------------------------% +\input hyperbasics %comment out this line to restore non-hyper functionality +% +%% site dependent options: +%% \unredoffs and \redoffs define horizontal and vertical offsets +%% respectively for unreduced and reduced modes. \speclscape defines +%% the \special{} call that sets printer to landscape (sideways) mode. +%% from standard set below, leave uncommented as appropriate or redefine +% +%%% next 400dpi +\def\unredoffs{} \def\redoffs{\voffset=-.31truein\hoffset=-.48truein} +\def\speclscape{\special{landscape}} +%\def\speclscape{\special{papersize=11in,8.5in}} +% +%%% apple lw +%\def\unredoffs{} \def\redoffs{\voffset=-.31truein\hoffset=-.59truein} +%\def\speclscape{\special{ps: landscape}} +% +%%% qms lasergrafix: +%\def\unredoffs{} \def\redoffs{\voffset=-.4truein\hoffset=.125truein} +%\def\speclscape{\special{qms: landscape}} +% +%%% saclay A4 paper: +%\def\unredoffs{\hoffset-.14truein\voffset-.2truein} +%\def\redoffs{\voffset=-.45truein\hoffset=-.21truein} +%\def\speclscape{\special{landscape}} +% +%---------------------------------------------------------------------% +% +\newbox\leftpage \newdimen\fullhsize \newdimen\hstitle \newdimen\hsbody +\tolerance=1000\hfuzz=2pt\def\fontflag{cm} +% +\catcode`\@=11 % This allows us to modify PLAIN macros. +\ifx\hyperdef\UNd@FiNeD\def\hyperdef#1#2#3#4{#4}\def\hyperref#1#2#3#4{#4}\fi +% +\def\bigans{b } +\message{ big or little (b/l)? }\read-1 to\answ +% +\ifx\answ\bigans\message{(This will come out unreduced.} +\magnification=1200\unredoffs\baselineskip=16pt plus 2pt minus 1pt +\hsbody=\hsize \hstitle=\hsize %take default values for unreduced format +% +\else\message{(This will be reduced.} \let\l@r=L +\magnification=1000\baselineskip=16pt plus 2pt minus 1pt \vsize=7truein +\redoffs \hstitle=8truein\hsbody=4.75truein\fullhsize=10truein\hsize=\hsbody +% +\output={\ifnum\pageno=0 %%% This is the HUTP version + \shipout\vbox{\speclscape{\hsize\fullhsize\makeheadline} + \hbox to \fullhsize{\hfill\pagebody\hfill}}\advancepageno + \else + \almostshipout{\leftline{\vbox{\pagebody\makefootline}}}\advancepageno + \fi} +\def\almostshipout#1{\if L\l@r \count1=1 \message{[\the\count0.\the\count1]} + \global\setbox\leftpage=#1 \global\let\l@r=R + \else \count1=2 + \shipout\vbox{\speclscape{\hsize\fullhsize\makeheadline} + \hbox to\fullhsize{\box\leftpage\hfil#1}} \global\let\l@r=L\fi} +\fi +%--------------------------------------------------------------------- +% +\newcount\yearltd\yearltd=\year\advance\yearltd by -1900 +\def\HUTP#1#2{\Title{HUTP-\number\yearltd/A#1}{#2}} +\def\Title#1#2{\nopagenumbers\abstractfont\hsize=\hstitle\rightline{#1}% +\vskip 1in\centerline{\titlefont #2}\abstractfont\vskip .5in\pageno=0} +% +\def\Date#1{\vfill\leftline{#1}\tenpoint\supereject\global\hsize=\hsbody% +\footline={\hss\tenrm\hyperdef\hypernoname{page}\folio\folio\hss}}% +% (restores pagenumbers) +% +% use following instead of \Date on the preliminary draft, +% puts date/time on each page in big mode, writes labels in margins +\def\draft{\draftmode\Date{\draftdate}} +\def\draftmode{\message{ DRAFTMODE }\def\draftdate{{\rm preliminary draft: +\number\month/\number\day/\number\yearltd\ \ \hourmin}}% +\headline={\hfil\draftdate}\writelabels\baselineskip=20pt plus 2pt minus 2pt + {\count255=\time\divide\count255 by 60 \xdef\hourmin{\number\count255} + \multiply\count255 by-60\advance\count255 by\time + \xdef\hourmin{\hourmin:\ifnum\count255<10 0\fi\the\count255}}} +% use \nolabels to get rid of eqn, ref, and fig labels in draft mode +\def\nolabels{\def\wrlabeL##1{}\def\eqlabeL##1{}\def\reflabeL##1{}} +\def\writelabels{\def\wrlabeL##1{\leavevmode\vadjust{\rlap{\smash% +{\line{{\escapechar=` \hfill\rlap{\sevenrm\hskip.03in\string##1}}}}}}}% +\def\eqlabeL##1{{\escapechar-1\rlap{\sevenrm\hskip.05in\string##1}}}% +\def\reflabeL##1{\noexpand\llap{\noexpand\sevenrm\string\string\string##1}}} +\nolabels +% +% tagged sec numbers +\global\newcount\secno \global\secno=0 +\global\newcount\meqno \global\meqno=1 +% +\def\newsec#1{\global\advance\secno by1\message{(\the\secno. #1)} +%\ifx\answ\bigans \vfill\eject \else \bigbreak\bigskip \fi %if desired +\global\subsecno=0\eqnres@t\noindent +{\bf\hyperdef\hypernoname{section}{\the\secno}{\the\secno.} #1}% +\writetoca{{\string\hyperref{}{section}{\the\secno}{\secsym}} {#1}}% +\par\nobreak\medskip\nobreak} +\def\eqnres@t{\xdef\secsym{\the\secno.}\global\meqno=1\bigbreak\bigskip} +\def\sequentialequations{\def\eqnres@t{\bigbreak}}\xdef\secsym{} +% +\global\newcount\subsecno \global\subsecno=0 +\def\subsec#1{\global\advance\subsecno by1\message{(\secsym\the\subsecno. #1)} +\ifnum\lastpenalty>9000\else\bigbreak\fi +\noindent{\it\hyperdef\hypernoname{subsection}{\secsym\the\subsecno}% +{\secsym\the\subsecno.} #1}\writetoca{\string\quad +{\string\hyperref{}{subsection}{\secsym\the\subsecno}{\secsym\the\subsecno.}} +{#1}}\par\nobreak\medskip\nobreak} +% +\def\appendix#1#2{\global\meqno=1\global\subsecno=0\xdef\secsym{\hbox{#1.}}% +\bigbreak\bigskip\noindent{\bf Appendix \hyperdef\hypernoname{appendix}{#1}% +{#1.} #2}\message{(#1. #2)}\xdef\appsym{#1}% +\writetoca{\string\hyperref{}{appendix}{#1}{Appendix {#1.}} {#2}}% +\par\nobreak\medskip\nobreak} +% +% \eqn\label{a+b=c} gives displayed equation, numbered +% consecutively within sections. +% \eqnn and \eqna define labels in advance (of eqalign?) +% +\def\checkm@de#1#2{\ifmmode{\def\f@rst##1{##1}\hyperdef\hypernoname{equation}% +{#1}{#2}}\else\hyperref{}{equation}{#1}{#2}\fi} +% +\def\eqnn#1{\DefWarn#1\xdef #1{(\noexpand\relax\noexpand\checkm@de% +{\secsym\the\meqno}{\secsym\the\meqno})}% +\wrlabeL#1\writedef{#1\leftbracket#1}\global\advance\meqno by1} +% +\def\f@rst#1{\c@t#1a\em@ark}\def\c@t#1#2\em@ark{#1} +\def\eqna#1{\DefWarn#1\wrlabeL{#1$\{\}$}% +\xdef #1##1{(\noexpand\relax\noexpand\checkm@de% +{\secsym\the\meqno\noexpand\f@rst{##1}}{\hbox{$\secsym\the\meqno##1$}})} +\writedef{#1\numbersign1\leftbracket#1{\numbersign1}}\global\advance\meqno by1} +% +\def\eqn#1#2{\DefWarn#1% +\xdef #1{(\noexpand\hyperref{}{equation}{\secsym\the\meqno}% +{\secsym\the\meqno})}$$#2\eqno(\hyperdef\hypernoname{equation}% +{\secsym\the\meqno}{\secsym\the\meqno})\eqlabeL#1$$% +\writedef{#1\leftbracket#1}\global\advance\meqno by1} +% +\def\xeqn{\expandafter\xe@n}\def\xe@n(#1){#1} +\def\xeqna#1{\expandafter\xe@n#1} +\def\eqns#1{(\e@ns #1{\hbox{}})} +\def\e@ns#1{\ifx\UNd@FiNeD#1\message{eqnlabel \string#1 is undefined.}% +\xdef#1{(?.?)}\fi{\let\hyperref=\relax\xdef\next{#1}}% +\ifx\next\em@rk\def\next{}\else% +\ifx\next#1\xeqn#1\else\def\n@xt{#1}\ifx\n@xt\next#1\else\xeqna#1\fi +\fi\let\next=\e@ns\fi\next} +% +\def\etag#1{\eqnn#1\eqno#1}\def\etaga#1{\eqna#1\eqno#1} +\def\DefWarn#1{\ifx\UNd@FiNeD#1\else +\immediate\write16{*** WARNING: the label \string#1 is already defined ***}\fi} +% +% footnotes +\newskip\footskip\footskip14pt plus 1pt minus 1pt %sets footnote baselineskip +\def\footnotefont{\ninepoint}\def\f@t#1{\footnotefont #1\@foot} +\def\f@@t{\baselineskip\footskip\bgroup\footnotefont\aftergroup\@foot\let\next} +\setbox\strutbox=\hbox{\vrule height9.5pt depth4.5pt width0pt} +% +\global\newcount\ftno \global\ftno=0 +%\def\foot{\global\advance\ftno by1\footnote{$^{\the\ftno}$}} +\def\foot{\global\advance\ftno by1\def\foot@rg{\hyperref{}{footnote}% +{\the\ftno}{\the\ftno}\xdef\foot@rg{\noexpand\hyperdef\noexpand\hypernoname% +{footnote}{\the\ftno}{\the\ftno}}}\footnote{$^{\foot@rg}$}} +% +%say \footend to put footnotes at end +%will cause problems if \ref used inside \foot, instead use \nref before +\newwrite\ftfile +\def\footend{\def\foot{\global\advance\ftno by1\chardef\wfile=\ftfile +%%$^{\the\ftno}$\ifnum\ftno=1\immediate\openout\ftfile=\jobname.fts\fi% +\hyperref{}{footnote}{\the\ftno}{$^{\the\ftno}$}% +\ifnum\ftno=1\immediate\openout\ftfile=\jobname.fts\fi% +\immediate\write\ftfile{\noexpand\smallskip% +%%\noexpand\item{f\the\ftno:\ }\pctsign}\findarg}% +\noexpand\item{\noexpand\hyperdef\noexpand\hypernoname{footnote} +{\the\ftno}{f\the\ftno}:\ }\pctsign}\findarg}% +\def\footatend{\vfill\eject\immediate\closeout\ftfile{\parindent=20pt +\centerline{\bf Footnotes}\nobreak\bigskip\input \jobname.fts }}} +\def\footatend{} +% +% \ref\label{text} +% generates a number, assigns it to \label, generates an entry. +% To list the refs on a separate page, \listrefs +% +\global\newcount\refno \global\refno=1 +\newwrite\rfile +% +\def\ref{[\hyperref{}{reference}{\the\refno}{\the\refno}]\nref} +\def\nref#1{\DefWarn#1% +\xdef#1{[\noexpand\hyperref{}{reference}{\the\refno}{\the\refno}]}% +\writedef{#1\leftbracket#1}% +\ifnum\refno=1\immediate\openout\rfile=\jobname.refs\fi +\chardef\wfile=\rfile\immediate\write\rfile{\noexpand\item{[\noexpand\hyperdef% +\noexpand\hypernoname{reference}{\the\refno}{\the\refno}]\ }% +\reflabeL{#1\hskip.31in}\pctsign}\global\advance\refno by1\findarg} +% horrible hack to sidestep tex \write limitation +\def\findarg#1#{\begingroup\obeylines\newlinechar=`\^^M\pass@rg} +{\obeylines\gdef\pass@rg#1{\writ@line\relax #1^^M\hbox{}^^M}% +\gdef\writ@line#1^^M{\expandafter\toks0\expandafter{\striprel@x #1}% +\edef\next{\the\toks0}\ifx\next\em@rk\let\next=\endgroup\else\ifx\next\empty% +\else\immediate\write\wfile{\the\toks0}\fi\let\next=\writ@line\fi\next\relax}} +\def\striprel@x#1{} \def\em@rk{\hbox{}} +% +\def\lref{\begingroup\obeylines\lr@f} +\def\lr@f#1#2{\DefWarn#1\gdef#1{\let#1=\UNd@FiNeD\ref#1{#2}}\endgroup\unskip} +% +\def\semi{;\hfil\break} +\def\addref#1{\immediate\write\rfile{\noexpand\item{}#1}} %now unnecessary +% +\def\listrefs{\footatend\vfill\supereject\immediate\closeout\rfile\writestoppt +\baselineskip=\footskip\centerline{{\bf References}}\bigskip{\parindent=20pt% +\frenchspacing\escapechar=` \input \jobname.refs\vfill\eject}\nonfrenchspacing} +% +\def\startrefs#1{\immediate\openout\rfile=\jobname.refs\refno=#1} +% +\def\xref{\expandafter\xr@f}\def\xr@f[#1]{#1} +\def\refs#1{\count255=1[\r@fs #1{\hbox{}}]} +\def\r@fs#1{\ifx\UNd@FiNeD#1\message{reflabel \string#1 is undefined.}% +\nref#1{need to supply reference \string#1.}\fi% +\vphantom{\hphantom{#1}}{\let\hyperref=\relax\xdef\next{#1}}% +\ifx\next\em@rk\def\next{}% +\else\ifx\next#1\ifodd\count255\relax\xref#1\count255=0\fi% +\else#1\count255=1\fi\let\next=\r@fs\fi\next} +% +\def\figures{\centerline{{\bf Figure Captions}}\medskip\parindent=40pt% +\def\fig##1##2{\medskip\item{Fig.~\hyperdef\hypernoname{figure}{##1}{##1}. }% +##2}} +% +% this is ugly, but moore insists +\newwrite\ffile\global\newcount\figno \global\figno=1 +% +\def\fig{fig.~\hyperref{}{figure}{\the\figno}{\the\figno}\nfig} +\def\nfig#1{\DefWarn#1% +\xdef#1{fig.~\noexpand\hyperref{}{figure}{\the\figno}{\the\figno}}% +\writedef{#1\leftbracket fig.\noexpand~\xfig#1}% +\ifnum\figno=1\immediate\openout\ffile=\jobname.figs\fi\chardef\wfile=\ffile% +{\let\hyperref=\relax +\immediate\write\ffile{\noexpand\medskip\noexpand\item{Fig.\ % +\noexpand\hyperdef\noexpand\hypernoname{figure}{\the\figno}{\the\figno}. } +\reflabeL{#1\hskip.55in}\pctsign}}\global\advance\figno by1\findarg} +% +\def\listfigs{\vfill\eject\immediate\closeout\ffile{\parindent40pt +\baselineskip14pt\centerline{{\bf Figure Captions}}\nobreak\medskip +\escapechar=` \input \jobname.figs\vfill\eject}} +% +\def\xfig{\expandafter\xf@g}\def\xf@g fig.\penalty\@M\ {} +\def\figs#1{figs.~\f@gs #1{\hbox{}}} +\def\f@gs#1{{\let\hyperref=\relax\xdef\next{#1}}\ifx\next\em@rk\def\next{}\else +\ifx\next#1\xfig #1\else#1\fi\let\next=\f@gs\fi\next} +% +\def\figin{\epsfcheck\figin}\def\figins{\epsfcheck\figins} +\def\epsfcheck{\ifx\epsfbox\UNd@FiNeD +\message{(NO epsf.tex, FIGURES WILL BE IGNORED)} +\gdef\figin##1{\vskip2in}\gdef\figins##1{\hskip.5in}% blank space instead +\else\message{(FIGURES WILL BE INCLUDED)}% +\gdef\figin##1{##1}\gdef\figins##1{##1}\fi} +\def\DefWarn#1{} +\def\figinsert{\goodbreak\midinsert} +\def\ifig#1#2#3{\DefWarn#1\xdef#1{fig.~\noexpand\hyperref{}{figure}% +{\the\figno}{\the\figno}}\writedef{#1\leftbracket fig.\noexpand~\xfig#1}% +\figinsert\figin{\centerline{#3}}\medskip\centerline{\vbox{\baselineskip12pt +\advance\hsize by -1truein\noindent\wrlabeL{#1=#1}\footnotefont% +{\bf Fig.~\hyperdef\hypernoname{figure}{\the\figno}{\the\figno}:} #2}} +\bigskip\endinsert\global\advance\figno by1} +% +\newwrite\lfile +{\escapechar-1\xdef\pctsign{\string\%}\xdef\leftbracket{\string\{} +\xdef\rightbracket{\string\}}\xdef\numbersign{\string\#}} +\def\writedefs{\immediate\openout\lfile=\jobname.defs \def\writedef##1{% +{\let\hyperref=\relax\let\hyperdef=\relax\let\hypernoname=\relax + \immediate\write\lfile{\string\def\string##1\rightbracket}}}}% +\def\writestop{\def\writestoppt{\immediate\write\lfile{\string\pageno% +\the\pageno\string\startrefs\leftbracket\the\refno\rightbracket% +\string\def\string\secsym\leftbracket\secsym\rightbracket% +\string\secno\the\secno\string\meqno\the\meqno}\immediate\closeout\lfile}} +% +\def\writestoppt{}\def\writedef#1{} +% +\def\seclab#1{\DefWarn#1% +\xdef #1{\noexpand\hyperref{}{section}{\the\secno}{\the\secno}}% +\writedef{#1\leftbracket#1}\wrlabeL{#1=#1}} +\def\subseclab#1{\DefWarn#1% +\xdef #1{\noexpand\hyperref{}{subsection}{\secsym\the\subsecno}% +{\secsym\the\subsecno}}\writedef{#1\leftbracket#1}\wrlabeL{#1=#1}} +\def\applab#1{\DefWarn#1% +\xdef #1{\noexpand\hyperref{}{appendix}{\appsym}{\appsym}}% +\writedef{#1\leftbracket#1}\wrlabeL{#1=#1}} +% +\newwrite\tfile \def\writetoca#1{} +\def\leaderfill{\leaders\hbox to 1em{\hss.\hss}\hfill} +% use this to write file with table of contents +\def\writetoc{\immediate\openout\tfile=\jobname.toc + \def\writetoca##1{{\edef\next{\write\tfile{\noindent ##1 + \string\leaderfill {\string\hyperref{}{page}{\noexpand\number\pageno}% + {\noexpand\number\pageno}} \par}}\next}}} +% and this lists table of contents on second pass +\newread\ch@ckfile +\def\listtoc{\immediate\closeout\tfile\immediate\openin\ch@ckfile=\jobname.toc +\ifeof\ch@ckfile\message{no file \jobname.toc, no table of contents this pass}% +\else\closein\ch@ckfile\centerline{\bf Contents}\nobreak\medskip% +{\baselineskip=12pt\footnotefont\parskip=0pt\catcode`\@=11\input\jobname.toc +\catcode`\@=12\bigbreak\bigskip}\fi} +% +\catcode`\@=12 % at signs are no longer letters +% +% Unpleasantness in calling in abstract and title fonts +\edef\tfontsize{\ifx\answ\bigans scaled\magstep3\else scaled\magstep4\fi} +\font\titlerm=cmr10 \tfontsize \font\titlerms=cmr7 \tfontsize +\font\titlermss=cmr5 \tfontsize \font\titlei=cmmi10 \tfontsize +\font\titleis=cmmi7 \tfontsize \font\titleiss=cmmi5 \tfontsize +\font\titlesy=cmsy10 \tfontsize \font\titlesys=cmsy7 \tfontsize +\font\titlesyss=cmsy5 \tfontsize \font\titleit=cmti10 \tfontsize +\skewchar\titlei='177 \skewchar\titleis='177 \skewchar\titleiss='177 +\skewchar\titlesy='60 \skewchar\titlesys='60 \skewchar\titlesyss='60 +% +\def\titlefont{\def\rm{\fam0\titlerm}% switch to title font +\textfont0=\titlerm \scriptfont0=\titlerms \scriptscriptfont0=\titlermss +\textfont1=\titlei \scriptfont1=\titleis \scriptscriptfont1=\titleiss +\textfont2=\titlesy \scriptfont2=\titlesys \scriptscriptfont2=\titlesyss +\textfont\itfam=\titleit \def\it{\fam\itfam\titleit}\rm} +% +\font\authorfont=cmcsc10 \ifx\answ\bigans\else scaled\magstep1\fi +% +\ifx\answ\bigans\def\abstractfont{\tenpoint}\else +\font\absit=cmti10 scaled \magstep1 +\font\abssl=cmsl10 scaled \magstep1 +\font\absrm=cmr10 scaled\magstep1 \font\absrms=cmr7 scaled\magstep1 +\font\absrmss=cmr5 scaled\magstep1 \font\absi=cmmi10 scaled\magstep1 +\font\absis=cmmi7 scaled\magstep1 \font\absiss=cmmi5 scaled\magstep1 +\font\abssy=cmsy10 scaled\magstep1 \font\abssys=cmsy7 scaled\magstep1 +\font\abssyss=cmsy5 scaled\magstep1 \font\absbf=cmbx10 scaled\magstep1 +\skewchar\absi='177 \skewchar\absis='177 \skewchar\absiss='177 +\skewchar\abssy='60 \skewchar\abssys='60 \skewchar\abssyss='60 +% +\def\abstractfont{\def\rm{\fam0\absrm}% switch to abstract font +\textfont0=\absrm \scriptfont0=\absrms \scriptscriptfont0=\absrmss +\textfont1=\absi \scriptfont1=\absis \scriptscriptfont1=\absiss +\textfont2=\abssy \scriptfont2=\abssys \scriptscriptfont2=\abssyss +\textfont\itfam=\absit \def\it{\fam\itfam\absit}\def\footnotefont{\tenpoint}% +\textfont\slfam=\abssl \def\sl{\fam\slfam\abssl}% +\textfont\bffam=\absbf \def\bf{\fam\bffam\absbf}\rm}\fi +% +\def\tenpoint{\def\rm{\fam0\tenrm}% switch back to 10-point type +\textfont0=\tenrm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm +\textfont1=\teni \scriptfont1=\seveni \scriptscriptfont1=\fivei +\textfont2=\tensy \scriptfont2=\sevensy \scriptscriptfont2=\fivesy +\textfont\itfam=\tenit \def\it{\fam\itfam\tenit}\def\footnotefont{\ninepoint}% +\textfont\bffam=\tenbf \def\bf{\fam\bffam\tenbf}\def\sl{\fam\slfam\tensl}\rm} +% +\font\ninerm=cmr9 \font\sixrm=cmr6 \font\ninei=cmmi9 \font\sixi=cmmi6 +\font\ninesy=cmsy9 \font\sixsy=cmsy6 \font\ninebf=cmbx9 +\font\nineit=cmti9 \font\ninesl=cmsl9 \skewchar\ninei='177 +\skewchar\sixi='177 \skewchar\ninesy='60 \skewchar\sixsy='60 +% +\def\ninepoint{\def\rm{\fam0\ninerm}% switch to footnote font +\textfont0=\ninerm \scriptfont0=\sixrm \scriptscriptfont0=\fiverm +\textfont1=\ninei \scriptfont1=\sixi \scriptscriptfont1=\fivei +\textfont2=\ninesy \scriptfont2=\sixsy \scriptscriptfont2=\fivesy +\textfont\itfam=\ninei \def\it{\fam\itfam\nineit}\def\sl{\fam\slfam\ninesl}% +\textfont\bffam=\ninebf \def\bf{\fam\bffam\ninebf}\rm} +% +%--------------------------------------------------------------------- +% +\def\noblackbox{\overfullrule=0pt} +\hyphenation{anom-aly anom-alies coun-ter-term coun-ter-terms} +% +\def\inv{^{\raise.15ex\hbox{${\scriptscriptstyle -}$}\kern-.05em 1}} +\def\dup{^{\vphantom{1}}} +\def\Dsl{\,\raise.15ex\hbox{/}\mkern-13.5mu D} %this one can be subscripted +\def\dsl{\raise.15ex\hbox{/}\kern-.57em\partial} +\def\del{\partial} +\def\Psl{\dsl} +\def\tr{{\rm tr}} \def\Tr{{\rm Tr}} +\def\biglie{\font\bigit=cmti10 scaled\magstep1\hbox{\bigit\$}} %pound sterling +\def\lspace{\ifx\answ\bigans{}\else\qquad\fi} +\def\lbspace{\ifx\answ\bigans{}\else\hskip-.2in\fi} % $$\lbspace...$$ +\def\boxeqn#1{\vcenter{\vbox{\hrule\hbox{\vrule\kern3pt\vbox{\kern3pt + \hbox{${\displaystyle #1}$}\kern3pt}\kern3pt\vrule}\hrule}}} +\def\mbox#1#2{\vcenter{\hrule \hbox{\vrule height#2in + \kern#1in \vrule} \hrule}} %e.g. \mbox{.1}{.1} +% matters of taste +%\def\tilde{\widetilde} \def\bar{\overline} \def\hat{\widehat} +% +% some sample definitions +\def\CAG{{\cal A/\cal G}} \def\CO{{\cal O}} % curly letters +\def\CA{{\cal A}} \def\CC{{\cal C}} \def\CF{{\cal F}} \def\CG{{\cal G}} +\def\CL{{\cal L}} \def\CH{{\cal H}} \def\CI{{\cal I}} \def\CU{{\cal U}} +\def\CB{{\cal B}} \def\CR{{\cal R}} \def\CD{{\cal D}} \def\CT{{\cal T}} +\def\e#1{{\rm e}^{^{\textstyle#1}}} +\def\grad#1{\,\nabla\!_{{#1}}\,} +\def\gradgrad#1#2{\,\nabla\!_{{#1}}\nabla\!_{{#2}}\,} +\def\ph{\varphi} +\def\psibar{\overline\psi} +\def\om#1#2{\omega^{#1}{}_{#2}} +\def\vev#1{\langle #1 \rangle} +\def\lform{\hbox{$\sqcup$}\llap{\hbox{$\sqcap$}}} +\def\darr#1{\raise1.5ex\hbox{$\leftrightarrow$}\mkern-16.5mu #1} +\def\lie{\hbox{\it\$}} %pound sterling +\def\ha{{1\over2}} +\def\half{{\textstyle{1\over2}}} %puts a small half in a displayed eqn +\def\roughly#1{\raise.3ex\hbox{$#1$\kern-.75em\lower1ex\hbox{$\sim$}}} diff --git a/support/hypertex/hypertex/pdfcomments.txt b/support/hypertex/hypertex/pdfcomments.txt new file mode 100644 index 0000000000..422e442904 --- /dev/null +++ b/support/hypertex/hypertex/pdfcomments.txt @@ -0,0 +1,164 @@ +From: ginsparg@qfwfq.lanl.gov +Date: Tue Oct 25 12:53:13 1994 +To: hypertex@snorri.chem.washington.edu +Subject: comments on pdf +Cc: rokicki@CS.Stanford.EDU + +a number of people have been asking about adobe's pdf, so i assembled a few +comments from recent experiences here (much of the below comes via doyle +[doyle@mmm.lanl.gov , who modified dvips to pick up the hyperdvi specials -- +a version will be made public fairly soon, along with dvipsk] and tanmoy +[tanmoy@qcd.lanl.gov , who valiantly joined the battle against the pc's]). +if the dvips modifications meet tom rokicki's standards, perhaps we can +even get them included in the official distribution. + +comments below meant for more general audience, so excuse some redundancy +(and remember any opinions below are barely mine alone, not meant to represent +official lanl or gov't policy): + +------------------------------------------------------------------ + +> I am starting an evaluation of PDF for use by ... +> Do you have comments or complaints? +> Recent traffic on the HyperTeX list suggests you may be thinking of +> settling on this as a standard output format. Is this impression correct? + +experiences so far are mixed. +a year ago when we first saw pdf demoed, looked promising +(i.e. to have an operation like adobe with a known track record [postscript] +take on the task of insuring compatibility across platforms [mac/pc/unix] +for the browsers). seemed useful to be able to hyperlink, though +it was all manual and menu-based and we didn't see the point of future armies +of "typesetters" manually composing hyperlink overlays, especially when for our +purposes (i.e. physicists and mathematicians using tex), all the contextual +info was *already* in the .tex source -- was just being lost in the process of +conversion to printed format. moment's relection suggested passing the info +out of .tex via \special's and then just matter of time before fixing standard +and getting some dvi browsers modified (arthur smith maintains the xhdvi for X +and dmitri linde did the first modifications of texview.app for nextstep) +to facilitate macro development last spring and early summer. +was reassuring to see how well it worked instantly for pre-existing tex source +(i.e. all eqns, figs, refs, secs, etc. become automatically hyperlinked) +and many people are now also running papers from the archives automatically +through processor that pattern matches e.g. archive/9401001 into network +hyperlinks when appearing anywhere in text. +(see e.g. http://xxx.lanl.gov/hypertex/ for more info). +also popular is the middle click option that brings up a separate smaller +window with just an equation or reference (as originally pushed for by wati +taylor -- implemented in asmith's xhdvi by spawning additional xhdvi processes, +to be implemented in hypertexview.app via additional windows. +forwarded actual user [risc/6000] comment: + >Date: Wed, 19 Oct 1994 22:50:19 -0500 + >Subject: hypertex + > + > It's great!!!!!!!!!!!!!!!! + >It's almost 11 and I am still here (without lunch) playing with it.The + >little window with the equations is so cute . Being able to preview + >papers and the references therein at the same time just by clicking + >that is real power. + +now all of the above works best with the hyperdvi previewers at present. +the current "dvipdf driver" that passes the hyperlink overlay +to pdf is actually a modified dvips that understands the info in the dvi file, +and converts to "pdfmarks" in the .ps file that are understood by +adobe's ps -> pdf distiller. but the adobe acroexchange browsers don't yet work +as well in many ways as the hyperdvi browsers (which were relatively +straightforward for X and for nextstep (i.e. the rapid single person efforts by +smith and linde [with help from andy cohen to patch in the in-line postscript +support to xhdvi from the upgraded xdvi; and dmitri before peremptorily +running off for his sophomore year at caltech kindly passed the +hypertexview.app source code to doyle for further development]). + +one problem with the multiplatform acroexchanges is that adobe has done +an uninspired port of the windoze version to mac and unix so all interfaces +are basically pulled down to the lowest conceivable level of gui . + +another problem is that there's some bizarre way they're emulating display +postscript so that pages with bitmapped fonts can take 10 sec or longer +to image (even on a real machine) -- this problem goes away if one uses +PostScript fonts (i.e. type I with all the scaling data) so that's what +we've been using instead of the standard bitmapped computer moderns (e.g. +CMR10 instead of cmr10), but not everyone has those fonts, and it's foolish +to perpetuate the current folly of transmitting fonts as inclusions in .ps +files (a gruesome artifact of the way people used to send files to +postscript printers, with no place in efficient network document transmission). +moreover we're not sure that postscript versions even exist +for example for the full set of ams fonts. (there was as well a nasty +problem getting the new adobe type manager to recognize the bluesky +postscript versions of the computer modern fonts -- not a problem with the +previous type manager on same fonts so not clear where current problem +lies, but just an indication of the primitive current state of affairs, and +the headaches one is guaranteed to encounter in any semi-serious application.) + +yet another problem is that the conversion from hyperdvi to pdf is "lossy" in +the sense that pdf only allows "view" information in a link (i.e. position +on page + magnification) whereas the hyperdvi still contains the contextual +info (e.g. equation.2.4, subsection.5.3) so that for example any third +party can trivially refer to a specific point within, +http://xxx.lanl.gov/path/paper.dvi#equation.2.4 , without having to know +anything about how it was produced (except of course that it was texed +with the hyperbasics macros, already ported to most standard latex styles +and some other plain tex packages, without changing underlying tex source +of paper itself). in the postscript file one can at least append a table that +encodes this information, to be picked up by a suitably modified postscript +previewer, but it is lost in the distillation to pdf. +(*it would have been more impressive had adobe foreseen the crucial need to +facilitate passing this sort of information.*) + +and another problem has been adobe's slowness to incorporate full network +hyperlinks (many people, both here and at lanl, have been lobbying for this +for past year. one problem is the primitive state of in/out messaging to +current generation of www clients and lack of standardization even for such +things as passing base url's. some of us have also been lobbying ncsa, w3 +consortium, et al. to get that situation under control) -- there remains +an unfortunate dichotomy between the people who understand serious +typesetting and the people interested in serious networking. +it seems that adobe's current public domain readers do not have any promised +network url plug-in included, which leaves them unacceptably crippled from +anyone's point of view. + +with the modified dvips in hand, most of the above problems can easily be +solved just by modifying standard ps previewers (e.g. ghostview, which +someone may soon start) to as well pick up the pdfmarks and hyperlink +(quite simple, now that the standard is in place). then we're no longer +so dependent on adobe to produce a high quality browser, but on the other +hand have to rely on volunteer operations across all the different platforms +so it could be just as slow. (but it doesn't really matter from standpoint +of underlying format since we'll be remaining in an intercompatibility range +for the various levels of browsing, from .dvi to .ps to .pdf) + +some other things arguing for adobe's acrobat viewers in the long term are +a) text searching (and indexing), they have reasonable algorithms for + finding all the word breaks, etc. (though i was disappointed that they + *still* don't find ligatures [e.g. ff or fi as one char] even in their own + fonts) +b) they have ocr software that does a good job on overall page markup + including retaining font info, and converts to pdf with in-line bitmaps for + anything it isn't sure of (though when i last looked at it in april it seemed + to make too many identification errors, especially in things like subscripts + effectively scanned at lower resolution, to be immediately useful). + but that means that one could conceivably have a unified manner of treating + future and archival databases +c) adobe has recently joined the cilabs opendocs standard, so will fit well + both as an inclusion (and includer) of the full range of "multi-media" + being supported there (as well across all platforms), so as a group + they could ultimately guarantee a high level of support. + + + + <a href="http://xxx.lanl.gov/pg.html">pg</a> + + + +p.s. in all of these things, however, we quickly learn how irrelevant we +(i.e. physics and mathematics communities) are in the overall scale of things. +while enjoying an opendoc demo, for example, i naively asked to whom the +equation editors, etc., were likely directed -- i.e. physicists and +mathematicians writing or reading papers? "no, absolutely not," +was the response, "who cares about them? this is primarily for real markets +such as for high school and college textbooks." +then the really depressing part: "and think how much easier it will be: +used to be so painful to learn something like differentiation +or integration, now you can just click on the equation and it gets +done automatically..." + diff --git a/support/hypertex/hypertex/xhdvi_binaries/xhdvi.alpha_OSF1 b/support/hypertex/hypertex/xhdvi_binaries/xhdvi.alpha_OSF1 Binary files differnew file mode 100644 index 0000000000..c29e0d45bb --- /dev/null +++ b/support/hypertex/hypertex/xhdvi_binaries/xhdvi.alpha_OSF1 diff --git a/support/hypertex/hypertex/xhdvi_binaries/xhdvi.i486_Next b/support/hypertex/hypertex/xhdvi_binaries/xhdvi.i486_Next Binary files differnew file mode 100644 index 0000000000..16980520c8 --- /dev/null +++ b/support/hypertex/hypertex/xhdvi_binaries/xhdvi.i486_Next diff --git a/support/hypertex/hypertex/xhdvi_binaries/xhdvi.rs6k_AIX3.2.5 b/support/hypertex/hypertex/xhdvi_binaries/xhdvi.rs6k_AIX3.2.5 Binary files differnew file mode 100644 index 0000000000..43f429ddc9 --- /dev/null +++ b/support/hypertex/hypertex/xhdvi_binaries/xhdvi.rs6k_AIX3.2.5 diff --git a/support/hypertex/hypertex/xhdvi_binaries/xhdvi.sgi_IRIX4.0.5C b/support/hypertex/hypertex/xhdvi_binaries/xhdvi.sgi_IRIX4.0.5C Binary files differnew file mode 100644 index 0000000000..410253763c --- /dev/null +++ b/support/hypertex/hypertex/xhdvi_binaries/xhdvi.sgi_IRIX4.0.5C diff --git a/support/hypertex/hypertex/xhdvi_binaries/xhdvi.sun3_SunOS4 b/support/hypertex/hypertex/xhdvi_binaries/xhdvi.sun3_SunOS4 Binary files differnew file mode 100644 index 0000000000..ef827dd116 --- /dev/null +++ b/support/hypertex/hypertex/xhdvi_binaries/xhdvi.sun3_SunOS4 diff --git a/support/hypertex/hypertex/xhdvi_binaries/xhdvi.sun4_SunOS4 b/support/hypertex/hypertex/xhdvi_binaries/xhdvi.sun4_SunOS4 Binary files differnew file mode 100644 index 0000000000..8979cd9dac --- /dev/null +++ b/support/hypertex/hypertex/xhdvi_binaries/xhdvi.sun4_SunOS4 diff --git a/support/hypertex/hypertex/xhdvi_binaries/xhdvi_0.7.Linux b/support/hypertex/hypertex/xhdvi_binaries/xhdvi_0.7.Linux Binary files differnew file mode 100644 index 0000000000..847c2f7510 --- /dev/null +++ b/support/hypertex/hypertex/xhdvi_binaries/xhdvi_0.7.Linux |