The factor elasticities from a Cobb-Douglas function in Romer's macroeconomy book
This is not the elasticity of substitution formula. The correct one is, between factors, $K,L$

$$\sigma = \frac{\mathrm{d}\log \left(\frac{K}{L}\right)}{\mathrm{d}\log \left(\frac{F_L}{F_K}\right)}$$

This expression can conveniently be worked as follows: 

$$\frac{\mathrm{d}\log \left(\frac{K}{L}\right)}{\mathrm{d}\log \left(\frac{F_L}{F_K}\right)} = \frac {(L/K)[d(K/L)]}{(F_K/F_L)[d(F_{L}/F_{K})]}$$

$$=\frac {LF_L}{KF_K} \cdot \frac{d(K/L)}{d(F_{L}/F_{K})}$$

In the Cobb-Douglas case we have

$$ \frac {F_L}{F_L} = \frac {1-a}{a}\frac {K}{L} $$

so

$$d\left(\frac{F_{L}}{F_{K}}\right) = \frac {1-a}{a}d\left(\frac{K}{L}\right)$$

Substituting both expressions we have

$$\sigma = \frac {L}{K}\frac {1-a}{a}\frac {K}{L} \cdot \frac{d(K/L)}{[(1-a)/a]d(K/L)}=1.$$