overfull-hbox
Installation
SKILL.md
Overfull Hbox Fix with Constrained Synonyms
This skill provides guidance for fixing LaTeX overfull hbox warnings by replacing words with shorter synonyms, while strictly adhering to a predefined list of allowed replacements.
Problem Overview
Overfull hbox warnings occur when LaTeX cannot fit text within the specified line width. The solution involves replacing words with shorter synonyms, but with a critical constraint: only words explicitly listed in a synonyms file may be replaced, and they may only be replaced with synonyms from that same file.
Approach
Step 1: Parse and Understand the Constraints
Before making any changes:
- Read the entire synonyms file completely (not just a truncated view)
- Build a data structure mapping each word to its allowed replacements
- Note that replacements are typically bidirectional (if A→B is allowed, B→A is also allowed)
- Identify which words in the document are candidates for replacement