Try this: in menu window > utility > script
In script panel open Application > Javascript
and right-click on one file (example AddGuides.jsx
) and select Show in Finder
. Duplicate the file in Finder and rename in decreaseParagrph.jsx
and now open it with simple text editor. Paste this code:
mySel = app.selection;
var myArray = new Array();
var myP = prompt("Choose your % of decrease","80");
var myPercentile = myP/100;
// this grep find all the sentences : [^.!?\s][^.!?]*(?:[.!?](?!['"]?\s|$)[^.!?]*)*[.!?]?['"]?(?=\s|$)
var a = "[^.!? ][^.!?]*(?:[.!?](?!['"
var b = '"';
var c = "]? |$)[^.!?]*)*[.!?]?['";
var d = "]?(?= |$)";
// you must select text (or more texts)
if(mySel.length>0){
for(var i=0;i<mySel.length;i++){
//clear find/replace preferences
app.findGrepPreferences = NothingEnum.nothing;
app.changeGrepPreferences = NothingEnum.nothing;
//find the grep
app.findGrepPreferences.findWhat = a+b+c+b+d;
//and put into array
var myArray = mySel[i].parentStory.findGrep();
//for all elements of array (exept the first)
for(var o=1;o<myArray.length;o++){
//take the prevoius sentence point size
var myNewMeasure = myArray[o-1].pointSize;
//and transform it
myArray[o].pointSize = myNewMeasure*myPercentile;
}
}
}
Save decreaseParagrph.jsx
file and return in InDesign, open the file with paragraph, choose the text box with text you want and double click on decreaseParagrph.jsx
(in script panel), choose % of decrease and enjoy ;)