Purplelink
← All posts

TikZ diagrams and tables in ModernTex, without writing either by hand

Two things every LaTeX document eventually needs, and two things almost nobody enjoys writing by hand: a TikZ diagram and a results table. ModernTex now builds both visually and drops in the real source.

Ask a researcher what they would rather not do in LaTeX and two answers come up constantly: draw a diagram in TikZ, and lay out a table by hand. TikZ can produce publication-quality figures that nothing else matches, and tabular gives you real typographic control. However, neither is a pleasant place to start from a blank line and a syntax reference. ModernTex's last two releases went after exactly that gap.

A TikZ designer that draws instead of describes

The first fix was the feedback loop. A missing semicolon or an unbalanced brace in a tikzpicture used to mean a full compile just to find out something small was wrong. TikZ Preview (⌘⌥K) renders just the picture under your cursor on its own and flags a missing semicolon or an unclosed brace instantly, before you run a real build.

The second fix was the syntax itself. TikZ Designer (⌘⌥⇧K, or the toolbar's TikZ Figure Editor button) is a real canvas. You drag boxes and arrows into place, pick colors from a swatch or a full picker, resize a box by its corner, double-click to rename it in place, and connect two shapes by dragging from one to the other. Start from a preset (flowchart, pipeline, state machine, tree) or a blank canvas. If a diagram is already in your document, the Figures menu finds it and loads it back in for editing, so you do not redraw it from scratch. Whatever you build turns into ordinary, readable TikZ the moment you insert it. Nothing is hidden, and you could have typed all of it yourself, just more slowly.

A table editor that pastes like a spreadsheet

Tables had a narrower problem but an equally annoying one. Getting data from a spreadsheet into a tabular environment meant either retyping it or fighting a converter. The new Table Editor (⌘⇧T, or the toolbar's Table Editor button) copies the part of Excel and Google Sheets that matters. Paste a range and it lands in the right cells. The table grows if the pasted data is bigger than what is there, and everything else stays untouched if it is smaller.

From there the editor behaves like the spreadsheet you just pasted from. Return confirms a cell and moves down a row, and the arrow keys move between rows. ⌥Return adds a line break inside a cell, which turns that column into a wrapping paragraph column instead of a table that silently ignores your line break. Drag a column's edge to resize it. Set a table-wide font size and family when a results table needs to be smaller than the rest of the page. As with the TikZ designer, you can reopen an existing table from the Tables menu and edit it in place rather than rebuild it.

The output is still plain LaTeX

Neither tool is a black box. The designer and the editor produce the tikzpicture and tabular you would have written by hand: booktabs rules, the array package's paragraph columns, and ordinary \definecolors. You see the source in a live preview pane before you insert it, and you can edit it as plain text afterward like everything else in the document. The goal was never to hide LaTeX. It was to stop making two of its most common tasks feel like a syntax exam.

Both are in ModernTex now, along with everything from the last few releases: license keys, Fix with AI, and sync between Macs. If you have not tried it yet, ModernTex is $19.99, once, with updates included.

The synced PDF preview got its own fix in a later release. The bug behind it is a good example of why the two directions of a sync are not mirror images.

← Back to blog