Back

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

  • You must be logged in to reply to this topic.Login

Change character preference settings for all documents in a book

Return to Member Forum

  • Author
    Posts
    • #54568

      I have a multi-chapter book where each chapter is a separate InDesign document. I've just discovered that the subscript and superscript size and position is incorrect for these documents and I need to change it. This can be done in the Preferences menu (why the big sweary is it there, of all places?) for each document in turn, but I have over 20 documents so I would rather have some way of doing them all at once to ensure they are all consistent. This isn't included in book synchronisation. Is there any other way?

    • #54569
      Eugene Tyson
      Member

      Unfortunately the Superscript and Subscript position in the Preferences are document specific – not application wide.

      Pity that – you could style the Superscript and Subscript with a character style using this script https://creativepro.com…..atting.jsx

      You need to copy that text to a text pad (not word or any program that can contain styles) and save the file as preservelocalformatting.jsx

      Run the script on all the 20 documents.

      Then change the Baseline Shift in character style for Superscript and Subscript.

      Now you can synch the character styles across all the book documents by selecting the document you edited the Superscript and Subscript as the source style.

      Hope that helps.

      Maybe someone can make a script that will change the Preference for all the documents in a folder or something? Not really my area of expertise.

    • #54570

      (Awakes.) Wot? Wot? A script? This javascript ought to work (note: untested!). Copy, save as “CopySupPrefs.jsx” into your scripting folder. Open your book file; then create a new text document and set the preferences as you want them. Run the script to copy these to all documents in the Book. Be aware that — if it works — your text may re-format, because you are changing sizes.

      supPos = app.activeDocument.textPreferences.superscriptPosition;
      supSiz = app.activeDocument.textPreferences.superscriptSize;

      infPos = app.activeDocument.textPreferences.subscriptPosition;
      infSiz = app.activeDocument.textPreferences.subscriptSize;

      book = app.activeBook;

      for (var i=0; i<book.bookContents.length; i++)
      {
      var currentDoc = app.open (book.bookContents[i].fullName, false);
      currentDoc.textPreferences.superscriptPosition = supPos;
      currentDoc.textPreferences.superscriptSize = supSiz;
      currentDoc.textPreferences.subscriptPosition = infPos;
      currentDoc.textPreferences.subscriptSize = infSiz;
      currentDoc.close(SaveOptions.YES);
      }

    • #54573

      A somewhat friendlier version (with a dialog!) can be downloaded from https://www.jongware.com/binari&#8230;..ttings.zip

      It defaults to the current active document's settings, or the application defaults if there is no doc open. So to copy “from” one document to the active book, first open a “good” document then run.

      For completeness sake I added the Small Caps size as well.

      Actually, apart from testing if it does anything at all, I didn't really try it. It seems to work, though. Check after running.

    • #54574

      “(awakes) wot, wot? a script?” LOL

      Just have to say that I really appreciate how the two of you are always right on the case helping users with the thorniest problems. Other users help out a lot too of course (don't mean to dis anyone) but this post is typical. I mean, a user posts an impossible issue at 3:57 a.m., Eugene posts solution at 4:06 a.m., and Jongware (only because he was sleeping) posts a custom solution at 9:05 a.m.

      ;-)

    • #54576
      Eugene Tyson
      Member

      Anne-Marie the time difference may indeed be in play here.

      I posted at around 9:00 a.m. 0+GMT (I'm in Ireland) (it's now 4:45 p.m.)

      And it's an absolute pleasure to help out – I know Anne-Marie and David (and other contributors to InDSecrets constantly helped me out) so turnabout is fair play.

      I know how difficult it is learning the software and I know how difficult it is when you have nobody but strangers to turn to for help and I know how difficult it is using the software where the options lack for certain things and the almighty scripters come along with awesome scripts.

      That's what a community does – helps each other out. Just pay it forward :)

    • #54577

      Errr… No I was at work. Honestly! :-)

    • #54578
      Eugene Tyson
      Member

      Sleeping at work Jongware? Wouldn't matter anyway you can probably script things in your sleep :)

    • #14324338

      Ow — I just noticed somehow the link to the full script has been cut off since posting! Here it is again:

      https://www.jongware.com/binaries/CopySupInfSettings.zip

    • #14371178
      David Blatner
      Keymaster

      Jongware’s site is no more, so I posted this here: creativepro.com/files/jongware/binaries/CopySupInfSettings.zip

Viewing 9 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads