Back

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

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: Word equations to indesign #14331423
    Qing Youguo
    Participant

    Hi Cardoso,
    In-TeX/LaTeX is a JavaScript tool to compile LaTeX code to PDF in InDesign, it can run under both macOS and Windows.
    Download form: https://github.com/cooldtp/InTeXLaTeX
    Demo:
    And more:
    The English version is not available yet, but it’s So easy to follow by demos.

    Qing Youguo
    Participant

    Select a textframe or a insertionpoint, and run it:

    // Create a tbale whith specific number of row and column
    if(app.documents.length !== 0 && app.selection[0].hasOwnProperty(“insertionPoints”)){
    app.selection[0].tables.add(LocationOptions.AFTER, app.selection[0].insertionPoints[0], {
    bodyRowCount: 8,
    columnCount: 6,
    footerRowCount: 0,
    headerRowCount: 1
    })
    }

    in reply to: Image Fitting options on Anchored Graphic Frames #14323968
    Qing Youguo
    Participant

    Hi Masood,

    Change the following conde line:

    var allRtg = myObject.rectangles.everyItem().getElements();

    to:

    var allRtg = myObject.parentStory.rectangles.everyItem().getElements();

    is what you want?

    By the way, Inline Images’s parent —— theRtg DOESN’T haved “theRtg.fit(Justification.CENTER_ALIGN)” such a method, and the selected texfframe’s story !== all the stories in the document, maybe one or a few stories in the selected texfframes indeed! So, it’s a better way to do it: loop all the strories in the document, and loop all the Rectangles that containing images in each story.

    You must telling the whole details before asking question.

    in reply to: Image Fitting options on Anchored Graphic Frames #14324010
    Qing Youguo
    Participant

    Try this:

    app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, “Image Fitting Script”);
    function main() {
    // Capture the current selections in array
    var mySelections = app.selection;
    for (var i = 0; i < mySelections.length; i++) {
    var myObject = mySelections[i];
    if (myObject instanceof TextFrame) {
    var allRtg = myObject.rectangles.everyItem().getElements();
    for (var j = 0; j < allRtg.length; j++) {
    var theRtg = allRtg[j];
    try {
    theRtg.fit(FitOptions.contentToFrame);
    theRtg.fit(FitOptions.proportionally);
    theRtg.fit(FitOptions.centerContent);
    theRtg.fit(FitOptions.frameToContent);
    } catch (e) {}
    }
    }
    }
    }

    in reply to: MathType in InDesign for Mac? #110382
    Qing Youguo
    Participant

    Hi all,

    If you are doing math inside InDesign For Mac, you can try InTeXLaTeX. Install MacTeX2018 & InTeXLaTeX, and run InTeXLaTeX_3.0.jsx, just doing LaTeX math inside InDesign if you learn a liitle about LaTeX. Sorry it’s only for chinese version, English version is not available yet.

    https://github.com/cooldtp/InTeXLaTeX

Viewing 5 posts - 1 through 5 (of 5 total)