File tree Expand file tree Collapse file tree 8 files changed +92
-0
lines changed Expand file tree Collapse file tree 8 files changed +92
-0
lines changed Original file line number Diff line number Diff line change @@ -1393,6 +1393,17 @@ class DoclingDocument(BaseModel):
1393
1393
math annotation {
1394
1394
display: none;
1395
1395
}
1396
+ .formula-not-decoded {
1397
+ background: repeating-linear-gradient(
1398
+ 45deg, /* Angle of the stripes */
1399
+ LightGray, /* First color */
1400
+ LightGray 10px, /* Length of the first color */
1401
+ White 10px, /* Second color */
1402
+ White 20px /* Length of the second color */
1403
+ );
1404
+ margin: 0;
1405
+ text-align: center;
1406
+ }
1396
1407
</style>
1397
1408
</head>"""
1398
1409
@@ -2503,6 +2514,10 @@ def _prepare_tag_content(
2503
2514
2504
2515
if text != "" :
2505
2516
html_texts .append (text )
2517
+ else :
2518
+ html_texts .append (
2519
+ '<div class="formula-not-decoded">Formula not decoded</div>'
2520
+ )
2506
2521
2507
2522
elif isinstance (item , ListItem ):
2508
2523
Original file line number Diff line number Diff line change 56
56
math annotation {
57
57
display : none;
58
58
}
59
+ .formula-not-decoded {
60
+ background : repeating-linear-gradient (
61
+ 45deg , /* Angle of the stripes */
62
+ LightGray, /* First color */
63
+ LightGray 10px , /* Length of the first color */
64
+ White 10px , /* Second color */
65
+ White 20px /* Length of the second color */
66
+ );
67
+ margin : 0 ;
68
+ text-align : center;
69
+ }
59
70
</ style >
60
71
</ head >
61
72
< h2 > DocLayNet: A Large Human-Annotated Dataset for Document-Layout Analysis</ h2 >
Original file line number Diff line number Diff line change 56
56
math annotation {
57
57
display : none;
58
58
}
59
+ .formula-not-decoded {
60
+ background : repeating-linear-gradient (
61
+ 45deg , /* Angle of the stripes */
62
+ LightGray, /* First color */
63
+ LightGray 10px , /* Length of the first color */
64
+ White 10px , /* Second color */
65
+ White 20px /* Length of the second color */
66
+ );
67
+ margin : 0 ;
68
+ text-align : center;
69
+ }
59
70
</ style >
60
71
</ head >
61
72
< h1 > This is the title</ h1 >
Original file line number Diff line number Diff line change 56
56
math annotation {
57
57
display: none;
58
58
}
59
+ .formula-not-decoded {
60
+ background: repeating-linear-gradient(
61
+ 45deg, /* Angle of the stripes */
62
+ LightGray, /* First color */
63
+ LightGray 10px, /* Length of the first color */
64
+ White 10px, /* Second color */
65
+ White 20px /* Length of the second color */
66
+ );
67
+ margin: 0;
68
+ text-align: center;
69
+ }
59
70
</style>
60
71
</head>
61
72
<h1>Title of the Document</h1>
Original file line number Diff line number Diff line change 56
56
math annotation {
57
57
display: none;
58
58
}
59
+ .formula-not-decoded {
60
+ background: repeating-linear-gradient(
61
+ 45deg, /* Angle of the stripes */
62
+ LightGray, /* First color */
63
+ LightGray 10px, /* Length of the first color */
64
+ White 10px, /* Second color */
65
+ White 20px /* Length of the second color */
66
+ );
67
+ margin: 0;
68
+ text-align: center;
69
+ }
59
70
</style>
60
71
</head>
61
72
<h1>Title of the Document</h1>
Original file line number Diff line number Diff line change 56
56
math annotation {
57
57
display: none;
58
58
}
59
+ .formula-not-decoded {
60
+ background: repeating-linear-gradient(
61
+ 45deg, /* Angle of the stripes */
62
+ LightGray, /* First color */
63
+ LightGray 10px, /* Length of the first color */
64
+ White 10px, /* Second color */
65
+ White 20px /* Length of the second color */
66
+ );
67
+ margin: 0;
68
+ text-align: center;
69
+ }
59
70
</style>
60
71
</head>
61
72
<h1>Title of the Document</h1>
Original file line number Diff line number Diff line change 56
56
math annotation {
57
57
display : none;
58
58
}
59
+ .formula-not-decoded {
60
+ background : repeating-linear-gradient (
61
+ 45deg , /* Angle of the stripes */
62
+ LightGray, /* First color */
63
+ LightGray 10px , /* Length of the first color */
64
+ White 10px , /* Second color */
65
+ White 20px /* Length of the second color */
66
+ );
67
+ margin : 0 ;
68
+ text-align : center;
69
+ }
59
70
</ style >
60
71
</ head >
61
72
< h1 > Title of the Document</ h1 >
Original file line number Diff line number Diff line change 56
56
math annotation {
57
57
display : none;
58
58
}
59
+ .formula-not-decoded {
60
+ background : repeating-linear-gradient (
61
+ 45deg , /* Angle of the stripes */
62
+ LightGray, /* First color */
63
+ LightGray 10px , /* Length of the first color */
64
+ White 10px , /* Second color */
65
+ White 20px /* Length of the second color */
66
+ );
67
+ margin : 0 ;
68
+ text-align : center;
69
+ }
59
70
</ style >
60
71
</ head >
61
72
< h1 > DocLayNet: A Large Human-Annotated Dataset for Document-Layout Analysis</ h1 >
You can’t perform that action at this time.
0 commit comments