  We generalize the recently discovered relationship between JT gravity and
double-scaled random matrix theory to the case that the boundary theory may
have time-reversal symmetry and may have fermions with or without
supersymmetry. The matching between variants of JT gravity and matrix ensembles
depends on the assumed symmetries. Time-reversal symmetry in the boundary
theory means that unorientable spacetimes must be considered in the bulk. In
such a case, the partition function of JT gravity is still related to the
volume of the moduli space of conformal structures, but this volume has a
quantum correction and has to be computed using Reidemeister-Ray-Singer
"torsion." Presence of fermions in the boundary theory (and thus a symmetry
$(-1)^F$) means that the bulk has a spin or pin structure. Supersymmetry in the
boundary means that the bulk theory is associated to JT supergravity and is
related to the volume of the moduli space of super Riemann surfaces rather than
of ordinary Riemann surfaces. In all cases we match JT gravity or supergravity
with an appropriate random matrix ensemble. All ten standard random matrix
ensembles make an appearance -- the three Dyson ensembles and the seven
Altland-Zirnbauer ensembles. To facilitate the analysis, we extend to the other
ensembles techniques that are most familiar in the case of the original
Wigner-Dyson ensemble of hermitian matrices. We also generalize Mirzakhani's
recursion for the volumes of ordinary moduli space to the case of super Riemann
surfaces.
