段落罫線をボックスに合わせる

cropped-UNI4833.jpg

スクリプトエディタで開く

フレーム内マージン+フォントサイズに段落罫線を設定します。

スクリーンショット 2014-03-07 3-07 16.17.04

tell document 1 of application “Adobe InDesign CS5”
set a1 to parent text frames of selection
copy geometric bounds of a1‘s item 1 to {p1, p2, p3, p4}
try
copy inset spacing of text frame preferences of a1‘s item 1 to {i1, i2, i3, i4}
on error
set {i1, i2, i3, i4} to {0, 0, 0, 0}
end try
copy properties of selection to {point size:b5}
set g1 to (b5 * 0.25) + i1
set properties of selection to {rule below line weight:p3p1, rule below offset:-g1, rule below:true, rule below width:text width, rule below right indent:-i4, rule below left indent:-i2}
end tell