Convert a paper surgically.
Surgical keeps born-digital pages on the fast path and spends TexTeller only on formula crops — the economical default for papers with math. Formula regions come from the PDF text layer (TeX math fonts plus unicode math), merged line-aware so multi-line display equations become one crop while columns and prose stay apart.
import bobine
conv = bobine.HybridConverter(
bobine.ConverterConfig(
routing_mode=bobine.RoutingMode.Surgical),
cache_dir="~/.cache/huggingface/hub")
md = conv.convert_pdf("paper.pdf", work_dir="/tmp/out")