Subject: TeXhax Digest V89 #84 From: TeXhax Digest Errors-To: TeXhax-request@cs.washington.edu Maint-Path: TeXhax-request@cs.washington.edu To: TeXhax-Distribution-List:; Reply-To: TeXhax@cs.washington.edu TeXhax Digest Tuesday, September 19, 1989 Volume 89 : Issue 84 Moderators: Tiina Modisett and Pierre MacKay %%% The TeXhax digest is brought to you as a service of the TeX Users Group %%% %%% in cooperation with the UnixTeX distribution service at the %%% %%% University of Washington %%% Today's Topics: MTEX User's Guide lfonts.tex Trigonometry in \TeX ! MacBibTeX PD BibTex for the Mac is available Typos in the metafontbook LaTeX bug or feature? End of Comand command, and some other stuff Dvipage with PK fonts ------------------------------------------------------------------------------- Date: 9 Sep 89 3:57 -0700 From: Francois Jalbert Subject: MTEX User's Guide Keywords: MTeX, user guide There has been some talk in the last few months about the music typesetting set of macros MTeX. Since I came across that package last April, I have looked somewhat into it. I would like to share my findings with all of you people out there. MTeX can handle single-staff music with one or two voices. It can also put text below the staff, and knows about most accents that go above notes, or simply above the staff. However, it cannot deal with multiple- staffs, or with notes of variable size. The current version is only 0.92 and one can wonder if a version 1.0 ever saw the light of day. I am still hoping one day to finally manage to contact the authors. So far, no luck in my attempts. I immediately saw last April the potential of this system which happened to answer exactly my modest needs. Unfortunately, the brief document in german enumerating the available macros was the only documentation available. I felt the need for a more complete user's guide still remained unanswered, and so I volunteered to give it a try. The guide (Version 1.1) has been around for some time and is about 40 pages long. Among other things of interest, Appendix C lists several errors I already have found in MTeX. I also generated several standard series of fonts which accompany the guide. The whole MuTeX package (MTeX+Guide+Fonts) can be FTPed from the following three locations stolaf.edu 130.71.128.1 pub/MuTeX.tar.Z yale-zoo-suned.arpa (suned.zoo.cs.yale.edu) 128.36.21.1 cs.ubc.ca 128.189.97.5 src/MuTeX/MuTeX.tar.Z (slow) If you plan on making this package available for FTP at your site, I would appreciate you letting me know your coordinates and the path to be used for retrieving MuTeX. I plan on keeping updating the list of these sites in the Preface of the forthcoming versions of this guide. Francois Jalbert ' jalbert@cs.ubc.ca ------------------------------------------------------------------------------- Date: Thu 7 Sep 89 05:48:34-EDT From: b beeton Subject: lfonts.tex Keywords: lfonts.tex leslie lamport asked, in reply to an earlier question about an old version of lfonts.tex, whether the current version, dated 10 april 89, was at score. well, it is, has been since at least early june, but score itself may no longer be accessible by the time you read this. (it was due to be unplugged on 31 august, but they're taking their time about it.) i've arranged with the keeper of the clarkson archive to make sure that everything at clarkson that came from score will be up to date (though checking may take some time). instructions for access to the clarkson archive are published regularly in tugboat; there is a mail retrieval service in addition to ftp access. -- bb ----------------------------------------------------------------------------- Date: Wed, 6 SEP 89 18:36:26 BST From: CHAA006%vaxb.rhbnc.ac.uk@NSFnet-Relay.AC.UK Subject: Trigonometry in \TeX ! Reply-To: Philip Taylor (RHBNC) Keywords: TeX, trigonometry At TUG '89, Kees van der Laan asked about the implementation/availability of trig. functions in TeX, and I promised to send him some code which I had written. Unfortunately I've lost Kees' address, but I hope that he reads one of these three lists (Kees, are you there ?); anyhow, the routines may be of use/interest to others, particularly those who want to perform geometric transformations on embedded PostScript figures. ** Phil. Philip Taylor Royal Holloway and Bedford New College. %= = = = = = = = = = = = = T R I G O N O M E T R Y . T E X = = = = = = = = = %%% Trigonometry.TeX: %%% Routines to calculate the sine of an angle expressed in radians. %%% So far as I can tell, the results are accurate to four places %%% of decimals, for arguments in the range -pi/2 .. pi/2, except %%% for `ridiculously small' arguments, which cannot be accurately represented. %%% The routines for cosine and tangent are left to the reader ... %%% After a call to \Sin (), the result is available for typesetting %%% or boxing, and may also be extracted from the control-sequence \sine. %%% Grouping is used to hide most things, but the following csnames are %%% globally defined: %%% \nodimen, \n@dimen, \product, \sine, \term, \t@rm, \Term \newif \ifdebug %%% turn me on to see TeX hard at work ... \def \term #1{{x^{#1} \over #1!}} The power series expansion for $\sin$ is: $$ \sin x = x - \term3 + \term5 - \term7 + \cdots$$ \indent and for $\cos$ is: $$ \cos x = 1 - \term2 + \term4 - \term6 + \cdots$$ \let \then = \relax \chardef \letter = 11 \chardef \other = 12 \def \radian {pt } \let \radians = \radian \let \dimensionlessunit = \radian \let \dimensionlessunits = \dimensionlessunit \def \internalunit {sp } \let \internalunits = \internalunit \newif \ifstillconverging \def \Message #1{\ifdebug \then \message {#1} \fi} { %%% Things that need abnormal catcodes %%% \catcode `\@ = \letter \gdef \nodimen {\expandafter \n@dimen \the \dimen} \gdef \term #1 #2 #3% {\edef \t@ {\the #1}%%% freeze parameter 1 (count, by value) \edef \t@@ {\expandafter \n@dimen \the #2\radian}% %%% freeze parameter 2 (dimen, by value) \t@rm {\t@} {\t@@} {#3}% } \gdef \t@rm #1 #2 #3% {{% \count 0 = 0 \dimen 0 = 1 \dimensionlessunit \dimen 2 = #2\relax \Message {Calculating term #1 of \nodimen 2}% \loop \ifnum \count 0 < #1 \then \advance \count 0 by 1 \Message {Iteration \the \count 0 \space}% \Multiply \dimen 0 by {\dimen 2}% \Message {After multiplication, term = \nodimen 0}% \Divide \dimen 0 by {\count 0}% \Message {After division, term = \nodimen 0}% \repeat \Message {Final value for term #1 of \nodimen 2 \space is \nodimen 0}% \xdef \Term {#3 = \nodimen 0 \radians}% \aftergroup \Term }} \catcode `\p = \other \catcode `\t = \other \gdef \n@dimen #1pt{#1} %%% throw away the ``pt'' } \def \Divide #1by #2{\divide #1 by #2} %%% just a synonym \def \Multiply #1by #2%%% allows division of a dimen by a dimen {{%%% should really freeze parameter 2 (dimen, passed by value) \count 0 = #1\relax \count 2 = #2\relax \count 4 = 65536 \Message {Before scaling, count 0 = \the \count 0 \space and count 2 = \the \count 2}% \ifnum \count 0 > 32767 %%% do our best to avoid overflow \then \divide \count 0 by 4 \divide \count 4 by 4 \else \ifnum \count 0 < -32767 \then \divide \count 0 by 4 \divide \count 4 by 4 \else \fi \fi \ifnum \count 2 > 32767 %%% while retaining reasonable accuracy \then \divide \count 2 by 4 \divide \count 4 by 4 \else \ifnum \count 2 < -32767 \then \divide \count 2 by 4 \divide \count 4 by 4 \else \fi \fi \multiply \count 0 by \count 2 \divide \count 0 by \count 4 \xdef \product {#1 = \the \count 0 \internalunits}% \aftergroup \product }} \def \Sin (#1)% {{% \dimen 0 = #1 \radian \dimen 2 = 3.1415926535897963 \radian %%% a well-known constant \divide \dimen 2 by 2 %%% we only deal with -pi/2 : pi/2 \ifdim \dimen 0 > \dimen 2 \then \message {Sin: argument (\nodimen 0) too large --- use range reduction}% \xdef \sine {}% \else \ifdim \dimen 0 < - \dimen 2 \then \message {Sin: argument (\nodimen 0) too large --- use range reduction}% \xdef \sine {}% \else \Message {Sin: calculating Sin of \nodimen 0}% \count 0 = 1 %%% see power-series expansion for sine \dimen 2 = 1 \radian %%% ditto \dimen 4 = 0 \radian %%% ditto \loop \ifnum \dimen 2 = 0 %%% then we've done \then \stillconvergingfalse \else \stillconvergingtrue \fi \ifstillconverging %%% then calculate next term \then \term {\count 0} {\dimen 0} {\dimen 2}% \advance \count 0 by 2 \count 2 = \count 0 \divide \count 2 by 2 \ifodd \count 2 %%% signs alternate \then \advance \dimen 4 by \dimen 2 \else \advance \dimen 4 by -\dimen 2 \fi \repeat \xdef \sine {\nodimen 4}% \fi \fi \aftergroup \sine }} %%% What follows is just a demonstration of the \Sin function $$ \def \rule {\noalign {\hrule}} \def \SIN (#1){&&\Sin (#1)&\cr\noalign{\message {The sine of #1 is \sine}}} \mathcode `\- = 32768 %%% just a bodge to improve alignment \let \minus = - \begingroup \catcode `\- = \active \gdef -{\llap{\minus}} \endgroup \vbox {\offinterlineskip \halign {\vrule #& \qquad \hfil $#$ & \vrule # & \qquad $#$ \hfil & \vrule # \strut \cr \rule &\omit {\hfil $x$ \hfil} && \omit {\hfil $\sin x$ \hfil} & \cr \rule \SIN (-1.6) \SIN (-1.5) \SIN (-1.4) \SIN (-1.3) \SIN (-1.2) \SIN (-1.1) \SIN (-1.0) \SIN (-0.9) \SIN (-0.8) \SIN (-0.7) \SIN (-0.6) \SIN (-0.5) \SIN (-0.4) \SIN (-0.3) \SIN (-0.2) \SIN (-0.1) \SIN (-0.01) \SIN (-0.001) \SIN (-0.0001) \SIN (0) \SIN (0.0001) \SIN (0.001) \SIN (0.01) \SIN (0.1) \SIN (0.2) \SIN (0.3) \SIN (0.4) \SIN (0.5) \SIN (0.6) \SIN (0.7) \SIN (0.8) \SIN (0.9) \SIN (1.0) \SIN (1.1) \SIN (1.2) \SIN (1.3) \SIN (1.4) \SIN (1.5) \SIN (1.6) \rule} } $$ \end -------------------------------------------------------------------------- Date: 6 Sep 89 22:24:00 CDT From: "UTPE::ROBERT" Subject: MacBibTeX Keywords: Mac, BibTeX >%% Moderator's note: BELTRAME@ICNUCEVM.CNUCE.CNR.IT is also >%% interested in any information on this subject. > >Does anyone have a version of Bibtex which works on the Macintosh? > >Michael Assuming you haven't been inundated by responses to this .. I have a binhexed copy of MacBibTeX available for ftp from one of my machines. You can get a copy of the file from perv.pe.utexas.edu ( 128.83.167.1 ) with a user name of anonymous and any string for a password. The file is DISK$MACS:[TEX]MACBIBTEX.HQX. I originally got a copy of this from a machine at UCLA ( ats.ucla.edu, 10.3.0.1 ) but I can't seem to raise that machine at the moment. I took a quick look at some of the other archives but didn't see it out there either. A little strange .. Let me know if you have any problems getting the file .. Robert Schneider |Robert Schneider | Internet: robert@perv.pe.utexas.edu| |Department of Petroleum Engineering | BITNET: pefv673@utchpc | |University of Texas at Austin | THEnet: PERV::ROBERT | ---------------------------------------------------------------------------- Date: Thu, 7 Sep 89 07:01:23 CDT From: Michael G. Kahn Subject: PD BibTex for the Mac is available Keywords: BibTeX, Macintosh There has been a couple recent requests for BibTex for the Mac. MacBibtex, a public domain version of bibtex 0.99c is available, although the announcement in TexHax is almost 1 year old. Version 1.1 has been stable for 9 months and although there is much that could be done to improve it, I always seem to rationalize that it works well enough to go on to other things. There are two ways to get macbibtex. Anonymous ftp to SCIENCE.UTAH.EDU has a binhexed, stuffit version of the application, sources, and style files in the directory APS:. Or you can send a blank diskette directly to me and I will return it to you with the application, sources, and all the style files and doc files that were on SCORE.STANFORD.EDU (rest-in-peace). In addition, now that I suspect there will be renewed interest, I'll submit the application and the README file to Info-Mac so that European users can get it via the servers that mirror the Info-Mac library. Michael Kahn (kahn@wucs1.wustl.edu or kahn@sumex-aim.stanford.edu) Department of Internal Medicine Box 8121 660 South Euclid Avenue St. Louis MO 63110 ------------------------------------------------------------------------------ Date: Thu 7 Sep 89 06:12:20-EDT From: b beeton Subject: Typos in the metafontbook Keywords: typos, METAFONT pete siemsen reports (texhax #80) that he has found several typos in the metafontbook, and wonders to whom he can report them. the tex users group periodically distributes with tugboat the latest official list of errata to the whole computers & typesetting series and changes to tex.web, mf.web and the cm fonts, as received from donald knuth. (knuth "cuts off" the list from time to time -- it's been an annual event for the past couple of years -- but the back issues are available from tug; send a message to tug@math.ams.com for information on obtaining them.) if, after checking the list of known errata, you still believe you are the first to find a typo in any of the books, send a message *on paper* to Prof. Donald Knuth Department of Computer Science Stanford University Stanford, CA 94305 knuth is now working on a sun workstation that is not, and won't be, connected to any network. his very efficient secretary preprocesses his mail and delivers it to him at agreed-on intervals. if you are the "first finder", your bounty will be sent to you in due time, and the correction will appear in the next edition of the errata. -- bb ---------------------------------------------------------------------------- Date: Thu, 07 Sep 89 15:20:14 BST From: Jon Warbrick Subject: LaTeX bug or feature? Keywords: LaTeX, bug This file: \documentstyle{article} \begin{document} \include{part1} \addtocontents{toc}{\protect\newpage} \include{part2} \end{document} when processed by LaTeX produces the following .AUX file: \relax \@input{part1.aux} \@input{part2.aux} \@writefile{toc}{\string\newpage\space } Notice how the \@writefile generated by the \addtocontents comes after the part2.aux file is input rather than before as you might expect. As a result, when the .aux files are processed at the end of the job the table of contents entries for part2 appear in the .toc file *BEFORE* the \newpage rather than after as was intended. This happens because, in the definition of \include, the write to the .aux file is proceded by an \immediate but in the definition of \addtocontents there there isn't one. As far as I can see there should either be an \immediate in both or in neither. A work around is to move the \addtocontents into part2.tex, but is this something that can or should be fixed? Jon. Jon Warbrick, Computing Service, Plymouth (0752) 233913 (ddi) Polytechnic South West, --. Drake Circus, `--> Polytechnic South West was formed from Plymouth PL4 8AA UK. Plymouth Polytechnic on 1st April 1989 ---------------------------------------------------------------------- Date: Thu, 07 Sep 89 15:03:18 PDT From: S John Banner Subject: End of Comand command, and some other stuff Keywords: end of command Hello, I may be wrong, but reading the discussion about wanting to make "\ " work all the time gave me an idea. Would it not work to say \def\ {\discresionary{}{}{\hspace \smallskipamount}} or something relatively equivalent? According to the TeXbook, the first two go before, and after a line break (if it occurs there), and the last goes at that location if there is no break. This strikes me as fixing everything (i.e. "\ " works as a space if we need a space, and does nothing if we don't need a space). Just a suggestion. Now for a question. I reasonably often find that I want to have one or more paragraphs layed out like: Line one starts like this... This is still the same para, as is this, etc. I have come up with a macro that I can use to do this, but I am unhappy with it: % % Toggle one line hanging indent on/off for the remaining paragraphs. % \def\hanging{ \advance\leftskip by \parindent \parindent=-\parindent \advance\hsize by \parindent } % % Set the parameter to have a hanging indent. % \def\hang{ \hangindent=\parindent \noindent \hangafter=1 } % % Adjust the narrower macro to deal with the above hanging indent % stuff. % \def\narrower{\ifdim\parindent<0pt\dimen0=-\parindent\else\dimen0=\parindent\fi \advance\leftskip by \dimen0 \advance\rightskip by \dimen0 } As you can see, in order to make it work, I also have to redefine \narrower, and it breaks some other stuff as well (I don't remember quite what, but it does). Does anyone have any suggestions that might make things a bit cleaner? In case you haven't realized, I use Plain TeX pretty much exclusivly... Thanks much, S. John Banner ------------------------------------------------------------------------------ Date: Fri, 8 Sep 89 10:01 BST From: kevin@math.lsa.umich.edu Subject: Dvipage with PK fonts Keywords: dvipage, PK I recently re-installed dvipage after our operating system was updated. I upgraded to version 3.0, with the patches to read PK fonts as supplied in TeXhax.89.034. This led to a curious bug---the first appearance of every character wasn't displayed until after that page had been stored. The bug can be corrected by running patch on the following context diff *** fonts.c Fri Sep 8 12:26:00 1989 --- fonts.c.old Fri Sep 8 12:26:00 1989 *************** *** 1213,1219 **** if (ptr->width == 0 || ptr->height == 0) { ptr->where.address.pixrectptr = (struct pixrect *) 0; ! return TRUE; } fseek(font_fp, (long)ptr->where.address.fileOffset, 0); --- 1213,1219 ---- if (ptr->width == 0 || ptr->height == 0) { ptr->where.address.pixrectptr = (struct pixrect *) 0; ! return; } fseek(font_fp, (long)ptr->where.address.fileOffset, 0); *************** *** 1331,1335 **** } ptr->where.isloaded = TRUE; - return TRUE; } --- 1331,1334 ---- ----------------------------------------------------------------------- %%% Further information about the TeXhax Digest, the TeX %%% Users Group, and the latest software versions is available %%% in every tenth issue of the TeXhax Digest. %%% %%% Concerning subscriptions, address changes, unsubscribing: %%% %%% BITNET: send a one-line mail message to LISTSERV@xxx %%% SUBSCRIBE TEX-L % to subscribe %%% or UNSUBSCRIBE TEX-L %%% %%% Internet: send a similar one line mail message to %%% TeXhax-request@cs.washington.edu %%% JANET users may choose to use %%% texhax-request@uk.ac.nsf %%% All submissions to: TeXhax@cs.washington.edu %%% %%% Back issues available for FTPing as: %%% machine: directory: filename: %%% JUNE.CS.WASHINGTON.EDU TeXhax/TeXhaxyy.nn %%% yy = last two digits of current year %%% nn = issue number %%% %%%\bye %%% End of TeXhax Digest ************************** -------