Back

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

Forum Replies Created

Viewing 10 posts - 31 through 40 (of 40 total)
  • Author
    Posts
  • in reply to: Paragraph Style conversion #114599
    Tamás Nagy
    Participant

    Hi David,

    I have a script ready that asks you to select one document as the source of all text styles and in a 2nd step asks you to seletc all docs in which you want to update these styles from the source. Finally it starts to refresh text styles in all the selected target docs.

    It is not foolproof, it talks to you in Hungarian but it worked for me. :D

    Is it what you need?

    Tamás

    in reply to: Script to duplicate page/spread after current #114511
    Tamás Nagy
    Participant

    Hi all,

    Michael asked some posts and 5 years ago how to duplicate multiple spreads in a way that preserves text threads from one spread to another. I have the same problem now, but I couldn’t find the answer here. Is here anyone who knows the solution? :)

    I tried to copy the spreads one by one by a for cycle, no success. Then I tried to copy them in 1 step this way:

    var myS=thisDoc.spreads.everyItem();
    myS.duplicate(LocationOptions.AT_END, otherDoc);

    but no change, it didn’t work either: all interspread threads were broken.

    Someone please help me!

    Tamás

    in reply to: List of font styles in Find/Replace #102477
    Tamás Nagy
    Participant

    Thank you both, in this case I think I will try to kill my Win10 again by removing 5-600 fonts. :)

    in reply to: List of font styles in Find/Replace #102474
    Tamás Nagy
    Participant

    Thank you Dwayne for your answer but it’s not that. These topics are mostly about the installed fonts either in Windows/Mac system or in Adobe’s or inDesign’s Fonts folder or the “Document fonts” subfolder of the document’s location.

    I don’t know how to insert an image here so I can’t show you it now but when you select Find/Change from the main menu, then click on the upper magnifying glass then you get to the Find attributes (or what) palette, where you can select the font family you would like to find. It’s not what I’m talking about yet but right below this there is a Font style dropdown menü. That’s it.

    Now: in that menu there is a swarm of unknown font styles, at least unknown for me. Font style “E” or “M” for example, or “Banner Italic”. “Arial Bold” is a font we all know. “Arial M” or any other font family with font style “M”… well…

    These exotic font styles make this list unusably long, that’s why I’d like to shorten it somehow.

    in reply to: List of font styles in Find/Replace #102472
    Tamás Nagy
    Participant

    momentarily Win 10. But I regularly work on Macs too so both are interesting for me.

    in reply to: Local formatting a paragraph's characters one by one #93956
    Tamás Nagy
    Participant

    Sorry, second try:

    Hi friends,

    I am trying to copy the character attributes of one paragraph’s characters onto the characters of another paragraph. There may be up to (say) 10 different types of local formatting in the source paragraph. The rules on how to do this are complicated: it’s not simply that character[1] of the destination paragraph should look like the character[1] of the source, and so on with char[2], char[3] etc., the special chars are mixed up, the number of characters and even the language of the two paragraphs are different.

    My problem is that I can’t get (or set, btw.) the attributes like this:


    myChrProps=myParagraph.characters[i].properties;

    because I get error message: Object is invalid.
    Okay, I tried this:


    myTemp=myParagraph.characters.everyItem().getElements();
    myChrProps=myTemp[i].properties;

    Te result is the same, error message on the first line.
    Well, let’s try this:


    myTemp=myParagraph; alert(myTemp+"\r"+myTemp.length);
    myTemp=myTemp.characters; alert(myTemp+"\r"+myTemp.length);
    myTemp=myTemp.everyItem(); alert(myTemp+"\r"+myTemp.length);
    myTemp=myTemp.getElements(); alert(myTemp+"\r"+myTemp.length);
    myChrprops=myTemp[i].properties;

    Aaaaaand victory!!! I could even define a character style with the props I got in response.
    BUT the same code without the alerts leads to the error message again.

    Can someone explain me what’s going on?

    Tom

    in reply to: fixed-width vs. regular nonbreak spaces #87007
    Tamás Nagy
    Participant

    Hi Matt,

    I had the same problem. Moreover I found that the width of the Non Breaking Space (NBS) varies relative to the normal space as I change the font. I have for example a font where NBS has almost zero width!

    This experience gave me an idea: maybe NBS is a separate glyph in the font and Indesigen simply uses this glyph when you insert an NBS into the text. And voilá: Unicode character U+00A0 is often referred as Non Breaking Space. I checked this defective font (that I mentioned above) in Fontlab and the glyph U+00A0 had a width of about 20% of the normal space width. After copying and pasting normal space over this glyph the font started to behave correctly. Of course after editing the font and saving on top of the old one you have to uninstall-reinstall it, and clear the Application’s font-cache. Or simply restart your computer.

    So edit your font or choose another font and NBS-es will be okay.

    Best,
    Tamás

    in reply to: Table column alignment for numbers #83796
    Tamás Nagy
    Participant

    Ok, let’s try it again :)

    With the pre tag:

    if (app.activeDocument.selection.length==0) exit();
    if (!app.activeDocument.selection[0].hasOwnProperty("cells")) exit();
    var myCtemp=app.activeDocument.selection[0].cells;
    if (myCtemp.length==0) exit();
    
    app.doScript(AlignNums,ScriptLanguage.JAVASCRIPT,undefined,UndoModes.FAST_ENTIRE_SCRIPT,"Table Numbers");
    
    function AlignNums(){
    var myWo=[], myWt=[], myCells=[], myOi, myTextw;
    for (var i=0; i<1000; i++) myWt[i]=0;
    
    for (var i=0; i<myCtemp.length; i++) {
        if (myCtemp[i].rowType!=RowTypes.BODY_ROW) continue;
        myCells.push(myCtemp[i]);
        myOi=myCtemp[i].parentColumn.index;
        myWo[myOi]=myCtemp[i].width;
        myTextw=myCtemp[i].texts[0];
        myTextw=myTextw.endHorizontalOffset-myTextw.horizontalOffset;
        myWt[myOi]=Math.max(myTextw,myWt[myOi]);
        };
    
    for (var i=0; i<myCells.length; i++){
        myOi=myCells[i].parentColumn.index;
        myTextw=(myWo[myOi]-myWt[myOi])/2;
        myCells[i].leftInset=0;
        myCells[i].texts[0].justification=Justification.RIGHT_ALIGN;
        myCells[i].rightInset=myTextw;
        };
    };
    

    By the way: how could I delete/modify my earlier posts?

    in reply to: Table column alignment for numbers #83316
    Tamás Nagy
    Participant

    Did you mean some HTML-like <mycode> </mycode> pairs? Pls show me an example :)

    in reply to: Table column alignment for numbers #83312
    Tamás Nagy
    Participant

    Sorry?

    I mean I see it’s mean but I don’t know how to be professional :)

Viewing 10 posts - 31 through 40 (of 40 total)