ASOKOLOV@ESOC1.BITNET (Alex Sokolov IKI) (02/17/91)
Dear Subscribers I tried to change macro \TeXref used in Gentle Introduction to TeX to place some text in the margin just to the left of the line where \TeXref occurs so that now it will place the text to the left on even page and to the right on odd page. So I redefined this macro \newdimen\theight \def \TeXref#1{% \vadjust{\setbox0=\hbox{\sevenrm\TeX book: #1}% \theight=\ht0 \advance\theight by \dp0 \advance\theight by \lineskip \kern -\theight \vbox to \theight{% \ifodd\pageno \leftline{\llap{\box0\qquad}}% \else \rightline{\rlap{\qquad\box0}}% \fi \vss}}} But this does not serve. Let see what happens if macro is invoked near page break. TeX reads more than will fit on one page so TeX can process macro while constructing "recent" page thought text to be placed in the margin will go on the next one. Any suggestion? Vladimir Rozov. VOICE : (7-095)-333-41-12 TELEX : 4 11 498 star su FAX : (7-095)-310-70-23 E-MAIL : ASOKOLOV@ESOC1.BITNET ADDRESS : Space Research Institute (IKI) USSR Academy of Science ! : Profsoyuznaya 84/32, 117810 Moscow GSP-7, USSR
eijkhout@s41.csrd.uiuc.edu (Victor Eijkhout) (02/17/91)
ASOKOLOV@ESOC1.BITNET (Alex Sokolov IKI) writes: > \ifodd\pageno > \leftline{\llap{\box0\qquad}}% > \else > \rightline{\rlap{\qquad\box0}}% Indeed, this problem is less than trivial. Basically there are two approaches: -- write an output routine on the premisse that \vsize=\baselineskip, so that you always know where you are, or -- make a two-pass attack on the problem. -- run the job twice, once with all notes left, once right. The big K wrote a small piece about this problem in TUGboat, a couple of years ago. Title was (I think) `Jill's macros'. Victor.
dhosek@freke.claremont.edu (Don Hosek) (02/17/91)
In article <1991Feb17.013638.16362@csrd.uiuc.edu>, eijkhout@s41.csrd.uiuc.edu (Victor Eijkhout) writes: > ASOKOLOV@ESOC1.BITNET (Alex Sokolov IKI) writes: >> \ifodd\pageno >> \leftline{\llap{\box0\qquad}}% >> \else >> \rightline{\rlap{\qquad\box0}}% > Indeed, this problem is less than trivial. > Basically there are two approaches: > -- write an > output routine on the premisse that \vsize=\baselineskip, > so that you always know where you are, or > -- make a two-pass attack on the problem. > -- run the job twice, once with all notes left, once right. > The big K wrote a small piece about this problem > in TUGboat, a couple of years ago. Title was > (I think) `Jill's macros'. I've attacked this problem twice. Once in my LaTeX style files class at Texas A&M last year where after showing how to get footnotes numbered within a page, we went on to create environments that "stuck out" into the outside margin and a style option for guaranteeing that margin pars are always in the correct margin. I also did the same thing in plain TeX for a local professor's Geneology book; the macros were a modified version of the Knuth macros: Knuth's macros work by only outputting every other page. I thought that was stupid since it still required two passes and every page was typeset anyway, so I rewrote the macros so that an auxiliary file was used to check the positioning of the notes on subsequent runs. That routine is currently "in the shop" since it turned out that for some reason the routine puts all marginal notes in the wrong margin for all pages divisible by 11. I haven't looked at the code yet to fix it (the fix is a favor being done in my scant spare time), but when it's fixed, I'll try to isolate it and pop it in [anonymous.tex.inputs.plain-contrib] on ymir. -dh --- Don Hosek To retrieve files from ymir via the | dhosek@ymir.claremont.edu mailserver, send a message to | Quixote TeX Consulting mailserv@ymir.claremont.edu with a | 714-625-0147 line saying send [DIRECTORY]FILENAME where DIRECTORY is the FTP directory (sans "anonymous") and FILENAME is the filename, e.g. "send [tex]00readme.txt". There is a list of files in each directory under the name 00files.txt Binary files are not available by this technique.