In this Q&A, it is shown that we can use MathJax to create tables (see this answer in particular). However, as I attempt to use it, I find myself unable to add the text formatting I wish to use.

Here are my attempts:

$$ \begin{array}{c|l} \text{**I want this to be bold**}& \text{*I want this to be italics*} \\ \hline \text{***I want this to be bold italics***} & \text{_I want this to be italics too_} \\ \end{array} $$

As you can see, it doesn't quite obey the markdown formatting like I expect it to. MathJax must have it's own way of specifying it; either that, or it simply isn't possible.

Is it possible to have simple text formatting (i.e. bold, italics, etc) for the text (i.e. the "Some Text" within this \text{Some Text})?

| |

By looking at this related meta from Math SE, I found these formatting options which I think may be what you want. You can use \textit and \textbf for italicised and bolded text. For mathematical symbols only, you can use \mathbf and \mathit.

\textbf{I want this to be bold}& \textit{I want this to be italics} \\
\pmb{\textit{I want this to be bold italics}} & \textit{I want this to be italics too} \\

This produces this result:

$$ \begin{array}{c|l} \textbf{I want this to be bold}& \textit{I want this to be italics} \\ \hline \pmb{\textit{I want this to be bold italics}} & \textit{I want this to be italics too} \\ \end{array} $$

| |
  • \$\begingroup\$ Awesome, thanks for this. I have looked at some of the math.meta before, but there's so much there I found it difficult to find what I was looking for. \$\endgroup\$ – NathanS Dec 16 '19 at 11:19
  • 2
    \$\begingroup\$ There are also the two commands \textbf{} and \textit{} for bold and italicised text in math mode respectively. \$\endgroup\$ – Someone_Evil Dec 16 '19 at 11:37
  • 3
    \$\begingroup\$ Readers please note that there are about fifty different ways to do anything in *TeX; if you're googling around you'll probably find a bunch of other ways to achieve the same effect(s). \$\endgroup\$ – nitsua60 Dec 16 '19 at 14:09
  • 1
    \$\begingroup\$ Please don’t recommend math mode for text: use \textbf, \textit, or \emph for text formatting. \emph should be used when text is italicized for emphasis, and can be nested (\emph inside an already-italic section will make the \emph text not italic). \textit is for book titles, D&D spells, and other things italicized as a matter of formatting and not emphasis. Bold-italic should just be \textbf{\textit{whatever}}. \pmb, or “poor man’s bold,” is just a bad idea all around, and will often not give desirable results. \$\endgroup\$ – KRyan Dec 18 '19 at 4:49
  • 2
    \$\begingroup\$ @KRyan I've updated the post to mention those, but it looks like \textbf{\textit{{whatever}} doesn't nest — the inner textit gets interpreted as plaintext. I don't know what to put there instead so I've left \pmb in, as bad as it is. \$\endgroup\$ – doppelgreener Dec 18 '19 at 9:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .