{"id":543,"date":"2014-03-06T15:21:16","date_gmt":"2014-03-06T20:21:16","guid":{"rendered":"https:\/\/jasoncantarella.com\/wordpress\/?p=543"},"modified":"2014-06-04T14:15:17","modified_gmt":"2014-06-04T18:15:17","slug":"anki-2-022latexmavericks-problems-and-solutions","status":"publish","type":"post","link":"https:\/\/jasoncantarella.com\/wordpress\/anki-2-022latexmavericks-problems-and-solutions\/","title":{"rendered":"Anki 2.022\/Latex\/Mavericks Problems and Solutions"},"content":{"rendered":"<p>For the last few days, I&#8217;ve been working through an unexpected problem with lovely, dependable <a href=\"http:\/\/www.ankisrs.net\">Anki<\/a>, which is a flashcard program that I use to memorize everything from my students&#8217; names (it&#8217;s genius for this) to tricky integral and derivative formulas.<\/p>\n<p>It turns out that all previous versions of Anki (so far as I can tell) worked with whatever TeX distribution you install on your Mac, as long as<\/p>\n<ol>\n<li>You had dvipng.<\/li>\n<li>latex and dvipng were on your default path.<\/li>\n<\/ol>\n<p>This is\u00a0<em>not<\/em> true with Anki 2.022 (presumably it will continue to fail for higher versions of Anki), which won&#8217;t find latex at all unless you&#8217;ve installed MacTeX (which installs in \/usr\/texbin) or BasicTeX (which I guess installs either in the same place, or someplace else that Anki can find it).<\/p>\n<p>If, like me, you have a TeXLive distribution, you&#8217;re in trouble until you discover the &#8220;Edit_LaTeX_and_dvipng_calls&#8221; add-on for Anki (tip of the hat to one Soren Bjornstad for this one&#8211; you, sir, have saved my bacon royally with this one). The trick is to open the add-on, which gives you a piece of Python code containing the line<\/p>\n<p>newLatex = [&#8220;latex&#8221;, &#8220;-interaction=nonstopmode&#8221;]<\/p>\n<p>which you need to edit to\u00a0<strong>insert the complete path to latex, as in<\/strong><\/p>\n<p><!--StartFragment-->newLatex = [&#8220;\/usr\/local\/texlive\/2013\/bin\/x86_64-darwin\/latex&#8221;, &#8220;-interaction=nonstopmode&#8221;]<\/p>\n<p>If you don&#8217;t know the path, you can get it by opening terminal and typing &#8220;which latex&#8221;. This should show you the entire path on your machine.\u00a0<!--EndFragment--><\/p>\n<p>Repeat the process with the line<\/p>\n<p><!--StartFragment-->newDviPng = [&#8220;dvipng&#8221;, &#8220;-D&#8221;, &#8220;200&#8221;, &#8220;-T&#8221;, &#8220;tight&#8221;]<\/p>\n<p>which, again, needs\u00a0<strong>the entire path to dvipng<\/strong>, as in<\/p>\n<p>newDviPng = [&#8220;\/usr\/local\/texlive\/2013\/bin\/x86_64-darwin\/dvipng&#8221;, &#8220;-D&#8221;, &#8220;200&#8221;, &#8220;-T&#8221;, &#8220;tight&#8221;]<\/p>\n<p>As before, you can get the path (if you don&#8217;t know it) by typing &#8220;which dvipng&#8221; in terminal.<\/p>\n<p>It&#8217;s likely that if you have TeXShop (or TeXWorks) or something similar, then you have either TeTeX or TeXLive as the underlying TeX distribution, and you&#8217;ll have to do this. Or, I guess, install MacTeX on top of your existing distribution.<\/p>\n<p>Happy memorizing! And many thanks to Damien Elmes of Anki, who helped me work through all this.<br \/>\n<!--EndFragment--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For the last few days, I&#8217;ve been working through an unexpected problem with lovely, dependable Anki, which is a flashcard program that I use to memorize everything from my students&#8217; names (it&#8217;s genius for this) to tricky integral and derivative formulas. It turns out that all previous versions of Anki (so far as I can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-543","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/jasoncantarella.com\/wordpress\/wp-json\/wp\/v2\/posts\/543","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jasoncantarella.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jasoncantarella.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jasoncantarella.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jasoncantarella.com\/wordpress\/wp-json\/wp\/v2\/comments?post=543"}],"version-history":[{"count":2,"href":"https:\/\/jasoncantarella.com\/wordpress\/wp-json\/wp\/v2\/posts\/543\/revisions"}],"predecessor-version":[{"id":545,"href":"https:\/\/jasoncantarella.com\/wordpress\/wp-json\/wp\/v2\/posts\/543\/revisions\/545"}],"wp:attachment":[{"href":"https:\/\/jasoncantarella.com\/wordpress\/wp-json\/wp\/v2\/media?parent=543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jasoncantarella.com\/wordpress\/wp-json\/wp\/v2\/categories?post=543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jasoncantarella.com\/wordpress\/wp-json\/wp\/v2\/tags?post=543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}