/* Responsives: make equations scrollable on small screens. * See: https://github.com/Khan/KaTeX/issues/327 */ .katex-display > .katex { max-width: 100%; } .katex-display > .katex > .katex-html { max-width: 100%; overflow-x: auto; overflow-y: hidden; padding-left: 2px; padding-right: 2px; } /* Increase margin around equations */ .katex-display { margin: 1.2em 0; } /* Equation number floats to the right and shows permalink for mouse hover on the right side of equation number. */ div.math { position: relative; padding-right: 2.5em; } .eqno { height: 100%; position: absolute; right: 0; padding-left: 5px; padding-bottom: 5px; padding-right: 1px; } .eqno:before { /* Force vertical alignment of number */ display: inline-block; height: 100%; vertical-align: middle; content: ""; } .eqno .headerlink { display: none; visibility: hidden; font-size: 14px; padding-left: .3em; } .eqno:hover .headerlink { display: inline-block; visibility: visible; margin-right: -1.05em; }