Loading md_to_docx_converter/ETSIstyles.css +10 −6 Original line number Diff line number Diff line Loading @@ -24,19 +24,19 @@ font-size: 9pt; } .HTML_Variable { .HTML-Variable { font-family: "Roboto Mono", Monospace; font-size: 8pt; font-style: italic; } .HTML_Keyboard { .HTML-Keyboard { font-family: Times New Roman; font-size: 10pt; color: #595959; } .HTML_Definition { .HTML-Definition { font-style: italic; } Loading @@ -48,7 +48,7 @@ gap: 12pt; } .HTML_Code { .HTML-Code { font-family: "Roboto Mono", Monospace; font-size: 8pt; color: #31849b; Loading @@ -58,7 +58,7 @@ font-family: Courier New; } .HTML_Error { .HTML-Error { font-family: Times New Roman; font-weight: bold; font-style: italic; Loading Loading @@ -128,6 +128,10 @@ white-space: nowrap; } .EQ { text-align: center; } .EX { padding-left: 12pt; margin-bottom: 9pt; Loading Loading @@ -192,7 +196,7 @@ margin-bottom: 9pt; } .HTML_Sample { .HTML-Sample { font-family: Courier New; font-size: 8pt; } Loading md_to_docx_converter/customCSS.css +3 −3 Original line number Diff line number Diff line Loading @@ -597,13 +597,13 @@ h3 { font-size: 1.25em; } h4 { font-size: 1em; font-size: 1.1em; } h5 { font-size: 0.875em; font-size: 1.05em; } h6 { font-size: 0.85em; font-size: 1em; color: #777; } h1 tt, Loading md_to_docx_converter/filter_2.lua +6 −3 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ function Substitute(el, word) el.content[i + 6]) end else --we finally sustitute it with the proper link if word == "clause" and tocLinks[number] ~= nil then if word == "clause" then newContent:insert(ClauseLink(elem.text .. " " .. number, number)) elseif word == "figure" then newContent:insert(FigureLink(elem.text .. " " .. number, number)) Loading Loading @@ -295,7 +295,10 @@ if FORMAT:match 'html' then function Emph(el) el = Linking(el) return pandoc.RawInline('html', '<i>' .. pandoc.utils.stringify(el) .. '</i>') if #el.content == 1 then return el.content[1] end return el end function Underline(el) Loading md_to_docx_converter/md_to_html_2.lua +4 −1 Original line number Diff line number Diff line Loading @@ -338,7 +338,10 @@ if FORMAT:match 'html' then function Emph(el) el = Linking(el) return pandoc.RawInline('html', '<i>' .. pandoc.utils.stringify(el) .. '</i>') if #el.content == 1 then return el.content[1] end return el end function Underline(el) Loading md_to_docx_converter/src/to_html/preprocessing.py +10 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,14 @@ def run_format_checks(filename: str, file_lines: list[str]): check_divs() check_notes_and_examples() def remove_ignore_prettier_statements(text: str) -> str: """Remove any existing <!-- prettier-ignore --> statements from the text to avoid duplication""" new_lines = [] for line in text.split("\n"): if line.strip() != "<!-- prettier-ignore-start -->" and line.strip() != "<!-- prettier-ignore-end -->": new_lines.append(line) return "\n".join(new_lines) def add_divs_to_images_tables(text : str) -> str: """Add divs around images and their captions, and tables captions to the ones defined using the ETSI guidelines.""" Loading Loading @@ -598,6 +606,8 @@ def preprocess( run_format_checks(filename, text.splitlines()) text = remove_ignore_prettier_statements(text) text = add_divs_to_images_tables(text) if filename in clauses_filenames: Loading Loading
md_to_docx_converter/ETSIstyles.css +10 −6 Original line number Diff line number Diff line Loading @@ -24,19 +24,19 @@ font-size: 9pt; } .HTML_Variable { .HTML-Variable { font-family: "Roboto Mono", Monospace; font-size: 8pt; font-style: italic; } .HTML_Keyboard { .HTML-Keyboard { font-family: Times New Roman; font-size: 10pt; color: #595959; } .HTML_Definition { .HTML-Definition { font-style: italic; } Loading @@ -48,7 +48,7 @@ gap: 12pt; } .HTML_Code { .HTML-Code { font-family: "Roboto Mono", Monospace; font-size: 8pt; color: #31849b; Loading @@ -58,7 +58,7 @@ font-family: Courier New; } .HTML_Error { .HTML-Error { font-family: Times New Roman; font-weight: bold; font-style: italic; Loading Loading @@ -128,6 +128,10 @@ white-space: nowrap; } .EQ { text-align: center; } .EX { padding-left: 12pt; margin-bottom: 9pt; Loading Loading @@ -192,7 +196,7 @@ margin-bottom: 9pt; } .HTML_Sample { .HTML-Sample { font-family: Courier New; font-size: 8pt; } Loading
md_to_docx_converter/customCSS.css +3 −3 Original line number Diff line number Diff line Loading @@ -597,13 +597,13 @@ h3 { font-size: 1.25em; } h4 { font-size: 1em; font-size: 1.1em; } h5 { font-size: 0.875em; font-size: 1.05em; } h6 { font-size: 0.85em; font-size: 1em; color: #777; } h1 tt, Loading
md_to_docx_converter/filter_2.lua +6 −3 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ function Substitute(el, word) el.content[i + 6]) end else --we finally sustitute it with the proper link if word == "clause" and tocLinks[number] ~= nil then if word == "clause" then newContent:insert(ClauseLink(elem.text .. " " .. number, number)) elseif word == "figure" then newContent:insert(FigureLink(elem.text .. " " .. number, number)) Loading Loading @@ -295,7 +295,10 @@ if FORMAT:match 'html' then function Emph(el) el = Linking(el) return pandoc.RawInline('html', '<i>' .. pandoc.utils.stringify(el) .. '</i>') if #el.content == 1 then return el.content[1] end return el end function Underline(el) Loading
md_to_docx_converter/md_to_html_2.lua +4 −1 Original line number Diff line number Diff line Loading @@ -338,7 +338,10 @@ if FORMAT:match 'html' then function Emph(el) el = Linking(el) return pandoc.RawInline('html', '<i>' .. pandoc.utils.stringify(el) .. '</i>') if #el.content == 1 then return el.content[1] end return el end function Underline(el) Loading
md_to_docx_converter/src/to_html/preprocessing.py +10 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,14 @@ def run_format_checks(filename: str, file_lines: list[str]): check_divs() check_notes_and_examples() def remove_ignore_prettier_statements(text: str) -> str: """Remove any existing <!-- prettier-ignore --> statements from the text to avoid duplication""" new_lines = [] for line in text.split("\n"): if line.strip() != "<!-- prettier-ignore-start -->" and line.strip() != "<!-- prettier-ignore-end -->": new_lines.append(line) return "\n".join(new_lines) def add_divs_to_images_tables(text : str) -> str: """Add divs around images and their captions, and tables captions to the ones defined using the ETSI guidelines.""" Loading Loading @@ -598,6 +606,8 @@ def preprocess( run_format_checks(filename, text.splitlines()) text = remove_ignore_prettier_statements(text) text = add_divs_to_images_tables(text) if filename in clauses_filenames: Loading