{"id":4654,"date":"2018-04-03T09:26:15","date_gmt":"2018-04-03T15:26:15","guid":{"rendered":"http:\/\/www.realtimerendering.com\/blog\/?p=4654"},"modified":"2018-04-03T16:41:24","modified_gmt":"2018-04-03T22:41:24","slug":"quick-tool-to-check-your-latex","status":"publish","type":"post","link":"https:\/\/www.realtimerendering.com\/blog\/quick-tool-to-check-your-latex\/","title":{"rendered":"Quick Tool to Check Your LaTeX"},"content":{"rendered":"<p>Executive summary: use the Perl script at <a href=\"https:\/\/github.com\/erich666\/chex_latex\">https:\/\/github.com\/erich666\/chex_latex<\/a><\/p>\n<p>I have been fiddling with this Perl script for a few editions of <em>Real-Time Rendering<\/em>. It&#8217;s handy enough now that I thought I&#8217;d put it up in a repository, since it might help others out. There are other <a href=\"https:\/\/tex.stackexchange.com\/questions\/163\/is-there-a-program-equivalent-to-lint-for-latex\">LaTeX linters<\/a> out there, but I&#8217;ve found them fussy to set up and use (&#8220;just download the babbleTeX distribution, use the GNU C compiler to make the files, be sure to use tippyShell for the command line, and define three paths&#8230;&#8221;). Frankly, I&#8217;ve never been able to get any of them to work &#8211; maybe I just haven&#8217;t found the right one, and please do point me at any (and make sure the links are not dead).<\/p>\n<p>Anyway, this script runs over 300 tests on your .tex files, returning warnings. I&#8217;ve tried to keep it simple and not over-spew (if you would like\u00a0<em>more<\/em> spew, use the &#8220;-ps&#8221; command line options to look for additional stylistic glitches). I haven&#8217;t tried to put in every rule under the sun. Most of the tests exist because we ran into the problem in the book. The script is also graphics-friendly, in that common misspellings such as &#8220;tesselate&#8221; are flagged.\u00a0It finds awkward phrases and weak writing. For example, you&#8217;ll rarely find the word &#8220;very&#8221; in the new edition of our book, as I took <a href=\"https:\/\/lifehacker.com\/replace-very-with-damn-to-improve-your-writing-1708460103\">Mark Twain&#8217;s advice<\/a> to heart:\u00a0&#8220;Substitute &#8216;damn&#8217; every time you\u2019re inclined to write &#8216;very.&#8217; Your editor will delete it and the writing will be just as it should be.&#8221; So the word &#8220;very&#8221; gets flagged. You could also\u00a0<a href=\"https:\/\/www.grammarcheck.net\/very\/\">find a substitute<\/a>\u00a0(and that website is also in the comments in the Perl script itself, along with other explanations of the sometimes-terse warnings).<\/p>\n<p>Maybe you love to use &#8220;very&#8221; &#8211; that&#8217;s fine, just comment out or delete that rule in the Perl script, it&#8217;s trivial to do so. Or put &#8220;% chex_latex&#8221; as a comment at the end of the line using it, so the warning is no longer flagged. The script is just a text file, nothing to compile. Maybe you delete everything in the script but the one line that finds doubled words such as &#8220;the the&#8221; or &#8220;in in&#8221; or similar. In testing the script on five student theses kindly provided by John Owens, I was surprised by how many doubled words were found, along with a bunch of other true errors.<\/p>\n<p>Oh, and even if you do not use this tool at all, consider at least tossing your titles through <a href=\"https:\/\/capitalizemytitle.com\/\">this website&#8217;s tester<\/a>. It checks that all the words in a title are properly capitalized or lowercase.<\/p>\n<p>A few minutes of additional work with various tools will make your presentation look more professional (and so, more trustworthy), so &#8220;just do it&#8221;. And, do you see the error in that previous sentence (hint: I wrote it in the U.S.)?<\/p>\n<p><strong>Update:\u00a0<\/strong>I also added a little Perl script for &#8220;batch spell checking,&#8221; which for large documents is much more efficient (for me) than most interactive spell checkers. See the bottom of <a href=\"https:\/\/github.com\/erich666\/chex_latex\">the repo page<\/a> for details.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Executive summary: use the Perl script at https:\/\/github.com\/erich666\/chex_latex I have been fiddling with this Perl script for a few editions of Real-Time Rendering. It&#8217;s handy enough now that I thought I&#8217;d put it up in a repository, since it might help others out. There are other LaTeX linters out there, but I&#8217;ve found them fussy [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[462,640],"class_list":["post-4654","post","type-post","status-publish","format-standard","hentry","category-resources","tag-latex","tag-lint"],"_links":{"self":[{"href":"https:\/\/www.realtimerendering.com\/blog\/wp-json\/wp\/v2\/posts\/4654","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.realtimerendering.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.realtimerendering.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.realtimerendering.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.realtimerendering.com\/blog\/wp-json\/wp\/v2\/comments?post=4654"}],"version-history":[{"count":5,"href":"https:\/\/www.realtimerendering.com\/blog\/wp-json\/wp\/v2\/posts\/4654\/revisions"}],"predecessor-version":[{"id":4661,"href":"https:\/\/www.realtimerendering.com\/blog\/wp-json\/wp\/v2\/posts\/4654\/revisions\/4661"}],"wp:attachment":[{"href":"https:\/\/www.realtimerendering.com\/blog\/wp-json\/wp\/v2\/media?parent=4654"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.realtimerendering.com\/blog\/wp-json\/wp\/v2\/categories?post=4654"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.realtimerendering.com\/blog\/wp-json\/wp\/v2\/tags?post=4654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}