This is a simple page demonstrating an nlScript language for arranging scientific features. The real functionality is available in a Java implementation, as a Fiji plugin, at https://github.com/nlScript/nlFigure. It can generate a figure like this:
let parser = new nlScript.Parser();
parser.defineType("title", "'{title:[^']:+}'", undefined, true);
parser.defineType("visibility", "visible", e => true);
parser.defineType("visibility", "invisible", e => false);
parser.defineType("font-name", "Helvetica", undefined);
parser.defineType("font-name", "Arial", undefined);
parser.defineType("font-name", "Courier", undefined);
parser.defineType("font-style", "plain", undefined);
parser.defineType("font-style", "bold", undefined);
parser.defineType("font-style", "italic", undefined);
parser.defineType("font-size", "{font-size:int}pt", undefined, true);
parser.defineType("font", "{font-size:font-size} {font-style:font-style} {font-name:font-name}", undefined, true);
parser.defineType("page-size", "A4", undefined);
parser.defineType("page-size", "A3", undefined);
parser.defineType("page-size", "A2", undefined);
parser.defineType("page-size", "A1", undefined);
parser.defineType("page-size", "A0", undefined);
parser.defineType("page-size", "A5", undefined);
parser.defineType("page-orientation", "landscape", undefined);
parser.defineType("page-orientation", "portrait", undefined);
parser.defineType("alignment", "TOP_LEFT", undefined);
parser.defineType("alignment", "TOP_CENTER", undefined);
parser.defineType("alignment", "TOP_RIGHT", undefined);
parser.defineType("alignment", "CENTER_LEFT", undefined);
parser.defineType("alignment", "CENTERED", undefined);
parser.defineType("alignment", "CENTER_RIGHT", undefined);
parser.defineType("alignment", "BOTTOM_LEFT", undefined);
parser.defineType("alignment", "BOTTOM_CENTER", undefined);
parser.defineType("alignment", "BOTTOM_RIGHT", undefined);
parser.defineType("label-scheme", "LOWERCASE_LETTERS.", undefined);
parser.defineType("label-scheme", "UPPERCASE_LETTERS.", undefined);
parser.defineType("label-scheme", "NUMBERS.", undefined);
parser.defineType("borders", "{borders:tuple} mm", undefined, true);
// Document setup
// --------------
parser.defineSentence("{Set the document} size to {ps:page-size} {po:page-orientation}.", undefined);
parser.defineSentence("{Set the document} borders to {borders:borders}.", undefined);
// Title setup
// -----------
parser.defineSentence("{Set the title} {text} to {title:title}.", undefined);
parser.defineSentence("{Set the title} {color} to {c:color}.", undefined);
parser.defineSentence("{Set the title} {font} to {f:font}.", undefined);
// Headings setup
// --------------
parser.defineSentence("{Set the headings} {text} {of column} {c:int} to {h:title}.", undefined);
parser.defineSentence("{Set the headings} {text} {of row} {r:int} to {h:title}.", undefined);
parser.defineSentence("{Set the headings} {text font} to {f:font}.", undefined);
parser.defineSentence("{Set the headings} {frame thickness} to {thickness:float}.", undefined);
parser.defineSentence("{Set the headings} {text color} to {c:color}.", undefined);
parser.defineSentence("{Set the headings} {frame color} to {c:color}.", undefined);
parser.defineSentence("{Set the headings} {background color} to {c:color}.", undefined);
parser.defineSentence("{Set the headings} {frame invisible}.", undefined);
parser.defineSentence("{Set the headings} {frame visible}.", undefined);
// Image setup
// -----------
parser.defineSentence("{Set the image title} {font} to {f:font}.", undefined);
parser.defineSentence("{Set the image title} {color} to {c:color}.", undefined);
parser.defineSentence("{Set the image title} {position} to {a:alignment}.", undefined);
parser.defineSentence("{Set the image title} {gap} to {g:float}.", undefined);
parser.defineSentence("{Set the image title} {visible}.", undefined);
parser.defineSentence("{Set the image title} {invisible}.", undefined);
parser.defineSentence("{Set the image frame} {thickness} to {thickness:float}.", undefined);
parser.defineSentence("{Set the image frame} {color} to {c:color}.", undefined);
parser.defineSentence("{Set the image frame} {visible}", undefined);
parser.defineSentence("{Set the image frame} {invisible}", undefined);
parser.defineType("scalebar-position", "top left", undefined);
parser.defineType("scalebar-position", "top right", undefined);
parser.defineType("scalebar-position", "bottom left", undefined);
parser.defineType("scalebar-position", "bottom right", undefined);
parser.defineSentence("{Set the image scalebar} {position} to {position:scalebar-position}.", undefined);
parser.defineSentence("{Set the image scalebar} {length} to {l:float}.", undefined);
parser.defineSentence("{Set the image scalebar} {color} to {c:color}.", undefined);
parser.defineSentence("{Set the image scalebar} {visible}.", undefined);
parser.defineSentence("{Set the image scalebar} {invisible}.", undefined);
// Panel setup
// -----------
parser.defineSentence("{Set the panel} {label scheme} to {scheme:label-scheme}.", undefined);
parser.defineSentence("{Set the panel} {label font} to {f:font}.", undefined);
parser.defineSentence("{Set the panel} {label color} to {c:color}.", undefined);
parser.defineSentence("{Set the panel} {label position} to {a:alignment}.", undefined);
parser.defineSentence("{Set the panel} {label gap} to {g:float}.", undefined);
parser.defineSentence("{Set the panel} {frame thickness} to {thickness:float}.", undefined);
parser.defineSentence("{Set the panel} {frame color} to {color:color}.", undefined);
parser.defineSentence("{Set the panel} {frame visible}.", undefined);
parser.defineSentence("{Set the panel} {frame invisible}.", undefined);
parser.defineType("field-of-view", "({w:int} x {h:int}) at ({x:int}, {y:int})", undefined, true);
parser.defineSentence("{Layout panels} to make all rows the same height.", undefined);
parser.defineSentence("{Layout panels} to make all columns the same width.", undefined);
parser.defineSentence("{Layout panels} to fit the page height.", undefined);
parser.defineSentence("{Layout panels} to fit the page width.", undefined);
parser.defineType("panel", "{panel:tuple}", undefined);
parser.defineType("image-magnification", "preserving magnification", undefined);
parser.defineType("image-magnification", "matching the panel size", undefined);
parser.defineType("image", "{image:title}", undefined);
parser.defineSentence("Add image {image:image} to panel {panel:panel} {mag:image-magnification}.", undefined);
// Image manipulation
parser.defineSentence("Modify image {image:image} {to display channels} {channels:list}.", undefined);
parser.defineSentence("Modify image {image:image} {to display timepoint} {timepoint:int}.", undefined);
parser.defineSentence("Modify image {image:image} {to display plane} {plane:int}.", undefined);
parser.defineSentence("Modify image {image:image} {to limit the field of view to} {fov:field-of-view}.", undefined);
parser.defineType("rectangle", "{w:int} x {h:int} rectangle at ({x:int}, {y:int})", undefined, true);
parser.defineSentence("Modify image {image:image} to show a {r:rectangle}.", undefined);
parser.defineSentence("Modify image {image:image} to hide the overlay.", undefined);
parser.defineSentence("Modify image {image:image} to show the overlay.", undefined);
parser.defineSentence("Modify image {image:image} to clear the overlay.", undefined);
new nlScript.ACEditor(parser, document.getElementById("nls-container"));