You are currently browsing articles tagged latex.

Executive summary: use the Perl script at

I have been fiddling with this Perl script for a few editions of Real-Time Rendering. It’s handy enough now that I thought I’d put it up in a repository, since it might help others out. There are other LaTeX linters out there, but I’ve found them fussy to set up and use (“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…”). Frankly, I’ve never been able to get any of them to work – maybe I just haven’t found the right one, and please do point me at any (and make sure the links are not dead).

Anyway, this script runs over 300 tests on your .tex files, returning warnings. I’ve tried to keep it simple and not over-spew (if you would like more spew, use the “-ps” command line options to look for additional stylistic glitches). I haven’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 “tesselate” are flagged. It finds awkward phrases and weak writing. For example, you’ll rarely find the word “very” in the new edition of our book, as I took Mark Twain’s advice to heart: “Substitute ‘damn’ every time you’re inclined to write ‘very.’ Your editor will delete it and the writing will be just as it should be.” So the word “very” gets flagged. You could also find a substitute (and that website is also in the comments in the Perl script itself, along with other explanations of the sometimes-terse warnings).

Maybe you love to use “very” – that’s fine, just comment out or delete that rule in the Perl script, it’s trivial to do so. Or put “% chex_latex” 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 “the the” or “in in” 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.

Oh, and even if you do not use this tool at all, consider at least tossing your titles through this website’s tester. It checks that all the words in a title are properly capitalized or lowercase.

A few minutes of additional work with various tools will make your presentation look more professional (and so, more trustworthy), so “just do it”. And, do you see the error in that previous sentence (hint: I wrote it in the U.S.)?

Update: I also added a little Perl script for “batch spell checking,” which for large documents is much more efficient (for me) than most interactive spell checkers. See the bottom of the repo page for details.

Tags: ,

I just learned of a new book coming out: “Real-Time Shadows“, by an excellent group of researchers (a little more info here). I assume this book will be based on the authors’ 148-page “Casting Shadows in Real Time” course notes and related publications. This subject deserves its own book. There are enough interesting principles and so many variants and subtleties that I’m happy to hear this topic will get thorough coverage. Our book page is updated.

Looking around at other book-related resources, I noticed some interesting bits. John Vince’s “Geometry for Computer Graphics: Formulae, Examples and Proofs“, from 2005, has been reissued in a softcover edition. It’s pricey, as Springer books can be, and weighs in at just 364 pages, but it’s an information-packed volume. It’s a kind of book you rarely see now, one with a dense collection of formulae, like CRC Press used to specialize in. Google Books sample here. Some of it’s pretty tangential to computer graphics – normally I don’t need proofs about things like the opposite angles of a parallelogram being equal – but it’s fun to page through: “Someday I’d love to find a use for that coiled ring equation”. Whether you’ll ever need 1/100th of the information in this book depends on you. It seems like a good fit for demoscene programmers who want procedural functions and model generation, for example. Anyway, something to see if your university library has, just to page through and know it exists.

Speaking of geometric resources, I was sad to see the site appears to be defunct. What’s key to remember in such cases is that there’s the Wayback Machine. Just put in a dead URL and more times than not this site will have a copy. So the Geometry Algorithms site lives on here! Luckily, math doesn’t really rot, so the articles are still worthwhile. The bad news is that a few of the figures are missing.

For technical book authors, I ran across this interesting little tool: Detexify2. Draw the symbol you need, it will show you likely matches and what LaTeX you need. I’ve found it’s pretty accurate, though seemed to have problems with “not equals” half the time I drew that symbol as a test. Anyway, it’s probably no more efficient than just looking it up here or here, but is more fun.

Last resource for the (mothers’) day: so you want to explain the basics of computer graphics to your mom. Frédo Durand’s six page introduction is not a bad place to start. At the least, you can use the figures at the end to explain ideas.

Tags: , , , , ,