]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/ja/usage/updating.itely
6d9d3e3266b4c003ff6025372c19429c43f92b22
[lilypond.git] / Documentation / ja / usage / updating.itely
1 @c -*- coding: utf-8; mode: texinfo; documentlanguage: ja -*-
2
3 @ignore
4     Translation of GIT committish: fabcd22c8f88ea9a87241597f1e48c0a9adbfc6e
5
6     When revising a translation, copy the HEAD committish of the
7     version that you are working on.  For details, see the Contributors'
8     Guide, node Updating translation committishes..
9 @end ignore
10
11 @c \version "2.16.0"
12
13 @c Translators: Yoshiki Sawada
14 @c Translation status: post-GDP
15
16
17 @node convert-ly を使ってファイルを更新する
18 @chapter @command{convert-ly} を使ってファイルを更新する
19 @translationof Updating files with convert-ly
20
21 @cindex Updating a LilyPond file (LilyPond ファイルを更新する)
22 @cindex convert-ly
23
24 LilyPond の入力構文は、さまざまな方法で単純化または改善するために、@c
25 定期的に変更されます。@c
26 その副作用として、LilyPond のインタプリタは@c
27 しばしば古い入力ファイルと互換性を持たなくなります。@c
28 これを救済するために、プログラム @command{convert-ly} を用いることで、@c
29 たいていの LilyPond のバージョン間での構文変更を処理することができます。
30
31
32 @menu
33 * 何故構文は変更されるのか?::
34 * convert-ly を呼び出す::
35 * convert-ly のコマンド ライン オプション::
36 * convert-ly の問題点::
37 * 手動変換::
38 @end menu
39
40 @node 何故構文は変更されるのか?
41 @section 何故構文は変更されるのか?
42 @translationof Why does the syntax change?
43
44 @cindex convert-ly
45 @cindex updating old input files (古い入力ファイルを更新する)
46
47 LilyPond の入力構文はしばしば変更されます。@c
48 LilyPond 自体が改良されるため、構文 (入力言語) もそれに合わせて変更されます。@c
49 変更の目的は、入力ファイルを読みやすく、書きやすくするためであったり、@c
50 LilyPond に新しい機能を持たせるためであったりします。
51
52 例えば、@code{\paper} と @code{\layout} のプロパティ名は
53 @code{first-second-third} という形式で記述することになっています。@c
54 しかしながら、バージョン 2.11.60 で @code{printallheaders} プロパティが@c
55 この規則に従っていないことが判明しました。@c
56 放置すべきでしょうか?
57 (新しいユーザはつじつまの合わない入力形式で混乱するでしょう。)
58 それとも、変更すべきでしょうか?
59 (既存の楽譜を持つユーザには煩わしいことです。)
60 このケースでは、プロパティ名を  @code{print-all-headers} に変更することを@c
61 決断しました。@c
62 幸運なことに、@c
63 この変更は @command{convert-ly} ツールで自動的に変換することができます。
64
65 不幸なことに、@c
66 @command{convert-ly} はすべての変更を処理できるわけではありません。@c
67 例えば、バージョン 2.4 以前の LilyPond では、@c
68 アクセント文字と非英語文字を LaTeX を用いて入力していました
69 -- Christmas のフランス語は @code{No\"el} のように入力されていました。@c
70 しかしながら、バージョン 2.6 以降の LilyPond では、@c
71 特殊文字 @code{ë} を UTF-8 文字として直接 LilyPond ファイルに@c
72 入力することになりました。@c
73 @command{convert-ly} はすべての LaTeX の特殊文字を UTF-8 文字に変換する@c
74 ことはできません。@c
75 手動で古い LilyPond 入力ファイルを更新する必要があります。
76
77
78 @node convert-ly を呼び出す
79 @section @command{convert-ly} を呼び出す
80 @translationof Invoking convert-ly
81
82 @command{convert-ly} は古いバージョン番号を検出するために@c
83 入力ファイルの @code{version} ステートメントを使用します。@c
84 たいていの場合、あなたの入力ファイルを更新するには、@c
85 そのファイルを保持しているディレクトリで以下を実行することで十分です:
86
87 @example
88 convert-ly -e myfile.ly
89 @end example
90
91 @noindent
92 これにより、@code{myfile.ly} は更新され、@c
93 オリジナル ファイルは @code{myfile.ly~} に保存されます。
94
95 @warning{@command{convert-ly} のバージョンは、@c
96 それが扱う最新の構文変更に合わせて変更されます。@c
97 このため、入力ファイルの @code{\version} 番号はたいてい@c
98 @command{convert-ly} のバージョンよりも低いことになります。}
99
100 ディレクトリの中にある入力ファイルをすべて変換するには、@c
101 以下のようにします:
102
103 @example
104 convert-ly -e *.ly
105 @end example
106
107 オリジナル ファイルをそのまま残しておき、
108 更新されたファイルに新しいファイル名を指定するには以下のようにします:
109
110 @example
111 convert-ly myfile.ly > mynewfile.ly
112 @end example
113
114 このプログラムは変換元のバージョン番号をリストアップします。
115 バージョン番号がリストアップされない場合、@c
116 そのファイルは最新であるということになります。
117
118 MacOS@tie{}X ユーザはこのコマンドをメニュー エントリ
119 (@code{Compile > Update syntax}) 下で実行することになるかもしれません。
120
121 Windows ユーザはこれらのコマンドを @q{コマンド プロンプト} ウィンドウから@c
122 実行する必要があります。@c
123 コマンド プロンプトは通常、@code{スタート > アクセサリ > コマンド プロンプト}
124 で見つかります。
125
126
127 @node convert-ly のコマンド ライン オプション
128 @section @command{convert-ly} のコマンド ライン オプション
129 @translationof Command line options for convert-ly
130
131 一般に、このプログラムは以下のように呼び出されます:
132
133 @example
134 convert-ly [@var{option}]@dots{} @var{filename}@dots{}
135 @end example
136
137 以下のオプションを与えることができます:
138
139 @table @code
140 @item -d, --diff-version-update
141 @code{\version} を最新に更新します。最新バージョンよりも大きい場合は@c
142 何もしません。
143
144 @item -e, --edit
145 入力ファイルに直接変換を適用して、それをその場で変更します。
146
147 @item -f, --from=@var{from-patchlevel}
148 変換元のバージョンをセットします。@c
149 これがセットされていない場合、@c
150 @command{convert-ly} は入力ファイルの中にある
151 @code{version} 文字列を基に推測します。@c
152 例: @option{--from=2.10.25}
153
154 @item -h, --help
155 ヘルプ (使い方) を表示します。
156
157 @item -l @var{loglevel}, --loglevel=@var{loglevel}
158 出力の饒舌さを @var{loglevel} にセットします。@c
159 取り得る値は、大文字で、@code{PROGRESS} (デフォルト), @code{NONE},
160 @code{WARNING}, @code{ERROR}, それに @code{DEBUG} です。
161
162 @item -n, --no-version
163 通常、@command{convert-ly} は @code{\version} インジケータを@c
164 出力に付け加えます。@c
165 このオプションを指定すると、それを抑制します。
166
167 @item -s, --show-rules
168 すべての変換を表示して、終了します。
169
170 @item -t, --to=@var{to-patchlevel}
171 変換先のバージョンを明示してセットします。@c
172 明示されない場合は、デフォルトで最新バージョンにセットします。
173
174 @example
175 convert-ly --to=2.14.1 myfile.ly
176 @end example
177
178 @end table
179
180 texinfo ファイルの中にある LilyPond 断片を更新するには@c
181 以下を使用してください:
182
183 @example
184 convert-ly --from=... --to=... --no-version *.itely
185 @end example
186
187 2 つのバージョン間での LilyPond 構文の変更を調べるには、@c
188 以下を使用してください:
189
190 @example
191 convert-ly --from=... --to=... -s
192 @end example
193
194
195 @node convert-ly の問題点
196 @section @code{convert-ly} の問題点
197 @translationof Problems running convert-ly
198
199 Windows の @q{コマンド プロンプト} ウィンドウから@c
200 スペースを含むファイル名やパスを持つファイルに対して@c
201 convert-ly を実行する場合、@c
202 入力ファイル名全体を 3 つ (!) のダブル クォートで囲む必要があります:
203
204 @example
205 convert-ly """D:/My Scores/Ode.ly""" > "D:/My Scores/new Ode.ly"
206 @end example
207
208 @command{convert-ly -e *.ly} コマンドが@c
209 展開時に長くなりすぎて失敗する場合、@c
210 @command{convert-ly} コマンドをループさせてやります。@c
211 以下の例は UNIX 用であり、@c
212 カレント ディレクトリの中にあるすべての @code{.ly} ファイルを@c
213 更新します:
214
215 @example
216 for f in *.ly; do convert-ly -e $f; done;
217 @end example
218
219 Windows の @q{コマンド プロンプト} ウィンドウでの@c
220 上の例に対応するコマンドは以下の通りです:
221
222 @example
223 for %x in (*.ly) do convert-ly -e """%x"""
224 @end example
225
226 言語の変更がすべて処理されるわけではありません。@c
227 指定できる出力オプションは 1 つだけです。@c
228 自動的に Scheme と更新することと
229 LilyPond の Scheme インタフェイスを更新することはまったく異なります。@c
230 Scheme コードの調整は手動で行う覚悟でいてください。
231
232
233 @node 手動変換
234 @section 手動変換
235 @translationof Manual conversions
236
237 @c not yet
238 理論的には、@c
239 @command{convert-ly} のようなプログラムはすべての構文変更を処理できます。
240 After all, a computer program interprets the old
241 version and the new version, so another computer program can
242 translate one file into another@footnote{At least, this is
243 possible in any LilyPond file which does not contain scheme.  If
244 there is scheme in the file, then the LilyPond file contains a
245 Turing-complete language, and we run into problems with the famous
246 @qq{Halting Problem} in computer science.}.
247
248 しかしながら、LilyPond プロジェクトの資源には限りがあり、@c
249 すべての変換を自動化することはできません。@c
250 以下は既知の問題のリストです。
251
252 @verbatim
253 1.6->2.0:
254  Doesn't always convert figured bass correctly, specifically things like {<
255 >}.  Mats' comment on working around this:
256    To be able to run convert-ly
257    on it, I first replaced all occurrences of '{<' to some dummy like '{#'
258    and similarly I replaced '>}' with '&}'.  After the conversion, I could
259    then change back from '{ #' to '{ <' and from '& }' to '> }'.
260  Doesn't convert all text markup correctly.  In the old markup syntax,
261  it was possible to group a number of markup commands together within
262 parentheses, e.g.
263    -#'((bold italic) "string")
264    This will incorrectly be converted into
265    -\markup{{\bold italic} "string"}
266    instead of the correct
267    -\markup{\bold \italic "string"}
268 2.0->2.2:
269  Doesn't handle \partcombine
270  Doesn't do \addlyrics => \lyricsto, this breaks some scores with multiple
271 stanzas.
272 2.0->2.4:
273  \magnify isn't changed to \fontsize.
274     - \magnify #m => \fontsize #f, where f = 6ln(m)/ln(2)
275  remove-tag isn't changed.
276     - \applyMusic #(remove-tag '. . .) => \keepWithTag #'. . .
277  first-page-number isn't changed.
278     - first-page-number no => print-first-page-number = ##f
279  Line breaks in header strings aren't converted.
280     - \\\\  as line break in \header strings => \markup \center-align <
281       "First Line" "Second Line" >
282  Crescendo and decrescendo terminators aren't converted.
283     - \rced => \!
284     - \rc => \!
285 2.2->2.4:
286  \turnOff (used in \set Staff.VoltaBracket = \turnOff) is not properly
287 converted.
288 2.4.2->2.5.9
289  \markup{ \center-align <{ ... }> } should be converted to:
290  \markup{ \center-align {\line { ... }} }
291  but now, \line is missing.
292 2.4->2.6
293  Special LaTeX characters such as $~$ in text are not converted to UTF8.
294 2.8
295  \score{} must now begin with a music expression.  Anything else
296  (particularly \header{}) must come after the music.
297 @end verbatim