summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/support/lyluatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-11-22 22:44:42 +0000
committerKarl Berry <karl@freefriends.org>2017-11-22 22:44:42 +0000
commit6ded4238ca0913166ea4b5a5efdde5f44900d3e8 (patch)
tree0647eeedddb841e93d9eb7f6c44b6bd111a47832 /Master/texmf-dist/doc/support/lyluatex
parent1bea5926931cacb1ac5323dc459a8c297f3b9871 (diff)
lyluatex (22nov17)
git-svn-id: svn://tug.org/texlive/trunk@45886 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/support/lyluatex')
-rw-r--r--Master/texmf-dist/doc/support/lyluatex/LICENSE22
-rw-r--r--Master/texmf-dist/doc/support/lyluatex/README.md56
-rw-r--r--Master/texmf-dist/doc/support/lyluatex/lyluatex.pdfbin0 -> 123820 bytes
-rw-r--r--Master/texmf-dist/doc/support/lyluatex/lyluatex.tex138
4 files changed, 216 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/support/lyluatex/LICENSE b/Master/texmf-dist/doc/support/lyluatex/LICENSE
new file mode 100644
index 00000000000..7dc50b19781
--- /dev/null
+++ b/Master/texmf-dist/doc/support/lyluatex/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 jperon
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/Master/texmf-dist/doc/support/lyluatex/README.md b/Master/texmf-dist/doc/support/lyluatex/README.md
new file mode 100644
index 00000000000..d69f9e3f7f8
--- /dev/null
+++ b/Master/texmf-dist/doc/support/lyluatex/README.md
@@ -0,0 +1,56 @@
+This material is subject to the MIT license.
+
+# Lyluatex
+## Usage
+
+In the preable of your document, include the package `lyluatex`:
+
+ \usepackage{lyluatex}
+
+The `program` option permits the definition of an alternative path to
+`lilypond`, for example:
+
+ \usepackage[program=/opt/lilypond-dev/lilypond]{lyluatex}
+
+Thereafter, you can include a lilypond file with the command:
+
+ \includely[staffsize=17]{CHEMIN/VERS/LA/PARTITION}
+
+The argument `staffsize`, which is optional, changes the size of the score. You
+can change the size for all the subsequent scores in a document by placing the
+following command before your first include statement to be so affected:
+
+ \def\staffsize{24}
+
+Next, you simply need to compile the document normally with the command
+`lualatex -shell-escape` :
+
+ lualatex -shell-escape DOCUMENT.TEX
+
+Another "more secure" option is to add `lilypond` to default allowed commands :
+
+ shell_escape_commands=$(kpsewhich -expand-var '$shell_escape_commands'),lilypond lualatex DOCUMENT.TEX
+
+On systems with low RAM, when working on big documents, you could encounter
+*buffer overflows* in `lilypond` calls. In that case, first compile with option
+`-draftmode`, then compile again without this option.
+
+You can also input music directly into your docoment with the `ly` environment.
+This is only recommended for very short snippets. For example:
+
+ \begin{ly}
+ \relative c' { c d e f g a b c }
+ \end{ly}
+
+
+## Migration from `lilypond-book`
+
+In order to facilitate the migration from `lilypond-book`, `lyluatex` defines
+the command `\lilypondfile` with the same arguments as `\includely`. There is
+also the environment `lilypond` which is the same as `ly`, and the command
+`\lilypond` should work as with `lilypond-book`.
+
+In this manner, documents typeset with `lilypond-book` can be adapted to use
+`lyluatex` without much difficulty. Just keep in mind that apart from the
+`staffsize` parameter, the optional parameters that `lilypond-book` supports are
+not supported by `lyluatex` (at least for now).
diff --git a/Master/texmf-dist/doc/support/lyluatex/lyluatex.pdf b/Master/texmf-dist/doc/support/lyluatex/lyluatex.pdf
new file mode 100644
index 00000000000..7a91f2751ec
--- /dev/null
+++ b/Master/texmf-dist/doc/support/lyluatex/lyluatex.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/lyluatex/lyluatex.tex b/Master/texmf-dist/doc/support/lyluatex/lyluatex.tex
new file mode 100644
index 00000000000..46d975cdb4c
--- /dev/null
+++ b/Master/texmf-dist/doc/support/lyluatex/lyluatex.tex
@@ -0,0 +1,138 @@
+\documentclass[]{article}
+\usepackage{lmodern}
+\usepackage{amssymb,amsmath}
+\usepackage{ifxetex,ifluatex}
+\usepackage{fixltx2e} % provides \textsubscript
+\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
+ \usepackage[T1]{fontenc}
+ \usepackage[utf8]{inputenc}
+\else % if luatex or xelatex
+ \ifxetex
+ \usepackage{mathspec}
+ \else
+ \usepackage{fontspec}
+ \fi
+ \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
+\fi
+% use upquote if available, for straight quotes in verbatim environments
+\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
+% use microtype if available
+\IfFileExists{microtype.sty}{%
+\usepackage[]{microtype}
+\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
+}{}
+\PassOptionsToPackage{hyphens}{url} % url is loaded by hyperref
+\usepackage[unicode=true]{hyperref}
+\hypersetup{
+ pdfborder={0 0 0},
+ breaklinks=true}
+\urlstyle{same} % don't use monospace font for urls
+\IfFileExists{parskip.sty}{%
+\usepackage{parskip}
+}{% else
+\setlength{\parindent}{0pt}
+\setlength{\parskip}{6pt plus 2pt minus 1pt}
+}
+\setlength{\emergencystretch}{3em} % prevent overfull lines
+\providecommand{\tightlist}{%
+ \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
+\setcounter{secnumdepth}{0}
+% Redefines (sub)paragraphs to behave more like sections
+\ifx\paragraph\undefined\else
+\let\oldparagraph\paragraph
+\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
+\fi
+\ifx\subparagraph\undefined\else
+\let\oldsubparagraph\subparagraph
+\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
+\fi
+
+% set default figure placement to htbp
+\makeatletter
+\def\fps@figure{htbp}
+\makeatother
+
+
+\date{}
+
+\begin{document}
+
+\section{Lyluatex}\label{lyluatex}
+
+\subsection{Usage}\label{usage}
+
+In the preable of your document, include the package \texttt{lyluatex}:
+
+\begin{verbatim}
+\usepackage{lyluatex}
+\end{verbatim}
+
+The \texttt{program} option permits the definition of an alternative
+path to \texttt{lilypond}, for example:
+
+\begin{verbatim}
+\usepackage[program=/opt/lilypond-dev/lilypond]{lyluatex}
+\end{verbatim}
+
+Thereafter, you can include a lilypond file with the command:
+
+\begin{verbatim}
+\includely[staffsize=17]{CHEMIN/VERS/LA/PARTITION}
+\end{verbatim}
+
+The argument \texttt{staffsize}, which is optional, changes the size of
+the score. You can change the size for all the subsequent scores in a
+document by placing the following command before your first include
+statement to be so affected:
+
+\begin{verbatim}
+\def\staffsize{24}
+\end{verbatim}
+
+Next, you simply need to compile the document normally with the command
+\texttt{lualatex\ -shell-escape}~:
+
+\begin{verbatim}
+lualatex -shell-escape DOCUMENT.TEX
+\end{verbatim}
+
+Another ``more secure'' option is to add \texttt{lilypond} to default
+allowed commands~:
+
+\begin{verbatim}
+shell_escape_commands=$(kpsewhich -expand-var '$shell_escape_commands'),lilypond lualatex DOCUMENT.TEX
+\end{verbatim}
+
+On systems with low RAM, when working on big documents, you could
+encounter \emph{buffer overflows} in \texttt{lilypond} calls. In that
+case, first compile with option \texttt{-draftmode}, then compile again
+without this option.
+
+You can also input music directly into your docoment with the
+\texttt{ly} environment. This is only recommended for very short
+snippets. For example:
+
+\begin{verbatim}
+\begin{ly}
+\relative c' { c d e f g a b c }
+\end{ly}
+\end{verbatim}
+
+\subsection{\texorpdfstring{Migration from
+\texttt{lilypond-book}}{Migration from lilypond-book}}\label{migration-from-lilypond-book}
+
+In order to facilitate the migration from \texttt{lilypond-book},
+\texttt{lyluatex} defines the command
+\texttt{\textbackslash{}lilypondfile} with the same arguments as
+\texttt{\textbackslash{}includely}. There is also the environment
+\texttt{lilypond} which is the same as \texttt{ly}, and the command
+\texttt{\textbackslash{}lilypond} should work as with
+\texttt{lilypond-book}.
+
+In this manner, documents typeset with \texttt{lilypond-book} can be
+adapted to use \texttt{lyluatex} without much difficulty. Just keep in
+mind that apart from the \texttt{staffsize} parameter, the optional
+parameters that \texttt{lilypond-book} supports are not supported by
+\texttt{lyluatex} (at least for now).
+
+\end{document}