Having trouble accessing front matter in template

This seems like something basic, but I can’t figure out why it doesn’t work. I have MathJax on my blog, but only 10% or so of my pages actually use it, so I figure I should just include it for those posts by having a flag in the front matter. Thus, I changed my header file to this:

{{ if .Params.useMath }}
 <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=AM_CHTML"> 
   asciimath2jax: { delimiters: [['$$','$$']]  }
{{ end }}

And added “useMath=true” to the front matter one of my posts which use math. Unfortunately, this seems to evaluate to false when generating the post. If I change the if statement to {{ if or 1 .Params.useMath }} then MathJax comes back so it seems like it has something to do with accessing the front matter. I tried following the instructions here for accessing the front matter: http://gohugo.io/templates/go-templates/#using-content-page-parameters:e2fc23c6497b774f0cb0b339042e10c3 but something isn’t working right.

My version string is: Hugo Static Site Generator v0.15 BuildDate: 2015-12-27T20:05:11-08:00

This is a wild guess, but perhaps it is whitespace around the = in your front matter? Or maybe the capitalisation of the word true?

I don’t use TOML, and the I do the following very similar thing with YAML front matter in my personal site and it works with the same version of Hugo.

I figured out the issue. For some reason I have to use .Params.usemath, not .Params.useMath in my template. It seems to ignore capitalization.

User variables are always converted to lower-case.

All Params are only accessible using all lowercase characters.

Docs: Hugo Page Params