From eb0cac44f6725c6d3d025319bae6271d78132853 Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Fri, 31 Jan 2025 14:17:05 +0100 Subject: [PATCH] add display none for latex annotation Signed-off-by: Michele Dolfi --- docling_core/types/doc/document.py | 3 +++ test/data/doc/2206.01062.yaml.html | 3 +++ test/data/doc/bad_doc.yaml.html | 3 +++ test/data/doc/constructed_doc.embedded.html.gt | 3 +++ test/data/doc/constructed_doc.placeholder.html.gt | 3 +++ test/data/doc/constructed_doc.referenced.html.gt | 3 +++ test/data/doc/constructed_document.yaml.html | 3 +++ test/data/doc/dummy_doc.yaml.html | 3 +++ 8 files changed, 24 insertions(+) diff --git a/docling_core/types/doc/document.py b/docling_core/types/doc/document.py index 299d786f..eb56e7cc 100644 --- a/docling_core/types/doc/document.py +++ b/docling_core/types/doc/document.py @@ -1390,6 +1390,9 @@ class DoclingDocument(BaseModel): table tr:nth-child(even) td{ background-color: LightGray; } + math annotation { + display: none; + } """ diff --git a/test/data/doc/2206.01062.yaml.html b/test/data/doc/2206.01062.yaml.html index ba2add20..ea69871b 100644 --- a/test/data/doc/2206.01062.yaml.html +++ b/test/data/doc/2206.01062.yaml.html @@ -53,6 +53,9 @@ table tr:nth-child(even) td{ background-color: LightGray; } + math annotation { + display: none; + }

DocLayNet: A Large Human-Annotated Dataset for Document-Layout Analysis

diff --git a/test/data/doc/bad_doc.yaml.html b/test/data/doc/bad_doc.yaml.html index 12cf61d0..c6c20f87 100644 --- a/test/data/doc/bad_doc.yaml.html +++ b/test/data/doc/bad_doc.yaml.html @@ -53,6 +53,9 @@ table tr:nth-child(even) td{ background-color: LightGray; } + math annotation { + display: none; + }

This is the title

diff --git a/test/data/doc/constructed_doc.embedded.html.gt b/test/data/doc/constructed_doc.embedded.html.gt index 12ef29ee..ec63d1a2 100644 --- a/test/data/doc/constructed_doc.embedded.html.gt +++ b/test/data/doc/constructed_doc.embedded.html.gt @@ -53,6 +53,9 @@ table tr:nth-child(even) td{ background-color: LightGray; } + math annotation { + display: none; + }

Title of the Document

diff --git a/test/data/doc/constructed_doc.placeholder.html.gt b/test/data/doc/constructed_doc.placeholder.html.gt index e63df310..f14a80e0 100644 --- a/test/data/doc/constructed_doc.placeholder.html.gt +++ b/test/data/doc/constructed_doc.placeholder.html.gt @@ -53,6 +53,9 @@ table tr:nth-child(even) td{ background-color: LightGray; } + math annotation { + display: none; + }

Title of the Document

diff --git a/test/data/doc/constructed_doc.referenced.html.gt b/test/data/doc/constructed_doc.referenced.html.gt index da449dfb..4678f9cb 100644 --- a/test/data/doc/constructed_doc.referenced.html.gt +++ b/test/data/doc/constructed_doc.referenced.html.gt @@ -53,6 +53,9 @@ table tr:nth-child(even) td{ background-color: LightGray; } + math annotation { + display: none; + }

Title of the Document

diff --git a/test/data/doc/constructed_document.yaml.html b/test/data/doc/constructed_document.yaml.html index e63df310..f14a80e0 100644 --- a/test/data/doc/constructed_document.yaml.html +++ b/test/data/doc/constructed_document.yaml.html @@ -53,6 +53,9 @@ table tr:nth-child(even) td{ background-color: LightGray; } + math annotation { + display: none; + }

Title of the Document

diff --git a/test/data/doc/dummy_doc.yaml.html b/test/data/doc/dummy_doc.yaml.html index 7de2efc7..46d5c090 100644 --- a/test/data/doc/dummy_doc.yaml.html +++ b/test/data/doc/dummy_doc.yaml.html @@ -53,6 +53,9 @@ table tr:nth-child(even) td{ background-color: LightGray; } + math annotation { + display: none; + }

DocLayNet: A Large Human-Annotated Dataset for Document-Layout Analysis