]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/ja/application/updating.itely
Merge commit 'origin/master'
[lilypond.git] / Documentation / ja / application / updating.itely
1 @c -*- coding: utf-8; mode: texinfo; documentlanguage: ja -*-
2
3 @ignore
4     Translation of GIT committish: 499a511d4166feaada31114e097f86b5e0c56421
5
6     When revising a translation, copy the HEAD committish of the
7     version that you are working on.  See TRANSLATION for details.
8 @end ignore
9
10 @c \version "2.12.0"
11
12 @c Translators: Yoshiki Sawada
13 @c Translation status: post-GDP
14
15
16 @node convert-ly を使ってファイルを更新する
17 @chapter @command{convert-ly} を使ってファイルを更新する
18 @translationof Updating files with convert-ly
19
20 @cindex Updating a LilyPond file (LilyPond ファイルを更新する)
21 @cindex convert-ly
22
23 LilyPond の入力構文は、さまざまな方法で単純化または改善するために、@c
24 定期的に変更されます。@c
25 その副作用として、LilyPond のインタプリタは@c
26 しばしば古い入力ファイルと互換性を持たなくなります。@c
27 これを救済するために、プログラム @command{convert-ly} を用いることで、@c
28 たいていの LilyPond のバージョン間での構文変更を処理することができます。
29
30
31 @menu
32 * convert-ly を呼び出す::
33 * convert-ly のコマンド ライン オプション::
34 * convert-ly の問題点::
35 @end menu
36
37 @node convert-ly を呼び出す
38 @section @command{convert-ly} を呼び出す
39 @translationof Invoking convert-ly
40
41 @command{convert-ly} は古いバージョン番号を検出するために@c
42 入力ファイルの @code{version} ステートメントを使用します。@c
43 たいていの場合、あなたの入力ファイルをアップグレードするには、@c
44 そのファイルを保持しているディレクトリで以下を実行することで十分です:
45
46 @example
47 convert-ly -e myfile.ly
48 @end example
49
50 @noindent
51 これにより、@code{myfile.ly} はアップグレードされ、@c
52 オリジナル ファイルは @code{myfile.ly~} に保存されます。
53
54 ディレクトリの中にある入力ファイルをすべて変換するには、@c
55 以下のようにします:
56
57 @example
58 convert-ly -e *.ly
59 @end example
60
61 オリジナル ファイルをアップグレードされたファイルで置き換える代わりに、@c
62 アップグレードされたファイルに異なるファイル名を指定して、@c
63 オリジナル ファイルをそのまま残しておくには、@c
64 以下のようにします:
65
66 @example
67 convert-ly myfile.ly > mynewfile.ly
68 @end example
69
70 @command{convert-ly} は常にそれが扱っている最新の構文変更に変換します。@c
71 このことは、通常、ファイルの中にある @code{version} 番号は 
72 @command{convert-ly} 自体のバージョンよりも低いということを意味します。
73
74 このプログラムは変換元のバージョン番号をリストアップします。
75 バージョン番号がリストアップされない場合、@c
76 そのファイルは最新であるということになります。
77
78 MacOS@tie{}X ユーザはこのコマンドをメニュー エントリ 
79 (@code{Compile > Update syntax}) 下で実行することになるかもしれません。
80
81 Windows ユーザはこれらのコマンドを @q{コマンド プロンプト} ウィンドウから@c
82 実行する必要があります。@c
83 コマンド プロンプトは通常、@code{スタート > アクセサリ > コマンド プロンプト}
84 で見つかります。
85
86
87 @node convert-ly のコマンド ライン オプション
88 @section @command{convert-ly} のコマンド ライン オプション
89 @translationof Command line options for convert-ly
90
91 一般に、このプログラムは以下のように呼び出されます:
92
93 @example
94 convert-ly [@var{option}]@dots{} @var{filename}@dots{}
95 @end example
96
97
98 以下のオプションを与えることができます:
99
100 @table @code
101 @item -e,--edit
102 Apply the conversions direct to the input file, modifying it
103 in-place.
104
105 @item -f,--from=@var{from-patchlevel}
106 変換元のバージョンをセットします。@c
107 これがセットされていない場合、@c
108 @command{convert-ly} は入力ファイルの中にある 
109 @code{version} 文字列を基に推測します。@c
110 例: @code{--from=2.10.25}
111
112 @item -n,--no-version
113 通常、@command{convert-ly} は @code{\version} インジケータを@c
114 出力に付け加えます。@c
115 このオプションを指定すると、それを抑制します。
116
117 @item -s, --show-rules
118 すべての変換を表示して、終了します。
119
120 @item --to=@var{to-patchlevel}
121 変換先のバージョンをセットします。@c
122 デフォルトは利用可能な最新バージョンです。@c
123 例: @code{--to=2.12.2}
124
125 @item -h, --help
126 使用方法についてのヘルプを表示します。
127 @end table
128
129 texinfo ファイルの中にある LilyPond 断片をアップグレードするには@c
130 以下を使用してください:
131
132 @example
133 convert-ly --from=... --to=... --no-version *.itely
134 @end example
135
136 2 つのバージョン間での LilyPond 構文の変更を調べるには、@c
137 以下を使用してください:
138
139 @example
140 convert-ly --from=... --to=... -s
141 @end example
142
143
144 @node convert-ly の問題点
145 @section @code{convert-ly} の問題点
146 @translationof Problems with convert-ly
147
148 Windows の @q{コマンド プロンプト} ウィンドウから@c
149 スペースを含むファイル名やパスを持つファイルに対して@c
150 convert-ly を実行する場合、@c
151 入力ファイル名全体を 3 つ (!) のダブル クォートで囲む必要があります:
152
153 @example
154 convert-ly """D:/My Scores/Ode.ly""" > "D:/My Scores/new Ode.ly"
155 @end example
156
157 @command{convert-ly -e *.ly} コマンドが@c
158 展開時に長くなりすぎて失敗する場合、@c
159 @command{convert-ly} コマンドをループさせてやります。@c
160 以下の例は UNIX 用であり、@c
161 カレント ディレクトリの中にあるすべての @code{.ly} ファイルを@c
162 アップグレードします:
163
164 @example
165 for f in *.ly; do convert-ly -e $f; done;
166 @end example
167
168 Windows の @q{コマンド プロンプト} ウィンドウでの@c
169 上の例に対応するコマンドは以下の通りです:
170
171 @example
172 for %x in (*.ly) do convert-ly -e """%x"""
173 @end example
174
175 言語の変更がすべて処理されるわけではありません。@c
176 指定できる出力オプションは 1 つだけです。@c
177 自動的に Scheme と更新することと 
178 LilyPond の Scheme インタフェイスを更新することはまったく異なります。@c
179 Scheme コードの調整は手動で行う覚悟でいてください。
180
181 convert-ly が処理できないことがいくつかあります。@c
182 ここに、LilyPond コミュニティがそのことについて訴えたリストを挙げます。
183
184 convert-ly は必要とされるすべての変更を@c
185 スムーズに実装できるような構造にはなっていないため、@c
186 このようなバグ レポートがあります。@c
187 以下は対応して欲しいという望みのリストであり、@c
188 参照のためにここに置かれています。
189
190 @verbatim
191 1.6->2.0:
192  Doesn't always convert figured bass correctly, specifically things like {<
193 >}.  Mats' comment on working around this:
194    To be able to run convert-ly
195    on it, I first replaced all occurrences of '{<' to some dummy like '{#'
196    and similarly I replaced '>}' with '&}'.  After the conversion, I could
197    then change back from '{ #' to '{ <' and from '& }' to '> }'.
198  Doesn't convert all text markup correctly.  In the old markup syntax,
199  it was possible to group a number of markup commands together within
200 parentheses, e.g.
201    -#'((bold italic) "string")
202    This will incorrectly be converted into
203    -\markup{{\bold italic} "string"}
204    instead of the correct
205    -\markup{\bold \italic "string"}
206 2.0->2.2:
207  Doesn't handle \partcombine
208  Doesn't do \addlyrics => \lyricsto, this breaks some scores with multiple
209 stanzas.
210 2.0->2.4:
211  \magnify isn't changed to \fontsize.
212     - \magnify #m => \fontsize #f, where f = 6ln(m)/ln(2)
213  remove-tag isn't changed.
214     - \applyMusic #(remove-tag '. . .) => \keepWithTag #'. . .
215  first-page-number isn't changed.
216     - first-page-number no => print-first-page-number = ##f
217  Line breaks in header strings aren't converted.
218     - \\\\  as line break in \header strings => \markup \center-align <
219       "First Line" "Second Line" >
220  Crescendo and decrescendo terminators aren't converted.
221     - \rced => \!
222     - \rc => \!
223 2.2->2.4:
224  \turnOff (used in \set Staff.VoltaBracket = \turnOff) is not properly
225 converted.
226 2.4.2->2.5.9
227  \markup{ \center-align <{ ... }> } should be converted to:
228  \markup{ \center-align {\line { ... }} }
229  but now, \line is missing.
230 2.4->2.6
231  Special LaTeX characters such as $~$ in text are not converted to UTF8.
232 2.8
233  \score{} must now begin with a music expression.  Anything else
234  (particularly \header{}) must come after the music.
235 @end verbatim