EthoClaw ethoclaw-paper-figure-layout
Auto-layout folders of result images into a paper-like PDF (LaTeX) with captions derived from filenames and optional heatmap+colorbar grouping. Use when the user says: use images in this folder to help with layout/generate paper figures/arrange figures into PDF by folder grouping; or when there are many PNG/JPG figures that need consistent captions and pagination.
install
source · Clone the upstream repo
git clone https://github.com/penciler-star/EthoClaw
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/penciler-star/EthoClaw "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/ethoclaw-paper-figure-layout" ~/.claude/skills/penciler-star-ethoclaw-ethoclaw-paper-figure-layout && rm -rf "$T"
manifest:
skills/ethoclaw-paper-figure-layout/SKILL.mdsource content
Paper Figure Layout
Auto-generate a Nature-Communications-ish compact multi-panel figure PDF from a directory of images.
What it does
Default (recommended): compact multi-panel
- Compact, figure-like layout (not one-page-per-image)
- Subpanel letters
aligned in reading ordera, b, c… - Figure title above panels (
)Fig. X | Title - Per-panel descriptions below ("a …; b …; c …")
- Sensible defaults: if the user doesn’t specify, pick 1 representative image per type
- "type" = (nested) subfolder under the input root, e.g.
,heatmap_velocity/radar/group_means/
- "type" = (nested) subfolder under the input root, e.g.
Legacy: foldered dump
- Groups by subfolder: each subfolder becomes a section.
- Captions from filenames: underscores/dashes become spaces.
- Stable pagination: uses one-column LaTeX blocks (no fragile two-column floats).
Quick start
Compact multi-panel (default)
python3 scripts/layout_results_foldered.py \ --input "/path/to/2_results" \ --output "/path/to/out.pdf" \ --title "Results"
Defaults (can override):
--mode compact--max-per-type 1--cols 2--panels-per-figure 6
Default representative logic:
means: keep 1 representative per inferred subtype, not just 1 file for the whole folder.--max-per-type 1- Example: if a folder contains
,x-Axis
,y-Axis
, the default compact layout should keep all 3 because they are three subtypes of the same figure family.z-Axis
Useful override:
→ include all images from each type/folder instead of representative selection.--max-per-type 0
Special handling:
- If a folder contains
/colorBar
plus heatmaps, the layout bundles them into one panel:color_bar- up to 3 heatmaps + 1 shared colorbar side-by-side
- the colorbar is rendered narrow instead of occupying a full panel by itself
Legacy foldered
python3 scripts/layout_results_foldered.py \ --input "/path/to/2_results" \ --output "/path/to/out.pdf" \ --title "Results" \ --mode foldered
Outputs
- A single PDF at
.--output
Notes
- The TypeTex LaTeX compiler environment often defaults to
via latexmk, butxelatex
may be missing. The script supplies axelatex
that forces.latexmkrc
.pdflatex
Resources
— the generator.scripts/layout_results_foldered.py
— the Nature-Communications-ish preamble used by the generator.assets/naturecomm_figures.tex