forked from gregorio-project/gregorio-project.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration-texworks.html
141 lines (108 loc) · 7.39 KB
/
configuration-texworks.html
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!--
Gregorio web site.
Copyright (C) 2007-2015 The Gregorio project
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<title>Gregorio project website</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="description" content="Free software for typesetting Gregorian chant" lang="en">
<meta name="keywords" content="Gregorian chant, gregorio, gabc, gregoriotex" lang="en">
<meta name="author" content="The Gregorio project">
<link rel="shortcut icon" href="./illus/fav.ico">
<link rel="icon" href="./illus/fav.ico">
<link rel="stylesheet" href="./style.css" type="text/css" title="default">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type="text/javascript" src="./gregorio-menu.js"></script>
<script>
var context = 'gregorio';
var title = 'Gregorio project website'
</script>
</head>
<body>
<div id="ban">
<img src="./illus/harpedroite.png" title="" class="hd" alt="" />
<a id="haut" name="haut"></a>
<div id="banniere">
</div>
</div>
<script>write_gre_menu();</script>
<div class="flux">
<!-- IE patch-->
<div class="text">
<!-- End of header -->
<!-- header -->
<h1>Configuring <span class="tex">T<span class="epsilon">e</span>X</span>works for Gregorio</h1>
<h3>Automatic score compilation</h3>
<p>A feature of Gregorio version 3.0 and later is the automatic compilation of gabc scores when needed to complete a <span class="latex">L<span class="alpha">a</span>T<span class="epsilon">e</span>X</span> document. For this feature to work, <code>lualatex</code> must be able to launch the <code>gregorio</code> program during compilation.</p>
<p><span class="tex">T<span class="epsilon">e</span>X</span>works can be configured to do this by creating a new engine for compilation that adds the <code>--shell-escape</code> argument to <code>lualatex</code>.</p>
<p>To create it, go into <code>Edit -> Preferences</code> (into <code>TeXworks -> Preferences</code> on a Mac). Then, in the "Typesetting" tab, in the "Processing tools" section, click on "+" in the "Tools" section. You can fill the values for the new engine:</p>
<div class="commandline">
<code>Name: LuaLaTeX+se</code><br>
<code>Program: lualatex</code><br>
</div>
<p>The name <code>LuaLaTeX+se</code> is arbitrary, but it's important to use it so that Gregorio users will be able to share scores.</p>
<p>Then you need to add three arguments, clicking each time on "+": first is <code>--shell-escape</code>, second is <code>$synctexoption</code>, third is <code>$fullname</code>.</p>
<p>Once you're done, validate everything and restart <span class="tex">T<span class="epsilon">e</span>X</span>works.</p>
<h3>Ease of use of .gabc files (optional)</h3>
<p>If you want to be able to filter files with <code>.gabc</code> extensions in the file dialogs of <span class="tex">T<span class="epsilon">e</span>X</span>works, you have to hack the configuration files a little, but this is very easy.</p>
<p>First, you have to find the file named <code>texworks-config.txt</code>. Under Linux it is in <code>~/.TeXworks/configuration/</code>, under Mac it is in <code>~/Library/TeXworks/configuration/</code>, under Windows it should be in <code>C:/Users/<your user name>/.texlive2015/texmf-config</code> (replace "2015" with your version); if it's not there, you can look for it with the Windows search tools. On some systems, this file may be designated as read-only. If it is, you'll need to alter its permissions before proceeding.</p>
<p><b>Nota Bene:</b> If you have never opened <span class="tex">T<span class="epsilon">e</span>X</span>works before then the configuration files will not exist on your system. Open and close <span class="tex">T<span class="epsilon">e</span>X</span>works and it will create the missing configuration files. You can also reset your configuration to the default by simply deleting all the configuration files and then opening and closing <span class="tex">T<span class="epsilon">e</span>X</span>works.</p>
<p>Then open this file, and, near the end, you will see comments starting by <code># file-open-filter:</code>. Uncomment these lines (delete the leading "<code># </code>", note that the space has to go too) and then add the following line:</p>
<div class="commandline">
<code>file-open-filter: Gabc score (*.gabc)</code>
</div>
<p>...where you want it to appear in the list.</p>
<p>You might also want to add the a line to cleanup patterns section:</p>
<div class="commandline">
<code>cleanup-patterns: $jobname.gaux *-*_*_*.gtex</code>
</div>
<p>Doing this will allow the "Remove Aux Files" command to remove the intermediate files generated by Gregorio<span class="tex">T<span class="epsilon">e</span>X</span> along with all the other files it removes.</p>
<p><b>Note:</b> The interesting combination of wildcards (<code>*</code>) and characters on the <code>gtex</code> filename is designed to pickup the automaticly created <code>gtex</code> files which have the version number attached to the original filename in the form <code>-4_0_0</code> (though with the numbers of the Gregorio version currently installed). However, if you are in the habit of using dashes and underscores in your filenames, then it may pickup files you've generated manually, so caution is advised.</p>
<h3>Syntax Highlighting for .gabc files (optional)</h3>
<p>Adding syntax highlighting for <code>.gabc</code> files requires
manual configuration.</p>
<p>First find the file <code>syntax-patterns.txt</code>. Under Linux
it is in <code>~/.TeXworks/configuration/</code>, under Mac it is
in <code>~/Library/TeXworks/configuration/</code>, under Windows it
should be in <code>C:/Users/<your user
name>/.texlive2015/texmf-config</code> (replace "2015" with your
version); if it's not there, you can look for it with the Windows
search tools. On some systems, this file may be designated as
read-only. If it is, you'll need to alter its permissions before
proceeding.</p>
<p>Add the following code to the end of the file:</p>
<div class="commandline">
<code>[Gabc]<br>
# notes<br>
tomato N \([^\)]*\)<br>
# headers<br>
darkblue N [^\(:]+:.*;<br>
# comments<br>
gray Y %.*
</code>
</div>
<p>This adds an option to the menu <i>Format -> Syntax Highlighting</i> You will either have to select it manually or set it as the default.</p>
<h3>Using <span class="tex">T<span class="epsilon">e</span>X</span>works</h3>
<p>Once <span class="tex">T<span class="epsilon">e</span>X</span>works is ready, refer to <a href="introduction-editor.html">the introduction page</a> to start using Gregorio!</p>
<!-- footer -->
</div>
<div class="bottom">
</div>
<script>initialize_menu();</script>
</body>
</html>