I have some paragraphs, for example,

  1. For inline formulas, enclose the formula in $$. For displayed formulas, use $$$$.

    • These render differently. For example, type the following to show inline mode:
      $\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$
      $\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$
    • or type the following for display mode:
      $$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$$
      $$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$$
  2. For Greek letters, use \alpha, \beta, …, \omega: $\alpha$, $\beta$, …, $\omega$.

    • For uppercase letters, use \Gamma, \Delta, …, \Omega: $\Gamma$, $\Delta$, …, $\Omega$.
    • For other Greek capital letters, use Latin $A,, B, E$ and so on: $A, B, E$.
    • Some Greek letters have variant forms: \epsilon \varepsilon $\epsilon$, $\varepsilon$, \phi \varphi $\phi$, $\varphi$, and others.

Is there a mathjax syntax to put above paragraphs inside a box? This is to separate (and thus highlight) a theorem statement in a thread.

Thank you so much!

  • 2
    $\begingroup$ In the MathJax tutorial, there is an answer titled "Highlighting equation". Perhaps you'll find that of use... $\endgroup$ Commented Apr 9, 2023 at 19:04
  • $\begingroup$ @TheAmplitwist I'm aware of that answer, but it only works for equations inside $...$ or $$...$$. $\endgroup$
    – Akira
    Commented Apr 9, 2023 at 19:06
  • 1
    $\begingroup$ I suppose you could use the \text{} command inside the math block $...$. (I'm not sure if that will cause any serious accessibility issues, e.g. when viewing the site using a screen reader.) $\endgroup$ Commented Apr 9, 2023 at 19:10
  • $\begingroup$ @TheAmplitwist My paragraphs usually contain many text sentences... $\endgroup$
    – Akira
    Commented Apr 9, 2023 at 19:13
  • 1
    $\begingroup$ It will most likely be very complicated to typeset the sample paragraph you indicated in your post. But you could manage something short like $$\bbox[15px,border:2px solid black] {\textbf{Theorem. } \text{If $A$, then $B$ implies $C$.}}$$. $\endgroup$ Commented Apr 9, 2023 at 19:21
  • 3
    $\begingroup$ See e.g. this answer with box-highlighted telescopic induction schema (highlighted so extremely because they deserve to be much better known - one should use extreme highlighing sparingly) $\endgroup$ Commented Apr 9, 2023 at 20:35
  • 1
    $\begingroup$ Just for the sake of completeness, you get borders for free with this New Feature: Table Support. Quite limited and painful to use, though. $\endgroup$
    – dxiv
    Commented Apr 10, 2023 at 2:23


You must log in to answer this question.

Browse other questions tagged .