Resources

You are currently browsing the archive for the Resources category.

So you know, Andrew Glassner rewrote sections 2.6 and 2.7 of “An Introduction to Ray Tracing” last week and inserted it into the free PDF of the book. Info here. It’s the longest duration I know for an erratum – the book was first published in 1989, the error was reported this year.

First, Ray Tracing Gems is now available on Kindle for free; it’s also free through the UK and Germany Amazon sites. Great stuff, and I’ve asked about whether it could also be made available on Google Play in some form.

When Real-Time Rendering, 4th Edition came out I decided to plunk down the cash to get the Kindle and Google Play versions, just to see how they came out. Not bad: the resolution is not as high as I’d like for a few images, but overall the results are good. It’s understandable why the image quality was not up to the 300+ DPI of some of the original material, as the book’s file would be massively larger.

What’s of interest is how much more often I’ll use the Google Play version than the Kindle. I’ll even use it more than my own private PDF of the book. This is because it’s one click away: I have the URL bookmarked for the Google Play version, so it’s up immediately, no messing about looking for the file, loading an app, or any other nonsense.

For example, today I just tried Amazon’s cloud reader for Kindle, but I run into “License limit reached,” that I have exceeded the number of devices authorized blah blah blah. My favorite line of the warning is “You may also purchase another copy from the Kindle Store” – great, thanks. There’s none of this annoyance with Google Play; I can immediately read the book since it’s tied to my Google Account. I hope Amazon someday figures out a way to determine that I’m me (judging from the targeted ads I see on Amazon, they already have, but they haven’t extended the courtesy to Kindle access).

BTW, anyone trying to reproduce antialiasing or noise images in a book or printed article, be careful: you’ll probably want to zoom in on parts of your image, and want to make the zoomed image literally zoomed up using “nearest neighbor” filtering or similar. That is, say you select a 200×200 piece of an image to magnify, to show noise. I’d resize this to 600×600 and just replicate the pixels, “select and repeat” (often called “nearest neighbor” or “hold” or “pixel replication”). The printing process will naturally try to smooth images out the other direction, so you usually need to counteract this. If you have any sure-fire tips on doing this better than I’ve described here, I (and others) are all ears.

OK, even I’m getting a bit tired of writing about Ray Tracing Gems (not to mention Real-Time Rendering) goings ons. But, a few things:

  • The code repo for Ray Tracing Gems is now up! Some more code will be added and updated later, after the GDC/GTC rush.
  • At GDC Naty Hoffman, Angelo Pesce, and I will sign copies of Real-Time Rendering on Wednesday, 3-4 PM, at the CRC booth, P1867, located near the Connect Lounge. If you’re around (and even if you already have a copy or never want one because GPUs are a fad), come by and say “hi.”
  • Authors of Ray Tracing Gems will sign the book right after, 4-5 PM, in the alcove west of Room 201 South Hall (two floors up). It looks like at least 17 authors will be at GDC, but all may not be able to attend. I’ll be giving a rap-free fast-forward talk after, in Room 205. Map below.
  • GTC: book talk Thursday 2-3 PM room 230B (Concourse Level), book signing after at the GTC bookseller 3-4 PM.
  • The only physical copies of Ray Tracing Gems available until May will be sold at GDC and GTC, nowhere else. So buy them all and resell on EBay. No, don’t do that.

Really, all this info except the Real-Time Rendering signing is covered on http://raytracinggems.com

Book signing (in yellow) map for GDC, right next to the restrooms – classy 🙂

 

I haven’t done one of these for awhile – too busy with The Book (not That Book; the Other Book). Here’s a collection of stuff I’ve noticed the past few weeks.

  • GDC: hey, there’s a Shadertoy meetup. Me, I’ve been to GDC only once before, back in 2001, and look forward to going this year. Help me out: What should I know about and not miss?
  • If you’re in the Boston or London area in March (the 31st and 16th, respectively), go to BAHFest. I went last year for the first time, and it was pretty great. Here’s a winner from last year, how cats are behind crypto-currency fever.
  • Youtube recommended I watch this video, and they were right! Path tracing explained fairly well, in a wonderful hokey 50’s style. Andrew Glassner pointed out there’s another in a similar style, on snow simulation.
  • Clickbaity title, but I liked this article for its rundown of color blindness and a possible cure.
  • Also in Wired: Lena/Lenna is an iconic image, a symbol of objectification, and a point of pride to Lena herself. The world’s a fascinating place, which is one of the reasons I live here instead of on Mars.
  • Just so there’s some actual chewy technical content in this post, see this article on mesh simplification. It has a generally-applicable idea: you often don’t need an exact sort, just a rough one, e.g., for depths or sizes of objects. For that, a single-pass radix sort might be just the thing. BTW, there are a surprising number of odd videos on sorting: Radix sort (and different group, different song); bubble sort – I’m a sucker for Balkan music; and this 15-sorts one – no dancing, and sounds like a set of 8-bit game sounds run amok, but still interesting if you know the algorithms. I hadn’t heard of the cocktail shaker sort, and sadly the bogo sort is not played to completion…
  • Improved Kill/death ratio as a selling point. Admirably, they attempt to control for skill level, based on number of hours played as a proxy. Surprising conclusion: “the higher the skill level, the more that players are attuned to the game and can benefit from differences in hardware.” Also, 144+ FPS seems to be the current frame rate to aim for. Yes, I work for NVIDIA now, but I found it interesting and believable. If you’re in sales, you’d like the opposite to be true, “just buy new hardware and you casual players – the vast majority – will benefit the most.” (Thanks to Pete Shirley for pointing this one out.)

Repeat that title three times, then “and I feel fine.” This R.E.M. song has been going through my mind much of the week, as the Ray Tracing Gems book was released last Saturday as a free PDF. With Open Access, the publisher agreed to put the book up for free, even before the physical book was available. Apress has 27 other Open Access titles free to download, so they’re somewhat used to the idea.

The bragging number is that the official Ray Tracing Gems PDF has been downloaded 102K times as of today. I suspect there are a lot of pack rats out there who will download any book that’s free, or someone’s trying to make Tomas and me feel good by setting up an auto-download bot farm (if so, thanks, good job!).

But wait, there’s more. Stephen Hill spotted some typos in the preview copy and sent them on to me Saturday. Monday I made an unofficial PDF for distribution, identical to the official PDF but with his and other errata fixed. Doing so is fine under the license, which allows reasonable changes that are properly noted. The publisher and I worked on the wording on the front page to clearly label this version as unofficial, then I released it on Tuesday. It’s of course the one I recommend grabbing. Being more “hidden,” this one’s been downloaded a more believable 499 times as of last night.

“Supplies are limited” is my favorite ridiculous marketing phrase, always true since there’s a large but finite amount of material in the universe. For GDC and GTC, it’s actually true. The publisher is rush printing and shipping a few hundred copies for these conferences, and they should arrive at onsite booksellers and to NVIDIA next week, fingers crossed, knock wood, rub lucky rabbit’s foot. The hardcover book will not be available for online purchase until mid to late May, though on slightly-higher quality paper (coated glossy vs. coated matte; I believe “coated matte” is what the GPU Gems series used).

Me, I like having both the physical and the electronic forms: electronic is great for searching and for travel, physical is nicer to read (at least for me), use stickies on, add notes in the margins, and for getting signed. Speaking of which, see our page for authors’ signings and talks at the conferences.

So, this is all an odd sequence: NVIDIA released free preprints of the book during February, as did EA; the publisher released the PDF for free in March; I (or anyone) can then make a slightly improved version for distribution; the physical book will be available at conferences in 10 days but not for online purchase until May. Releasing preprints of a whole book, fixing errors in the released version – this is not something we’re used to. Personally, I know I’ve had any number of emails along the way where we each reassure the other, “no, it’s OK, this is how it works under Open Access.”

I love free. The first two of the seven parts that make up Ray Tracing Gems are now available in preprint form from NVIDIA’s Developer Zone. Each of the remaining parts will be released every three or four days through February.

The links: the PDF download page (login needed), NVIDIA’s first post about it, their second post, and the Table of Contents

We just finished the first major round of going through the proofs. Lots of little (and a few big) fixes, and there’s another round soon, then the book gets published. But, the goal all along has been to get the finished and corrected articles out to developers sooner rather than later, so NVIDIA’s releasing preprints this month. You do need to sign on to the Developer Zone to download them, but that’s a minute to sign up for a free account, and anyone can do so.

Since NVIDIA paid for the book to be open access, it’s entirely fine to redistribute these PDFs – it’s a brave new world in publishing, I tell ya. The first page of each PDF explains the license, also noted in my previous post.

BTW, there will be an authors & editors book signing at GDC (probably Wednesday 6 PM, maybe earlier) and GTC (almost assuredly Thursday 3 PM), assuming the hardcover book publishing process goes properly and on time. By me adding the phrase “assuming the hardcover book…” I’m hoping to nullify any jinx that occurred by me mentioning these signings – we’re on a tight publication schedule, to put it mildly. I’ll also be giving a “Fast Forward” talk, e.g., on the book’s contents, the hour just before each of these two signings. I promise there will be no rap (Ken Perlin did great in 2002, can’t top that, though all too many have tried), but I may use haikus, such as for Chapter 7:

With a trembling arm
shoot an arrow at a coin –
so are ray and sphere.

That makes you want to read that article I coauthored, right? Right?!

Thousands of person-hours went into this book and there’s lots of great content, so, enjoy! Oh, and spread the word with their tweet or mine.

Short version: the first book on ray tracing, An Introduction to Ray Tracing, from 1989, is now free to download. You can get the PDF or DJVU version. Note that the PDF has been updated with one erratum fix (so far), and currently is at version 1.1.

Longer version: with Pete Shirley releasing for free his three introductory mini-books on ray tracing this summer, then Matt Pharr releasing the book Physically Based Rendering for free, I asked Andrew Glassner if he could get the rights to release the classic An Introduction to Ray Tracing. He was game, clearing it with the authors, tracing down the right person at Elsevier to ask, going through the paperwork, and – freed! He just wrote me:

I’ve just now received the countersigned rights release for An Introduction to Ray Tracing. I guess the contract was in my name, because I now own the rights! I hereby grant you permission to publicly share the aforementioned book, or the manuscript thereof, or an electronified version of the manuscript thereof, electrically encoded and presented using one or more typefaces of human design, upon a website for the general reading pleasure of the general reading public. Go for it!

So going for it I am. Enjoy! Yes, it’s ancient. But, surprisingly, it’s still a fine introduction in a bunch of ways – math doesn’t rot, and many of the bits from back then are still used today – stochastic sampling, bounding volumes, adaptive supersampling, etc. (Matt Pharr agrees). Andrew’s page about the book (and some history about the cover) is here.

Me, I expect this will cut into my yearly royalties – I earned $6.22 last year on the book – but, ah, the giant sacrifices I make for The Greater Good, and so humble, too. If you consider free books a travesty, you can always buy a copy off this insane page on Amazon – a steal (on someone’s part) at $588.23. The normal Amazon book page is not so bonkers.

Update: Andrew was asked what sort of license the book is under. We discussed it and he chose the Attribution 4.0 International (CC BY 4.0) license, the most liberal of the CC licenses. To quote the main bits:

You are free to:

Under the following terms:

  • Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use
  • No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.

Do see the whole license page for further details.

If by some miracle you use the first printing of the book, I’ve made an errata page. All these errors are fixed in the PDF and DJVU versions, except as noted.

If you have an NVIDIA RTX GPU, go get this demo of Quake 2 path tracing by Christian Shied and many others. It’s free, and easy to install, as the directions actually work: install the Quake II Starter, download and unzip their Windows executable, copy the .pak files from the Starter to q2vkpt\baseq2, (install the Visual Studio 2017 redistributable if you don’t have it), and run. It’s single player and multiplayer.

It’s Quake 2 in all its crazy-fast running and gunning glory, with shots and explosions that light up the walls, reflective water, and other bits of eye candy. To quote their page:

This client implements fully dynamic illumination without precomputation supporting area light sources, reflections, soft shadows, and indirect illumination. This client is a port of our real-time path tracer vkpt and is based on the Quake II engine Q2PRO.

This effort comes about a decade after Daniel Pohl’s Quake Wars ray tracing conversion, but now works on a normal machine. The ray traced version isn’t particularly more playable than the original, e.g., the lighting for the button to open the cage for your first new gun makes it invisible, but it’s pretty great to see fun little effects. I think all of these effects could be done with rasterization tricks – we are talking about a 21-year-old game here, so the content’s not much to work with – but I suspect it was much easier to add them all with ray tracing than specialized hacks, and with fewer artifacts. That said, they really are path tracing and denoising each frame, which is impressive. See their site for more information and screenshots and Githubbed code.

Anyway, two screen shots I made today, running through the original and the ray traced, with approximate original vs. RTRT shots – something they don’t have on their site. They have nice example videos, which are more fun. I kept trying to take a screen shot of the blaster in use, as its bullets light up the nearby environment, but couldn’t hit the screen capture button quickly enough.

 

 

My last post was all the free and easy ways to improve your written work. These get you only so far. Going from “free” to “a penny or more” in today’s friction-free Internet economy is a hard sell, but you should consider it. Would you pay $40 to have your submitted or completed article be more professional and readable? If you’re a researcher, I’d hope you’d answer “of course.” The trick is knowing how to do so.

My answer: hire a technical-oriented copy editor. Specifically, hire Charlotte Byrnes – contact email’s below. She did all the copy editing and typesetting for Real-Time Rendering, 4th edition, and all the copy editing for Ray Tracing Gems. Me, I’m not planning on writing another book for a decade or so – that’s about how long it takes for me to forget all the pain from these two previous times. Charlotte’s not part of that pain – just the opposite. I asked Ms. Byrnes if, with our book done, she was accepting article-editing work. She said she’s currently available, though may have to turn down work if the demand becomes unmanageable. Now that we’re not selfishly monopolizing her time, I asked if I could pass her name along – she agreed, and so, this post.

Of the four editions of Real-Time Rendering, she’s done by far the most clean-up work on our text. I recall a previous edition where the copy editing was nothing but thousands of commas getting added, page after page of little blue “add comma” marks, which (to meet the deadline) I had to type in. Ugh, and I knew there were sentences that could have been polished and improved, but simply weren’t. Charlotte improves sentences, makes equations look better, notes problems with notation, cleans up bibliography references, on and on. With Charlotte, we send her the .tex file, figures, and whatever else is needed to compile the article. She edits the .tex and .bib files, making corrections and adding a few notes about elements she wants the authors to check.

In fact, here’s a simple example, a diff showing her edits to the four-page chapter “What is a Ray?” from Ray Tracing Gems. There are not a huge number of changes, but she caught some grammatical errors, commented on figure notation problems (search on “CE QUERY”), and rewrote a phrase that frankly made no sense, “the surface $\pt{P}$ lies on may intersect” – a problem we four authors didn’t notice ourselves. Great stuff, and so worth it.

My advice: if you’re using .tex, don’t use “\import”, just send her one .tex file with all the text – it’s much easier on both her and you, as you can then do a “diff” with your one original file and see what’s changed. I also recommend putting hard line breaks at 80 characters (e.g., in TeXstudio use “Idefix | Hard Line Break…”), as then the “diff” will be easier to view. Or use WinMerge, which shows long-line diffs without scrolling.

Also, note with the rates below that there’s an assumption the article is in relatively reasonable shape. If you know your non-native-English is not that great, she’s willing to edit, but it’s more per page, negotiable.

Here’s the info she sent:

 

I have over 14 years experience in academic scientific publishing, both editorial and production, specializing in mathematics and computer science (particularly in computer graphics and game design).

Available Services

o   Copyediting
o   Developmental editing
o   Typesetting in LaTeX
o   Word-to-LaTeX conversion
o   LaTeX-to-Word conversion
o   Proofreading
o   Entering edits in Word or LaTeX files
o   Project management for collections with contributing authors

Base Rates

Copyediting: $2.50 per page/1200 characters
Typesetting: $3.50 per page
Conversion: $2.00 per page, plus $1.00 per significant mathematical expression
Minimum cost of $40.00

Negotiable rates for non-native-English-speaking authors, developmental editing, and additional services

Charlotte Byrnes
STM Manuscript Services
[email protected]

Takeaways from this article: Use Capitalize My Title to determine exactly which characters to capitalize. Use my free chex_latex Perl script to find common goofs in your .tex and text (just copy your .docx text to a text file) files. Also try pasting your .tex into Microsoft Word to see what it turns up. Jump to the end of this post for more info. And if you want a great technical copy editor or typesetter (she did both for Real-Time Rendering 4th edition and copy editing for Ray Tracing Gems), hire Charlotte Byrnes. No, really, do it; she copy edits papers, too.

Yesterday we finished putting together Ray Tracing Gems, turning the files over to our publisher. Tomas and I agree that we’re done with making books for a decade or so, at least. “Editing, it’ll be easier than writing,” said the naive editors. And, yes, we changed all “naïve” with the umlaut (a form that seems to be popular with authors from Germany) to “naive.”

There’s a lot we learned about process – basically, think through and establish good processes early on, for everything – but I want to focus on grammar and style-nerd stuff, since it’s SIGGRAPH paper-writing season. What follows are my fairly-well-informed-but-I-could-be-convinced-otherwise opinions. I think of myself as maybe a B+ English student, on a good day.

Gender-neutral: Instead of he/she, or alternating “he” and “she” in a passage, people can use “they” for the singular form. This concept dates back to 1375.

“Data is” is fine, according to The Guardian, which also notes that The Wall Street Journal is coming around. To quote: “It’s like agenda, a Latin plural that is now almost universally used as a singular. Technically the singular is datum/agendum, but we feel it sounds increasingly hyper-correct, old-fashioned and pompous to say ‘the data are’.”

Please spell out any acronym you use the first time you use it, e.g., “the bounding volume hierarchy (BVH) for the scene.”

Use the ACM Digital Library (DL) for references in your .bib files. On an article’s page on the upper right is “Export Formats: bibtex” – click it. Even then, the DL is sometimes not quite correct, e.g., “Proceedings of High Performance Graphics” should have a hyphen: “Proceedings of High-Performance Graphics,” as that’s truly the conference name. But they’re at least close. Here are some variants I spotted from authors:

High-Performance Graphics (nice and short, but a little hard to tell if this is a book or something else when reading the bibliographic entry in the paper)
High Performance Graphics
Proceedings of High Performance Graphics (ACM DL form, needs a hyphen)
Proceedings of the Conference on High Performance Graphics
High Performance Graphics 2009
Proceedings of the 5th High-Performance Graphics Conference
Proceedings of the ACM SIGGRAPH Symposium on High-Performance Graphics
Proceedings of the Fourth ACM SIGGRAPH / Eurographics Conference on High-Performance Graphics (wins for longest)

The DL bibtex entry sometimes puts the article title into lowercase when it is actually presented properly capitalized. I’m for using the capitalized version the authors intended. BTW, the Google Scholar Button is handy for finding references.

Hyphens are tricky. For a word where you could hyphenate it or leave out the hyphen, e.g., “non-planar”/”nonplanar,” we had a few rules of thumb:

  • Check Merriam-Webster. For example, “nonplanar” is an accepted spelling, so we left the hyphen out. So “nearfield,” “dataset,” and “retroreflection” are in the dictionary. You still must poke around, e.g., “retroreflect” is not.
  • If it’s not in the dictionary, consider the literature. So, “microfacet” and “framebuffer” are OK, since they are commonly used in computer graphics.
  • Otherwise, use a hyphen, e.g., “re-render,” “micro-detail.”

For phrases we used these hyphenation rules. For example, “world-space coordinates” vs. “world space” vs. “coordinates in world space” are all proper. Also, it’s never “Monte-Carlo” – you wouldn’t say “faster than a New-York minute.” Oh, and it’s never “physically-based,” as the rules note.

Our one exception to these sorts of rules was that we never hyphenated “ray-tracing” in Ray Tracing Gems. For starters, we’d have to considering changing the title to Ray-Tracing Gems, which takes emphasis off of ray tracing (“Hey, this book’s a rip-off, I thought it was about properly rendering gemstones”). It’s also the more popular adjective form in previous publications (though I found only a few articles to back up this claim). To confuse things a bit, Microsoft calls their DXR API “DirectX Raytracing” – one word for “ray tracing.” We use it this way whenever we spell it out for DXR. We also resisted using “any-hit shader” and “closest-hit shader,” as Microsoft does not hyphenate, no matter how much I wish they did. This quotidian stuff takes up a surprising amount of time, but luckily I’ve folded the various common hyphenation tests into chex_latex. If you disagree, it’s easy to change or remove the tests from the script (even if you don’t know Perl, you do know how to use the “delete” key).

I like to avoid too many uses of “this” without a noun after them. Some strict teachers never allow a “this” without a noun after each one, but I think that’s overkill. Still, it’s good to think about: If it’s not obvious what the noun should be after the “this”, then add it. I’ve also found that “This” at the start of a sentence can often be changed to “Doing so,” e.g., “We add up the probabilities. This simplifies the subsequent…” to “We add up the probabilities. Doing so simplifies the subsequent…” The second sentence is a bit more active and engaging.

Avoid “very” when you can, as it’s either fluff or is a lazy way to increase the impact. Mark Twain didn’t say (but it’s still a great quote): “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.” There are lists out there, such as this one, giving synonyms, e.g., “massive” for “very big.” That said, I haven’t yet found good replacements for “very close” and “very time consuming.” Another word in this category of fluff is “really.” Please never use that in formal writing; even “very” is better.

At the start of a sentence, “In order to” can usually be replaced by “To.” Shorter is more concise and sounds more authoritative.

The word “only” can often get moved to the right. Placement matters: “I only cook hot dogs but don’t eat them” and “I cook only hot dogs, not hamburgers” have “only” modifying the proper words. So “We only render the opaque objects” is less precise than “We render only the opaque objects.” Both work – we’re used to mentally shoving the “only” to be with the objects in the first version – but why not say it right to begin with?

The abbreviations “i.e.” and “e.g.” always have commas after them in the U.S., e.g., such as what I just did in this sentence. Same thing with the phrases “for example” and “that is” – commas after. Also, this is my own hypersensitivity, but please reword to avoid “et al.’s” – it’s fine in some lawless parts of the world, but you drive a stake in my Latin teacher’s heart when you mix Latin and English in this way.

In the U.S., the Chicago Manual of Style says “toward” is preferred in the U.S. over “towards,” “forward” over “forwards,” and so on. I’ve also seen this in spell checkers, with “towards” being flagged. Most sites say either is fine for the U.S., though the English prefer “towards.” I decided on the “remove the ‘s'” versions for this U.S. book (and “color” not “colour,” etc.) in order to be consistent throughout and to avoid spell-checker catches.

OK, that’s way more than enough, and I haven’t started in on “that” vs. “which” or how semicolons get misused…

If I could change just one thing in U.S. English, it would be punctuation placement with quotes and double-quotes. In the U.S. we put commas and periods inside the double-quotes, “like this.” In the U.K. it’s “like this”. Note that all other punctuation – colon, question mark, semicolon – for the U.S. is outside the quotes, unless you’re quoting a phrase with these in it, e.g., “Quis custodiet ipsos custodes?” I wish we’d all switch to the U.K. model, it’s more consistent and puts my computer science heart at ease. Oh well. That said, it’s legal to keep the punctuation out if you’re trying to explain syntax itself, e.g., “To declare floating-point numbers you can use ‘double’ or ‘float’.”

To conclude, I’ll explain more what I said at the start, about free tools you should consider using:

  • Use Capitalize My Title to determine exactly which characters to capitalize in titles and section headers. There seems to be a tendency in Europe to not capitalize the hyphenated word. For example, the often-cited (and good!) paper “An Inexpensive BRDF Model for Physically-based Rendering” has a lowercase “b” in “based” (there also should not be a hyphen). It’s also visible in such things as the First-tier Tribunal. For U.S. publications the rule is to capitalize the hyphenated word, unless the word would normally be lowercase, e.g., “Texture Level-of-Detail Strategies for Real-Time Ray Tracing.”
  • Microsoft Word or other spell and style checker is worth your while. Copy the contents of your PDF or .tex file, paste into Word, and see what it turns up. If you do this simple trick as a reviewer, you look like some copy-editing genius by catching obscure errors. Beat reviewers to the punch by doing this to your own submissions. I did so with this article and it turned up six suggestions, four of which I used.
  • Give chex_latex.pl a run on your .tex or text file (e.g., copy your text from your Word document to a .txt file). Yes, you must install Perl, how old-school, but ten minutes of messing with this program will likely turn up a few things in your paper that are wrong or at least worth contemplating changing. It has hundreds of little tests, but my favorite is the one I stole from here, that finds accidentally doubled words, e.g., “the the” or “a a” – these occur surprisingly often. Perl scripts are trivial to edit, so if you don’t like a test, just delete or modify it. Or you can put “% chex_latex” at the end of any line to have the tool ignore it completely. I ran this tool on this article and it found two little goofs.
  • For longer works I find an interactive spell checker to lead to madness, as you hit author after author after author when you check, along with variable and procedure names. I finally wrote a tiny back-end program, aspell_sorter.pl, for the standalone command-line spell checker “aspell.” Now with three commands I concatenate all .tex files together, spell-check them all, and then sort by word and get a count for each “misspell.” For example, on my latest run, in 23,083 lines of .tex in Ray Tracing Gems, “aspell” found 7744 questionable terms. That’s like one spell check per 3 lines – insane. The “aspell_sorter” turns this into a list of 1599 questionable terms – almost 5x less. You can also set “$spellcount = 1;” to show only unique misspellings, things “misspelled” only once. Doing so will miss consistently misspelled words, but the list to skim over is now down to just 696 entries – a more than 11x culling of potential problems. Of these, I found three true misspellings: ROUGNESS, vextex, and identifer (though these were found after three editors had already read each of the chapters and I had similarly spell checked most of the text a month earlier). I had to wade through a lot of false positives, 693 of them, but it’s better than wading through 7741.
  • I’ve heard good things about Grammarly and Hemingway, but haven’t gotten into them myself.

Bonus info: it’s not about grammar, more about English in general, but I’m enjoying Bill Bryson’s The Mother Tongue – it’s a great bathroom read. The amount of useless knowledge per page is impressive. For example, I now know where the “r” sound in the word “colonel” comes from.

« Older entries