Skip to content

Commit

Permalink
CSS font size configure: metanorma/isodoc#227
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Nov 17, 2020
1 parent c87cf94 commit ed5f47b
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 41 deletions.
4 changes: 2 additions & 2 deletions lib/isodoc/un/html/htmlstyle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ $un-admonition-color: #47430c;
$un-toc-active: #4d7ea5;

body {
@include bodyStyle1(15px, 1.4em, $un-text, #ffffff, 300);
@include bodyStyle1($normalfontsize, 1.4em, $un-text, #ffffff, 300);
font-weight: 400;
}

Expand Down Expand Up @@ -523,7 +523,7 @@ a.footnote-number {
}

.footnote {
font-size: 0.9em;
font-size: $footnotefontsize;
}


Expand Down
39 changes: 19 additions & 20 deletions lib/isodoc/un/html/unece.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ p.Sourcecode, li.Sourcecode, div.Sourcecode, pre.Sourcecode, pre
text-align:left;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-size:$monospacefontsize;
font-family:$monospacefont;
mso-fareast-font-family:Calibri;
mso-bidi-font-family:"Courier New";
Expand All @@ -43,7 +43,7 @@ p.pseudocode, li.pseudocode, div.pseudocode
text-align:left;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.5pt;
font-size:$normalfontsize;
font-family:$bodyfont;
mso-fareast-font-family:Calibri;
mso-bidi-font-family:"Courier New";
Expand All @@ -60,7 +60,7 @@ p.Biblio, li.Biblio, div.Biblio, p.NormRef, li.NormRef, div.NormRef
tab-stops: 33.15pt;
line-height:12.0pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
font-size:$normalfontsize;
font-weight:normal;
font-family:$bodyfont;
mso-fareast-font-family:$bodyfont;
Expand Down Expand Up @@ -153,10 +153,9 @@ p.Note, div.Note, li.Note, p.TableFootnote, div.TableFootnote, li.TableFootnote
line-height:12.0pt;
mso-pagination:widow-orphan;
tab-stops:20.15pt;
font-size:10.0pt;
font-size:$smallerfontsize;
mso-bidi-font-size:11.0pt;
font-family:$bodyfont;
font-size:10.0pt;
mso-fareast-font-family:$bodyfont;
mso-bidi-font-family:$bodyfont;
mso-ansi-language:EN-GB;}
Expand Down Expand Up @@ -410,7 +409,7 @@ p.zzCopyright, li.zzCopyright
tab-stops:20.15pt 25.7pt 481.15pt;
padding:0cm;
mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt;
font-size:10.5pt;
font-size:$normalfontsize;
font-family:$bodyfont;
mso-fareast-font-family:$bodyfont;
mso-bidi-font-family:$bodyfont;
Expand Down Expand Up @@ -491,7 +490,7 @@ p.Quote, li.Quote, div.Quote
line-height:12.0pt;
mso-pagination:widow-orphan;
tab-stops:20.15pt;
font-size:10.5pt;
font-size:$normalfontsize;
font-family:$bodyfont;
mso-fareast-font-family:$bodyfont;
mso-bidi-font-family:$bodyfont;
Expand All @@ -506,7 +505,7 @@ p.QuoteAttribution
line-height:12.0pt;
mso-pagination:widow-orphan;
tab-stops:20.15pt;
font-size:10.5pt;
font-size:$normalfontsize;
font-family:$bodyfont;
mso-fareast-font-family:$bodyfont;
mso-bidi-font-family:$bodyfont;
Expand Down Expand Up @@ -562,7 +561,7 @@ p.Formula, li.Formula, div.Formula
line-height:12.0pt;
mso-pagination:widow-orphan;
tab-stops:right 487.45pt;
font-size:10.5pt;
font-size:$normalfontsize;
font-family:$bodyfont;
mso-fareast-font-family:$bodyfont;
mso-bidi-font-family:$bodyfont;
Expand Down Expand Up @@ -681,14 +680,14 @@ table.MsoISOTable, table.MsoISOTableBig
mso-border-insideh:.75pt solid windowtext;
mso-border-insidev:.75pt solid windowtext;
margin-bottom:12pt;
font-size:10.0pt;
font-size:$smallerfontsize;
font-family:$bodyfont;}
table.MsoISOTable th, table.MsoISOTableBig th
{border:solid windowtext 1pt;
mso-border-alt:solid windowtext 1pt;
padding:0cm 2.85pt 0cm 2.85pt;}
table.MsoISOTable p, table.MsoISOTableBig p
{font-size:10.0pt; }
{font-size:$smallerfontsize; }
table.MsoISOTable td, table.MsoISOTableBig td
{border:solid windowtext 1pt;
mso-border-alt:solid windowtext 1pt;
Expand All @@ -708,7 +707,7 @@ table.MsoTableGrid
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
margin-bottom:12pt;
font-size:10.0pt;
font-size:$smallerfontsize;
font-family:$bodyfont;}
div.formula
{tab-stops:right 487.45pt;}
Expand Down Expand Up @@ -743,7 +742,7 @@ div.coverpage_warning
vertical-align:super;}

aside {
font-size:10.0pt;
font-size:$footnotefontsize;
}

.example-title {
Expand All @@ -765,38 +764,38 @@ div.example {

p.example, li.example, div.example, td.example {
mso-pagination:none;
font-size:10.0pt;
font-size:$smallerfontsize;
font-family:$bodyfont;}

td.example p.MsoListParagraph {
font-size: 10.0pt;
font-size: $smallerfontsize;
}

div.example p.MsoListParagraph {
font-size: 10.0pt;
font-size: $smallerfontsize;
}

div.Note p.MsoListParagraph {
font-size: 10.0pt;
font-size: $smallerfontsize;
margin-left: 1.0cm;
}

div.Note span.stem {
font-size: 10.0pt; }
font-size: $smallerfontsize; }

div.Note p.Sourcecode, div.Note pre.Sourcecode {
font-size: 8.0pt;
margin-left: 1.0cm;
}

div.Note table.dl {
font-size: 10.0pt;
font-size: $smallerfontsize;
margin-left: 1.0cm;
}

span.note_label, span.example_label, td.example_label, td.note_label
{
font-size: 10.0pt;
font-size: $smallerfontsize;
font-family:$bodyfont;
}

Expand Down
34 changes: 17 additions & 17 deletions lib/isodoc/un/html/wordstyle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ p.MsoNormal, li.MsoNormal, div.MsoNormal
margin:0cm;
margin-bottom:12.0pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
font-size:$normalfontsize;
font-family:$bodyfont;
mso-fareast-font-family:"Times New Roman";
mso-ansi-language:EN-US;
Expand All @@ -85,7 +85,7 @@ p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
margin-bottom:12.0pt;
/* do not put in margin-left, it is specific to list level */
mso-pagination:widow-orphan;
font-size:10.5pt;
font-size:$normalfontsize;
font-family:$bodyfont;
mso-ansi-language:EN-AU;
mso-fareast-language:EN-US;}
Expand All @@ -99,7 +99,7 @@ p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphC
margin-bottom:12.0pt;
/* do not put in margin-left, it is specific to list level */
mso-pagination:widow-orphan;
font-size:10.5pt;
font-size:$normalfontsize;
font-family:$bodyfont;
mso-ansi-language:EN-AU;
mso-fareast-language:EN-US;}
Expand All @@ -113,7 +113,7 @@ p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagrap
margin-bottom:12.0pt;
/* do not put in margin-left, it is specific to list level */
mso-pagination:widow-orphan;
font-size:10.5pt;
font-size:$normalfontsize;
font-family:$bodyfont;
mso-ansi-language:EN-AU;
mso-fareast-language:EN-US;}
Expand All @@ -127,7 +127,7 @@ p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxS
margin-bottom:12.0pt;
/* do not put in margin-left, it is specific to list level */
mso-pagination:widow-orphan;
font-size:10.5pt;
font-size:$normalfontsize;
font-family:$bodyfont;
mso-ansi-language:EN-AU;
mso-fareast-language:EN-US;}
Expand All @@ -149,7 +149,7 @@ p.MsoHeader, li.MsoHeader, div.MsoHeader
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:center 216.0pt right 482.0pt;
font-size:10.5pt;
font-size:$normalfontsize;
font-family:$bodyfont;
mso-fareast-font-family:"Times New Roman";
mso-ansi-language:EN-US;
Expand All @@ -160,7 +160,7 @@ p.MsoHeaderLandscape, li.MsoHeaderLandscape, div.MsoHeaderLandscape
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:center 367.0pt right 734.0pt;
font-size:10.5pt;
font-size:$normalfontsize;
font-family:$bodyfont;
mso-fareast-font-family:"Times New Roman";
mso-ansi-language:EN-US;
Expand All @@ -171,7 +171,7 @@ p.MsoFooter, li.MsoFooter, div.MsoFooter
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:right 482.0pt;
font-size:10.5pt;
font-size:$normalfontsize;
font-family:$bodyfont;
mso-fareast-font-family:"Times New Roman";
mso-ansi-language:EN-US;
Expand All @@ -182,7 +182,7 @@ p.MsoFooterLandscape, li.MsoFooterLandscape, div.MsoFooterLandscape
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:right 734.0pt;
font-size:10.5pt;
font-size:$normalfontsize;
font-family:$bodyfont;
mso-fareast-font-family:"Times New Roman";
mso-ansi-language:EN-US;
Expand Down Expand Up @@ -553,7 +553,7 @@ p.MsoToc1, li.MsoToc1, div.MsoToc1
mso-pagination:widow-orphan;
mso-hyphenate:none;
tab-stops:20.15pt 36.0pt right dotted 487.6pt;
font-size:10.5pt;
font-size:$normalfontsize;
font-family:$bodyfont;
mso-fareast-font-family:$bodyfont;
mso-bidi-font-family:$bodyfont;
Expand All @@ -575,7 +575,7 @@ p.MsoToc2, li.MsoToc2, div.MsoToc2
mso-pagination:widow-orphan;
mso-hyphenate:none;
tab-stops:20.15pt 36.0pt right dotted 487.6pt;
font-size:10.5pt;
font-size:$normalfontsize;
font-family:$bodyfont;
mso-fareast-font-family:$bodyfont;
mso-bidi-font-family:$bodyfont;
Expand All @@ -597,7 +597,7 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3
mso-pagination:widow-orphan;
mso-hyphenate:none;
tab-stops:20.15pt 36.0pt right dotted 487.6pt;
font-size:10.5pt;
font-size:$normalfontsize;
font-family:$bodyfont;
mso-fareast-font-family:$bodyfont;
mso-bidi-font-family:$bodyfont;
Expand All @@ -618,7 +618,7 @@ p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText
line-height:12.0pt;
mso-pagination:widow-orphan;
tab-stops:20.15pt;
font-size:9.0pt;
font-size:$footnotefontsize;
font-family:$bodyfont;
mso-fareast-font-family:$bodyfont;
mso-bidi-font-family:$bodyfont;
Expand All @@ -636,7 +636,7 @@ p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
text-align:justify;
line-height:12.0pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
font-size:$normalfontsize;
font-family:$bodyfont;
mso-fareast-font-family:$bodyfont;
mso-bidi-font-family:$bodyfont;
Expand Down Expand Up @@ -745,9 +745,9 @@ p.Tablebody, li.Tablebody, div.Tablebody
margin-right:0cm;
margin-bottom:3.0pt;
margin-left:0cm;
line-height:10.5pt;
line-height:$normalfontsize;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-size:$smallerfontsize;
mso-bidi-font-size:11.0pt;
font-family:$bodyfont;
mso-fareast-font-family:$bodyfont;
Expand Down Expand Up @@ -1130,7 +1130,7 @@ table.MsoNormalTable
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-size:$smallerfontsize;
font-family:$bodyfont;}
ol
{margin-bottom:0cm;
Expand Down
4 changes: 3 additions & 1 deletion lib/isodoc/un/html_convert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ def default_fonts(options)
'"SimHei",sans-serif' :
'"Times New Roman", serif'
),
monospacefont: '"Courier New",monospace'
monospacefont: '"Courier New",monospace',
normalfontsize: "15px",
footnotefontsize: "0.9em",
}
end

Expand Down
6 changes: 5 additions & 1 deletion lib/isodoc/un/word_convert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ def default_fonts(options)
'"Times New Roman",serif'),
headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' :
'"Times New Roman",serif'),
monospacefont: '"Courier New",monospace'
monospacefont: '"Courier New",monospace',
normalfontsize: "10.5pt",
monospacefontsize: "10.0pt",
smallerfontsize: "10.0pt",
footnotefontsize: "9.0pt",
}
end

Expand Down

0 comments on commit ed5f47b

Please sign in to comment.