@@ -49,15 +49,15 @@ const caption = (s) => {
4949 text : s ,
5050 fontSize : 15 ,
5151 bold : true ,
52- margin : [ 30 , 5 , 5 , 5 ] ,
52+ margin : [ 30 , 5 , 30 , 5 ] ,
5353 } ) ;
5454} ;
5555
5656const index = ( s ) => {
5757 content . push ( {
5858 text : s ,
5959 fontSize : 12 ,
60- margin : [ 30 , 2 , 5 , 2 ] ,
60+ margin : [ 30 , 2 , 30 , 2 ] ,
6161 preserveLeadingSpaces : true ,
6262 } ) ;
6363} ;
@@ -66,7 +66,8 @@ const para = (s) => {
6666 content . push ( {
6767 text : s ,
6868 fontSize : 12 ,
69- margin : [ 30 , 5 , 5 , 5 ] ,
69+ alignment : 'justify' ,
70+ margin : [ 30 , 5 , 30 , 5 ] ,
7071 } ) ;
7172} ;
7273
@@ -92,8 +93,14 @@ const code = (src) => {
9293 } ) ;
9394} ;
9495
96+ const abstract = fs . readFileSync ( 'content/Abstract.en.md' , 'utf8' ) ;
97+ const text = abstract . replace ( '#' , '' ) . split ( '\n' ) ;
98+ caption ( text . shift ( ) ) ;
99+ para ( text . join ( ' ' ) ) ;
100+
95101const src = fs . readFileSync ( 'content/Index.en.md' , 'utf8' ) ;
96102const data = src . split ( '\n' ) ;
103+
97104for ( let i = 0 ; i < data . length ; i ++ ) {
98105 const row = data [ i ] ;
99106 if ( row . startsWith ( '#' ) ) {
@@ -106,13 +113,15 @@ for (let i = 0; i < data.length; i++) {
106113 }
107114}
108115
116+ /*
109117para('Consider following:');
110118code(`const id = (x) => x;
111119
112120// Usage
113121
114122const res = id(5);
115123console.log({ res });`);
124+ */
116125
117126const now = new Date ( ) ;
118127
0 commit comments