Although it is probably not a cure in severe cases as that described in the article, I would also recommend paying attention to one's magnesium intake. However, I found that taking supplements is not necessary. Just find a mineral water that has a high magnesium content (100mg/L +), and it should get you covered as water has a pretty high bioavailability for Mg.
I don’t use LaTeX much, so if you would be willing to test with the kinds of documents you write, or even send me a file to test with, that would be greatly appreciated.
It's easy enough to make your own magnesium water, using magnesium hydroxide (as the laxative Milk of Magnesia) and carbonated water: http://www.afibbers.org/Wallerwater.pdf
Milk of Magnesia is in every grocery store. I buy from Fry's (Kroeger), because their version doesn't have any additives.
I use to take a large dose of Magnesium Glycinate, which did improve my anxiety. And sleep.
And I've taken epsom salt baths as well. Which helped me relax and sleep better as well.
But none of those have approached the even keeled feeling that the mg l-threonate provides. Maybe it's because l-threonate crosses the blood-brain barrier? Placebo affect? Unsure.