feat: explicit TikZ environment handling in LaTeX backend (#3187)
* feat: explicitly handle tikzpicture as atomic figure nodes Signed-off-by: StealthTensor <rayabharaputrinai@gmail.com> * fix: resolve copilot review on recursion depth and text labels Signed-off-by: StealthTensor <rayabharaputrinai@gmail.com> * test: cover tikz fallback label and depth guard Signed-off-by: StealthTensor <rayabharaputrinai@gmail.com> * fix: address copilot tikz parent and end-tag edge cases Signed-off-by: StealthTensor <rayabharaputrinai@gmail.com> * feat(latex): store TikZ source in Picture meta code field Handle tikzpicture environments as real Picture nodes via add_picture and store raw TikZ in PictureMeta.code (CodeMetaField) with language metadata. Also update LaTeX backend tests to assert picture meta code behavior and bump docling-core minimum version to 2.71.0 (includes PictureMeta.code). Signed-off-by: StealthTensor <rayabharaputrinai@gmail.com> * fix(latex): make TikZ code metadata compatible across docling-core versions Avoid hard import of CodeMetaField to prevent import-time crashes when older docling-core is resolved. Use PictureMeta.code when available and retain legacy CODE fallback otherwise. Update TikZ tests for dual-path behavior and refresh uv.lock to pin docling-core 2.71.0. Signed-off-by: StealthTensor <rayabharaputrinai@gmail.com> * refactor(latex): simplify TikZ parent assignment Signed-off-by: StealthTensor <rayabharaputrinai@gmail.com> * fix(latex): remove legacy PictureMeta guard and use TIKZ code metadata Signed-off-by: StealthTensor <rayabharaputrinai@gmail.com> * fix: require docling-core 2.73.0 for TIKZ code label Signed-off-by: StealthTensor <rayabharaputrinai@gmail.com> * test: remove legacy tikz code-meta compatibility branch Signed-off-by: StealthTensor <rayabharaputrinai@gmail.com> --------- Signed-off-by: StealthTensor <rayabharaputrinai@gmail.com>
R
Rayabharapu Trinai committed
a15c16e19fc9531e68916d15a1976ba76414c545
Parent: cd2e5b6
Committed by GitHub <noreply@github.com>
on 4/15/2026, 3:47:20 AM