blob: dfd2d509c7c88ee5a945b5ddd00aae4c9f948a24 (
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
% mtxlatex.sty: Macro package to make music scores using Latex
% or produce LaTeX documents containing music examples
% Dirk Laurie dlaurie@na-net.ornl.gov 2001-12-27
% Update: see \mtxdate below
% Some comments on usage appear at the bottom
\ifx\mtxlatex\undefined\else\endinput\fi
\def\mtxlatexdate{20 October 2016}
\immediate\write10{%
mtxLaTeX\space<\mtxlatexdate>}
\usepackage{etex}
\def\MTx{\mbox{\textbf{\textsl{M-Tx}}}}
\def\PMX{\textbf{PMX}}
\def\musixlyr{\texttt{\textbf{musixlyr}}}
\input musixtex
\input musixltx
% Preamble TeX commands for documents that contain .ex files
% generated by M-Tx/PMX
\def\mtxlatex{
\input mtx
\renewcommand{\BIGtype}{\Huge\bfseries}
\renewcommand{\BIgtype}{\huge\bfseries}
\renewcommand{\Bigtype}{\LARGE\bfseries}
\renewcommand{\bigtype}{\Large\bfseries}
% Kill the PMX definition of \parskip.
\parskip=0pt plus 1pt
}
% Extra vertical space evenly spread between systems
\renewcommand\alaligne{\stoppiece\vfill\contpiece}
\def\scoreheight{\textheight 270mm}
\def\scorewidth{\textwidth 193mm}
\newcommand{\startscore}{\let\SmuF\startmuflex\let\EmuF\endmuflex
\scorewidth\scoreheight
\oddsidemargin -15mm\evensidemargin -15mm\topmargin -20mm
\ifx\mysizes\undefined\else\mysizes\fi
\let\startmuflex\relax\let\endmuflex\relax\let\bye\relax%
\let\nopagenumbers\relax\musicparskip}
\newcommand\headingandcontents[1]{\markboth{#1}{#1}\addcontentsline{toc}
{section}{\protect\numberline{}{#1}}}
% The environment 'Score' is suitable for scores submitted to the
% Werner Icking music archive
\newenvironment{Score}[2]{\headingandcontents{#1}
\startscore\input #2
}{\markboth{}{}}
% The environment 'score' requires you to do your own input
\newenvironment{score}{\startscore}{}
\newenvironment{excerpts}{
\newlength\keepOSM\setlength\keepOSM\oddsidemargin
\newlength\keepTM\setlength\keepTM\topmargin
\global\setlength\oddsidemargin{-13mm} \global\setlength\topmargin{-20mm}
\let\startmuflex\relax\let\endmuflex\relax
\let\nopagenumbers\relax \let\bye\relax \let\vfill\relax \let\eject\relax
\musicparskip
\renewcommand{\BIGtype}{\huge\bfseries}
\renewcommand{\BIgtype}{\LARGE\bfseries}
\renewcommand{\Bigtype}{\Large\bfseries}
\renewcommand{\bigtype}{\large\bfseries}
}{\global\setlength\oddsidemargin\keepOSM\global\setlength\topmargin\keepTM}
\newenvironment{mus}%
{\begin{minipage}{260mm}\startscore\musicparskip}%
{\assignlyrics1{}\assignlyrics2{}%
\gdef\mtxTitle{}\end{minipage}}
\def\example#1#2#3#4#5#6#7#8{
\noindent\begin{minipage}[t]{#3}
\begin{mus} \vskip #6
\input{#1.tex}
\end{mus}
\end{minipage}\hskip #4
\begin{minipage}[#7]{#5} \vskip #8
\verbatiminput{#1.#2}
\end{minipage}}
\mtxlatex
\endinput
============================================================================
\example{basename}{ext}
{musicwidth}{separation}{codewidth}
{musicvskip}{alignment}{codevskip}
Set music example together with M-Tx (or other) code.
basename - musicfile is basename.tex
ext - codefile is basename.ext
separation - distance between music and code minipages
alignment - c, t or b (for code minipage)
|