summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/m-tx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-01-25 22:35:15 +0000
committerKarl Berry <karl@freefriends.org>2019-01-25 22:35:15 +0000
commit0c9aa4f80b0f44658e8ba13f2261a2386e99c774 (patch)
treeb06ea5ce07c014d072fe77e90fd37a0d8573a11b /Master/texmf-dist/tex/latex/m-tx
parent2b252198a05d7b5f671f4a377c9de54441dc1db4 (diff)
m-tx (24jan19)
git-svn-id: svn://tug.org/texlive/trunk@49818 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/m-tx')
-rw-r--r--Master/texmf-dist/tex/latex/m-tx/mtxlatex.sty98
1 files changed, 98 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/m-tx/mtxlatex.sty b/Master/texmf-dist/tex/latex/m-tx/mtxlatex.sty
new file mode 100644
index 00000000000..dfd2d509c7c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/m-tx/mtxlatex.sty
@@ -0,0 +1,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)