Inline images/links/equations - need to script the space or/and/after...

He

work on some textbooks of mathematics. text is written in the word with many mathtype equations and imported in indd.

some inline equations have space around, some don't.

need a script to clean it. hold 1 space around each equation (before and after).

Thank you

Then, test the ExtendScript (JavaScript):

// InsertSpaceBEFORE-AFTER-Anchored-GraphicFrame-v4.jsx
// Uwe Laubender

// NOTE: Text in tables or text in footnotes will ALSO be handled.

/**
* @@@BUILDINFO@@@ InsertSpaceBEFORE-AFTER-Anchored-GraphicFrame-v4.jsx !Version! Sun Jan 10 2016 15:56:14 GMT+0100
*/

app.findGrepPreferences.findWhat = app.changeGrepPreferences.changeTo = "";

// Here we could also look after "" with a text search!
// A GREP search for "\\x{FFFC}" will ALSO work.
app.findGrepPreferences.findWhat = "~a";

var whatToAddBefore = " "; // A single space
var whatToAddAfter = " "; // A single space

// The focus is on our active document:
var doc = app.documents[0];

// Let's find every anchored object in the document in reverse order:
var foundResults = doc.findGrep(true);

// We are not interested in anchored text frames, anchored buttons etc.pp.
// Just in anchored graphic frames, that contain graphics.
// We could refine that even more, if we like.

// So we loop the found special characters:

for(var n=0;n

Who should do it for you.

You can remove the double and triple spaces thereafter.

Uwe

Tags: InDesign

Similar Questions

  • How to replace the spaces before and after a Word with tabs using GREP or search - replace

    Here's the scenario:

    I have a paragraph with spaces (can be 1 or more) at the beginning (before the first word) and a single space after the first word (is be a number if this matter - which may be a single digit or more).

    I'm looking to replace the spaces before each paragraph with a single tab and replace one tab so of space after the first word (number). In addition, I would like to apply a paragraph style to it.

    Thank you very much in advance for anyone who can find a solution. It sounds like a solution of some sort GREP but can't nail. Thank you.

    ^(\s+)(\S+)(\s+)

    and replace with \t$2\t and define the change of setting fit your style.

  • How to prune a white space before and after the bookmarks?

    Hello

    I hope that someone can help me with some JavaScript to remove the spaces before and after my favorites. I know I have to use regular expressions which I think would be ^ [\t]+| [\t]+$ and I also found a code on the internet but it is related to not favorite channels.] How would change this code work for bookmarks? Thank you.

    // Trim
    function trim(stringToTrim){
    return stringToTrim.replace(/^\s+|\s+$/g,””);
    }
    

    First of all, for this code to work, you must use standard double quotes, not the ones you currently have it.

    For use on a bookmark, you can do something like this:

    var bkm = this.bookmarkRoot.children[0];
    bkm.name = trim(bkm.name);
    
  • Best practices - exeternal link a PDF file on the FM band, and in turn, HR

    I use TCS2 with FM and HR.  My goal is the following:

    -to create a doc FM (with several chapters) and links to external PDF documents. When I generate the FM file in PDF format, it correctly will allow users to click on links and display these external PDF docs.

    -import the doc FM (with several chapters) in HR and create HTML webhelp. Ideally, having the links included in the docs of FM (in external PDF) automatically generate in the HR doc, so that the produced HTML online help doc may have clicked on links also open the external PDF files.

    Issues related to the:

    -best way to do it in FM? I guess I have to create my PDFs in a portfolio (package?), so external clients keep the documentation in the same place (because hyperlinks can damage, I guess)

    -best way to make it work in HR?

    -things to watch?

    TIA!

    -Adriana

    Adrianna,

    Presents all works seamlessly in the framework, assuming that you use cross reference tools and the hyperlink correctly. Assuming that your external files are either 1.)  local for new image files or 2.) are in a static situation on a server that can be identified by a URL.

    The warnings are only external PDF files must be in the same relative location as the files FM where they are created, because the path information is used in the links, OR you must specify the static location of the external PDF as a URL using a marker rather than a cross reference hypertext.

    If you move the directories containing PDFs around after the fact, Yes, you will break things.

    (And when you generate your PDF files, it is recommended to open all the files in the book so that network errors and minor messages prevent files update targets).

    If you cannot keep the logical tree when you deliver your PDF documents, Yes, you will need to do the manual steps and create functions and so on and bind files in Acrobat format.

    It is worth it for most people to find a way to maintain the stability of the directory structure...

    See you soon,.

    Art

  • Satellite A100-787: drivers needed to use the control buttons and volume knob

    There should be a program that displays on the screen, the volume level when I change volume and another which allows me to use the game, front, back or stop buttons either with medial player JetAudio.

    Where can I get such a program?

    Are you using the original image of preinstalled Toshiba?
    The image of Toshiba Vista contains all the necessary drivers and utilities and using this OS everything should function.

    If you have installed other OS like XP XP drivers are needed.
    If I m not wrong not the notification of screen volume levels appears not in XP.

    Also if you want to use Toshiba command buttons you need to install the correct drivers as controls, common modules, etc.
    The proper installation order is necessary and important. That's why I recommend that you check the installation instructions on the download page of Toshiba!

    By the way; the control buttons are preconfigured and I don t think that it might be possible to use it with another players as IE Jetaudio.

  • I run on a Mac CS6.  I need to change the operating system and would like to know if I can still install the software

    I run on a Mac CS6.  I need to change the operating system and would like to know if I can still install the software.  I upgraded to OS X 7 (Lion) for OS X 10 (Coyote), but my devices would not work.  I'm changing to OS X 7 (Lion), but this will eliminate my entire hard drive.  My CS6 software install?  I bought CS5 and CS6 improved.  I don't want to go on the CCif I don't have to.  Thank you!!!

    as long as you have your serial numbers and installation cs6 files, you should be ok.

    Available downloadable Setup files:

    Download and installation help links Adobe

    Help download and installation to Prodesigntools links can be found on the most linked pages.  They are essential; especially steps 1, 2 and 3.  If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".

    window using the Lightroom 3 link to see these "important Instructions".

  • When I update my device I need to have the apple ID and I can not find and contact the owner of the first.

    Hello;

    I can't find the original owner of my camera.

    I can't have my Apple device Id. When I update my device I need to have the apple ID and I can not find and contact the owner of the first. And I have a lot of problem with this matter.please help me. Please unlock my device to activate locking Mode.Or maybe if I have the Apple Id for my camera I found the password.

    My phone number is:

    IMEI:

    *********

    ICCID:

    ********

    Serial No.:

    F2 * FFK

    Part number:

    ME300LL/A

    Please, please, please help me.

    best regards;

    Siavash


    < personal information under the direction of the host >

    Only the owner of the unit can remove locking activation. If you have the original receipt, you can try to take it to an Apple Store and ask them to do, otherwise return the unit to the person to whom it was purchased for a refund.

  • I need to upgrade the CPU, motherboard and RAM in my machine. Which will impact my Activation of Windows genuine?

    I need to upgrade the CPU, motherboard and Ram in my machine. Which will impact my Activation of Windows genuine?

    original title: can I put my machine after GWA?

    It's a Genuine Windows Kit which is what you would be considered a retail license. In other words, that it is transferable to another computer, which means you have the right to support directly from Microsoft.

  • I need to format the hard drive and it won't let me because the program is running.

    Please help someone... I have a desktop running windows 7.  I need to format the hard drive and it won't let me because the program is running.

    Any ideas on how to get this tour using the bios screen, or y at - it an other way round. The drive has a partition, but no other programs on it.  I'm actually getting rid of the computer and need to erase the first hard drive and reload windows xp pro.

    Thanks for any help given, I'm desperate.

    Original title: help with windows 7

    Reinstall Windows XP
    http://michaelstevenstech.com/cleanxpinstall.html

    Insert your Windows XP CD, and then restart your computer.

    When you are prompted to boot from the CD, do so. To do this, press any key on the keyboard.

    To learn how to change your BIOS options to boot from the DVD drive, the following tutorial:

    http://notebooks.com/2011/05/05/How-to-load-BIOS-and-change-boot-configuration/

    Windows XP will go into its configuration process.

    Once you arrive at the welcome configuration, press enter on your keyboard to start the installation process

    Press F8 on your keyboard to accept the license agreement

    Select the partition, and then press D on your keyboard to remove it

    Select Format the partition using the NTFS file system

    Press F on your keyboard to start the formatting.

    Installation files will now be copied to your hard drive

    Your system will be rebooted, the installation of Windows XP will continue

  • Hello. I have the DVD of Lightroom 5.7.1 version. He just started is behaving badly and I've deleted and reinstalled the product. When I'm in the 'development' module, I get random stains of color in my images. This only happens in the develop module and

    Hello. I have the DVD of Lightroom 5.7.1 version. He just started is behaving badly and I've deleted and reinstalled the product. When I'm in the 'development' module, I get random stains of color in my images. This only occurs in the develop module and no where else. It also does not reach any other software or area on my pc. I also changed the cable and the same triesd another monitor. Anyone have any ideas? Thank you.

    Are patches of red and blue color?

    If so, you probably have warnings of cutting of light/shadow enabled. Press J to hide them.

    You can also activate their power by clicking on the arrows up left and right of the histogram.

    Salient facts cut medium red, medium blue clipped shadows.

  • Need help with the OSB Assign and replace the

    I have a proxy service that receives the SOAP message:

    " < = xmlns:soapenv soapenv:Envelope ' http://schemas.xmlsoap.org/SOAP/envelope/ "xmlns:SOAP - ENC =" " http://schemas.xmlsoap.org/SOAP/encoding/ "container =" " http://www.w3.org/1999/XMLSchema ">

    " < = xmlns:soapenv soapenv:Header ' http://schemas.xmlsoap.org/SOAP/envelope/ ">

    < / soapenv:Header >

    < soapenv:Body >

    " < pidx:OrderChange pidx:transactionPurposeIndicator = 'Replace' xmlns:pidx = ' http://www.API.org/pidXML "xmlns =" http://www.API.org/pidXML "" xmlns: xsi = " http://www.w3.org/2001/XMLSchema-instance "xsi:schemaLocation="C:\shareIt\OrderChange_1-2.xsd" > ""

    ...

    < / pidx:OrderChange >

    " < = Xmlns:ocp DeliveryInformation ' http://www.digitaloilfield.com/OCP ">

    ...

    < / DeliveryInformation >

    < / soapenv:Body >

    < / soapenv:Envelope >

    I need to take the OrderChange element and place it in a SOAP body and the DeliveryInformation element and place it in the SOAP of the same SOAP message header.

    The SOAP message is then sent to a business service that makes an HTTP POST of the SOAP XML.

    I created the service of the company and he sent some data test SOAP and it works very well, but cannot create a bridge between the Proxy and the Business Service.

    In the stream of messages of Proxy I tried to do an assignment in a routing. I tried to do the following:

    1. an XQuery query transform to generate the XML SOAP just described

    2. not the entitlement where the "Expression" is the transformation and the Variable is a variable based on a schema for SOAP.

    I can see that the company is trying to be invoked, but the SOAP data does not have to be formatted or passed.

    It is the right approach or is their a better way of

    1. create the SOAP wrapped XML

    2. call the Business Service.

    Any suggestions are appreciated. I can provide more detail if necessary.

    Kind regards.

    Thank you Vlad...

    I think I'm getting in that direction now. Just do some debugging.

    Appreciate the input. I will update with final results.

    Again, your help is greatly appreciated.

    Kind regards.

  • Need to remove the spaces between each words

    Hi guys,.

    I need to remove the spaces between each word. I'm doing this because I want to compare a column with a value.

    For ex: named - description "Negotiate APR - current balance" should be replaced by "NegotiateAPR-currentbalance.

    All can help me out here to achieve. Your timely help is well appreciated.

    Thanks in advance.

    WITH t AS (SELECT '"Negotiate APR - current balance"' str FROM DUAL)
    SELECT REPLACE (str, ' ') str
      FROM t;
    

    gives: "NegotiateAPR-currentbalance.

    Is that what you want...? If this isn't the case, please give some examples.

    See you soon,.

    Manik.

  • Need to remove the space between &lt; af:panelGrouplayout &gt; and &lt; af:panelBox &gt;

    Hi all

    I use JDeveloper 11.1.1.6.

    My scenario is I need to stretch some fields for all browsers, so I use Panel box inside the < f: facet center = name > panelStretchLayout.

    It works very well. But some scenarios need to display the header above the group box elements. Then I try to add panelGroupLayout in < f: facet = top name >. It is stretching very well, but is always to show space between < af:panelBox >.

    How can I remove the space between < af:panelGroupLayout > and < af:panelBox >?

    My Codes like this,

    < af:panelStretchLayout id = "PSL1" inlineStyle = "" margin-top: 30px; ">"

    < f: facet = 'top' name >

    < af:panelGroupLayout id = "pgl4" layout = "vertical".

    inlineStyle = "" background-color: red; ">"

    < af:panelGroupLayout layout = "horizontal" id = "pgl1" >

    < af:outputText value = 'Day' id = "ot1" / >

    < af:outputText value = "Week" id = "ot2" / >

    < af:outputText value = 'Months' id = "ot3" / >

    < af:outputText value = 'Year' id = "ot4" / >

    < / af:panelGroupLayout >

    < / af:panelGroupLayout >

    < / f: facet >

    < f: facet name = "center" >

    < columns af:panelDashboard = rowHeight '1' = "100%" id = "pd1" >

    < af:panelBox id = "pb1" showDisclosure = "false".

    showHeader = "never" > < / af:panelBox >

    < / af:panelDashboard >

    < / f: facet >

    < / af:panelStretchLayout >


    Thank you...

    Same answer as your other thread need to hide the space between &

    Use firebug to see if a style is the cause because it is not reproduced.

    Timo

  • I need to change the credit card and cardholder of credit of our monthly plans... but I can't find any button billing. could you kindly say?

    Hi all

    I need to change the credit card and cardholder of credit of our monthly plans... but I can't find any button billing.

    can't find any support by adobe regarding billing issues.

    anyone of you could help me?

    Thank you

    Inga

    Change in the information of credit card to join creative cloud

    (1) connect to creative.adobe.com.

    2) click on the manage my subscription.

    (3) to change my billing information

    For the invoice

    (1) connect to adobe.com

    (2) go to my orders and select the order number, print the invoice here

  • What happened to the feature to get around on the artboard by pressing the space bar and dragging with the mouse?

    What happened to the feature to get around on the artboard by pressing the space bar and dragging with the mouse?

    cwalker,

    If it does not, it may be time for the list:

    Sometimes, (some) things may fail or stop working for no apparent reason. When (other) possible reasons/remedies do not work, it is perhaps a kind corruption (temporary or permanent), or even preference settings which disturbs, which can be cured with something on the following list put in place in order to provide a catch-all solution for otherwise intractable cases. It starts with a few easy suggestions and safe) 1 and 2) for cases less serious and goes two ways 3) and 4) to reset the default preferences (easily but irreversibly and more laboriously but more completely and also reversible), then follows a list 5) various other possibilities, and it ends with a complete reinstallation 6). If no other suggestion doesn't work, or if no other suggestion appears, you can start on the list and decide how to go or who can apply.

    The following is a general list of things, try when

    (A) the question is not in a specific file,

    (B) you have a printer installed, connected and turned on if it's a physical printer (you can use Adobe PDF/Acrobat Distiller as a printer by default without the need to have a printer on, of course you will need to specify when you really need print on paper), and

    (C) It is not caused by problems with opening a file from external media (see below).

    You tried/made some of them already; 1 and 2) are easier for temporary strangenesses and 3) and 4) specifically may be corrupted/inconvenient preferences); ((5) is a list in itself and 6) is the last resort.

    If possible / there is, you must record a current work first, of course.

    (1) close Illy and open again.

    (2) restart the computer (you can make up at least 5 times);

    (3) close Illy and press Ctrl + Alt + Shift / Cmd + Option + shift during startup (easy, but irreversible);

    4) move the folder (follow the link with this name) with closed Illy (more tedious but also more thorough and reversible), for CS3 - CC you can find the file here:

    https://helpx.Adobe.com/Illustrator/KB/preference-file-location-Illustrator.html

    5 look through and try the relevant among the other options (click on the link with that name, item 7) is a list of the usual suspects among other applications which can disturb and confuse Illy, point 15) applies to the maybe CS5, CS6 and CC);

    Even worse, you can:

    6 (A) uninstall (check the box to delete the preferences, if any), B) run the cleanup tool (if you have CS3/CS4/CS5/CS6/CC) and C) reinstall. It is important to use this step three way: otherwise, things may persist.

    http://www.Adobe.com/support/contact/cscleanertool.html

Maybe you are looking for