Article View: comp.text.tex
Article #371Cassette label macros - CASS.TEX
From: Morgan Besson
Date: Thu, 23 Jul 1992 17:12
Date: Thu, 23 Jul 1992 17:12
199 lines
5715 bytes
5715 bytes
Here is a file of macros, CASS.TEX, for producing nicely formatted labels
for audio cassette boxes. The input consists of lines of text for the
cassette title, side A, and side B. The four macros to accomplish this are
\title, \sideA, \sideB, and \finish. The input file has the following form:
----------------------------------------------------------------------
\input cass
\title
0-3 lines
\sideA
lines (songs)
\sideB
lines (songs)
\finish
\end
----------------------------------------------------------------------
All four macro references should be in the file, even if some of the text is
blank.
The macros use \obeylines, so carriage returns start new lines. Also, there
are two internal macros:
1. The symbol > is basically \hfill. Use this to push the remainder of the
line flush right (use for song times, for example.)
2. The symbol | is basically \hfill\break and then indent the next line.
Use this to break lines manually, which is the preferred method here. I
think that for long song titles manual breaks are more logical. This also
avoids attempts to hyphenate, and additionally it indents the next line to
show it is part of the line above.
The defined fonts are \rm,\bf,\it, and \sl. These are cm__9. The default
font for the title is \bf and for the songs is \rm.
The output has four small vrules near the four corners of the label to aid
in cutting it out of the paper with a paper cutter:
1. Make a horizontal cut through the top pair, and a cut through the bottom
pair.
2. Turn the paper 90 degrees, and line up the two left vrules (what's left
of them after the first cut) on the cutting edge and cut. Do the same for
the two right vrules.
3. Turn the paper 90 degrees, and line up the top hrule with the cutting
edge and cut, likewise for the bottom hrule. Actually, I cut just behind
these hrules so they remain on the label. It looks nice.
4. Finally, fold along each of the two remaining hrules. Place it in the
cassette box and use the cardboard label that came with the cassette to keep
it in place.
Below are CASS.TEX and two sample files.
Regards,
Morgan Besson
Villanova University
Villanova, Pennsylvania USA
besson@ucis.vill.edu
% ------------------------- begin CASS.TEX -------------------------
% Macros to make cassette box labels
% - Morgan Besson 7/92 (besson@ucis.vill.edu)
\hsize=286pt
\font\rm=cmr9
\font\bf=cmbx9
\font\it=cmti9
\font\sl=cmsl9
\nopagenumbers
\parskip=0pt
\parindent=0pt
\baselineskip=9.5pt
\let\fullhsize=\hsize
\catcode`|=\active
\def|{\par\indent\kern12pt}
\catcode`>=\active
\def>{\hfill}
\newbox\titlebox
\newbox\leftbox
\newbox\rightbox
\def\title{\begingroup\obeylines
\global\setbox\titlebox=\vbox\bgroup
\hsize=.97\fullhsize \bf}
\def\sideA{\egroup\endgroup
\begingroup\obeylines
\global\setbox\leftbox=\vtop\bgroup
\hsize=.47\fullhsize
\centerline{\bf Side A}\smallskip}
\def\sideB{\egroup\endgroup\begingroup\obeylines
\global\setbox\rightbox=\vtop\bgroup
\hsize=.47\fullhsize
\centerline{\bf Side B}\smallskip}
\def\finish{\egroup\endgroup
\line{\vrule\strut\hfill\vrule}
\bigskip
\hrule\vbox to48pt{\vfill\line{\hfil\copy\titlebox\hfil}\vfill}
\hrule\vbox to36pt{\vfill\line{\hfil\box\titlebox\hfil}\vfill}\hrule
\smallskip
\vbox to184truept{
\line{\hfil\box\leftbox\hfil\vrule\hfil\box\rightbox\hfil}
\vfill\hrule}
\bigskip
\line{\vrule\strut\hfill\vrule}
\vfill\eject}
\rm
%------------------------- end CASS.TEX -------------------------
%------------------------- begin SAMPLE1.TEX -------------------------
\input cass
\title
A: Mighty Like a Rose - Elvis Costello
B: Ing\'enue - k. d. lang
\sideA
The Other Side of Summer > 3:56
Hurry Down Doomsday (The | Bugs Are Taking Over) > 4:05
How To Be Dumb > 5:12
All Grown Up > 4:17
Invasion Hit Parade > 5:33
Harpies Bizarre > 3:44
After the Fall > 4:38
Georgie and Her Rival > 3:38
So Like Candy > 4:36
Interlude: Couldn't Call It | Unexpected No.~2 > 0:22
Playboy To a Man > 3:17
Sweet Pear > 3:36
Broken > 3:36
Couldn't Call It | Unexpected No.~4 > 3:49
\sideB
Save Me > 4:33
The Mind of Love > 3:48
Miss Chatelaine > 3:48
Wash Me Clean > 3:17
So It Shall Be > 4:29
Still Thrives This Love > 3:33
Season of Hollow Soul > 4:56
Outside Myself > 4:57
Tears of Love's Recall > 3:48
Constant Craving > 4:38
\finish
\end
%------------------------- end SAMPLE1.TEX -------------------------
%------------------------- begin SAMPLE2.TEX -------------------------
\input cass
\title
J. S. Bach, Cello Suites Nos.~2, 3, \&5 - Maurice Gendron
\sideA
{\it No.~2 in D Minor, BWV 1008}
\smallskip
Pr\'elude > 3:33
Allemande > 3:36
Courante > 2:00
Sarabande > 4:37
Menuets I--II > 2:58
Gigue > 2:47
\bigskip
{\it No.~3 in C Major, BWV 1009}
\smallskip
Pr\'elude > 3:36
Allemande > 3:33
Courante > 3:12
Sarabande > 4:21
Bourr\'ees I--II > 3:09
Gigue > 3:24
\sideB
{\it No.~5 in C Minor, BWV 1011}
\smallskip
Pr\'elude > 5:45
Allemande > 5:22
Courante > 2:27
Sarabande > 3:25
Gavottes I--II > 4:46
Gigue > 2:37
\finish
\end
%------------------------- end SAMPLE2.TEX -------------------------
Technical Details
Message-ID:
<1992Jul23.161629.22563@vu-vlsi.vill.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!gatech!psuvax1!rutgers!ub!dsinc!vu-vlsi.vill.edu!newsShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!psuvax1!rutgers!ub!dsinc!vu-vlsi.vill.edu!news From: besson@ucis.vill.edu (Morgan Besson) Newsgroups: comp.text.tex Subject: Cassette label macros - CASS.TEX Message-ID: <1992Jul23.161629.22563@vu-vlsi.vill.edu> Date: 23 Jul 92 17:12:00 GMT Sender: news@vu-vlsi.vill.edu (Usenet news administrator) Organization: Villanova University Lines: 199 Nntp-Posting-Host: ucis.vill.edu