3-Column Multilingual Book with Spanning Headers

Explorer ,
May 04, 2022 May 04, 2022

Copy link to clipboard

Copied

Hello!

 

I would like to ask for suggestions concerning a new project that came to me. The client wants a book that will have three columns throughout:

 

ENGLISH  |  HEBREW  |  GREEK

 

Each column is essentially a translation of the other, so I am using a three-column text frame on a master page with grids to keep them aligned. However, I am facing two issues:

 

1. When the English content in Column 1 reaches the end of the page, it doesn't spill over to Column 1 on the next page. Instead, it moves over to Column 2 even though I'm using manual column breaks as I go. 

 

Another thread here recommended I change the Keep settings and set "Keep with Nexf" to 0, which I did for all the styles, but that didn't work. 

 

So, is there a way/plug-in to keep the text flowing in the same column from page to page? Of course, the 3-column text frames on all pages are linked. 

 

2. Another way of doing this, which is more tedious, might be three separate text frames with each language independent of the other. I could go this route, but then I would lose the ability to have headings span all three columns. 

 

So, is there a way to have text span across text frames? I'm very much trying to avoid resizing the height of each frame and adding a new frame just for headings, because there will most likely be some repagination in the future and it's quite messy.

 

Thanks in advance!

TOPICS
How to , Scripting , Type

Views

190

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , May 05, 2022 May 05, 2022
Hi @ibnabouna: This is a challenging layout. The answer is no to being able to span a heading across three separate text frames. Span only works when you have one text frame with multiple columns defined within it. You could go old-school and draw one new frame that spans all three columns on the page and then have three separate frames, for one for each language underneath, as you mentioned. As for the automatic spill-over, that only going to work if you have three separate frames, one for ...

Likes

Translate

Translate
Adobe Community Professional ,
May 04, 2022 May 04, 2022

Copy link to clipboard

Copied

Sounds like you could *almost* put it all in one big table, which would solve part of the issue but create other issues, eg. how to get the text into the table, one language per table column (script might be best) and table cells won't break across pages which I assume would be a problem in your case.

 

Any chance you could post screen shot or pdf of a representative page or couple of pages showing how they should break?

- Mark

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 05, 2022 May 05, 2022

Copy link to clipboard

Copied

Thank you so much for chiming in.

 

I tried using tables in the past, but the problem is that InDesign will not allow large chunks of text in a cell to split across the page, so one might end up with a quarter page or more of white space as the whole row shifts down to the next page. It works if you have small "chunks" of text that are about the same height, but in my document, this is not the case.

 

As much as I tried to find a plugin or other script to help InDesign in this respect, it seems there is no easy way of doing this short of manually creating a bunch of text frames and hoping for the best. 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
May 05, 2022 May 05, 2022

Copy link to clipboard

Copied

Hi @ibnabouna:

 

This is a challenging layout. The answer is no to being able to span a heading across three separate text frames. Span only works when you have one text frame with multiple columns defined within it. You could go old-school and draw one new frame that spans all three columns on the page and then have three separate frames, for one for each language underneath, as you mentioned.

 

As for the automatic spill-over, that only going to work if you have three separate frames, one for each language. Otherwise, there is going to be a lot of cutting and pasting to try to keep the languages in the correct columns after edits.

 

Neither option is ideal, but I'd chose the one I'm showing below because it would be slightly easier to control. If you follow the text threads/frame colors you can see how I have the frames connected. I'm making the assumption that you're going have heads in the middle of a page which would be the most problematic. Because the column lengths will never match up when you have multiple languages, you can use column breaks to force the text to hop over the middle-of-the-page heads and onto the next threaded frame.

 

~Barb

 

columns.png

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
May 05, 2022 May 05, 2022

Copy link to clipboard

Copied

What I've done, when I've needed a single headline to cross three paralell text columns, is to just use a single-cell table. Tables can extend beyond the boundaries of the frame without issue. Much less elegant than Barb's solution, but many fewer clicks. 

 

However, I've never bothered to get primary text frames on master pages working, so I just draw a bunch of parallel text frames and thread them by hand (usually with Rorohiko's Text Stitch, which I've been using since forever ago to speed up frame-threading in these situations).

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 05, 2022 May 05, 2022

Copy link to clipboard

Copied

Thank you for those recommendations! I'll have to check out Text Stitch.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 05, 2022 May 05, 2022

Copy link to clipboard

Copied

Thank you, Barb. Yes, this is the approach I decided on after trying the other options. It's still quite tedious, since all of the blocks of text are related to each other and must line up horizontally, but thankfully, it is workable with some effort.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
May 05, 2022 May 05, 2022

Copy link to clipboard

Copied

Hi @ibnabouna, I was intrigued by this problem and I've written a script idea called "Align Paragraphs". It's a slightly complicated set up, as you can imagine, but I'll attach a sample document that you can use to see what I've done. I've put a bit of documentation in the script itself, too.

 

The basic idea is to mark paragraphs in "AlignMe" paragraph style and the script will try to align them vertically. In my sample document I've also added an anchored text frame (blue) in the English column that spans all three columns—this has an object style applied so it's easy to edit. In my sample document I've left the "AlignMe" text frames (pink) visible, but you could make them invisible, or just send those frames to the back. The script looks through each story (English, Hebrew, and Greek) and adjusts the "AlignMe" headings so they will align to the one that sits lowest in the text flow. Then it moves on to the next set of three headings.

 

The script can be used multiple times, for example you could run it again after making some text changes. However, in a case where the script has added frame breaks (page 2 of my sample document) that will cause it to push those headings to the next page again, so you'll need to manually remove the frame break characters if this happens.

 

Oh, and a super important thing is you'll need to add a script label to each of the text frames on the first page (just the first page frames) and label them "English", "Hebrew", and "Greek" to match the script. Go to Window > Utilities > Script Label.

 

And don't forget to download the attached sample indesign document. It will help I think.

- Mark

 

adjust-paragraphs.gif

 

And here's the script:

 

/*
    Align Paragraphs
    for Adobe Indesign 2022

    by m1b,
    here: https://community.adobe.com/t5/indesign-discussions/3-column-multilingual-book-with-spanning-headers/m-p/12925006

    Will attempt to align paragraphs vertically on a page.

    Example setup:
    1.  Indesign doc with multiple stories
        that are threaded across pages adjacently
        (see linked thread at community.adobe.com)
    2.  At least one text frame of each story must
        be labelled (eg. "English", "Hebrew" etc.)
    3.  All text frames first baseline offset must
        be "Leading" (to handle first line aligning)
    4.  All headings to be aligned should have the
        "AlignMe" paragraph style applied.
    5.  Script will cause all "AlignMe" paragraphs
        to align at baselines, either by
        - altering spaceBefore, or if first line,
        - altering leading of first character
        (script will add frame breaks to attempt
        to place paragraphs on the same page)

    Note: as per adobe community thread attached document,
    see option of using anchored text frames for
    frame-spanning headings.

    Known limitations:
    - Truly horrifying lack of testing and
      error handling! If people show interest
      I'm happy to make improvements though.
    - if script is run multiple times on same
      document it doesn't remove frame breaks
      that it may have added at an earlier run

*/

function main() {

    var doc = app.activeDocument,

        // thread labels match with
        // script labels on text frames
        threads = [
            { label: 'English' },
            { label: 'Hebrew' },
            { label: 'Greek' }
        ],

        alignParagraphStyleName = 'AlignMe';

    // grep to find paragraph styles
    app.findGrepPreferences = NothingEnum.NOTHING;
    app.changeGrepPreferences = NothingEnum.NOTHING;
    app.findGrepPreferences.appliedParagraphStyle = alignParagraphStyleName;

    // collect objects in threads
    for (var h = 0; h < threads.length; h++) {
        // add labelled text frames
        threads[h].textFrame = getPageItems(doc, RegExp(threads[h].label), true);
        // add story
        threads[h].story = threads[h].textFrame.parentStory;
        // add headings
        threads[h].headings = threads[h].story.findGrep();
    }

    // sanity check
    var errors = [],
        numberOfHeadings = threads[0].headings.length;
    for (var h = 1; h < threads.length; h++) {
        if (threads[h].headings.length != numberOfHeadings)
            errors.push('Thread "' + threads[h].label + '" has ' + threads[h].headings.length + ' headings ("' + threads[0].label + '" has ' + numberOfHeadings + ' headings).');
    }
    if (errors.length > 0) {
        alert('Error:\n' + errors.join('\n'));
        return;
    }

    app.scriptPreferences.measurementUnit = MeasurementUnits.POINTS;
    // "frameScale" is just a way of evaluating the "height" of a heading
    // such that a heading with baseline height of only 100 but
    // textFrameIndex of 1 is considered "bigger" than a heading
    // with baseline height of 900 but textFrameIndex of 0.
    // Script would evaluate 10000100 > 900 and correctly determine that
    // the 100 baseline is "bigger" than the 900 baseline
    var frameScale = 10000000;
    // align headings
    for (var h = 0; h < numberOfHeadings; h++) {
        var maxYValue = 0;
        for (var i = 0; i < threads.length; i++) {
            var frameIndex = getTextsTextFrameIndexInStory(threads[i].headings[h], threads[i].story),
                yValue = frameIndex * frameScale + threads[i].headings[h].baseline;
            if (maxYValue < yValue)
                maxYValue = yValue;
        }
        // split the frame index and yValue
        var maxY = maxYValue % frameScale,
            maxFrameIndex = Math.floor(maxYValue / frameScale);

        aligningLoop:
        for (var i = 0; i < threads.length; i++) {
            // align heading by adding frame breaks
            var heading = threads[i].headings[h],
                headingTextFrame = heading.parentTextFrames[0],
                frameIndex = getTextsTextFrameIndexInStory(heading, threads[i].story),
                deltaFrameIndex = maxFrameIndex - frameIndex;
            while (deltaFrameIndex > 0) {
                threads[i].story.characters[heading.characters[0].index - 1].insertionPoints[0].contents = SpecialCharacters.FRAME_BREAK;
                deltaFrameIndex--;
            }

            // align heading
            var firstLineInFrame = heading.lines[0].index == headingTextFrame.lines[0].index;

            if (firstLineInFrame) {
                // align heading by adjusting first
                // character's leading; this is
                // necessary because spaceBefore
                // doesn't affect first lines
                // note: textFrame's first baseline offset
                // must be set to "Leading" for this to work
                var deltaY = maxY - heading.baseline;
                heading.characters[0].leading += deltaY;
            }

            else {
                // align heading by adjusting spaceBefore
                var deltaY = maxY - heading.baseline;
                heading.spaceBefore += deltaY;
            }
        }

    }

    function getTextsTextFrameIndexInStory(text, story) {
        // Explr.init(story); return;
        var textFrame = text.parentTextFrames[0];
        for (var i = 0; i < story.textContainers.length; i++) {
            if (textFrame == story.textContainers[i])
                return i;
        }
    }

    function getPageItems(doc, matcher, onlyFirst) {
        // matcher must be regex to match script label
        var items = doc.pageItems,
            found = [];
        for (var i = 0; i < items.length; i++) {
            if (matcher.test(items[i].label)) {
                if (onlyFirst)
                    return items[i]
                found.push(items[i]);
            }
        }
        return found;
    }
}

app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Align Paragraphs");

 

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 05, 2022 May 05, 2022

Copy link to clipboard

Copied

Wow. I'm speechless at this effort. 

 

I haven't had a chance to try it, but it looks very promising as an indispensable aid for these types of complicated layouts.

 

I'll report back when I have a chance to set it up with my content.

 

Again, this is really incredible.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
May 05, 2022 May 05, 2022

Copy link to clipboard

Copied

Just For Comments:

 

I've studied this matter since years. When time, I will explore a "3 flows" update! …

 

(^/)  The Jedi

 

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 06, 2022 May 06, 2022

Copy link to clipboard

Copied

Hello,

 

Amazing... This is quite impressive! I can tell it has the polish of being worked on for a long time.

 

Yes, please do update us if it can work on a three-column layout! 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
May 06, 2022 May 06, 2022

Copy link to clipboard

Copied

LATEST

Nice!

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines