pre.math-display:not(:only-child) {
    display: inline-block;
}
