latex - Lilypond 到 LaTeX
问题描述
有人可以ELI5这个过程吗?我试过阅读指南
http://lilypond.org/doc/v2.18/Documentation/usage/an-example-of-a-musicological-document
但它似乎不起作用。我在 Windows 10 上,并且安装了 Lilypond 2.18.2。这就是我到目前为止所做的一切。
这是我尝试过的。
在文本编辑器中,我复制并粘贴了代码
\documentclass[a4paper]{article}
\begin{document}
Documents for \verb+lilypond-book+ may freely mix music and text.
For example,
\begin{lilypond}
\relative c' {
c2 e2 \tuplet 3/2 { f8 a b } a2 e4
}
\end{lilypond}
Options are put in brackets.
\begin{lilypond}[fragment,quote,staffsize=26,verbatim]
c'4 f16
\end{lilypond}
Larger examples can be put into a separate file, and introduced with
\verb+\lilypondfile+.
\end{document}
然后我将文件保存为 lilybook.lytex
然后我按下开始,然后输入 DOS。出现一个叫做命令提示符的东西,我点击它。然后我输入 after C:\Users\[name]>
,以空格开头,
lilypond-book --output=out --pdf lilybook.lytex
然后,它显示
'lilypond-book' is not recognized as an internal or external command, operable program or batch file.
乐理堆栈交换的人说它不适用于 Windows 计算机。那么如何在 Windows 上做到这一点呢?请帮忙,我很困惑。谢谢你。
解决方案
我相信您需要将 lilypond-book 添加到 PATH 变量中,就像您对 lilypond 可执行文件所做的那样。这些是来自 LilyPond 自己网站的说明集:
命令行上的 Windows
运行 LilyPond 最方便的方法是将包含 LilyPond 可执行文件的文件夹添加到环境变量“Path”中。
- 打开控制面板上的“系统”,选择高级选项卡,然后单击环境变量按钮。
从环境变量列表中选择变量“路径”,然后单击编辑按钮。您将看到一个标题为“编辑系统变量”的窗口;将包含 LilyPond 可执行文件的文件夹的名称附加到“变量值”,如下所示:
[预设路径];DIR\LilyPond\usr\bin
注意:DIR 通常是 64 位系统的 C:\Program Files (x86) 或 32 位系统的 C:\Program Files。
并单击“确定”按钮关闭窗口。
调用单个可执行文件
LilyPond 可执行文件——例如 lilypond、lilypond-book、convert-ly 等——可以通过调用它们从命令行运行:
lilypond test.ly
来自: http: //lilypond.org/windows.html
推荐阅读
- javascript - 在一个简单的 Web 应用程序中保存单选按钮的最后状态。我需要数据库吗?
- node.js - 如何让 Passport.js 在 Adonis 框架中工作
- php - YouTube API v3 抓取时间
- php - 如何将值(条目)从 WPForm Wordpress 存储到 PhpAdmin 数据库
- entity-framework - 如何隐藏已删除的实体
- javascript - Dynamodb 条件更新根据条件添加或删除
- docker - 如何在 docker 文件中传递这一行。[/runjd.sh installjdk -Dname=javaversion]
- python - 将方法放在views.py中的类中
- python - 使用 Python 将 OpenCV cv.Rectangle(img, pt1, pt2) 转换为 NumPy 数组
- css - 创建具有视差效果的图像的 css 网格