mathmagic_run_batch
Process a JSON equation manifest within a time budget, skip completed items, save periodically, and resume via next_index. Stops on first error and relaunches MathMagic when needed.
Instructions
Process a manifest ({equations:[{id,marker,latex,size_pt?}]}, e.g. from soru-bankasi-uret-pro prepare_mathmagic.py) within a time budget; skips finished items, journals progress, relaunches MathMagic if it exits, retries an empty equation once, optional periodic save. Stops on the first error (LATEX_MISMATCH shows latex_exported). Returns next_index to continue.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"manifest_path": "<manifest_path>"
},
"name": "mathmagic_run_batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | offline (default; no focus change) or plugin (plugin brings windows to front) | |
| confirm | No | Must be true to make changes | |
| eps_dir | No | offline: EPS folder | |
| replace | No | Replace existing equations | |
| size_pt | No | Per-equation size in pt (menu sizes + 0.1 pt steps) | |
| document | No | Open InDesign document name (default: active document) | |
| save_every | No | Save the document every N inserted equations (0 = never) | |
| start_index | No | ||
| verify_latex | No | offline: LaTeX round-trip check per item | |
| manifest_path | Yes | Absolute .json path | |
| skip_existing | No | Skip markers that already have an equation (default true) | |
| stop_on_error | No | Default true | |
| time_budget_s | No | ||
| remove_markers | No | Remove markers after verification |