<br />
<b>Warning</b>:  Undefined array key "HTTP_REFERER" in <b>/home/sixthfor/public_html/steve/wordpress/wp-content/plugins/search-hilite.php</b> on line <b>88</b><br />
<br />
<b>Warning</b>:  Undefined array key "HTTP_REFERER" in <b>/home/sixthfor/public_html/steve/wordpress/wp-content/plugins/search-hilite.php</b> on line <b>88</b><br />
<br />
<b>Warning</b>:  Undefined array key "HTTP_REFERER" in <b>/home/sixthfor/public_html/steve/wordpress/wp-content/plugins/search-hilite.php</b> on line <b>88</b><br />
{"id":13,"date":"2004-08-09T18:02:05","date_gmt":"2004-08-09T17:02:05","guid":{"rendered":"http:\/\/sixthform.info\/steve\/wordpress\/?p=13"},"modified":"2008-03-13T10:00:25","modified_gmt":"2008-03-13T10:00:25","slug":"latexrender-as-a-plugin","status":"publish","type":"post","link":"https:\/\/sixthform.info\/steve\/wordpress\/?p=13","title":{"rendered":"LatexRender as a plugin"},"content":{"rendered":"<p>I have now managed to make LatexRender as a plugin (download files <a href=\"http:\/\/sixthform.info\/steve\/wordpress\/wp-content\/uploads\/wp-latexrender.zip\" >here<\/a>) which means that it won&#8217;t be necessary to edit WordPress files. Before you get too excited this assumes<\/p>\n<ol>\n<li>You are using at least WordPress 1.2\t(which uses plugins)<\/li>\n<li>You have the latest files which don&#8217;t eat backslashes (detailed on <a href=\"http:\/\/sixthform.info\/steve\/wordpress\/index.php?p=13&#038;page=2\" >page 2<\/a>)<\/li>\n<\/ol>\n<p>If not, you can still use the method in <a href=\"http:\/\/sixthform.info\/steve\/wordpress\/index.php?p=8\" >5<sup>th<\/sup> August&#8217;s post<\/a>. Also you will need to put some information about where to find files in the latexrender files.<\/p>\n<p>1. You need to have <a href=\"javascript:void(0)\"><img src='\/steve\/wordpress\/latexrender\/pictures\/ebb782749790e72b71fcc022d944016a.gif' title='\\LaTeX ' alt='\\LaTeX ' border=0 align=absmiddle onclick=\"newWindow=window.open('\/steve\/wordpress\/latexrender\/latexcode.php?code=%5CLaTeX+','latexCode','toolbar=no,location=no,scrollbars=yes,resizable=yes,status=yes,width=375,height=100,left=200,top=100');\"><\/a>and ImageMagick installed on your server. If this is not possible, then try mimeTeX (see <a href=\"http:\/\/sixthform.info\/steve\/wordpress\/index.php?p=13&#038;page=2\" >page 2<\/a>)<\/p>\n<p>2. <strong>latexrender-plugin.php<\/strong><br \/>\nEnsure that<br \/>\n<code>include_once('\/home\/path_to\/wordpress\/latexrender\/latex.php');<\/code><br \/>\ncontains the correct path to where you have put latex.php<\/p>\n<p>3. <strong>latex.php<\/strong><br \/>\nEnsure that<br \/>\n<code>$latexrender_path = \"\/home\/domain_name\/public_html\/path_to\/latexrender\";<\/code><br \/>\nand<br \/>\n<code>$latexrender_path_http = \"\/path_to\/latexrender\"; <\/code><br \/>\ncontain the correct path to where your latexrender files are to go<\/p>\n<p>4. <strong>class.latexrender.php<\/strong><br \/>\nEnsure that<br \/>\n<code>var $_latex_path = \"\/usr\/bin\/latex\";<br \/>\nvar $_dvips_path = \"\/usr\/bin\/dvips\";<br \/>\nvar $_convert_path = \"\/usr\/bin\/convert\";<br \/>\nvar $_identify_path = \"\/usr\/bin\/identify\";<\/code><br \/>\npoint to the right places.<\/p>\n<p>For Windows the paths in <strong>class.latexrender.php<\/strong> must use \\ or \/ not just a single \\<br \/>\nFor example<br \/>\n<code>var $_latex_path = \"C:\\texmf\\miktex\\bin\\latex.exe\";<\/code><br \/>\nor<br \/>\n<code>var $_latex_path = \"C:\/texmf\/miktex\/bin\/latex.exe\";<\/code><\/p>\n<p>5. Create a new latexrender folder in your WordPress folder, with sub folders tmp and pictures. These 2 folders <code>must<\/code> be chmod to 777.  Upload <strong>latex.php<\/strong> and <strong>class.latexrender.php<\/strong> to the latexrender folder<\/p>\n<p>6. If you are happy to let commenters use LaTeX (but beware spammers) then in <strong>latexrender-plugin.php<\/strong> remove \/\/ from the line:<br \/>\n\/\/ add_filter(&#8216;comment_text&#8217;, &#8216;addlatex&#8217;);<\/p>\n<p>7. Upload latexrender-plugin.php to WordPress&#8217;s plug-in folder (\/wp-content\/plugins) and activate it in the Plugins menu<\/p>\n<p><a href=\"javascript:void(0)\"><img src='\/steve\/wordpress\/latexrender\/pictures\/c51d7e23458ca0e7373a8ed6ab56b2b9.gif' title='\\LaTeX' alt='\\LaTeX' border=0 align=absmiddle onclick=\"newWindow=window.open('\/steve\/wordpress\/latexrender\/latexcode.php?code=%5CLaTeX','latexCode','toolbar=no,location=no,scrollbars=yes,resizable=yes,status=yes,width=375,height=100,left=200,top=100');\"><\/a> should now be enabled! Use [tex ] and [\/tex ] (without the space) to surround your maths. There&#8217;s a tex button to do this for you.<\/p>\n<p><!--nextpage--><br \/>\nUp till this weekend WordPress ate backslashes (ie made them disappear) so <a href=\"javascript:void(0)\"><img src='\/steve\/wordpress\/latexrender\/pictures\/c51d7e23458ca0e7373a8ed6ab56b2b9.gif' title='\\LaTeX' alt='\\LaTeX' border=0 align=absmiddle onclick=\"newWindow=window.open('\/steve\/wordpress\/latexrender\/latexcode.php?code=%5CLaTeX','latexCode','toolbar=no,location=no,scrollbars=yes,resizable=yes,status=yes,width=375,height=100,left=200,top=100');\"><\/a> commands don&#8217;t work. This bug has been resolved but if you don&#8217;t wish to upgrade your files, you can make the changes yourself:<br \/>\n8. <strong>wp-includes\/functions-formatting.php<\/strong><br \/>\nLine 226<br \/>\nAfter<br \/>\n<code>function format_to_edit($content) {<\/code><br \/>\nRemove the line that says:<br \/>\n<code>$content = stripslashes($content);<\/code><\/p>\n<p>(ii) <strong>wp_includes\/functions.php<\/strong><br \/>\nLine 1081<br \/>\nChange<br \/>\n<code>$content = stripslashes($post->post_content);<\/code><br \/>\nto<br \/>\n<code>$content = $post->post_content;<\/code><br \/>\nLine 1089<br \/>\nChange<br \/>\n<code>$pages[0] = stripslashes($post->post_content);<\/code><br \/>\nto<br \/>\n<code>$pages[0] = $post->post_content;<\/code><\/p>\n<p>9. No access to <a href=\"javascript:void(0)\"><img src='\/steve\/wordpress\/latexrender\/pictures\/c51d7e23458ca0e7373a8ed6ab56b2b9.gif' title='\\LaTeX' alt='\\LaTeX' border=0 align=absmiddle onclick=\"newWindow=window.open('\/steve\/wordpress\/latexrender\/latexcode.php?code=%5CLaTeX','latexCode','toolbar=no,location=no,scrollbars=yes,resizable=yes,status=yes,width=375,height=100,left=200,top=100');\"><\/a>? Then get <a href=\"http:\/\/www.forkosh.com\/mimetex.html\"  target=\"_blank\">mimeTeX<\/a> and download <a href=\"http:\/\/sixthform.info\/steve\/wordpress\/uploads\/wp-latexrender.zip\" >wp-latexrender.zip<\/a> which contains mimetex.php and mimetex_plugin.php.<br \/>\nYou need a latexrender folder inside WordPress and a subfolder called pictures which <strong>must<\/strong> be chmod to 777.<br \/>\nIn <strong>mimetex.php <\/strong>you need to put in your paths for<br \/>\n<code>$mimetex_path = \"\/home\/domain_name\/public_html\/cgi-bin\/mimetex.cgi\";<br \/>\n$mimetex_path_http = \"http:\/\/domain_name\/mimetex\";<br \/>\n$mimetex_cgi_path_http=\"http:\/\/domain_name\/cgi-bin\/mimetex.cgi\";<br \/>\n$pictures_path = \"\/home\/domain_name\/public_html\/mimetex\/pictures\";<\/code><\/p>\n<p>Then upload mimetex.php to the latexrender folder. Upload mimetex_plugin.php to the plugins folder and activate it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have now managed to make LatexRender as a plugin (download files here) which means that it won&#8217;t be necessary to edit WordPress files. Before you get too excited this assumes You are using at least WordPress 1.2 (which uses plugins) You have the latest files which don&#8217;t eat backslashes (detailed on page 2) If [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-13","post","type-post","status-publish","format-standard","hentry","category-latexrender"],"_links":{"self":[{"href":"https:\/\/sixthform.info\/steve\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/13","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sixthform.info\/steve\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sixthform.info\/steve\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sixthform.info\/steve\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sixthform.info\/steve\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13"}],"version-history":[{"count":0,"href":"https:\/\/sixthform.info\/steve\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/13\/revisions"}],"wp:attachment":[{"href":"https:\/\/sixthform.info\/steve\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sixthform.info\/steve\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sixthform.info\/steve\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}