Back

If your email is not recognized and you believe it should be, please contact us.

Forum Replies Created

Viewing 15 posts - 181 through 195 (of 344 total)
  • Author
    Posts
  • in reply to: auto center object inline with height #84930
    Ari Singer
    Member

    Thanks. What I can do is tell the script that whenever it finds an EPS it should ignore it and not apply baseline shift. But this means that if you have more EPS’ in the file and you do want to adjust them it won’t work on that, because it will ignore any EPS.

    Here’s the modified script that ignores any EPS:

    //created by Ari S. designerjoe@outlook.com
    // Automatically vertically center inline graphics
    app.scriptPreferences.enableRedraw = false;
    app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Adjust Inline Graphics Baseline");
    function main() {
        var myDoc = app.activeDocument;
        with (myDoc.viewPreferences){
            var myOldXUnits = horizontalMeasurementUnits;
            var myOldYUnits = verticalMeasurementUnits;
            horizontalMeasurementUnits = MeasurementUnits.points;
            verticalMeasurementUnits = MeasurementUnits.points;
            }
        var mySelection = app.selection[0];
        if (app.selection.length == 1){
            //Evaluate the selection based on its type.
            switch (app.selection[0].constructor.name){
                case "InsertionPoint":
                case "Character":
                case "Word":
                case "TextStyleRange":
                case "Line":
                case "Paragraph":
                case "TextColumn":
                case "Text":
                case "Story":
                //The object is a text object; pass it on to a function.
                myAdjustBaseline(app.selection[0]);
                break;
                case "TextFrame":
                myAdjustBaseline(app.selection[0].texts.item(0));
                break;
                default:
                alert("The selected object is not a text object. Select some text and try again.");
                break;
                }
            }
        function myAdjustBaseline(text){
            app.findChangeGrepOptions.includeLockedLayersForFind = false;
            app.findChangeGrepOptions.includeLockedStoriesForFind = false;
            app.findChangeGrepOptions.includeHiddenLayers = false;
            app.findChangeGrepOptions.includeMasterPages = false;
            app.findChangeGrepOptions.includeFootnotes = true;
            app.findGrepPreferences = app.changeGrepPreferences = null;
            app.findGrepPreferences.findWhat = "~a";
            var myFound = text.findGrep(true);
            for (i=0; i < myFound.length; i++){
                var myGraphicPosition = myFound[i];
                if (myGraphicPosition.texts[0].pageItems[0].allGraphics[0].constructor.name == "EPS")
                continue;
                var myPointSize = myGraphicPosition.pointSize;
                var myBounds = myGraphicPosition.texts[0].pageItems[0].geometricBounds;
                var myHeight = myBounds[2] - myBounds[0];
                if (myHeight >= myPointSize)
                myGraphicPosition.baselineShift = -(myHeight/3);
                else if (myHeight >= (0.75 * myPointSize))
                myGraphicPosition.baselineShift = -(myHeight/4);
                else if (myHeight >= (.6 * myPointSize))
                myGraphicPosition.baselineShift = -(myHeight/5)
                else if (myHeight <= (0.25 * myPointSize))
                myGraphicPosition.baselineShift = (myHeight/4);
                }
            app.findGrepPreferences = app.changeGrepPreferences = null;
            }
        with (myDoc.viewPreferences){
            try{
                horizontalMeasurementUnits = myOldXUnits;
                verticalMeasurementUnits = myOldYUnits;
                }
            catch(myError){
                alert("Could not reset custom measurement units.");
                }
            }
        }
    
    Ari Singer
    Member

    That’s because the quotes are ‘smart quotes’, and what it needs are ‘straight quotes’. Just go into the JS file, delete the quotes and type in new quotes. The new quotes should come out straight, and should work.

    in reply to: add text frame to existing book #84925
    Ari Singer
    Member

    That’s because the picture is anchored in the text and you can’t group to or with an anchored object. You first have to release the anchor from the picture (by right-clicking the picture, then under the “Anchored object” submenu select “Release”), then group the released picture with the text frame, then you can optionally anchor back the new group in the text.

    in reply to: add text frame to existing book #84922
    Ari Singer
    Member

    You have to group them with the pictures.

    in reply to: Color Label Keyboard Shortcut? #84920
    Ari Singer
    Member

    Here you have a script for it: Just assign it a keyboard shortcut and you’re ready to go.
    app.activeWindow.activePage.pageColor = UIColors.CUTE_TEAL;

    P.S. When you run the script the current active page gets the color label. I selected at random the color “Cute Teal”, if you prefer a different color just let me know.

    https://creativepro.com/how-to-install-a-script-in-indesign-that-you-found-in-a-forum-or-blog-post.php

    in reply to: auto center object inline with height #84919
    Ari Singer
    Member

    I can only make the script omit the math object if it’s a different format than all other inline graphics. Is it? Or if all the math objects are the same size then I can try to make sure that all inline graphics of that size should not be touched.

    in reply to: auto center object inline with height #84914
    Ari Singer
    Member

    Here you go! i created this script, please let me know if it works.
    To make it work you have to select a range of text (or a text frame) before running the script, and the script will adjust all the inline graphics in the selected text (or text frame).
    If you don’t know how to use save and run this script, look here:https://creativepro.com/how-to-install-a-script-in-indesign-that-you-found-in-a-forum-or-blog-post.php

    Folowing is the script:

    //created by Ari S. designerjoe@outlook.com
    // Automatically vertically center inline graphics
    app.scriptPreferences.enableRedraw = false;
    app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Adjust Inline Graphics Baseline");
    function main() {
    var myDoc = app.activeDocument;
    with (myDoc.viewPreferences){
    var myOldXUnits = horizontalMeasurementUnits;
    var myOldYUnits = verticalMeasurementUnits;
    horizontalMeasurementUnits = MeasurementUnits.points;
    verticalMeasurementUnits = MeasurementUnits.points;
    }
    var mySelection = app.selection[0];
    if (app.selection.length == 1){
    //Evaluate the selection based on its type.
    switch (app.selection[0].constructor.name){
    case "InsertionPoint":
    case "Character":
    case "Word":
    case "TextStyleRange":
    case "Line":
    case "Paragraph":
    case "TextColumn":
    case "Text":
    case "Story":
    //The object is a text object; pass it on to a function.
    myAdjustBaseline(app.selection[0]);
    break;
    case "TextFrame":
    myAdjustBaseline(app.selection[0].texts.item(0));
    break;
    default:
    alert("The selected object is not a text object. Select some text and try again.");
    break;
    }
    }
    function myAdjustBaseline(text){
    app.findChangeGrepOptions.includeLockedLayersForFind = false;
    app.findChangeGrepOptions.includeLockedStoriesForFind = false;
    app.findChangeGrepOptions.includeHiddenLayers = false;
    app.findChangeGrepOptions.includeMasterPages = false;
    app.findChangeGrepOptions.includeFootnotes = true;
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = "~a";
    var myFound = text.findGrep(true);
    for (i=0; i < myFound.length; i++){
    var myGraphicPosition = myFound[i];
    var myPointSize = myGraphicPosition.pointSize;
    var myBounds = myGraphicPosition.texts[0].pageItems[0].geometricBounds;
    var myHeight = myBounds[2] - myBounds[0];
    if (myHeight >= myPointSize)
    myGraphicPosition.baselineShift = -(myHeight/3);
    else if (myHeight >= (0.75 * myPointSize))
    myGraphicPosition.baselineShift = -(myHeight/4);
    else if (myHeight >= (.6 * myPointSize))
    myGraphicPosition.baselineShift = -(myHeight/5)
    else if (myHeight <= (0.25 * myPointSize))
    myGraphicPosition.baselineShift = (myHeight/4);
    }
    app.findGrepPreferences = app.changeGrepPreferences = null;
    }
    with (myDoc.viewPreferences){
    try{
    horizontalMeasurementUnits = myOldXUnits;
    verticalMeasurementUnits = myOldYUnits;
    }
    catch(myError){
    alert("Could not reset custom measurement units.");
    }
    }
    }

    in reply to: auto center object inline with height #84903
    Ari Singer
    Member

    Thanks. Now I understand what you mean. Will look into it to see if and how I can pull it off.

    in reply to: auto center object inline with height #84901
    Ari Singer
    Member

    Can you please upload it to Google Drive or Dropbox? 4Shared is too much of a hassle to download. Thanx!

    in reply to: What does Turquoise Highlighting Mean? #84899
    Ari Singer
    Member

    It means that the tracking is not set to 0. Make sure all the paragraphs’ tracking is set to 0. Once it’s not 0, it’s considered custom.

    in reply to: auto center object inline with height #84898
    Ari Singer
    Member

    Can you please post a screenshot of what you’re trying to achieve so we can better understand what you’re looking for?

    You can post your screenshot on any cloud service (such as Google Drive or Dropbox) or any image-hosting site (such as imgur.com) and post the link here.

    in reply to: please help, cannot open file, missing plugin #84883
    Ari Singer
    Member
    in reply to: please help, cannot open file, missing plugin #84881
    Ari Singer
    Member

    Make sure the file extension of the file is .indd.

    Restart your computer (to make sure the file is not open in another application).

    in reply to: Master page, column gaps different #84879
    Ari Singer
    Member

    The recto and the verso are treated as separate pages so you have to make sure both of their settings are the same. In the Pages panel double-click the master-page name (A-Master or B-Master or any name label that it has), this will select both pages at once. Go into Layout ⟩ Margin and Columns, and in the dialog box make sure the margins, columns and gutter options are defined. So now both pages will have the same settings.

    in reply to: Creating award certificates #84878
    Ari Singer
    Member

    I believe you’re talking about InDesign CS3, not InDesign 3. Correct?

Viewing 15 posts - 181 through 195 (of 344 total)