Adobe InDesign
Insert, edit and update NeoMath equations and NeoChem chemistry in InDesign through the UXP plugin, .idjs scripts or .jsx scripts, all linked to the installed app.
On this page
The integration links InDesign to NeoMath installed on the computer, as happens with Word: the plugin works together with the app, through its local API. Equations and formulas come in as linked files (EPS for equations and \ce{}, SVG for structures), anchored inline with the right baseline.
Three ways, the same result#
| Way | For whom |
|---|---|
| UXP plugin (panel) | InDesign with UXP plugins; the panel follows edits made in the app |
.idjs scripts |
people who prefer the Scripts panel or cannot install plugins |
.jsx scripts (ExtendScript) |
InDesign CS6, CC 2014 to 2022 and also the current versions |
All three save the objects with the same neo label. An equation inserted by a script can be updated by the plugin, and vice versa.
Before you start#
- Keep NeoMath’s local API on: the installer option Start the local API with Windows, Settings › Advanced, or the
NeoMath --servidorcommand. - The app writes
servidor.jsonwith the port and the token; the plugin and scripts read that file by themselves. - Save the InDesign document: the files (
eq_<id>.eps,qm_<id>.epsorqm_<id>.svg) go to the folder you choose.
What you can do#
| Action | Plugin | Scripts |
|---|---|---|
| Insert an equation (LaTeX or MathML) at the cursor, with the text color and baseline aligned | Math tab, Insert | Neo_Inserir_equacao |
Convert the selected text ($…$, \(…\), plain LaTeX or <math>) |
Use selected text | Neo_Converter_selecao |
Convert every $…$ in the document |
In the document tab | Neo_Converter_marcadores |
Formulas and reactions (\ce, \ch, \pu, \ox, \enthalpy) and structures by SMILES, name or chemfig |
Chemistry tab | Neo_Inserir_quimica |
| Size, font and color of the selected equation | quick actions | Neo_Acoes_rapidas |
| Open in NeoMath to edit and update the link on save | Edit in app | Neo_Editar_no_NeoMath + Neo_Atualizar_vinculos |
| Blank new equation at the cursor, built in NeoMath | New equation in NeoMath | Neo_Nova_equacao |
| Regenerate every object with the current style | In the document tab | Neo_Regerar_todos |
| Recognize the selected image (OCR) and replace it with the equation | NeoMath OCR | Neo_OCR_da_imagem |
Single menu#
Neo.jsxopens a floating window with one button per action, which stays open and updates equations saved in NeoMath by itself.Neo.idjsshows the action list in an InDesign dialog.
Install the UXP plugin#
- Double-click the
.ccxpackage received from Neo; Creative Cloud installs the plugin. - Open the Neo panel in InDesign. On first open it reads
servidor.json; Read from servidor.json repeats the reading. - The OCR and edit buttons appear when the app advertises those features.
Install the scripts#
- In InDesign, open Window › Utilities › Scripts.
- Right-click User › Reveal in Explorer (or Finder).
- Copy the
.idjsor.jsxfiles into that folder. If you prefer a single item, copy onlyNeo.jsxorNeo.idjs.
Each action becomes a single step in Undo. An .idjs script ends when the action ends: after saving in NeoMath, run Neo_Atualizar_vinculos (the Links panel also marks the file as modified).
Edit in the app#
To edit an equation, the plugin opens the EPS in NeoMath. When you save, the link is updated and the equation stays aligned with the text.
NeoMath also has an Insert into InDesign menu (Windows and macOS): with the cursor in the text of the open document, the equation goes to the folder you choose and enters inline.
Good practices#
- Every action works in points and returns the ruler unit at the end, even with the document in millimeters.
- Equation frames have no stroke and no fill ([None] object style).
- The equation inherits the text color and size, but uses the font of the NeoMath preference; change it in the quick actions.