0

I want write in italic and bold a expression like this x = A^-1y

using the inverse function $x=A^{-1}y$ 

Must be written after the text no in the center. It's not in italic and bold.

enter image description here

Thanks

4
  • Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – erik Dec 6 '20 at 17:13
  • 1
    your title asks about \bf and \it but your code example uses neither of these commands. The input that you show would normally produce the image you show, in math italic, there is no command to use bold here.. – David Carlisle Dec 6 '20 at 17:31
  • @erik you're right. Sorry. I will remember. – Cirino Dec 6 '20 at 17:42
  • Which parts of the equation should be bold, and which parts should in italics? A related question: Should the bold part be bold-upright or bold-italic? – Mico Dec 6 '20 at 17:45
2

You can use the bm package for boldmath: enter image description here

\documentclass{article}

\usepackage{bm}

\begin{document}

using the inverse function $\bm{x=A^{-1}y}$ 

\end{document}
5
  • Thanks. It is run – Cirino Dec 6 '20 at 17:48
  • You are welcome, @Cirino. It may seem strange, but on this site, we generally do not thank posters in comments. The way to show appreciation is to upvote useful answers when you have sufficient reputation, and to accept the answer that best serves your needs. – Sandy G Dec 6 '20 at 18:02
  • you can although to make the whole formula bold I would use \boldmath which needs no package and is a lot more efficient than using \bm – David Carlisle Dec 6 '20 at 18:07
  • @DavidCarlisle I was under the impression that \boldmath sometimes had issues that were resolved with \bm, but at the cost of efficiency as you indicate. (Though in this specific example there are no issues.) Am I wrong about this? – Sandy G Dec 6 '20 at 18:26
  • @SandyG not really, \bm makes the fonts set up for boldmath available in the normal non bold math version – David Carlisle Dec 6 '20 at 18:51
2

The \boldmath command will turn math expressions following it bold, so you could write {\boldmath \( x=A^{-1}y \)}. Within math mode, you can use \( \boldsymbol{x=A^{-1}y} \). The unicode-math and isomath packages also add a \mathbfit alphabet for bold italic math letters.

To use this in LuaLaTeX or XeLaTeX, you want to load unicode-math and select a font that comes in bold, such as \setmathfont{XITS Math}. You could also specify a bold math version, such as \setmathfont{KpMath-Semibold.otf}[version=bold].

To use this in PDFTeX, load amsmath, and I would also recommend bm after all other math packages. However, the standard \boldmath and \boldsymbol commands are preferable to \bm, as they are more compatible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.