igbuend/grimbard/graphicx

Claude Code and agent skill by igbuend/grimbard

Trust tier 2
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

LaTeX graphicx package for image inclusion and manipulation. Use when helping users insert images, resize graphics, create figure environments, or work with subfigures.

Install

npx vskill@latest install igbuend/grimbard/graphicx

SKILL.md

graphicx — Image Inclusion & Manipulation

CTAN: https://ctan.org/pkg/graphicx Manual: texdoc graphicx

Setup

latex
\usepackage{graphicx}
% Set default search paths for images
\graphicspath{{images/}{figures/}{./}}

\includegraphics Options

latex
\includegraphics[options]{filename}
OptionExampleDescription
widthwidth=0.8\textwidthScale to width
heightheight=5cmScale to height
scalescale=0.5Scale factor
angleangle=90Rotate (counterclockwise, degrees)
trimtrim=1cm 2cm 1cm 0cmCrop: left bottom right top
clipclipMust accompany trim to actually crop
pagepage=3Page of multi-page PDF
keepaspectratiokeepaspectratioMaintain ratio when both width+height set
draftdraftShow filename box instead of image
bbbb=0 0 100 100Bounding box (EPS)
viewportviewport=50 50 200 200View sub-region (with clip)
resolutionresolution=300DPI for bitmap without natural size
latex
% Common patterns
\includegraphics[width=\textwidth]{photo}
\includegraphics[width=0.48\textwidth]{fig1}
\includegraphics[height=4cm, keepaspectratio]{diagram}
\includegraphics[angle=90, width=0.5\textwidth]{landscape}
\includegraphics[trim=10mm 5mm 10mm 5mm, clip, width=\linewidth]{screenshot}
\includegraphics[page=2, width=\textwidth]{multipage.pdf}

Supported Formats by Engine

EngineVectorRaster
pdfLaTeXPDF, EPS (auto-converted)PNG, JPG
XeLaTeXPDF, EPSPNG, JPG, BMP
LuaLaTeXPDF, EPSPNG, JPG
LaTeX→DVIEPS(none natively)

Best practice: Use PDF for vector graphics, PNG for screenshots/diagrams with transparency, JPG for photos.

Scaling & Rotating Commands

latex
% Scale content (text or images)
\scalebox{2}{Doubled}
\scalebox{0.5}[1.5]{Stretched} % [horizontal]{vertical}
% Resize to exact dimensions
\resizebox{3cm}{!}{Content} % ! = keep aspect ratio
\resizebox{!}{2cm}{Content}
\resizebox{3cm}{2cm}{Content} % exact (may distort)
% Rotate
\rotatebox{45}{Rotated text}
\rotatebox[origin=c]{90}{Centered rotation}
% origin: l, r, c, t, b, lt, rb, etc.

Figure Environment

latex
\begin{figure}[htbp] % placement: here, top, bottom, page
\centering
\includegraphics[width=0.8\textwidth]{plot.pdf}
\caption{Experimental results showing growth over time.}
\label{fig:results}
\end{figure}
% Reference: See Figure~\ref{fig:results}.
Placement Specifiers
SpecMeaning
hHere (approximately)
tTop of page
bBottom of page
pSeparate float page
!Override internal limits
HExactly here (requires float package)

Tip: Use [htbp] as default. Avoid [H] unless necessary.

Subfigures

latex
\usepackage{subcaption} % preferred over subfig/subfigure
\begin{figure}[htbp]
\centering
\begin{subfigure}[b]{0.48\textwidth}
\centering
\includegraphics[width=\textwidth]{fig_a.pdf}
\caption{First result}
\label{fig:sub_a}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.48\textwidth}
\centering
\includegraphics[width=\textwidth]{fig_b.pdf}
\caption{Second result}
\label{fig:sub_b}
\end{subfigure}
\caption{Comparison of results. (a) shows X, (b) shows Y.}
\label{fig:comparison}
\end{figure}
Three Subfigures in a Row
latex
\begin{figure}[htbp]
\centering
\begin{subfigure}[b]{0.32\textwidth}
\centering
\includegraphics[width=\textwidth]{a}
\caption{A}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.32\textwidth}
\centering
\includegraphics[width=\textwidth]{b}
\caption{B}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.32\textwidth}
\centering
\includegraphics[width=\textwidth]{c}
\caption{C}
\end{subfigure}
\caption{Three results side by side.}
\end{figure}

Overlays with overpic

latex
\usepackage{overpic}
\begin{overpic}[width=0.8\textwidth, grid, tics=10]{photo.jpg}
% Coordinates are percentages (0-100)
\put(20,80){\color{red}\Large\textbf{Label A}}
\put(70,30){\vector(-1,1){15}}
\end{overpic}

Remove grid, tics=10 after positioning. Coordinates are percentage-based.

Wrapfigure (Text Wrapping)

latex
\usepackage{wrapfig}
\begin{wrapfigure}{r}{0.4\textwidth} % r=right, l=left
\centering
\includegraphics[width=0.38\textwidth]{small_fig}
\caption{Side figure.}
\end{wrapfigure}
Text flows around the figure here...

Common Pitfalls

ProblemCauseFix
"File not found"Wrong path or extensionCheck \graphicspath, omit extension
"Unknown graphics extension .eps"pdfLaTeX can't use raw EPSUse epstopdf package (auto-converts) or switch to PDF
Blurry imagesLow resolution rasterUse ≥300 DPI or vector format
Figure floats awayLaTeX float algorithmUse [htbp!], add \FloatBarrier (placeins pkg)
Overfull hbox with subfiguresWidths sum > \textwidthEnsure widths + gaps < 1.0\textwidth
trim not croppingMissing clipAlways pair trim with clip
Image upside downCamera EXIF rotationPre-rotate or use angle=180
Subfigure numbering wrongUsing deprecated subfigure pkgSwitch to subcaption

Tips

  • Omit file extensions — LaTeX picks the best format automatically
  • Use \linewidth inside minipages/columns, \textwidth at top level
  • For publication: vector (PDF/EPS) for plots, high-DPI PNG/JPG for photos
  • \DeclareGraphicsExtensions{.pdf,.png,.jpg} to set search priority
  • draft option on \documentclass replaces all images with boxes (faster compilation)

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
4
Repository forks
1
7-day trend score
8

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 28 Mar 2026, 8 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/igbuend/grimbard/graphicx/badge)](https://verified-skill.com/skills/igbuend/grimbard/graphicx)

Something wrong with this skill or its page? Tell us.