Zoran Ovcin <[EMAIL PROTECTED]> wrote:


>parenthesis in title
>
>When I use \input outnorm with the outnorm file that Joel has sent, I
>get no title and page number in the bottom at all.
>


Zoran:

Please excuse my hurried response yesterday.  Yes, the "outnorm.tex" file I
posted DOES remove almost everything at the bottom whem it ships the page.
However, you can start again from the original source, which is found in
"musixsty.tex" (Thank you, Daniel!), and modify it for your own preferences.
For those on the list who are not familiar with the TeX language (and don't
have the TeX Book, by Donald Knuth), here are some "equally hurried" hints
about this modification process...  (Please forgive any omissions in
advance...)

Consider the following segment of code, some of which is based on what
currently appears in the musixsty.tex file, and suppose you want to modify
it to make a different output routine...

I have numbered the lines to simply the discussion that follows.

1: \def\footnoterule{}%
2: \edef\catcodeat{\the\catcode`\@}\catcode`\@=11
3: \def\outmorceau{\shipout\vbox{%
4: \vbox to \vsize{\vss\pagecontents\vss}\line{%
5: \ifodd\pageno\sl \titremorceau\ (\s@hortauthor)
6: \ifcopyright\rm$\copyright$\fi\hss \number\pageno
7: \else\rm\number\pageno\hss\sl \titremorceau\ (\s@hortauthor)
8: \ifcopyright\rm$\copyright$\fi\fi}}%
9:  \global\advance\count0 by 1\relax
10: \ifnum\outputpenalty>-20000 \else\dosupereject\fi}%
11: \output{\outmorceau}%
12: \catcode`\@=\catcodeat
%


Line 1, as shown above is NOT from the code in musixsty.tex.  It causes the
footnoterule to be defined as "nothing."  This means that when the macro
"\footnoterule" is "expanded" (in TeX terminology) it yields NOTHING....
Now, if you want it to yield something, you just provide a replacement text
inside the {} brackets.  However, let's move on...

Line 2 is a step that allows the following code to use the @ character as
one of the normal text characters (Characters with catcode 11).  The first p
art captures the current catcode of the @ character by defining \catcodeat
to be "The current value of (\the) \catecode`\@".  Then the catcode of the @
character is set directly to "catcode 11"... that of normal text characters.

Notice that the @ appears later, such as in line 5 in the appearance of
\[EMAIL PROTECTED] This is a convention used in typical TeX Macro Design so
users don't stumble too easily into the definitions of previously existing
macros when they design their own.  Since it is set up so that @ is NOT
treated as a normal text character, then, for example, a user cannot
unknowlingly write a definition of \s@hortauthor and overwrite the old one.

The step taken to set the catcode of the @ character to normal text can be
seen in most of the macro packages for TeX.  This brings up an interesting
omission in my "outnorm.tex" code sent in the last package... Notice that
the catcode of @ is never set back to what it was before... This is an
oversight, with the only consequence that all my coding thereafter COULD use
the @ character in a definition, if I should happen to do so.

The way to turn the protection back on is just to state:

  \catcode`\@=\catcodeat

at the last line of your adjusted definitions, as I have shown in line 12
above.

The definition of \outmorceau begins in line 3 and ends at the last } of
line 10.

It is easier to understand this macro if we take it out of the compressed
context above and make it look more like traditional programming code.
(Bear in mind that this is not always advisable since you need the % at the
end of various lines to remove the unwanted affects of line endings in
unexpected places.  Sometimes the line ending makes white space you don't
want.)

\def\outmorceau{%  Start the definition...
 \shipout\vbox{%  Shipout a Vertical BOX (say) "A"... containing...
 % It turns out that vertical BOX "A" contains TWO vertical boxes...
 % The FIRST is a vbox that contains our typset page (\pagecontents), and
 % a special vbox limited to a single line, where \line is a predefined
 % way to say just that...
   \vbox to \vsize{\vss\pagecontents\vss}%  Our music!!
   \line{%  This vbox is the stuff at the bottom of the page...
     % Check the page number for ODD or EVEN (what else?..)
     \ifodd\pageno% If the page number is ODD, then do this
           \sl \titremorceau\ (\s@hortauthor)
           \ifcopyright\rm$\copyright$\fi\hss \number\pageno
     \else%  If the page number is EVEN (what else could it be?)
         % then do this... (reverses the position of page number and
         % author information...
           \rm\number\pageno\hss\sl \titremorceau\ (\s@hortauthor)
           \ifcopyright\rm$\copyright$\fi
     \fi}% The END of the block testing page number
 }% The END of Vertical BOX "A"
 % VBOX "A" has been shipped out, so this is house cleaning...
 \global\advance\count0 by 1\relax % I would bet this is the Page Number...
 % The following is a part of TeX I am no expert on,
 % but, it has to do with forcing a New Page, but NOT if the accumulated
 % \outputpenalty is greater than -2000... My guess is that we get a new
 % page almost all the time... :-)  Another day, another project...
 \ifnum\outputpenalty>-20000 \else\dosupereject\fi%
}%  End the definition of \outmorceau

Well, by now you should at least spot where the extra parentheses are coming
from...  If one does not define \s@hortauthor to be anything, or leaves it
nothing... then the text (\s@hortauthor) expands simply to ().

One way to get rid of the () is simply to remove them from both instances in
the above definition (see musixsty.tex).

But first, notice line 11 in the lines above...

  \output{\outmorceau}

This causes the current definition of \outmorceau to be used as the output
routine.  You could either change the first definition of \outmorceau (as it
appears in musixsty.tex and rebuild using initex if needed), OR 2) you could
redefine \outmorceau to do what you want (and the second definition be the
only one available when \output is called), or 3) you could write some macro
with an entirely different name and assign that as the \output routine...

  \output{\mynewroutine}

I selected Option 2 because I did not like the idea of changing the
distribtuion files, and also because I could copy and alter more easily than
I could think up my own routine. :-)  The problem is that my preference (in
the code I submitted in the last mail) is to cut out everything at the
bottom, just as you observed.

However, you can probably adapt \outmorceau to do exactly what you want!

I hope this helps you break the "TeX Barrier" a little bit... Don't give up!

Joel Hunsberger
[EMAIL PROTECTED]

Reply via email to