Figures for papers¶
How to turn a drawing into the figure a journal prints: the journal styles, compound numbers, the export formats and what to send. Every step below is one command, one API call or one click, and the browser, the CLI, the SDK, the REST API and the MCP tools all produce the same figure from the same document.
Draw once, in the document’s style¶
A document carries a style.preset: acs-1996 (the default), rsc or
wiley. The preset fixes the bond length, the line width, the font size,
the hash spacing of wedges and the arrow proportions, so a scheme drawn for
one journal is re-rendered for another by changing the preset, not the
drawing. The values behind each preset, with their sources, are tabulated
on the file formats page.
Set the preset in the browser’s export panel, save it in the document, or override it for one export:
vibe-sketch render scheme.qvf -o scheme.svg --style rsc
The SDK accepts render(document, "svg", style="rsc"), the REST export
routes ?style=rsc, and the MCP export tool style. An override never
changes the saved document.
Number the compounds¶
A compound number is the species’ label: 1, 2a, (S)-3, as it
appears in the text. Labels are printed under each structure in the scheme
and survive redrawing, because a species keeps its id, label and name when
its structure stays the same. Set them in the browser’s species panel, with
PATCH /api/documents/{id}/species/{species} (label), or with the
set_species MCP tool; vibe-sketch info DOC lists them. Reagents drawn at
the arrow, conditions and the yield as printed (87%) belong to the
reaction and are drawn at the arrow.
Export the figure¶
Three formats cover what journals ask for:
Format |
When |
Needs |
|---|---|---|
SVG |
Line art for the manuscript and the supporting information; editable later. |
nothing beyond vibe-sketch |
Vector figures for submission systems that want PDF; the drawing’s physical size in points, searchable text with an embedded subset of the bundled font. |
the publication extra |
|
PNG |
Raster, when the journal insists; 300 DPI by default, 600 for line art, with the print resolution recorded in the file. |
the publication extra |
Install the publication extra once, pip install 'vibesketch[publication]'
(see installation); the desktop
bundle includes it. Then:
vibe-sketch render scheme.qvf -o scheme.pdf --style acs-1996
vibe-sketch render scheme.qvf -o scheme.png --style acs-1996 --dpi 600
No system font and no network resource is used; the figure embeds the bundled Roboto face, so it looks the same on every machine. Text with a glyph the font lacks is refused with the code point rather than printed as a box. The limits, 36 to 2400 DPI and 40 million pixels, are described with the formats under PNG and PDF publication figures.
Figures also come out of the browser’s export panel, the SDK
(vibesketch.render.render and vibesketch.document.formats.export), the
REST routes GET /api/documents/{id}/export/{svg|png|pdf} and
POST /api/export/{format}, and the MCP export tool.
LaTeX manuscripts can also take the drawing as chemfig source,
vibe-sketch convert scheme.qvf -o scheme.tex, a fragment to \input
that draws the scheme with the drawn angles; see chemfig for
LaTeX. Save editable documents as QVF.
CDXML import accepts ChemDraw drawings;
CDXML writing is deferred until users request it.
Render a paper’s figures at once¶
Keep one document per scheme and render them all with one style into one directory, in every format the submission needs:
vibe-sketch render schemes/*.qvf --out figures/ --format svg,pdf --style acs-1996
Each document becomes figures/STEM.svg and figures/STEM.pdf, named
after the document. Every figure is attempted; a document that cannot be
read, a figure that is refused (a glyph the font lacks, a raster over the
pixel limit, a stereochemistry the export cannot express) or a missing
backend is reported on standard error with its reason, and the command
exits with status 3 when a figure was refused or 1 when a document could
not be read, an output could not be written or a backend is missing, so a
build script notices. Missing files, unreadable files and invalid text are
reported per document; the other documents are still rendered. If the
output directory cannot be created, the command fails before rendering. Two
documents with the same stem are refused before anything is written.
What to send a journal¶
Vector first. Send SVG or PDF for schemes and structures; they scale to the column width without loss. Send PNG only when the instructions require a raster, at 600 DPI for line art.
The journal’s style, from the document. Pick the preset the journal asks for and keep it in the document; the drawing does not change.
Column widths. Each journal states its single and double column widths in its author guidelines. A figure’s physical size is the SVG’s
widthandheightin points, which the PDF keeps; check it against the column rather than scaling the figure in a word processor.Fonts. The exports embed the bundled font, so nothing has to be installed on the journal’s side.
Keep the source. Keep the
.qvfor.vskwith the manuscript: it holds the drawing, the compound numbers and the style, and renders the same figure again for the revision.