Span Columns; Setting Text Preferences - Adobe 0046100128056 - InDesign - Mac Manual

Javascript
Table of Contents

Advertisement

C
6: Text and Type
HAPTER

Span Columns

A paragraph layout can span multiple columns or split into subcolumns with the Span Columns attribute
or Split Column attribute applied. The following script fragment shows how to set the Span Columns and
Split Column style for a paragraph (for the complete script, see SpanColumns):
var myDocument = app.activeDocument;
var myPage = myDocument.pages.item(0);
var myTextFrame = myPage.textFrames.item(0);
myTextFrame.textFramePreferences.textColumnCount = 3;
var myStory = myTextFrame.parentStory;
//Split Column
with(myStory.paragraphs[0]) {
spanColumnType = SpanColumnTypeOptions.splitColumns;
spanSplitColumnCount = 2;
splitColumnOutsideGutter = 0;
splitColumnInsideGutter = 1;
}
//Span Columns
var mySpanIndex = Math.floor(myStory.paragraphs.length / 2);
with(myStory.paragraphs[mySpanIndex]) {
spanColumnType = SpanColumnTypeOptions.spanColumns;
spanSplitColumnCount = SpanColumnCountOptions.all;
}

Setting Text Preferences

The following script shows how to set general text preferences (for the complete script, see
TextPreferences):
//The following sets the text preferences for the application; to set the
//text preferences for the front-most document, replace "app.textPreferences" with
//"app.documents.item(0).textPreferences"
with(app.textPreferences){
abutTextToTextWrap = true;
//baseline shift key increment can range from .001 to 200 points.
baselineShiftKeyIncrement = 1;
highlightCustomSpacing = false;
highlightHjViolations = true;
highlightKeeps = true;
highlightSubstitutedFonts = true;
highlightSubstitutedGlyphs = true;
justifyTextWraps = true;
//kerning key increment value is 1/1000 of an em.
kerningKeyIncrement = 10;
//leading key increment value can range from .001 to 200 points.
leadingKeyIncrement= 1;
linkTextFilesWhenImporting = false;
scalingAdjustsText = false;
showInvisibles = true;
smallCap = 60;
subscriptPosition = 30;
Span Columns 109

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Indesign cs5

Table of Contents