wyle@bernina.ethz.ch (Mitchell Wyle) (12/30/90)
#! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of shell archive." # Contents: readme p.tdb p.tex tape-doc.tex tape.awk tape.example # tape.readme tape.sty # Wrapped by wyle@inf.ethz.ch on Fri Dec 28 15:38:07 1990 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'readme' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'readme'\" else echo shar: Extracting \"'readme'\" \(4238 characters\) sed "s/^X//" >'readme' <<'END_OF_FILE' XAudio cassette database, labels, inventory tools? Oh no! Not again!! X XYup, we're doing it again, and we're gonna keep on doing it until someone Xgets it right! X XI am the proud owner of several HUNDRED audio cassettes. Some are Xstudio tapes; most are self-made recordings of CD's and record Xalbums I own. I have seen and used several computer based cassette Xlabel making schemes, including: X X X o MacDraw(tm) template upon which you fill in your own text or X graphics X X o PC-based schemes which prompt you for text (some of which don't X print the labels ferchrissakes! X X o Native postscript(tm) code template in which you change the text X X o Pure-ascii text with ascii cut- and fold- lines (ha ha) X X o Hypercard(tm) Stack(bm) database which prints nice labels X X o Latex style file X X XNone of these schemes is exactly what I want. X XI do not have several thousand dollars to give to Apple Computer for Xone of their Xerox Star rip-off clones (toasters), just to produce some Xcassette labels. I don't happen to like Xerox PARC's Notecards Xsoftware, which incidentally was also stollen by Apple and was also Xgiven a fancier name. X XWe have some Apple hardware (toasters) at work, but I would rather Xlabel my audio cassettes at home on my own time and on my own Xhardware. Since I don't have a postscript(tm) printer, the postscript(tm) Xtemplate system is also useless to me. X XWhat's left? X XI ftp'd the latex style file from sun.soe.clarkson.edu and noticed that Xusing the cassette style format as a database would make life Xmiserable. First of all, it has a lot of Latex X\LargeCommand[cokebottle]{longparametername}{\several\commands text} Xstyle commands. In addition to the tedium of typing in all of those Xcommands (or writing a large set of editor macros to help), the source Xfiles are not so simple to parse when writing report programs for Xoutput other than cassette labels. X XSo I retreated to that popular and hacky language AWK which runs on dos, Xmac-os, Unix, and lots of other places (not on cp/m, though :-(). I Xdesigned a minimal database format and wrote an awk program to generate Xlatex album files for use with Sunil Podar's neato cassette latex style. X XMy database format is simple. The first letter is the line identifier. X Xk is KEY a short string which identifies the entry uniquely Xa is ARTIST the guy who wrote the music or whatever Xt is TITLE the title of the album or tape or what have you Xs is SONG an entry in the list of stuff on the tape Xo is OTHER comments you want on the tape label Xc is COMMENT stuff you do NOT want on the tape label but need in the database Xe is END a marker for the end-of-entry X Xblank lines in the database files are ignored by the awk script. X XA sample Tape DataBase file p.tdb is included. To see what the script does, Xtype something like X X% awk -f tape.awk < p.tdb X Xand then examine the output in o.tex. Then you can type something like X X% latex p X Xto see what the labels would look like. X XThe script (tape.awk) yells at you if it gets confused or can't find Xsome important fields in an entry. It always tries to recover and Xoutput a dummy string for the missing entry(ies). If there is no "e" Xfield in an album entry, you are in deep trouble; the script is dumb. X XI designed this database scheme in 10 minutes and wrote the awk script in Xhalf an hour, then I added the comments field and ignore blank-line stuff. XThis readme file is taking longer than the entire database system to write! X XBUGS IN tape.awk X X The e END-OF-ENTRY field is an ugly hack should be fixed X X The output file is fixed "o.tex" X X Sunil's 2-albums-per-tape hack is weak X X XTODO X X lots!! X X reports other than cassette labels X X a /bin/sh wrapper for the awk script X X------------------------ X XMacdraw was a trademark of Apple Computer. Then it became a trademark Xof some other software company which folded. Now, I believe, the Macdraw Xtrademark belongs to Claris, or perhaps to Apple again. I'm sure some Xlawyer somewhere cares. X XHypercard is a trademark of Apple Computer Inc., Cupertino XCalifornia, which should not be confused with Apple Records. X Xpostscript is a trademark of another company which prefers law suits to Xinnovation, namely Adobe Systems Inc. END_OF_FILE if test 4238 -ne `wc -c <'readme'`; then echo shar: \"'readme'\" unpacked with wrong size! fi # end of 'readme' fi if test -f 'p.tdb' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'p.tdb'\" else echo shar: Extracting \"'p.tdb'\" \(1134 characters\) sed "s/^X//" >'p.tdb' <<'END_OF_FILE' Xk p001 Xa Pink Floyd Xt Dark Side of the Moon Xs speak to me Xs breathe Xs on the run Xs time Xs great gig in the sky Xs money Xs us and them Xs any colour you like Xs brain damage Xs eclipse Xo recorded at abbey road studios June 72 to January 1973 Xe X Xk p002 Xa Pink Floyd Xt Wish You were Here Xs shine on you crazy diamond (part one) Xs welcome to the machine Xs have a cigar Xs wish you were here Xs shine on you crazy diamond (part two) Xo recorded at abbey road studios january to july 1975 Xo all lyrics by Roger Waters Xe X X Xk p003 Xa Pink Floyd Xt Animals Xs Pigs on the wing (part one) Xs dogs Xs pigs (three different ones) Xs sheep Xs Pigs on the wing (part two) Xo all lyrics by roger waters Xo recorded at britannia row studios Lodon, 1977 Xe X Xk p004 Xa Pink Floyd Xt Meddle Xe X Xk p005 Xa Pink Floyd Xt The Wall Xe X Xk p006 Xt Regatta de Blanc Xa The Police Xs message in a bottle Xs it's alright for you Xs deathwish Xs on any other day Xs contact Xs regatta de blanc Xs bring on the night Xs walking on the moon Xs the bed's too big without you Xs does everyone stare Xs no time this time Xo recorded at surrey sound studios Xe X Xk p007 Xt ghost in the machine Xa The Police Xe END_OF_FILE if test 1134 -ne `wc -c <'p.tdb'`; then echo shar: \"'p.tdb'\" unpacked with wrong size! fi # end of 'p.tdb' fi if test -f 'p.tex' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'p.tex'\" else echo shar: Extracting \"'p.tex'\" \(249 characters\) sed "s/^X//" >'p.tex' <<'END_OF_FILE' X\documentstyle[tape]{article} X\renewcommand{\globaltapeid}{Rock} X\begin{document} X\input o.tex X\maketape[wyle]{p001}{p002} X\newpage X\maketape[wyle]{p003}{p004} X\newpage X\maketape[wyle]{p005}{p005} X\newpage X\maketape[wyle]{p006}{p007} X\end{document} END_OF_FILE if test 249 -ne `wc -c <'p.tex'`; then echo shar: \"'p.tex'\" unpacked with wrong size! fi # end of 'p.tex' fi if test -f 'tape-doc.tex' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'tape-doc.tex'\" else echo shar: Extracting \"'tape-doc.tex'\" \(9986 characters\) sed "s/^X//" >'tape-doc.tex' <<'END_OF_FILE' X\documentstyle[tape]{article} X\setlength{\textwidth}{6.5in} X\setlength{\textheight}{9in} X\setlength{\oddsidemargin}{1in} X\renewcommand{\baselinestretch}{1.25} X\parindent=15pt X\parskip=6pt plus 1pt X\pagestyle{plain} X\begin{document} X X\section*{Making Casette Tape Labels using \LaTeX} X\begin{flushright} X\begin{tabular}{@{}l@{}} XSunil Podar (podar@sbcs)\\ XS.U.N.Y.\ at Stony Brook.\\ X X\end{tabular} X\end{flushright} X X\vspace*{8mm} XThis document describes a way to maintain a simple ``album database'' and Xsusequently print formatted casette tape labels. The commands to accomplish Xthis have been implemented as a documentstyle option {\tt tape} and should be Xused with the {\it article} documentstyle, i.e., it should be invoked with Xthe command: X X\verb|\documentstyle[tape]{article}| X XA casette has two sides and each side is assumed to hold one {\it album}. XEach side of a casette tape label has three major fields of information, Xdepicted in Figure 1.: X X\begin{description} X\item[side\hfill] the textual information that goes on the front-flap. This Xis where most of the information goes. X\item[title\hfill] the title given to the {\it side} that goes on the side Xface of the casette cover. X\item[addendum\hfill] the textual information that goes on the back-flap of Xthe casette tape cover. X\end{description} X X\album{1}{\it side--1}{\it title--1}{\it addendum--1} X\album{2}{\it side--2}{\it title--2}{\it addendum--2} X\begin{figure}[hb] X\begin{center} X\renewcommand{\globaltapeid}{\footnotesize global\\tapeid} X\small X\maketape[tapeid]{1}{2}% X\caption[]{The Layout of a Casette Tape Label and the Terminology Used} X\end{center} X\end{figure} X X\newpage XEach side of the tape in the database is defined using the following Xcommand: X X{\it X\verb|\album{|album-id\verb|}{|side\verb|}{|title\verb|}{|addendum\verb|}|} X X\verb|\album| command defines an album. More precisely, it defines one side Xof a casette tape. It takes four arguements: first one Xis a unique label assigned to every album, the other three being {\it side}, X{\it title} and {\it addendum}. X XA tape label holds information for two sides. Following command produces the tape label: X X{\it \verb|\maketape[|tape-id\verb|]{|album1-id\verb|}{|album2-id\verb|}[|optional tape title\verb|]|} X XThe album entry corresponding to {\it album1-id} goes on the left side of the Xtape label and those corresponding to {\it album2-id} on the right side. By Xdefault, individual titles are picked up from the album definition and Xformatted to appear under their own sides. If it is desired to have a single Xtitle as the case may be if both sides of a tape are by the same composer or Xgroup, then a title may be explicitly specified as the last arguement in Xwhich case individual titles of the two albums, as specified in their Xrespective \verb|\album| definitions, are ignored. X XA tape label also has two minor Xfields of information, that go on the side face of the tape label, on either Xside of the title. They are: X\begin{description} X\item[globaltapeid\hfill] This goes on the left side of the title, almost Xflush with the left edge. This may hold information such as the owner's name. XBy default, it is empty and may be changed using a \verb|\renewcommand|. X X\item[tapeid\hfill] This is an identification for individual tapes and goes Xto the right of the title almost flush with the right edge. X\end{description} X XThe width of the box in which the two fields described above are printed, is Xcontrolled by a variable \verb|\tapeidwidth| and may be changed using a X\verb|\setlength| command. Also, by default, a vertical line is drawn Xseparating the two boxes from the title region. It may be changed by a X\verb|\renewcommand| on the parameter \verb|\tapeidmarker| --- one may Xprefer a $\bullet$ (\verb|$\bullet$|) as the demarcator. X XThe {\it side} and the {\it addendum} fields are set in a \verb|minipage| Xenvironment, thus any of the regular paragraph formatting commands of \LaTeX\ Xmay be used; various formatting environments, such as {\tt tabbing}, {\tt Xtabular}, {\tt itemize}, {\tt enumerate}, etc., can also be used. The other Xfields, i.e., {\it title}, {\it globaltapeid} and {\it tapeid} are set in a X\verb|\parbox| thus only \verb|\\| command may be used with no blank lines in Xthe fields -- a parbox permits only one simple paragraph. Just a reminder: to Xget indentation on a line following a \verb|\\| command, use \verb|\hspace*| Xinstead of \verb|\hspace|; according to the manual, any \verb|\hspace| after Xa \verb|\\| is ignored. X XOn the outside of the left hand edge of the tape label, three vertical lines Xare shown. In addition to enforcing a correct height for each of the three Xregions, they also serve as an indicator. Their height is invariant and in Xthe case when more text has been typed in a region than will fit on the Xlabel, they indicate precisely by how much has the height been overshot. They Xshould, of course, be left out when the label is cut. X XNo choice of fonts or fontsizes is enforced and one is completely free to Xchoose these, although it is suggested that a small-sized font (such as those Xobtained by \verb|\small|, \verb|\footnotesize| or \verb|\tiny| declarations) Xbe used since the width of the paragraphs is rather small. Also, if more Xinformation need to be put than will fit, the inter-line spacing may be Xreduced using a \verb|\renewcommand| on the parameter \verb|\baselinestretch|. X XTwo tape labels can be fit on a page, and a \verb|\newpage| declaration ought Xto be placed after every two \verb|\maketape| commands. X XIt is assumed that each \verb|\album| describes one {\it side} of the tape Xlabel, which is also usually the case. If one side of a tape contains more Xthan one album then one will have to declare it as a single \verb|\album| Xdescription. On the other hand, if a single album, or piece of music spans Xboth sides of a casette tape, its description will have to be broken Xinto two \verb|\album| declarations. X XThe label can be cut out along the outer boundary -- the border lines are Xmeant to be part of the label so the cut should be just along the outer edge Xof the lines. X X\section*{General Comments} X XThe tape database is implemented by storing all fields as control sequences, Xthus it is suggested that the database be constructed using reasonable-sized Xfiles; subsequently to make tape labels, only the necessary files be X\verb|\input|, otherwise \TeX\ may run out of memory. X XThe tape database has been implemented with the aim that the database Xfiles be sharable amongst various users so long as every album has a unique X{\it album-id}. In order to load a tape database, all one needs to do is X\verb|\input| the appropriate files and subsequently type the X\verb|\maketape| commands for each desired pair of albums. XFollowing suggestions are made for conventions to be adopted Xso as to enable a large community to share files without much effort: X\begin{itemize} X\item Each album database file have a ``{\tt .bum}'' file-name Xextension\footnote{music album $\Leftrightarrow$ musical bum --- Benny Hill}. XFor such files, the extension will have to be explicitly specified in the X\verb|\input| statement, otherwise \TeX\ will look for a file with a {\tt X.tex} extension. X X\item Separate files be maintained for different composers or groups. X X\item Any character can be used in the {\it album-id}, thus following Xformats are suggested for {\it album-id}'s\\[1mm] X\hspace*{0.5in}\verb|filename.#|, or\\ X\hspace*{0.5in}\verb|filename[#]|, where {\tt \#} is an integer. X XFor example, one may have a file {\tt mozart1.bum} with various album Xdescriptions of Mozart's compositions, each having an album-id of the form X{\tt mozart1.1}, {\tt mozart1.2}, and so on. If a single piece of music Xspans both sides then we might label the two parts using another level of Xsubscripts, for example {\tt mozart.12.1} and {\tt mozart.12.2}. X\end{itemize} X XThe only problem with above conventions is that if two users have a file with Xidentical album-id's then the file will have to be Xcopied and the album-id's changed. X XFollowing page contains an example. Commands used to generate the label would Xbe: X\leftmargini 25pt X\begin{quote} X\begin{verbatim} X\documentstyle[tape]{article} X\renewcommand{\globaltapeid}{\footnotesize\sf Sunil\\Podar} X\begin{document} X\input{example.bum} X\maketape[\sf WC\\12]{vivaldi.1}{vivaldi.2} X\end{document} X\end{verbatim} X\end{quote} X X\newpage X\vspace*{-4mm} X{% X\input{tape.sty} X\input{example.bum} X\renewcommand{\globaltapeid}{\footnotesize\sf Sunil\\Podar} X\begin{center} X\small X\maketape[\sf WC\\12]{vivaldi.1}{vivaldi.2} X\end{center}% X} X X\renewcommand{\baselinestretch}{0.85} X\small\normalsize X X\noindent The file {\tt example.bum} contains: X\begin{quote} X\begin{verbatim} X\album{vivaldi.1}{\small Vivaldi, Antonio\hfill (1678-1741)\\ X\begin{enumerate} X\item Concerto in G Major for Two Mandolins, Strings \& Basso Continuo X\item Concerto in C Major for Mandolin, Strings \& Basso Continuo X\item Concerto in C Major for Two Mandolins, Two Theorboes, Two flutes, XTwo ``Salmoe'', Two Violins, Cello, Strings \& Basso Continuo X\item Concerto a dve Chori in B flat Major, ``Con Violino Discordato'', XStrings \& Basso Continuo X\end{enumerate} X}% X{\normalsize\sf Vivaldi\\Mandolin Concertos}% X{\small {\it I Solisti Veneti} --- Claudio Scimone\\[1mm] XBonifacio Bianchi, Alessandro Pitrelli --- Mandolins X} X%%----------------------------------------------------------- X\album{vivaldi.2}{\small Vivaldi, Antonio\\[1mm] X{\bf \underline{The Four Seasons\rule[-0.7mm]{0mm}{1mm}}} X X\begin{enumerate} X\item SPRING, Concerto No. 1 in E Major X\item SUMMER, Concerto No. 2 in G Minor X\item AUTUMN, Concerto No. 3 in F Major X\item WINTER, Concerto No. 4 in F Minor X\end{enumerate} X XSimon Standage --- Violin\\ XTrevor Pinnock --- Harpsichord\\[1mm] X{\it The English Chamber Orchestra} on authentic instruments. X}% X{\normalsize\sf Vivaldi\\The Four Seasons}{} X%%----------------------------------------------------------- X\end{verbatim} X\end{quote} X X\end{document} END_OF_FILE if test 9986 -ne `wc -c <'tape-doc.tex'`; then echo shar: \"'tape-doc.tex'\" unpacked with wrong size! fi # end of 'tape-doc.tex' fi if test -f 'tape.awk' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'tape.awk'\" else echo shar: Extracting \"'tape.awk'\" \(2591 characters\) sed "s/^X//" >'tape.awk' <<'END_OF_FILE' XBEGIN { X print "" > "o.tex" X print "%--------------------------" > "o.tex" X print "" > "o.tex" X num_songs = 0; X num_others = 0; X} X X# $1 meaning X# -- --------------------------------------------------------------------- X# k KEY, short, only one word, namely $2 X# t TITLE X# a AUTHOR / ARTIST X# s SONG (up to 14 on a side, or more if you use a smaller latex font) X# o OTHER stuff to put on the back flap of the label or for db search X# c COMMENT db search text will not appear on the cassette label X# e END-OF-ENTRY (very very important) X# X# X# X X{ X if (( $1 == "k" ) || ( $1 == "K" )) { X key = $2 X } else if (( $1 == "s" ) || ( $1 == "S" )) { X num_songs++ X for (i=2; i<=NF; i++) { X song[num_songs] = song[num_songs] " " $i X } X } else if (( $1 == "t" ) || ( $1 == "T" )) { X for (i=2; i<=NF; i++) { X title = title " " $i X } X } else if (( $1 == "a" ) || ( $1 == "A" )) { X for (i=2; i<=NF; i++) { X author = author " " $i X } X } else if (( $1 == "o" ) || ( $1 == "o" )) { X num_others++ X for (i=2; i<=NF; i++) { X others[num_others] = others[num_others] " " $i X } X } else if (( $1 == "e" ) || ( $1 == "E" )) { X if ( key == "" ) { X print "Yo blood! Jeez, dude, like, ain't no KEY in theya!" X key = "nokey" X } X o = "\\album{" key "}" X if ( author == "" ) { X print "Gaddangit blood, you plum forgit da AUTHOR mothalova" X author = "No Artist" X } X o = o "{" author "\\\\" X if ( title == "" ) { X print "Sheeeeit, mothalova, you done forgit da TITLE ehyeshoel" X title = "No Title" X } X o = o "{\\bf " title "}" X print o > "o.tex" X o = "" X if (num_songs > 0) { X print "\\begin{enumerate}" > "o.tex" X for ( i=1; i<=num_songs; i++) { X print "\\item " song[i] > "o.tex" X song[i] = ""; X } X print "\\end{enumerate}" > "o.tex" X } else { X print "{}" > "o.tex" X } X print "}" > "o.tex" X print "{{\\bf " author "\\\\" title "}}" > "o.tex" X if (num_others > 0) { X print "{" > "o.tex" X for (i=1 ; i<=num_others; i++) { X print others[i] "\\\\" > "o.tex" X others[i] = ""; X } X print "}" > "o.tex" X } else { X print "{}" > "o.tex" X } X print "%--------------------------" > "o.tex" X print "" > "o.tex" X num_songs=0; X num_others=0; X key = ""; X title = ""; X author = ""; X } else if ((length($0) == 0) || ($1 == "c") || ($1 == "C")) { X x="x"; X } else { X print "Hey, dude. Like I just saw a weirdo line, skin. It be:" X print $0 X } X} END_OF_FILE if test 2591 -ne `wc -c <'tape.awk'`; then echo shar: \"'tape.awk'\" unpacked with wrong size! fi # end of 'tape.awk' fi if test -f 'tape.example' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'tape.example'\" else echo shar: Extracting \"'tape.example'\" \(1231 characters\) sed "s/^X//" >'tape.example' <<'END_OF_FILE' X\album{vivaldi.1}{\small Vivaldi, Antonio\hfill (1678-1741)\\ X\begin{enumerate} X\item Concerto in G Major for Two Mandolins, Strings \& Basso Continuo X\item Concerto in C Major for Mandolin, Strings \& Basso Continuo X\item Concerto in C Major for Two Mandolins, Two Theorboes, Two flutes, XTwo ``Salmoe'', Two Violins, Cello, Strings \& Basso Continuo X\item Concerto a dve Chori in B flat Major, ``Con Violino Discordato'', XStrings \& Basso Continuo X\end{enumerate} X}% X{\normalsize\sf Vivaldi\\Mandolin Concertos}% X{\small {\it I Solisti Veneti} --- Claudio Scimone\\[1mm] XBonifacio Bianchi, Alessandro Pitrelli --- Mandolins X} X%%----------------------------------------------------------- X\album{vivaldi.2}{\small Vivaldi, Antonio\\[1mm] X{\bf \underline{The Four Seasons\rule[-0.7mm]{0mm}{1mm}}} X X\begin{enumerate} X\item SPRING, Concerto No. 1 in E Major X\item SUMMER, Concerto No. 2 in G Minor X\item AUTUMN, Concerto No. 3 in F Major X\item WINTER, Concerto No. 4 in F Minor X\end{enumerate} X XSimon Standage --- Violin\\ XTrevor Pinnock --- Harpsichord\\[1mm] X{\it The English Chamber Orchestra} on authentic instruments. X}% X{\normalsize\sf Vivaldi\\The Four Seasons}{} X%%----------------------------------------------------------- END_OF_FILE if test 1231 -ne `wc -c <'tape.example'`; then echo shar: \"'tape.example'\" unpacked with wrong size! fi # end of 'tape.example' fi if test -f 'tape.readme' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'tape.readme'\" else echo shar: Extracting \"'tape.readme'\" \(1652 characters\) sed "s/^X//" >'tape.readme' <<'END_OF_FILE' XThis file is a "Readme" for the "tape" documentstyle option that implements Xcommands to maintain a primitive database of albums from which subsequently Xcasette tape labels can be printed with minimal effort. A significant Xattraction is the fact that the album database can be shared among users. X XThe author hopes that from time to time netters make their databases Xavailable to general public. X XInstallation: XIn order for the 'tape' style option to be loaded, one of the two things will have to be done: X X1. A copy of the macro file 'tape.sty' be put in the standard place for Xsuch macros (typically /usr/lib/tex/macros), or X X2. If you do not wish to install it as in step 1. or if you do not have Xsuch priviledges, then a copy of 'tape.sty' may be put in some other Xdirectory, and the path declared in the environment variable TEXINPUTS; Xe.g. for C-shell on unix systems, put a command similar to the following in Xthe .cshrc file: X Xsetenv TEXINPUTS .:/usr/lib/tex/macros:/users/podar/texlib} X XCaveat: I should really have made "tape" a standalone document style, but Xwas lazy. I suggest that the following command be used for its invocation: X\documentstyle[tape]{article} Xwithout any other options. Also some of the list making environments, etc. Xare redefined, hence if you try printing some regular text besides the Xtape label, things may not come out right. X XAs always, comments, suggestions, bugs etc., are welcome. Also, please let me Xknow if any worthwhile modifications are made. X Xenjoy. X XSunil Podar XSUNY at Stony Brook X XCSNET: podar@sbcs.csnet XARPA: podar%suny-sb.csnet@csnet-relay.arpa XUUCP: {allegra, hocsd, philabs, ogcvax}!sbcs!podar END_OF_FILE if test 1652 -ne `wc -c <'tape.readme'`; then echo shar: \"'tape.readme'\" unpacked with wrong size! fi # end of 'tape.readme' fi if test -f 'tape.sty' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'tape.sty'\" else echo shar: Extracting \"'tape.sty'\" \(5861 characters\) sed "s/^X//" >'tape.sty' <<'END_OF_FILE' X% tape document style for LaTeX 2.09 X% podar@sbcs (Sunil Podar) June 20,1986 X% Dept. of Applied Math., SUNY at Stony Brook X% You may use this file for whatever purpose you wish. Please leave this X% notice, identifying original author, intact. X X\typeout{Document Style 'tape'. Released 20 June 1986} X X% This documentstyle is for making casette tape labels. Two labels can be X% fit on a page with a \newpage command after every two labels. X% It should be invoked with \documentstyle[tape]{article}. X% --- should have made a standalone documentstyle, but was lazy; would X% involve unnecessary dirty work. X% If more stuff needs to be fit on a label, reduce the \baselinestretch in X% the document and/or use smaller fonts. X% Two commands are implemented: X% \album{album-id}{stuff for the side}{title}{addendum that goes on backflap} X% \maketape[tape-id]{album-id}{album-id}[optional explicit title] X%--------------------------------------------------------------------------- X\makeatletter X\textwidth 5in X\textheight 9in X\pagestyle{empty} X\renewcommand{\baselinestretch}{0.85} X\parskip 0pt plus 1pt X%\parindent=0pt %% done inside \maketape X\hbadness=3000% will not complain about every little underfull hbox. X% X\leftmargini 12pt X\leftmarginii 10pt % more than two level deep not expected! X\labelsep 3pt X\leftmargin\leftmargini X\labelwidth\leftmargini\advance\labelwidth-\labelsep X\topsep 2pt plus 1pt minus 1pt X\partopsep 2pt plus 1pt minus 1pt X\parsep 1pt X\itemsep 1pt X X%% many paragraphing environments use list's and fiddle with the parameter X%% values, thus need to include them in the \def of \@listi. X\def\@listi{\leftmargin\leftmargini X \labelwidth\leftmargini\advance\labelwidth-\labelsep X \topsep 2pt plus 1pt minus 1pt X \partopsep 2pt plus 1pt minus 1pt X \parsep 1pt X \itemsep 1pt} X X%%removed the \def of \@listi from \small and \footnotesize X%% --- causes problems when used in center environment. X\def\small{\@setsize\small{11pt}\ixpt\@ixpt X\abovedisplayskip 8.5pt plus 3pt minus 4pt% X\belowdisplayskip \abovedisplayskip X\abovedisplayshortskip \z@ plus2pt% X\belowdisplayshortskip 4pt plus2pt minus 2pt} X X\def\footnotesize{\@setsize\footnotesize{9.5pt}\viiipt\@viiipt%------ X\abovedisplayskip 6pt plus 2pt minus 4pt% X\belowdisplayskip \abovedisplayskip X\abovedisplayshortskip \z@ plus 1pt% X\belowdisplayshortskip 3pt plus 1pt minus 2pt} X% X%% following two redefined to get the label flushleft. X\def\enumerate{\ifnum \@enumdepth >3 \@toodeep\else X \advance\@enumdepth \@ne X \edef\@enumctr{enum\romannumeral\the\@enumdepth}\list X {\csname label\@enumctr\endcsname}{\usecounter X {\@enumctr}\def\makelabel##1{\rlap{##1}\hss}}\fi} X X\def\itemize{\ifnum \@itemdepth >3 \@toodeep\else \advance\@itemdepth \@ne X\edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% X\list{\csname\@itemitem\endcsname}{\def\makelabel##1{\rlap{##1}\hss}}\fi} X X%---------------- X\setlength{\doublerulesep}{1mm} X\setlength{\arrayrulewidth}{0.8pt} X\newdimen\tapeidwidth X\newdimen\@titlewidth X%------------------------------------------------------------------------ X% Here are the user controllable parameters, specific to \makelabel: X% \globaltapeid goes on the little box on the left side of title. Typical X% thing to put there would be name. e.g. X% \renewcommand{\globaltapeid}{\footnotesize\sf Sunil\\Podar} X\def\globaltapeid{} %changed via a \renewcommand X\def\tapeidmarker{\vline} %changed via a \renewcommand X\tapeidwidth=0.35in %changed via a \setlength{\tapeidwidth}{..} command X% We put a \rule of 0in width and appropriate height along with the X% \tapeidmarker for the \vline to work since it is in a makebox[0in]. X%----------------------------------------------------------------------- X% \album{5}{side}{title}{addendum} => defines \album@v@s = side and X% \album@v@t = title and \album@v@a = addendum X% the title is the one used by \maketape as default. X% X\long\def\album#1#2#3#4{% X\@namedef{album.#1.s}{#2}% side X\@namedef{album.#1.t}{#3}% title X\@namedef{album.#1.a}{#4}}% addendum X%------------------------------------------------------------------ X%\maketape[tape-id]{album-id1}{album-id2}[explicit title formatted as a centered one entry] X% -- makes a tape label of albums identified by album-id1 andalbum-id2. The X% titles are picked up from the \album definition; if an explicit centered X% label is desired then specify it as the third (optional) argument. X% X\def\maketape{\@ifnextchar[{\@maketape}{\@maketape[]}} X\def\@maketape[#1]#2#3{\@ifnextchar[% X{\@imaketape[#1]{#2}{#3}}{\@imaketape[#1]{#2}{#3}[@]}} X% X\def\@imaketape[#1]#2#3[#4]{{\parindent=0pt X\tabcolsep=1pt %want explicit control on spacing X\begin{tabular}{|l@{\hspace{0.1in}}|@{\hspace{0.1in}}l|} X\hline X\makebox[0in][l]{\hskip-2mm\rule[-2.32in]{0.4mm}{2.5in}}% X\ \minipage[t]{1.84in}\@nameuse{album.#2.s}\endminipage &% X\minipage[t]{1.84in}\@nameuse{album.#3.s}\endminipage\ \\ X\hline\hline X% X\multicolumn{2}{|@{}l@{}|}{% X\makebox[0in][l]{\hskip-1.8mm\rule[-0.2in]{0.4mm}{0.46in}}% X\,\parbox{\tapeidwidth}{\raggedright\globaltapeid\ }% X\makebox[0in]{\tapeidmarker\rule[-0.2in]{0in}{0.46in}}% X\@titlewidth=1.97in \advance\@titlewidth by-\tapeidwidth% X\ifx#4@% X\parbox{\@titlewidth}{\centering \@nameuse{album.#2.t}\ }% X\parbox{\@titlewidth}{\centering \@nameuse{album.#3.t}\ }% X\else\@titlewidth=2\@titlewidth\parbox{\@titlewidth}{\centering #4\ }% X\fi% X\makebox[0in]{\tapeidmarker\rule[-0.2in]{0in}{0.46in}}% X\parbox{\tapeidwidth}{\raggedleft #1\ }\,}\\ X% X\hline\hline X\makebox[0in][l]{\hskip-2mm\rule[-0.72in]{0.4mm}{0.9in}}% X\ \minipage[t]{1.84in}\@nameuse{album.#2.a}\ \endminipage &% X% need \ in minipage to enforce size in case any of the minipage args are null X\minipage[t]{1.84in}\@nameuse{album.#3.a}\endminipage\ \\ X\hline X\end{tabular}% X\par\vspace*{0.2in}}} X%------------------------------------------------------------------ X\makeatother END_OF_FILE if test 5861 -ne `wc -c <'tape.sty'`; then echo shar: \"'tape.sty'\" unpacked with wrong size! fi # end of 'tape.sty' fi echo shar: End of shell archive. exit 0 -Mitchell F. Wyle Institut fuer Informationssysteme wyle@inf.ethz.ch ETH Zentrum / 8092 Zurich, Switzerland +41 1 254 7224
cyliax@dynamo.ecn.purdue.edu (Ingo Cyliax) (12/31/90)
Posted for a friend who has temporarily lost their newsfeed. Please send E-Mail replies directly to him (wyle@inf.ethz.ch). -ingo #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of shell archive." # Contents: readme p.tdb p.tex tape-doc.tex tape.awk tape.example # tape.readme tape.sty # Wrapped by wyle@inf.ethz.ch on Fri Dec 28 15:38:07 1990 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'readme' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'readme'\" else echo shar: Extracting \"'readme'\" \(4238 characters\) sed "s/^X//" >'readme' <<'END_OF_FILE' XAudio cassette database, labels, inventory tools? Oh no! Not again!! X XYup, we're doing it again, and we're gonna keep on doing it until someone Xgets it right! X XI am the proud owner of several HUNDRED audio cassettes. Some are Xstudio tapes; most are self-made recordings of CD's and record Xalbums I own. I have seen and used several computer based cassette Xlabel making schemes, including: X X X o MacDraw(tm) template upon which you fill in your own text or X graphics X X o PC-based schemes which prompt you for text (some of which don't X print the labels ferchrissakes! X X o Native postscript(tm) code template in which you change the text X X o Pure-ascii text with ascii cut- and fold- lines (ha ha) X X o Hypercard(tm) Stack(bm) database which prints nice labels X X o Latex style file X X XNone of these schemes is exactly what I want. X XI do not have several thousand dollars to give to Apple Computer for Xone of their Xerox Star rip-off clones (toasters), just to produce some Xcassette labels. I don't happen to like Xerox PARC's Notecards Xsoftware, which incidentally was also stollen by Apple and was also Xgiven a fancier name. X XWe have some Apple hardware (toasters) at work, but I would rather Xlabel my audio cassettes at home on my own time and on my own Xhardware. Since I don't have a postscript(tm) printer, the postscript(tm) Xtemplate system is also useless to me. X XWhat's left? X XI ftp'd the latex style file from sun.soe.clarkson.edu and noticed that Xusing the cassette style format as a database would make life Xmiserable. First of all, it has a lot of Latex X\LargeCommand[cokebottle]{longparametername}{\several\commands text} Xstyle commands. In addition to the tedium of typing in all of those Xcommands (or writing a large set of editor macros to help), the source Xfiles are not so simple to parse when writing report programs for Xoutput other than cassette labels. X XSo I retreated to that popular and hacky language AWK which runs on dos, Xmac-os, Unix, and lots of other places (not on cp/m, though :-(). I Xdesigned a minimal database format and wrote an awk program to generate Xlatex album files for use with Sunil Podar's neato cassette latex style. X XMy database format is simple. The first letter is the line identifier. X Xk is KEY a short string which identifies the entry uniquely Xa is ARTIST the guy who wrote the music or whatever Xt is TITLE the title of the album or tape or what have you Xs is SONG an entry in the list of stuff on the tape Xo is OTHER comments you want on the tape label Xc is COMMENT stuff you do NOT want on the tape label but need in the database Xe is END a marker for the end-of-entry X Xblank lines in the database files are ignored by the awk script. X XA sample Tape DataBase file p.tdb is included. To see what the script does, Xtype something like X X% awk -f tape.awk < p.tdb X Xand then examine the output in o.tex. Then you can type something like X X% latex p X Xto see what the labels would look like. X XThe script (tape.awk) yells at you if it gets confused or can't find Xsome important fields in an entry. It always tries to recover and Xoutput a dummy string for the missing entry(ies). If there is no "e" Xfield in an album entry, you are in deep trouble; the script is dumb. X XI designed this database scheme in 10 minutes and wrote the awk script in Xhalf an hour, then I added the comments field and ignore blank-line stuff. XThis readme file is taking longer than the entire database system to write! X XBUGS IN tape.awk X X The e END-OF-ENTRY field is an ugly hack should be fixed X X The output file is fixed "o.tex" X X Sunil's 2-albums-per-tape hack is weak X X XTODO X X lots!! X X reports other than cassette labels X X a /bin/sh wrapper for the awk script X X------------------------ X XMacdraw was a trademark of Apple Computer. Then it became a trademark Xof some other software company which folded. Now, I believe, the Macdraw Xtrademark belongs to Claris, or perhaps to Apple again. I'm sure some Xlawyer somewhere cares. X XHypercard is a trademark of Apple Computer Inc., Cupertino XCalifornia, which should not be confused with Apple Records. X Xpostscript is a trademark of another company which prefers law suits to Xinnovation, namely Adobe Systems Inc. END_OF_FILE if test 4238 -ne `wc -c <'readme'`; then echo shar: \"'readme'\" unpacked with wrong size! fi # end of 'readme' fi if test -f 'p.tdb' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'p.tdb'\" else echo shar: Extracting \"'p.tdb'\" \(1134 characters\) sed "s/^X//" >'p.tdb' <<'END_OF_FILE' Xk p001 Xa Pink Floyd Xt Dark Side of the Moon Xs speak to me Xs breathe Xs on the run Xs time Xs great gig in the sky Xs money Xs us and them Xs any colour you like Xs brain damage Xs eclipse Xo recorded at abbey road studios June 72 to January 1973 Xe X Xk p002 Xa Pink Floyd Xt Wish You were Here Xs shine on you crazy diamond (part one) Xs welcome to the machine Xs have a cigar Xs wish you were here Xs shine on you crazy diamond (part two) Xo recorded at abbey road studios january to july 1975 Xo all lyrics by Roger Waters Xe X X Xk p003 Xa Pink Floyd Xt Animals Xs Pigs on the wing (part one) Xs dogs Xs pigs (three different ones) Xs sheep Xs Pigs on the wing (part two) Xo all lyrics by roger waters Xo recorded at britannia row studios Lodon, 1977 Xe X Xk p004 Xa Pink Floyd Xt Meddle Xe X Xk p005 Xa Pink Floyd Xt The Wall Xe X Xk p006 Xt Regatta de Blanc Xa The Police Xs message in a bottle Xs it's alright for you Xs deathwish Xs on any other day Xs contact Xs regatta de blanc Xs bring on the night Xs walking on the moon Xs the bed's too big without you Xs does everyone stare Xs no time this time Xo recorded at surrey sound studios Xe X Xk p007 Xt ghost in the machine Xa The Police Xe END_OF_FILE if test 1134 -ne `wc -c <'p.tdb'`; then echo shar: \"'p.tdb'\" unpacked with wrong size! fi # end of 'p.tdb' fi if test -f 'p.tex' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'p.tex'\" else echo shar: Extracting \"'p.tex'\" \(249 characters\) sed "s/^X//" >'p.tex' <<'END_OF_FILE' X\documentstyle[tape]{article} X\renewcommand{\globaltapeid}{Rock} X\begin{document} X\input o.tex X\maketape[wyle]{p001}{p002} X\newpage X\maketape[wyle]{p003}{p004} X\newpage X\maketape[wyle]{p005}{p005} X\newpage X\maketape[wyle]{p006}{p007} X\end{document} END_OF_FILE if test 249 -ne `wc -c <'p.tex'`; then echo shar: \"'p.tex'\" unpacked with wrong size! fi # end of 'p.tex' fi if test -f 'tape-doc.tex' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'tape-doc.tex'\" else echo shar: Extracting \"'tape-doc.tex'\" \(9986 characters\) sed "s/^X//" >'tape-doc.tex' <<'END_OF_FILE' X\documentstyle[tape]{article} X\setlength{\textwidth}{6.5in} X\setlength{\textheight}{9in} X\setlength{\oddsidemargin}{1in} X\renewcommand{\baselinestretch}{1.25} X\parindent=15pt X\parskip=6pt plus 1pt X\pagestyle{plain} X\begin{document} X X\section*{Making Casette Tape Labels using \LaTeX} X\begin{flushright} X\begin{tabular}{@{}l@{}} XSunil Podar (podar@sbcs)\\ XS.U.N.Y.\ at Stony Brook.\\ X X\end{tabular} X\end{flushright} X X\vspace*{8mm} XThis document describes a way to maintain a simple ``album database'' and Xsusequently print formatted casette tape labels. The commands to accomplish Xthis have been implemented as a documentstyle option {\tt tape} and should be Xused with the {\it article} documentstyle, i.e., it should be invoked with Xthe command: X X\verb|\documentstyle[tape]{article}| X XA casette has two sides and each side is assumed to hold one {\it album}. XEach side of a casette tape label has three major fields of information, Xdepicted in Figure 1.: X X\begin{description} X\item[side\hfill] the textual information that goes on the front-flap. This Xis where most of the information goes. X\item[title\hfill] the title given to the {\it side} that goes on the side Xface of the casette cover. X\item[addendum\hfill] the textual information that goes on the back-flap of Xthe casette tape cover. X\end{description} X X\album{1}{\it side--1}{\it title--1}{\it addendum--1} X\album{2}{\it side--2}{\it title--2}{\it addendum--2} X\begin{figure}[hb] X\begin{center} X\renewcommand{\globaltapeid}{\footnotesize global\\tapeid} X\small X\maketape[tapeid]{1}{2}% X\caption[]{The Layout of a Casette Tape Label and the Terminology Used} X\end{center} X\end{figure} X X\newpage XEach side of the tape in the database is defined using the following Xcommand: X X{\it X\verb|\album{|album-id\verb|}{|side\verb|}{|title\verb|}{|addendum\verb|}|} X X\verb|\album| command defines an album. More precisely, it defines one side Xof a casette tape. It takes four arguements: first one Xis a unique label assigned to every album, the other three being {\it side}, X{\it title} and {\it addendum}. X XA tape label holds information for two sides. Following command produces the tape label: X X{\it \verb|\maketape[|tape-id\verb|]{|album1-id\verb|}{|album2-id\verb|}[|optional tape title\verb|]|} X XThe album entry corresponding to {\it album1-id} goes on the left side of the Xtape label and those corresponding to {\it album2-id} on the right side. By Xdefault, individual titles are picked up from the album definition and Xformatted to appear under their own sides. If it is desired to have a single Xtitle as the case may be if both sides of a tape are by the same composer or Xgroup, then a title may be explicitly specified as the last arguement in Xwhich case individual titles of the two albums, as specified in their Xrespective \verb|\album| definitions, are ignored. X XA tape label also has two minor Xfields of information, that go on the side face of the tape label, on either Xside of the title. They are: X\begin{description} X\item[globaltapeid\hfill] This goes on the left side of the title, almost Xflush with the left edge. This may hold information such as the owner's name. XBy default, it is empty and may be changed using a \verb|\renewcommand|. X X\item[tapeid\hfill] This is an identification for individual tapes and goes Xto the right of the title almost flush with the right edge. X\end{description} X XThe width of the box in which the two fields described above are printed, is Xcontrolled by a variable \verb|\tapeidwidth| and may be changed using a X\verb|\setlength| command. Also, by default, a vertical line is drawn Xseparating the two boxes from the title region. It may be changed by a X\verb|\renewcommand| on the parameter \verb|\tapeidmarker| --- one may Xprefer a $\bullet$ (\verb|$\bullet$|) as the demarcator. X XThe {\it side} and the {\it addendum} fields are set in a \verb|minipage| Xenvironment, thus any of the regular paragraph formatting commands of \LaTeX\ Xmay be used; various formatting environments, such as {\tt tabbing}, {\tt Xtabular}, {\tt itemize}, {\tt enumerate}, etc., can also be used. The other Xfields, i.e., {\it title}, {\it globaltapeid} and {\it tapeid} are set in a X\verb|\parbox| thus only \verb|\\| command may be used with no blank lines in Xthe fields -- a parbox permits only one simple paragraph. Just a reminder: to Xget indentation on a line following a \verb|\\| command, use \verb|\hspace*| Xinstead of \verb|\hspace|; according to the manual, any \verb|\hspace| after Xa \verb|\\| is ignored. X XOn the outside of the left hand edge of the tape label, three vertical lines Xare shown. In addition to enforcing a correct height for each of the three Xregions, they also serve as an indicator. Their height is invariant and in Xthe case when more text has been typed in a region than will fit on the Xlabel, they indicate precisely by how much has the height been overshot. They Xshould, of course, be left out when the label is cut. X XNo choice of fonts or fontsizes is enforced and one is completely free to Xchoose these, although it is suggested that a small-sized font (such as those Xobtained by \verb|\small|, \verb|\footnotesize| or \verb|\tiny| declarations) Xbe used since the width of the paragraphs is rather small. Also, if more Xinformation need to be put than will fit, the inter-line spacing may be Xreduced using a \verb|\renewcommand| on the parameter \verb|\baselinestretch|. X XTwo tape labels can be fit on a page, and a \verb|\newpage| declaration ought Xto be placed after every two \verb|\maketape| commands. X XIt is assumed that each \verb|\album| describes one {\it side} of the tape Xlabel, which is also usually the case. If one side of a tape contains more Xthan one album then one will have to declare it as a single \verb|\album| Xdescription. On the other hand, if a single album, or piece of music spans Xboth sides of a casette tape, its description will have to be broken Xinto two \verb|\album| declarations. X XThe label can be cut out along the outer boundary -- the border lines are Xmeant to be part of the label so the cut should be just along the outer edge Xof the lines. X X\section*{General Comments} X XThe tape database is implemented by storing all fields as control sequences, Xthus it is suggested that the database be constructed using reasonable-sized Xfiles; subsequently to make tape labels, only the necessary files be X\verb|\input|, otherwise \TeX\ may run out of memory. X XThe tape database has been implemented with the aim that the database Xfiles be sharable amongst various users so long as every album has a unique X{\it album-id}. In order to load a tape database, all one needs to do is X\verb|\input| the appropriate files and subsequently type the X\verb|\maketape| commands for each desired pair of albums. XFollowing suggestions are made for conventions to be adopted Xso as to enable a large community to share files without much effort: X\begin{itemize} X\item Each album database file have a ``{\tt .bum}'' file-name Xextension\footnote{music album $\Leftrightarrow$ musical bum --- Benny Hill}. XFor such files, the extension will have to be explicitly specified in the X\verb|\input| statement, otherwise \TeX\ will look for a file with a {\tt X.tex} extension. X X\item Separate files be maintained for different composers or groups. X X\item Any character can be used in the {\it album-id}, thus following Xformats are suggested for {\it album-id}'s\\[1mm] X\hspace*{0.5in}\verb|filename.#|, or\\ X\hspace*{0.5in}\verb|filename[#]|, where {\tt \#} is an integer. X XFor example, one may have a file {\tt mozart1.bum} with various album Xdescriptions of Mozart's compositions, each having an album-id of the form X{\tt mozart1.1}, {\tt mozart1.2}, and so on. If a single piece of music Xspans both sides then we might label the two parts using another level of Xsubscripts, for example {\tt mozart.12.1} and {\tt mozart.12.2}. X\end{itemize} X XThe only problem with above conventions is that if two users have a file with Xidentical album-id's then the file will have to be Xcopied and the album-id's changed. X XFollowing page contains an example. Commands used to generate the label would Xbe: X\leftmargini 25pt X\begin{quote} X\begin{verbatim} X\documentstyle[tape]{article} X\renewcommand{\globaltapeid}{\footnotesize\sf Sunil\\Podar} X\begin{document} X\input{example.bum} X\maketape[\sf WC\\12]{vivaldi.1}{vivaldi.2} X\end{document} X\end{verbatim} X\end{quote} X X\newpage X\vspace*{-4mm} X{% X\input{tape.sty} X\input{example.bum} X\renewcommand{\globaltapeid}{\footnotesize\sf Sunil\\Podar} X\begin{center} X\small X\maketape[\sf WC\\12]{vivaldi.1}{vivaldi.2} X\end{center}% X} X X\renewcommand{\baselinestretch}{0.85} X\small\normalsize X X\noindent The file {\tt example.bum} contains: X\begin{quote} X\begin{verbatim} X\album{vivaldi.1}{\small Vivaldi, Antonio\hfill (1678-1741)\\ X\begin{enumerate} X\item Concerto in G Major for Two Mandolins, Strings \& Basso Continuo X\item Concerto in C Major for Mandolin, Strings \& Basso Continuo X\item Concerto in C Major for Two Mandolins, Two Theorboes, Two flutes, XTwo ``Salmoe'', Two Violins, Cello, Strings \& Basso Continuo X\item Concerto a dve Chori in B flat Major, ``Con Violino Discordato'', XStrings \& Basso Continuo X\end{enumerate} X}% X{\normalsize\sf Vivaldi\\Mandolin Concertos}% X{\small {\it I Solisti Veneti} --- Claudio Scimone\\[1mm] XBonifacio Bianchi, Alessandro Pitrelli --- Mandolins X} X%%----------------------------------------------------------- X\album{vivaldi.2}{\small Vivaldi, Antonio\\[1mm] X{\bf \underline{The Four Seasons\rule[-0.7mm]{0mm}{1mm}}} X X\begin{enumerate} X\item SPRING, Concerto No. 1 in E Major X\item SUMMER, Concerto No. 2 in G Minor X\item AUTUMN, Concerto No. 3 in F Major X\item WINTER, Concerto No. 4 in F Minor X\end{enumerate} X XSimon Standage --- Violin\\ XTrevor Pinnock --- Harpsichord\\[1mm] X{\it The English Chamber Orchestra} on authentic instruments. X}% X{\normalsize\sf Vivaldi\\The Four Seasons}{} X%%----------------------------------------------------------- X\end{verbatim} X\end{quote} X X\end{document} END_OF_FILE if test 9986 -ne `wc -c <'tape-doc.tex'`; then echo shar: \"'tape-doc.tex'\" unpacked with wrong size! fi # end of 'tape-doc.tex' fi if test -f 'tape.awk' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'tape.awk'\" else echo shar: Extracting \"'tape.awk'\" \(2591 characters\) sed "s/^X//" >'tape.awk' <<'END_OF_FILE' XBEGIN { X print "" > "o.tex" X print "%--------------------------" > "o.tex" X print "" > "o.tex" X num_songs = 0; X num_others = 0; X} X X# $1 meaning X# -- --------------------------------------------------------------------- X# k KEY, short, only one word, namely $2 X# t TITLE X# a AUTHOR / ARTIST X# s SONG (up to 14 on a side, or more if you use a smaller latex font) X# o OTHER stuff to put on the back flap of the label or for db search X# c COMMENT db search text will not appear on the cassette label X# e END-OF-ENTRY (very very important) X# X# X# X X{ X if (( $1 == "k" ) || ( $1 == "K" )) { X key = $2 X } else if (( $1 == "s" ) || ( $1 == "S" )) { X num_songs++ X for (i=2; i<=NF; i++) { X song[num_songs] = song[num_songs] " " $i X } X } else if (( $1 == "t" ) || ( $1 == "T" )) { X for (i=2; i<=NF; i++) { X title = title " " $i X } X } else if (( $1 == "a" ) || ( $1 == "A" )) { X for (i=2; i<=NF; i++) { X author = author " " $i X } X } else if (( $1 == "o" ) || ( $1 == "o" )) { X num_others++ X for (i=2; i<=NF; i++) { X others[num_others] = others[num_others] " " $i X } X } else if (( $1 == "e" ) || ( $1 == "E" )) { X if ( key == "" ) { X print "Yo blood! Jeez, dude, like, ain't no KEY in theya!" X key = "nokey" X } X o = "\\album{" key "}" X if ( author == "" ) { X print "Gaddangit blood, you plum forgit da AUTHOR mothalova" X author = "No Artist" X } X o = o "{" author "\\\\" X if ( title == "" ) { X print "Sheeeeit, mothalova, you done forgit da TITLE ehyeshoel" X title = "No Title" X } X o = o "{\\bf " title "}" X print o > "o.tex" X o = "" X if (num_songs > 0) { X print "\\begin{enumerate}" > "o.tex" X for ( i=1; i<=num_songs; i++) { X print "\\item " song[i] > "o.tex" X song[i] = ""; X } X print "\\end{enumerate}" > "o.tex" X } else { X print "{}" > "o.tex" X } X print "}" > "o.tex" X print "{{\\bf " author "\\\\" title "}}" > "o.tex" X if (num_others > 0) { X print "{" > "o.tex" X for (i=1 ; i<=num_others; i++) { X print others[i] "\\\\" > "o.tex" X others[i] = ""; X } X print "}" > "o.tex" X } else { X print "{}" > "o.tex" X } X print "%--------------------------" > "o.tex" X print "" > "o.tex" X num_songs=0; X num_others=0; X key = ""; X title = ""; X author = ""; X } else if ((length($0) == 0) || ($1 == "c") || ($1 == "C")) { X x="x"; X } else { X print "Hey, dude. Like I just saw a weirdo line, skin. It be:" X print $0 X } X} END_OF_FILE if test 2591 -ne `wc -c <'tape.awk'`; then echo shar: \"'tape.awk'\" unpacked with wrong size! fi # end of 'tape.awk' fi if test -f 'tape.example' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'tape.example'\" else echo shar: Extracting \"'tape.example'\" \(1231 characters\) sed "s/^X//" >'tape.example' <<'END_OF_FILE' X\album{vivaldi.1}{\small Vivaldi, Antonio\hfill (1678-1741)\\ X\begin{enumerate} X\item Concerto in G Major for Two Mandolins, Strings \& Basso Continuo X\item Concerto in C Major for Mandolin, Strings \& Basso Continuo X\item Concerto in C Major for Two Mandolins, Two Theorboes, Two flutes, XTwo ``Salmoe'', Two Violins, Cello, Strings \& Basso Continuo X\item Concerto a dve Chori in B flat Major, ``Con Violino Discordato'', XStrings \& Basso Continuo X\end{enumerate} X}% X{\normalsize\sf Vivaldi\\Mandolin Concertos}% X{\small {\it I Solisti Veneti} --- Claudio Scimone\\[1mm] XBonifacio Bianchi, Alessandro Pitrelli --- Mandolins X} X%%----------------------------------------------------------- X\album{vivaldi.2}{\small Vivaldi, Antonio\\[1mm] X{\bf \underline{The Four Seasons\rule[-0.7mm]{0mm}{1mm}}} X X\begin{enumerate} X\item SPRING, Concerto No. 1 in E Major X\item SUMMER, Concerto No. 2 in G Minor X\item AUTUMN, Concerto No. 3 in F Major X\item WINTER, Concerto No. 4 in F Minor X\end{enumerate} X XSimon Standage --- Violin\\ XTrevor Pinnock --- Harpsichord\\[1mm] X{\it The English Chamber Orchestra} on authentic instruments. X}% X{\normalsize\sf Vivaldi\\The Four Seasons}{} X%%----------------------------------------------------------- END_OF_FILE if test 1231 -ne `wc -c <'tape.example'`; then echo shar: \"'tape.example'\" unpacked with wrong size! fi # end of 'tape.example' fi if test -f 'tape.readme' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'tape.readme'\" else echo shar: Extracting \"'tape.readme'\" \(1652 characters\) sed "s/^X//" >'tape.readme' <<'END_OF_FILE' XThis file is a "Readme" for the "tape" documentstyle option that implements Xcommands to maintain a primitive database of albums from which subsequently Xcasette tape labels can be printed with minimal effort. A significant Xattraction is the fact that the album database can be shared among users. X XThe author hopes that from time to time netters make their databases Xavailable to general public. X XInstallation: XIn order for the 'tape' style option to be loaded, one of the two things will have to be done: X X1. A copy of the macro file 'tape.sty' be put in the standard place for Xsuch macros (typically /usr/lib/tex/macros), or X X2. If you do not wish to install it as in step 1. or if you do not have Xsuch priviledges, then a copy of 'tape.sty' may be put in some other Xdirectory, and the path declared in the environment variable TEXINPUTS; Xe.g. for C-shell on unix systems, put a command similar to the following in Xthe .cshrc file: X Xsetenv TEXINPUTS .:/usr/lib/tex/macros:/users/podar/texlib} X XCaveat: I should really have made "tape" a standalone document style, but Xwas lazy. I suggest that the following command be used for its invocation: X\documentstyle[tape]{article} Xwithout any other options. Also some of the list making environments, etc. Xare redefined, hence if you try printing some regular text besides the Xtape label, things may not come out right. X XAs always, comments, suggestions, bugs etc., are welcome. Also, please let me Xknow if any worthwhile modifications are made. X Xenjoy. X XSunil Podar XSUNY at Stony Brook X XCSNET: podar@sbcs.csnet XARPA: podar%suny-sb.csnet@csnet-relay.arpa XUUCP: {allegra, hocsd, philabs, ogcvax}!sbcs!podar END_OF_FILE if test 1652 -ne `wc -c <'tape.readme'`; then echo shar: \"'tape.readme'\" unpacked with wrong size! fi # end of 'tape.readme' fi if test -f 'tape.sty' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'tape.sty'\" else echo shar: Extracting \"'tape.sty'\" \(5861 characters\) sed "s/^X//" >'tape.sty' <<'END_OF_FILE' X% tape document style for LaTeX 2.09 X% podar@sbcs (Sunil Podar) June 20,1986 X% Dept. of Applied Math., SUNY at Stony Brook X% You may use this file for whatever purpose you wish. Please leave this X% notice, identifying original author, intact. X X\typeout{Document Style 'tape'. Released 20 June 1986} X X% This documentstyle is for making casette tape labels. Two labels can be X% fit on a page with a \newpage command after every two labels. X% It should be invoked with \documentstyle[tape]{article}. X% --- should have made a standalone documentstyle, but was lazy; would X% involve unnecessary dirty work. X% If more stuff needs to be fit on a label, reduce the \baselinestretch in X% the document and/or use smaller fonts. X% Two commands are implemented: X% \album{album-id}{stuff for the side}{title}{addendum that goes on backflap} X% \maketape[tape-id]{album-id}{album-id}[optional explicit title] X%--------------------------------------------------------------------------- X\makeatletter X\textwidth 5in X\textheight 9in X\pagestyle{empty} X\renewcommand{\baselinestretch}{0.85} X\parskip 0pt plus 1pt X%\parindent=0pt %% done inside \maketape X\hbadness=3000% will not complain about every little underfull hbox. X% X\leftmargini 12pt X\leftmarginii 10pt % more than two level deep not expected! X\labelsep 3pt X\leftmargin\leftmargini X\labelwidth\leftmargini\advance\labelwidth-\labelsep X\topsep 2pt plus 1pt minus 1pt X\partopsep 2pt plus 1pt minus 1pt X\parsep 1pt X\itemsep 1pt X X%% many paragraphing environments use list's and fiddle with the parameter X%% values, thus need to include them in the \def of \@listi. X\def\@listi{\leftmargin\leftmargini X \labelwidth\leftmargini\advance\labelwidth-\labelsep X \topsep 2pt plus 1pt minus 1pt X \partopsep 2pt plus 1pt minus 1pt X \parsep 1pt X \itemsep 1pt} X X%%removed the \def of \@listi from \small and \footnotesize X%% --- causes problems when used in center environment. X\def\small{\@setsize\small{11pt}\ixpt\@ixpt X\abovedisplayskip 8.5pt plus 3pt minus 4pt% X\belowdisplayskip \abovedisplayskip X\abovedisplayshortskip \z@ plus2pt% X\belowdisplayshortskip 4pt plus2pt minus 2pt} X X\def\footnotesize{\@setsize\footnotesize{9.5pt}\viiipt\@viiipt%------ X\abovedisplayskip 6pt plus 2pt minus 4pt% X\belowdisplayskip \abovedisplayskip X\abovedisplayshortskip \z@ plus 1pt% X\belowdisplayshortskip 3pt plus 1pt minus 2pt} X% X%% following two redefined to get the label flushleft. X\def\enumerate{\ifnum \@enumdepth >3 \@toodeep\else X \advance\@enumdepth \@ne X \edef\@enumctr{enum\romannumeral\the\@enumdepth}\list X {\csname label\@enumctr\endcsname}{\usecounter X {\@enumctr}\def\makelabel##1{\rlap{##1}\hss}}\fi} X X\def\itemize{\ifnum \@itemdepth >3 \@toodeep\else \advance\@itemdepth \@ne X\edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% X\list{\csname\@itemitem\endcsname}{\def\makelabel##1{\rlap{##1}\hss}}\fi} X X%---------------- X\setlength{\doublerulesep}{1mm} X\setlength{\arrayrulewidth}{0.8pt} X\newdimen\tapeidwidth X\newdimen\@titlewidth X%------------------------------------------------------------------------ X% Here are the user controllable parameters, specific to \makelabel: X% \globaltapeid goes on the little box on the left side of title. Typical X% thing to put there would be name. e.g. X% \renewcommand{\globaltapeid}{\footnotesize\sf Sunil\\Podar} X\def\globaltapeid{} %changed via a \renewcommand X\def\tapeidmarker{\vline} %changed via a \renewcommand X\tapeidwidth=0.35in %changed via a \setlength{\tapeidwidth}{..} command X% We put a \rule of 0in width and appropriate height along with the X% \tapeidmarker for the \vline to work since it is in a makebox[0in]. X%----------------------------------------------------------------------- X% \album{5}{side}{title}{addendum} => defines \album@v@s = side and X% \album@v@t = title and \album@v@a = addendum X% the title is the one used by \maketape as default. X% X\long\def\album#1#2#3#4{% X\@namedef{album.#1.s}{#2}% side X\@namedef{album.#1.t}{#3}% title X\@namedef{album.#1.a}{#4}}% addendum X%------------------------------------------------------------------ X%\maketape[tape-id]{album-id1}{album-id2}[explicit title formatted as a centered one entry] X% -- makes a tape label of albums identified by album-id1 andalbum-id2. The X% titles are picked up from the \album definition; if an explicit centered X% label is desired then specify it as the third (optional) argument. X% X\def\maketape{\@ifnextchar[{\@maketape}{\@maketape[]}} X\def\@maketape[#1]#2#3{\@ifnextchar[% X{\@imaketape[#1]{#2}{#3}}{\@imaketape[#1]{#2}{#3}[@]}} X% X\def\@imaketape[#1]#2#3[#4]{{\parindent=0pt X\tabcolsep=1pt %want explicit control on spacing X\begin{tabular}{|l@{\hspace{0.1in}}|@{\hspace{0.1in}}l|} X\hline X\makebox[0in][l]{\hskip-2mm\rule[-2.32in]{0.4mm}{2.5in}}% X\ \minipage[t]{1.84in}\@nameuse{album.#2.s}\endminipage &% X\minipage[t]{1.84in}\@nameuse{album.#3.s}\endminipage\ \\ X\hline\hline X% X\multicolumn{2}{|@{}l@{}|}{% X\makebox[0in][l]{\hskip-1.8mm\rule[-0.2in]{0.4mm}{0.46in}}% X\,\parbox{\tapeidwidth}{\raggedright\globaltapeid\ }% X\makebox[0in]{\tapeidmarker\rule[-0.2in]{0in}{0.46in}}% X\@titlewidth=1.97in \advance\@titlewidth by-\tapeidwidth% X\ifx#4@% X\parbox{\@titlewidth}{\centering \@nameuse{album.#2.t}\ }% X\parbox{\@titlewidth}{\centering \@nameuse{album.#3.t}\ }% X\else\@titlewidth=2\@titlewidth\parbox{\@titlewidth}{\centering #4\ }% X\fi% X\makebox[0in]{\tapeidmarker\rule[-0.2in]{0in}{0.46in}}% X\parbox{\tapeidwidth}{\raggedleft #1\ }\,}\\ X% X\hline\hline X\makebox[0in][l]{\hskip-2mm\rule[-0.72in]{0.4mm}{0.9in}}% X\ \minipage[t]{1.84in}\@nameuse{album.#2.a}\ \endminipage &% X% need \ in minipage to enforce size in case any of the minipage args are null X\minipage[t]{1.84in}\@nameuse{album.#3.a}\endminipage\ \\ X\hline X\end{tabular}% X\par\vspace*{0.2in}}} X%------------------------------------------------------------------ X\makeatother END_OF_FILE if test 5861 -ne `wc -c <'tape.sty'`; then echo shar: \"'tape.sty'\" unpacked with wrong size! fi # end of 'tape.sty' fi echo shar: End of shell archive. exit 0 -Mitchell F. Wyle Institut fuer Informationssysteme wyle@inf.ethz.ch ETH Zentrum / 8092 Zurich, Switzerland +41 1 254 7224 -- /* Ingo Cyliax ECN, Electrical Engineering Bldg. * * cyliax@ecn.purdue.edu Purdue University, W. Lafayette,IN 47907 * * ing@cc.purdue.edu Work: (317) 494-9523 * * cyliax@pur-ee.UUCP Home: (317) 474-0031 */