  We show that under quite general conditions, various multifractal spectra may
be obtained as Legendre transforms of functions $T\colon \RR\to \RR$ arising in
the thermodynamic formalism. We impose minimal requirements on the maps we
consider, and obtain partial results for any continuous map $f$ on a compact
metric space. In order to obtain complete results, the primary hypothesis we
require is that the functions $T$ be continuously differentiable. This makes
rigorous the general paradigm of reducing questions regarding the multifractal
formalism to questions regarding the thermodynamic formalism. These results
hold for a broad class of measurable potentials, which includes (but is not
limited to) continuous functions. We give applications that include most
previously known results, as well as some new ones.
