File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -277,6 +277,9 @@ def get_ebook_methodology(lang, year):
277277 )
278278 # Remove lazy-loading attributes
279279 methodology_maincontent = re .sub (' loading="lazy"' , "" , methodology_maincontent )
280+ # Remove lazy-loading attributes
281+ methodology_maincontent = re .sub ('<div class="table-wrap">' , "<div>" , methodology_maincontent )
282+ methodology_maincontent = re .sub ('<div class="table-wrap-container">' , "<div>" , methodology_maincontent )
280283 return methodology_maincontent
281284
282285
Original file line number Diff line number Diff line change 6969 margin : 0 ;
7070}
7171
72+ table {
73+ border-radius : 16px ;
74+ border-radius : 1rem ;
75+ box-shadow : 0 0 16px 0 rgb (78 , 85 , 100 , 0.2 );
76+ box-shadow : 0 0 1rem 0 rgb (78 , 85 , 100 , 0.2 );
77+ }
78+
7279.table-wrap {
7380 padding : 0 ;
7481}
7582
83+ table caption {
84+ caption-side : bottom;
85+ }
86+
7687.large-table td {
7788 padding : 0.2rem ;
7889 line-height : 1.5em ;
@@ -360,9 +371,9 @@ section.chapter {
360371 /** We have some big tables that can't be force to break
361372 * So we cheat and make them small enough to fit on a page
362373 */
363- figure table td ,
364- figure table td li ,
365- figure table td p {
374+ div table td ,
375+ div table td li ,
376+ div table td p {
366377 font-size : 12px ;
367378 font-size : 0.85rem ;
368379 }
@@ -412,6 +423,8 @@ section.chapter {
412423 figure a ,
413424 figure div ,
414425 figure img ,
426+ div .table ,
427+ p .table-caption ,
415428 figcaption {
416429 max-width : 100% ;
417430 text-align : center;
@@ -426,7 +439,8 @@ section.chapter {
426439 text-decoration : none;
427440 }
428441
429- figcaption {
442+ figcaption ,
443+ p .table-caption {
430444 width : 1000px ;
431445 }
432446
Original file line number Diff line number Diff line change @@ -505,7 +505,8 @@ figure .anchor-link {
505505 background-color : # e5e5e5 ;
506506}
507507
508- figure {
508+ figure ,
509+ div .table {
509510 position : relative;
510511 display : flex;
511512 flex-direction : column;
@@ -551,7 +552,8 @@ figure .code-block {
551552 margin : 0.625rem auto;
552553}
553554
554- figcaption {
555+ figcaption ,
556+ p .table-caption {
555557 margin : 8px auto 0 ;
556558 margin : 0.5rem auto 0 ;
557559 text-align : center;
Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ const update_links = (chapter, chapter_config) => {
1414 body = body . replace ( / f i g u r e _ l i n k \( / g, 'figure_link(ebook=true,' ) ;
1515 // Remove figure_drodowns as not needed
1616 body = body . replace ( / { { \s * f i g u r e _ d r o p d o w n .* ?} } / gsm, '' ) ;
17+ // For PDFs tables cannot be in figures
18+ body = body . replace ( / < f i g u r e ( i d = " [ ^ " ] * ?" ) > < d i v c l a s s = " t a b l e - w r a p " > < d i v c l a s s = " t a b l e - w r a p - c o n t a i n e r " > < t a b l e > / gs, '<table $1>' ) ;
19+ body = body . replace ( / ( < \/ t a b l e > < \/ d i v > < \/ d i v > \n * ) < f i g c a p t i o n > ( .* ?) < \/ f i g c a p t i o n > ( \n * ) < \/ f i g u r e > / gs, '</table><p class="table-caption">$2</p>' ) ;
1720 // Replace current chapter header ids to full id (e.g. <h2 id="introduction"> -> <h2 id="javascript-introduction">)
1821 body = body . replace ( / < h ( [ 0 - 6 ] ) i d = " / g, '<h$1 id="' + chapter . metadata . chapter + '-' ) ;
1922 // Replace other chapter references with hash to anchor link (e.g. ./javascript#fig-1 -> #javascript-fig-1)
You can’t perform that action at this time.
0 commit comments