summaryrefslogtreecommitdiff
path: root/obsolete/macros/texmuse/Doc/tex/running.tex
blob: 3de75eacd9cd073daf26a80ed953f8246ca1074c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
\documentclass{article}
\usepackage{shortvrb}
\usepackage{ltugcomn}
\newcommand\TeXmuse{\TeX\-{\itshape\kern-.1em\raisebox{.0ex}{m\kern-.05em use}}}
\title{Running \protect\TeXmuse}
\author{}
\begin{document}
\MakeShortVerb{\|}
\maketitle

\subsection*{Installation}
Place the files |texmuse.tex|, |texmuse.mf|, and |txmfont.mf| where \TeX\ and \MF\ can find them. (The document's own folder is such a place, if you don't know of a better option.) 

\subsection*{Running}

A run of \TeXmuse\ (with \LaTeX) will eventually typeset the musical material using a \emph{new} font. Previous to the (first) run, the font \emph{does not exist}. And this can mean some problems, because, in principle, \TeX\ won't find the \texttt{tfm} file(s) that it needs---and, later, the previewer won't find the \texttt{pk}'s. So, in principle, error messages stemming form that are normal, and do not mean the program is not running.

\subsubsection*{Automatic font generation}
In any case, with today's implementations of \TeX, error messages are unlikely to occur (unless of course there's a mistake in the input, or a genuine bug in the program). Most implementations (I'm basing this on my experience with Windows Mik\TeX) today will generate the fonts automatically. So, if everything goes well, the first run will be a success. (If you don't have an implementation that handles fonts automatically, see below.)

But there is a problem later on. The first time the file was typeset, the fonts did not exist, and \emph{that's why} there was font generation in the first place. But the second time the font files (created in the first run) will be there, and the program will \emph{not} regenerate them. That means that any changes to the input file will not be reflected in the output. You need to \emph{delete} the automatically-generated files before the second run.

Those files are usually put in the local branch of the \TeX\ Directory Structure: folder |\localtexmf|. Usually, in |\localtex\fonts|. But beyond that, the placement of the new files depends on circumstances. So, you have to search |\localtex\fonts| for the files and delete them. For a document called \texttt{foo.tex}, the files to find and delete will be \texttt{foo1.tfm} and \texttt{foo1.pk}, \texttt{foo2.tfm} and \texttt{foo2.pk}, etc.

So, if there were changes to the music of \texttt{foo.tex}, you should find and delete all these files before typesetting. Since the files will usually be put in the same subdirectory every time, you can automate the procedure into a batch file that looks something like

\begin{verbatim}
del c:\localtexmf\fonts\pk\ljfour\monotype\abadi\dpi600\%1*.pk 
del c:\localtexmf\fonts\tfm\monotype\abadi\%1*.tfm
texify %1.tex
pause
yap -1 %1.dvi 
\end{verbatim}

\noindent (where \texttt{texify} and \texttt{yap} are \LaTeX's and the previewers executables).

It is the portion `|\monotype\abadi|' that changes from document to document, and it is the same for both \texttt{tfm} and \texttt{pk}'s (the latter, of course, adding `|\dpi600|' or equivalent). So it's a good idea to make a note of this portion in the input file. Thus, when you come back to it after worked on other \TeXmuse\ files, you can change the batch accordingly.

\subsubsection*{Manual font generation}
If your implementation does not generate the fonts by itself, you will have to do it manually. The first run will give an error message: \texttt{tfm} file not found. Just press enter, letting the run end. There will be \texttt{mf} files anyway. Run \MF\ on them:

|mf foo1.mf|

\noindent (and the same for the rest of the files). You might have to try things like

|mf \mode:=cx; input foo1.mf|

\noindent where |cx| can be changed into |ljfour|, for example. This depends on your local settings (and I assume if your implementation doesn't do this automatically, it's because you know all about this kind of procedures).

That creates \texttt{gf} files. From them you have to create the \texttt{pk} files: 

|gftopk foo1.1200gf|,

\noindent or whatever is appropriate. 

After getting the \texttt{tfm}'s and \texttt{pk}'s, you can run \LaTeX\ again, and it will produce the document.

For any changes to the music to actually show up, you have to make sure that the \texttt{tfm}'s and \texttt{pk}'s were produced from \emph{the last} \texttt{mf}'s (those that were created in the last \LaTeX\ run).

\subsection*{Some conventions}

You use \TeXmuse\ in a \LaTeX\ document by saying

|\input texmuse.tex|

\noindent in the preamble. Follow the samples to learn the (pretty easy) syntax.

Before declaring the existence of a bug in the program, please make sure your input follows all conventions. I know they are pretty uncomfortable right now---making recovery from errors a friendly activity with \TeXmuse\ is something to do yet.

One thing you need to know is that \TeXmuse\ needs |\makeatletter| to be on at all times. Make sure to type |\makeatletter| \emph{after} |\begin{document}|. 

To recover from errors, the best thing to recommend is to try to isolate the errors. Comment-out some of the input (always making sure both staves, if there are two, have the same number of measures), or try only one of the instruments, and so on. You'll see that most of the time there was something wrong in the input, no matter how hard it was to believe.

If the problem you are running into is \texttt{! METAFONT Capacity exceeded}, and you are sure there is no mistakes in the input, you will have to lower the value of |\FontSplit|. It's set by default to 180, and it means that each \MF\ file will have up to 180 characters. But maybe your file is too demanding, so \MF\ would do better with |\FontSplit=160|. Have in mind that there will be line-breaks where the fonts end; modifying |\FontSplit| has an impact on that. That will explain very long and stretched measures in the middle of a piece.




\end{document}