Span Columns. Adobe CS5 InDesign
إعلان
إعلان
C
HAPTER
6: Text and Type
Span Columns 116 set myDocument to document 1 tell footnote options of myDocument set separator text to tab set marker positioning to superscript marker end tell set myStory to story 1 of myDocument
--Add four footnotes at random locations in the story.
local myStoryLength, myRandomNumber set myStoryLength to (count words of myStory) repeat with myCounter from 1 to 5 set myRandomNumber to my myGetRandom(1, myStoryLength) tell insertion point -1 of word myRandomNumber of myStory set myFootnote to make footnote end tell
--Note: when you create a footnote, it contains text--the footnote marker
--and the separator text (if any). If you try to set the text of the footnote
--by setting the footnote contents, you will delete the marker. Instead, append
--the footnote text, as shown below.
tell insertion point -1 of myFootnote set contents to "This is a footnote." end tell end repeat
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): set myDocument to active document set myPage to page 1 of myDocument set myTextFrame to item 1 of text frames of myPage tell myTextFrame set text column count of text frame preferences to 3 set myStory to parent story tell item 1 of paragraphs of myStory
--split column set span column type to split columns set span split column count to 2 set split column outside gutter to 0 set split column inside gutter to 1 end tell set mySpanIndex to (count of paragraphs of myStory) div 2 + 1 tell item mySpanIndex of paragraphs of myStory
--span columns set span column type to span columns set span split column count to all end tell end tell
Setting Text Preferences
The following script shows how to set general text preferences (for the complete script, see
TextPreferences):
C
HAPTER
6: Text and Type
Setting Text Preferences 117 tell text preferences set abut text to text wrap to true
--baseline shift key increment can range from .001 to 200 points.
set baseline shift key increment to 1 set highlight custom spacing to false set highlight hj violations to true set highlight keeps to true set highlight substituted fonts to true set highlight substituted glyphs to true set justify text wraps to true
--kerning key increment value is 1/1000 of an em.
set kerning key increment to 10
--leading key increment value can range from .001 to 200 points.
set leading key increment to 1 set link text files when importing to false set show invisibles to true set small cap to 60 set subscript position to 30 set subscript size to 60 set superscript position to 30 set superscript size to 60 set typographers quotes to false set use optical size to false set use paragraph leading to false set z order text wrap to false end tell
--Text editing preferences are application-wide.
tell text editing preferences set allow drag and drop text in story to true set drag and drop text in layout to true set smart cut and paste to true set triple click selects line to false end tell
تنزيل
إعلان