From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- support/m-tx/latex/mtxlatex.sty | 98 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 support/m-tx/latex/mtxlatex.sty (limited to 'support/m-tx/latex') diff --git a/support/m-tx/latex/mtxlatex.sty b/support/m-tx/latex/mtxlatex.sty new file mode 100644 index 0000000000..dfd2d509c7 --- /dev/null +++ b/support/m-tx/latex/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) -- cgit v1.2.3