{"id":5,"date":"2021-05-17T19:07:28","date_gmt":"2021-05-17T19:07:28","guid":{"rendered":"http:\/\/mariuszpawlowski.pl\/?p=5"},"modified":"2021-05-17T22:02:43","modified_gmt":"2021-05-17T22:02:43","slug":"test","status":"publish","type":"post","link":"https:\/\/mariuszpawlowski.pl\/index.php\/2021\/05\/17\/test\/","title":{"rendered":"test"},"content":{"rendered":"<div class=\"maketitle\">\r\n<h2 class=\"titleHead\">Testing HTML Export with make4ht<\/h2>\r\n<div class=\"author\"><span class=\"cmr-12\">LianTze Lim<\/span><\/div>\r\n<div class=\"date\"><\/div>\r\n<\/div>\r\n<div class=\"abstract\">\r\n<div class=\"center\">\r\n\r\n<span class=\"cmbx-10\">Abstract<\/span>\r\n\r\n<\/div>\r\n<span class=\"cmr-10\">Your abstract. \u00c7a va? (Yes accented characters work.)<\/span>\r\n\r\n<\/div>\r\n<h3 class=\"sectionHead\"><span class=\"titlemark\">1 <\/span> <a id=\"x1-10001\"><\/a>Overview of Steps<\/h3>\r\n<ol class=\"enumerate1\">\r\n \t<li id=\"x1-1002x1\" class=\"enumerate\">I tweaked the <span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">latexmkrc<\/span><\/span><\/span> file so that <span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">make4ht<\/span><\/span><\/span> is run along with\r\n<span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">pdflatex<\/span><\/span><\/span>, so the HTML export is done only if you set your project to\r\nbe compiled with <span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">pdflatex<\/span><\/span><\/span>.(<span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">make4ht<\/span><\/span><\/span> doesn\u2019t work well with <span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">fontspec<\/span><\/span><\/span>; I haven\u2019t time to try this\r\nworkflow with <span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">XeLaTeX<\/span><\/span><\/span> nor <span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">LuaLaTeX<\/span><\/span><\/span> yet. So let\u2019s just leave it at\r\n<span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">pdflatex<\/span><\/span><\/span> first, yeah?)<\/li>\r\n \t<li id=\"x1-1004x2\" class=\"enumerate\"><span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">my.cfg<\/span><\/span><\/span> contains the settings I usually use in my workflow:\r\n<ul class=\"itemize1\">\r\n \t<li class=\"itemize\">Output math as MathML, and render it in browsers using\r\nMathJax.<\/li>\r\n \t<li class=\"itemize\">When <span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">\\includegraphics<\/span><\/span><\/span> uses <span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">.jpg<\/span><\/span><\/span>, <span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">.png<\/span><\/span><\/span>, <span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">.jpg<\/span><\/span><\/span>, <span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">.svg<\/span><\/span><\/span>, use the\r\nfiles directly for the HTML without conversion.<\/li>\r\n \t<li class=\"itemize\">When <span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">\\includegraphics<\/span><\/span><\/span> uses <span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">.eps<\/span><\/span><\/span> and <span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">.pdf<\/span><\/span><\/span>, convert them to\r\n<span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">.png<\/span><\/span><\/span> using ImageMagick <span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">convert<\/span><\/span><\/span>, and use those for the HTML.<\/li>\r\n \t<li class=\"itemize\">Tikz drawings are output as <span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">.svg<\/span><\/span><\/span>.<\/li>\r\n \t<li class=\"itemize\">I\u2019ve included some CSS styling. You can add a separate <span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">.css<\/span><\/span><\/span> file\r\nfor further styling.<\/li>\r\n<\/ul>\r\n<\/li>\r\n \t<li id=\"x1-1006x3\" class=\"enumerate\">When compilation is complete, use the steps at <a href=\"https:\/\/www.overleaf.com\/learn\/how-to\/View_generated_files\"><span class=\"cmti-10x-x-109\">View generated files<\/span><\/a> to\r\ndownload each generated file required. There\u2019s also a <code><span class=\"cmtt-10x-x-109\">allfiles.zip<\/span><\/code> that\r\ncontains <span class=\"cmti-10x-x-109\">all <\/span>generated files.<\/li>\r\n<\/ol>\r\n<h4 class=\"subsectionHead\"><span class=\"titlemark\">1.1 <\/span> <a id=\"x1-20001.1\"><\/a>Caveats<\/h4>\r\n<ul class=\"itemize1\">\r\n \t<li class=\"itemize\">This is an experimental hackety hack \u2013 things may just not work! More\r\na proof-of-concept rather than a stable solution on Overleaf at present.<\/li>\r\n \t<li class=\"itemize\">tex4ht doesn\u2019t work well with <span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">fontspec<\/span><\/span><\/span> nor <span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">authblk<\/span><\/span><\/span>.<\/li>\r\n \t<li class=\"itemize\">Avoid <span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">\\mathbf<\/span><\/span><\/span> \u2013 this broke MathML and MathJax for me.<\/li>\r\n \t<li class=\"itemize\">Avoid, or re-define the <span class=\"obeylines-h\"><span class=\"verb\"><span class=\"cmtt-10x-x-109\">multicol<\/span><\/span><\/span> environment to do nothing \u2013 tex4ht\r\nwill really export text in two or three columns <span class=\"cmti-10x-x-109\">by PDF page<\/span>, and it\u2019s\r\nnot the most readable.<\/li>\r\n<\/ul>\r\n<h3 class=\"sectionHead\"><span class=\"titlemark\">2 <\/span> <a id=\"x1-30002\"><\/a>Introduction<\/h3>\r\nYour introduction goes here!\r\n<h3 class=\"sectionHead\"><span class=\"titlemark\">3 <\/span> <a id=\"x1-40003\"><\/a>Some L<span class=\"cmr-8\">A<\/span>TE X Examples<\/h3>\r\n<h4 class=\"subsectionHead\"><span class=\"titlemark\">3.1 <\/span> <a id=\"x1-50003.1\"><\/a>How to Include Figures<\/h4>\r\nFirst you have to upload the image file (JPEG, PNG or PDF) from your\r\ncomputer to writeLaTeX using the upload link the project menu. Then use\r\nthe includegraphics command to include it in your document. Use the\r\nfigure environment and the caption command to add a number and a\r\ncaption to your figure. See the code for Figure <a href=\"#x1-50011\">1<!-- tex4ht:ref: fig:frog --><\/a> in this section for an\r\nexample.\r\n<figure class=\"figure\"><a id=\"x1-50011\"><\/a><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/mariuszpawlowski.pl\/wp-content\/uploads\/2021\/05\/frog.jpg\" alt=\"PIC\" width=\"108\" height=\"108\" \/><figcaption class=\"caption\"><span class=\"id\">Figure\u00a01:<\/span><span class=\"content\">This frog was uploaded to Overleaf via the project menu. The <code><span class=\"cmtt-10x-x-109\">.jpg<\/span><\/code>\r\nfile will be used as-is in the HTML export.<\/span><\/figcaption><!-- tex4ht:label?: x1-50011 --><\/figure>\r\n<figure class=\"figure\"><a id=\"x1-50022\"><\/a><img decoding=\"async\" src=\"overleaf.png\" alt=\"pict\" \/><figcaption class=\"caption\"><span class=\"id\">Figure\u00a02:<\/span><span class=\"content\">PDF images will be converted to PNG when exported to HTML.<\/span><\/figcaption><!-- tex4ht:label?: x1-50022 --><\/figure>\r\n<h4 class=\"subsectionHead\"><span class=\"titlemark\">3.2 <\/span> <a id=\"x1-60003.2\"><\/a>How to Make Tables<\/h4>\r\nUse the table and tabular commands for basic tables \u2014 see Table\u00a0<a href=\"#x1-60011\">1<!-- tex4ht:ref: tab:widgets --><\/a>, for\r\nexample.\r\n<div class=\"table\">\r\n\r\n&nbsp;\r\n<figure class=\"float\">\r\n<div class=\"tabular\">\r\n<table id=\"TBL-2\" class=\"tabular\" rules=\"groups\"><colgroup id=\"TBL-2-1g\"> <col id=\"TBL-2-1\" \/><\/colgroup> <colgroup id=\"TBL-2-2g\"> <col id=\"TBL-2-2\" \/><\/colgroup>\r\n<tbody>\r\n<tr id=\"TBL-2-1-\" style=\"vertical-align: baseline;\">\r\n<td id=\"TBL-2-1-1\" class=\"td11\" style=\"text-align: left; white-space: nowrap;\">Item<\/td>\r\n<td id=\"TBL-2-1-2\" class=\"td11\" style=\"text-align: right; white-space: nowrap;\">Quantity<\/td>\r\n<\/tr>\r\n<tr class=\"hline\">\r\n<td>\r\n\r\n<hr \/>\r\n\r\n<\/td>\r\n<td>\r\n\r\n<hr \/>\r\n\r\n<\/td>\r\n<\/tr>\r\n<tr id=\"TBL-2-2-\" style=\"vertical-align: baseline;\">\r\n<td id=\"TBL-2-2-1\" class=\"td11\" style=\"text-align: left; white-space: nowrap;\">Widgets<\/td>\r\n<td id=\"TBL-2-2-2\" class=\"td11\" style=\"text-align: right; white-space: nowrap;\">42<\/td>\r\n<\/tr>\r\n<tr id=\"TBL-2-3-\" style=\"vertical-align: baseline;\">\r\n<td id=\"TBL-2-3-1\" class=\"td11\" style=\"text-align: left; white-space: nowrap;\">Gadgets<\/td>\r\n<td id=\"TBL-2-3-2\" class=\"td11\" style=\"text-align: right; white-space: nowrap;\">13<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<figcaption class=\"caption\"><span class=\"id\">Table\u00a01:<\/span><span class=\"content\">An example table.<\/span><\/figcaption><!-- tex4ht:label?: x1-60011 --><\/figure>\r\n<\/div>\r\n<h4 class=\"subsectionHead\"><span class=\"titlemark\">3.3 <\/span> <a id=\"x1-70003.3\"><\/a>How to Write Mathematics<\/h4>\r\nL<span class=\"cmr-8\">A<\/span>TE X is great at typesetting mathematics. Let\r\n<!-- l. 94 -->\r\n\r\nX1,X2,\u2026 \u2061\r\n\r\n<!-- FUNCTION APPLICATION -->,Xn\r\n\r\nbe a\r\nsequence of independent and identically distributed random variables with\r\n<!-- l. 94 -->\r\n\r\nE[Xi] = \u03bc\r\n\r\nand\r\n<!-- l. 94 -->\r\n\r\nVar[Xi] = \u03c32 &lt; \u221e\r\n\r\n, and\r\nlet\r\n<!-- tex4ht:inline -->\r\n\r\n<!-- l. 95 -->\r\n\r\nSn = X1 + X2 + \u22ef + Xn\r\n\r\nn = 1\r\nn\u2211\r\ninX\r\ni\r\ndenote their mean. Then as <!-- l. 97 -->\r\n\r\nn\r\n\r\napproaches infinity, the random variables\r\n<!-- l. 97 -->\r\n\r\nn(S\r\n\r\nn \u2212 \u03bc) converge in distribution\r\nto a normal <!-- l. 97 -->\r\n\r\n?(0,\u03c32)\r\n\r\n.\r\n\r\nIn this HTML export example, math is output as MathML, and will be\r\nrendered using MathJax.\r\n<h4 class=\"subsectionHead\"><span class=\"titlemark\">3.4 <\/span> <a id=\"x1-80003.4\"><\/a>How to Make Sections and Subsections<\/h4>\r\nUse section and subsection commands to organize your document. L<span class=\"cmr-8\">A<\/span>TE X handles\r\nall the formatting and numbering automatically. Use ref and label commands for\r\ncross-references.\r\n<h4 class=\"subsectionHead\"><span class=\"titlemark\">3.5 <\/span> <a id=\"x1-90003.5\"><\/a>How to Make Lists<\/h4>\r\nYou can make lists with automatic numbering \u2026\r\n<ol class=\"enumerate1\">\r\n \t<li id=\"x1-9002x1\" class=\"enumerate\">Like this,<\/li>\r\n \t<li id=\"x1-9004x2\" class=\"enumerate\">and like this.<\/li>\r\n<\/ol>\r\n\u2026or bullet points \u2026\r\n<ul class=\"itemize1\">\r\n \t<li class=\"itemize\">Like this,<\/li>\r\n \t<li class=\"itemize\">and like this.<\/li>\r\n<\/ul>\r\n\u2026or with words and descriptions \u2026\r\n<dl class=\"description\">\r\n \t<dt class=\"description\"><span class=\"cmbx-10x-x-109\">Word<\/span><\/dt>\r\n \t<dd class=\"description\">Definition<\/dd>\r\n \t<dt class=\"description\"><span class=\"cmbx-10x-x-109\">Concept<\/span><\/dt>\r\n \t<dd class=\"description\">Explanation<\/dd>\r\n \t<dt class=\"description\"><span class=\"cmbx-10x-x-109\">Idea<\/span><\/dt>\r\n \t<dd class=\"description\">Text<\/dd>\r\n<\/dl>\r\nTesting some citations: [<a href=\"#XNTLKProject2015\">1<\/a>,\u00a0<a href=\"#XBond2014\">2<\/a>]\r\n<h3 class=\"sectionHead\"><span class=\"titlemark\">4 <\/span> <a id=\"x1-100004\"><\/a>Tikz Drawings<\/h3>\r\nTikZ drawings will be output as SVG, which should be rendered by most modern\r\nbrowsers.\r\n<figure class=\"figure\"><a id=\"x1-100013\"><\/a><object data=\"main-1.svg\" type=\"image\/svg+xml\" width=\"314.5752 \" height=\"37.6092 \">SVG-Viewer needed.<\/object><figcaption class=\"caption\"><span class=\"id\">Figure\u00a03:<\/span><span class=\"content\">TikZ drawings will be output as SVG, which should be rendered\r\nby most modern browsers.<\/span><\/figcaption><!-- tex4ht:label?: x1-100013 --><\/figure>\r\n<h3 class=\"likesectionHead\"><a id=\"x1-110004\"><\/a>References<\/h3>\r\n<div class=\"thebibliography\">\r\n<p class=\"bibitem\"><span class=\"biblabel\">\r\n<a id=\"XNTLKProject2015\"><\/a>[1] <span class=\"bibsp\">\u00a0\u00a0\u00a0<\/span><\/span>NTLK Project. Natural Language Toolkit (NLTK) 3.0\r\ndocumentation, 2015.<\/p>\r\n<p class=\"bibitem\"><span class=\"biblabel\">\r\n<a id=\"XBond2014\"><\/a>[2] <span class=\"bibsp\">\u00a0\u00a0\u00a0<\/span><\/span>Francis Bond, Lian\u00a0Tze Lim, Enya\u00a0Kong Tang, and Hammam Riza.\r\nThe Combined Wordnet Bahasa. <span class=\"cmti-10x-x-109\">NUSA: Linguistic studies of languages\r\n<\/span><span class=\"cmti-10x-x-109\">in and around Indonesia<\/span>, 57:83\u2013100, 2014.<\/p>\r\n\r\n<\/div>\r\n<!-- \/wp:post-content -->","protected":false},"excerpt":{"rendered":"<p>Testing HTML Export with make4ht LianTze Lim Abstract Your abstract. \u00c7a va? (Yes accented characters work.) 1 Overview of Steps I tweaked the latexmkrc file so that make4ht is run along with pdflatex, so the HTML export is done only if you set your project to be compiled with pdflatex.(make4ht doesn\u2019t work well with fontspec; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/mariuszpawlowski.pl\/index.php\/wp-json\/wp\/v2\/posts\/5","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mariuszpawlowski.pl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mariuszpawlowski.pl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mariuszpawlowski.pl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mariuszpawlowski.pl\/index.php\/wp-json\/wp\/v2\/comments?post=5"}],"version-history":[{"count":6,"href":"https:\/\/mariuszpawlowski.pl\/index.php\/wp-json\/wp\/v2\/posts\/5\/revisions"}],"predecessor-version":[{"id":13,"href":"https:\/\/mariuszpawlowski.pl\/index.php\/wp-json\/wp\/v2\/posts\/5\/revisions\/13"}],"wp:attachment":[{"href":"https:\/\/mariuszpawlowski.pl\/index.php\/wp-json\/wp\/v2\/media?parent=5"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mariuszpawlowski.pl\/index.php\/wp-json\/wp\/v2\/categories?post=5"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mariuszpawlowski.pl\/index.php\/wp-json\/wp\/v2\/tags?post=5"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}