Skip to main content
honey620
Participating Frequently
November 18, 2020
Answered

Splitting columns is causing the text to be out of order!

  • November 18, 2020
  • 10 replies
  • 3799 views

I split my text into two columns but the text is now out of order -see how the left column content should be on the right-. What do I do? 

This topic has been closed for replies.
Correct answer Laubender

Hi honey620,

there could be an explanation for this behavior:

The story direction of the text frame is set to Right-to-Left. That would be typical for a text frame of a document with RTL text like you would need it with Hebrew or Arabic. You could tell if this is the cause if you select the frame and check the in- and out-ports of the frame:

 

Story direction left-to-right, the in-port is at the upper left, the out-port is at the lower-right:

 

Story direction right-to-left, the in-port is at the upper right, the out-port is at the lower-left:

 

So in effect, if you do Span Columns to All you get the following results.

With story direction left-to-right:

 

 

With story direction right-to-left:

 

To change the story direction of the parent story of a selected text frame to LTR, use this script code written in ExtendScript (JavaScript) :

 

app.selection[0].texts[0].parentStory.storyPreferences.storyDirection = 
StoryDirectionOptions.LEFT_TO_RIGHT_DIRECTION;

 

How to save script code to a script file and to install that script file, see:

https://www.indiscripts.com/pages/help#hd0sb2

 

Regards,
Uwe Laubender

( ACP )

10 replies

Community Expert
December 9, 2021

"You Mean we Need to Make a loop to every text frame in the Document? or something else you are thinking about!"

 

Hm. No.

This should work:

var storiesArray = app.documents[0].stories.everyItem().getElements();

for( var n=0; n<storiesArray.length; n++ )
{
	storiesArray[n].storyPreferences.storyDirection = 
	StoryDirectionOptions.RIGHT_TO_LEFT_DIRECTION;
};

 

Regards,
Uwe Laubender

( ACP )

M.Hasanin
Inspiring
December 9, 2021

Your Genius @Laubender , Thanks a lot 

BestMohammad Hasanin
Community Expert
December 9, 2021

Did you try by selecting a single text frame and run this code:

// Text frame selected.
app.selection[0].texts[0].parentStory.storyPreferences.storyDirection = 
StoryDirectionOptions.RIGHT_TO_LEFT_DIRECTION;

 

Regards,
Uwe Laubender

( ACP )

M.Hasanin
Inspiring
December 9, 2021

Yes , Thats Works!, Thanks , also i tried the following and it works!

 

 

var myNewDoc = app.documents.add();

var myTextFrame = myNewDoc.textFrames.add({
	geometricBounds: myNewDoc.pages[0].bounds
});

with(myTextFrame){
//Set the bounds of the text frame.
geometricBounds = [70, 100, 300, 200];
//Fill the text frame with placeholder text in 1 column.
textFramePreferences.textColumnCount = 1;
contents = "حسانين";
parentStory.justification = Justification.RIGHT_JUSTIFIED;
paragraphs.item(0).paragraphDirection = ParagraphDirectionOptions.RIGHT_TO_LEFT_DIRECTION
//Now set the story direction left to right
parentStory.storyPreferences.storyDirection = StoryDirectionOptions.RIGHT_TO_LEFT_DIRECTION;
}

 

 

I added new document then arabic text frame and set some attributes in arabic (Right to left) 

BestMohammad Hasanin
Community Expert
December 9, 2021

Hi M.Hasanain ,

just an idea because I assume you are using the MENA version of InDesign:

app.documents[0].stories.everyItem().storyPreferences.storyDirection = 
StoryDirectionOptions.UNKNOWN_DIRECTION;

I hope that this will revert the story direction to the default one.

( Not tested, because I do not have the MENA version installed. )

 

Regards,
Uwe Laubender

( ACP )

M.Hasanin
Inspiring
December 9, 2021

Hi @Laubender 

Yes Im Using MENA Version that Support Arabic and Hebrew, But Strange no Code Works at All of the Following! also No Errors!, anyway thanks a lot you give it a try.

app.documents[0].stories.everyItem().storyPreferences.storyDirection = StoryDirectionOptions.RIGHT_TO_LEFT_DIRECTION;
app.documents[0].stories.everyItem().storyPreferences.storyDirection = StoryDirectionOptions.UNKNOWN_DIRECTION;
app.activeDocument.stories.everyItem().storyPreferences.storyDirection = StoryDirectionOptions.UNKNOWN_DIRECTION;

 

BestMohammad Hasanin
LaubenderCommunity ExpertCorrect answer
Community Expert
November 19, 2020

Hi honey620,

there could be an explanation for this behavior:

The story direction of the text frame is set to Right-to-Left. That would be typical for a text frame of a document with RTL text like you would need it with Hebrew or Arabic. You could tell if this is the cause if you select the frame and check the in- and out-ports of the frame:

 

Story direction left-to-right, the in-port is at the upper left, the out-port is at the lower-right:

 

Story direction right-to-left, the in-port is at the upper right, the out-port is at the lower-left:

 

So in effect, if you do Span Columns to All you get the following results.

With story direction left-to-right:

 

 

With story direction right-to-left:

 

To change the story direction of the parent story of a selected text frame to LTR, use this script code written in ExtendScript (JavaScript) :

 

app.selection[0].texts[0].parentStory.storyPreferences.storyDirection = 
StoryDirectionOptions.LEFT_TO_RIGHT_DIRECTION;

 

How to save script code to a script file and to install that script file, see:

https://www.indiscripts.com/pages/help#hd0sb2

 

Regards,
Uwe Laubender

( ACP )

M.Hasanin
Inspiring
December 9, 2021

Hi @Laubender 

When I Tried to the Opposite Side for Arabic (RTL) for all Document it doesnt execute?(no errors) did i make something wrong? 

var myStories = app.activeDocument.stories.everyItem().storyPreferences.storyDirection;
myStories = StoryDirectionOptions.RIGHT_TO_LEFT_DIRECTION;

 

BestMohammad Hasanin
Barb Binder
Community Expert
Community Expert
November 19, 2020

Let's take a look at the InDesign version you are using:

  1. Open the CC Desktop app.
  2. Click your avatar in the top right corner > Preferences > Apps.
  3. What version is checked? I can see from your screen shots that you have an English-language version installed. Which one is it?

 

~Barb 

 

 

 

 

~Barb at Rocky Mountain Training
Barb Binder
Community Expert
Community Expert
November 18, 2020

Hi @honey620 :

 

Actually, I can see that either the text is designated Middle Eastern or you have a Middle Eastern version installed by looking more closely at the screenshot that you posted of the paragraph panel. Directly under the left alignment button I see the left to right and right to left icons. Those don't normally appear in the English versions of the software.

 

Start by unsplitting, then change your paragraph composer from the World Ready Paragraph Composer to the Adobe Paragraph Composer. It's in the fly out menu from that same paragraph panel, top right corner. Resplit. Does that make a difference?

 

~Barb 

~Barb at Rocky Mountain Training
honey620
honey620Author
Participating Frequently
November 19, 2020

Unfortunatly that did not work.

Barb Binder
Community Expert
Community Expert
November 18, 2020

Hi @honey620:

 

When you split one column into two columns, the text runs down the first column, and then down the second column.

 

If the columns are reversed, are you using a Middle Eastern version of InDesign, or did the text come from an ME version of InDesign?

 

~Barb 

~Barb at Rocky Mountain Training
honey620
honey620Author
Participating Frequently
November 18, 2020

I'm not sure, how do I check for that?

honey620
honey620Author
Participating Frequently
November 18, 2020

I copied the text from a Google Docs file, not another ID file.

honey620
honey620Author
Participating Frequently
November 18, 2020

I'm using a PC Windows 10, I have the most updated version of InDesign CC. 

Legend
November 18, 2020

When you reply, please use the image icon to embed your images in the post, so other users don't have to download them to view them.

Steve Werner
Community Expert
Community Expert
November 18, 2020

Information that would help us help you: Please tell us what operating system (exactly) you're running. Please tell us (exactly) what InDesign version you're using. 

 

Show us what the text looked like BEFORE you "split text into two column" (turn on Hidden Characters when you make a screen shot). Exactly what command did you use to split into columns?