LaTeX forum ⇒ Math & Science\bm and \nicefrac don't work together

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Singularity
Posts: 152
Joined: Sat Jan 22, 2011 9:55 pm

\bm and \nicefrac don't work together

Postby Singularity » Fri Sep 11, 2015 4:22 am

I can't use \bm and \nicefrac together. Why not? How do I make bold, nice fractions (in math mode, but also out of math mode).

I could not get xfrac to work at all.

MWE:
  1. \documentclass[14pt,fleqn,reqno]{extarticle}
  2. \usepackage{amsfonts,amsmath,amssymb,amsthm}
  3. \usepackage{mathtools} % Better choice for bmatrix*, pmatrix*, etc. environments (I'm told)
  4. \usepackage{bm,nicefrac,xfrac}
  5.  
  6.  
  7. \begin{document}
  8. \begin{align*}
  9. \bm{\nicefrac{1}{4}}
  10. .\end{align*}
  11. \end{document}

Tags:

User avatar
cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm

Postby cgnieder » Fri Sep 11, 2015 11:13 am

I don't know why they're not working with \bm but both work with \mathbf:

  1. \documentclass{article}
  2. \usepackage{mathtools}
  3. \usepackage{bm,nicefrac,xfrac}
  4. \begin{document}
  5. \begin{align*}
  6. \mathbf{\nicefrac{1}{4}}
  7. \end{align*}
  8. \begin{align*}
  9. \mathbf{\sfrac{1}{4}}
  10. \end{align*}
  11. \end{document}


Singularity wrote:I could not get xfrac to work at all.


What does that mean? Did you get errors?
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

Singularity
Posts: 152
Joined: Sat Jan 22, 2011 9:55 pm

Postby Singularity » Fri Sep 11, 2015 1:20 pm

Ah, yes, that would be helpful information, huh?

I got 97 errors. The first one was "l3kernel too old", and l3keys2e.sty file is opened. I'm attaching the log file.

MWE.log
(55.15 KiB) Downloaded 144 times

User avatar
cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm

Postby cgnieder » Fri Sep 11, 2015 1:24 pm

Singularity wrote:I got 97 errors. The first one was "l3kernel too old"


Looks like your version of xfrac is newer than your TeX distribution. Did you install/update it manually?

You should update your TeX distribution. Packages often have dependencies and very often rely on certain versions of other packages which is why manual installations/updates always are dangerous.

Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

Singularity
Posts: 152
Joined: Sat Jan 22, 2011 9:55 pm

Postby Singularity » Fri Sep 11, 2015 8:50 pm

I recently ran MikTex's "Update (Admin)" process to solve another problem. But I didn't do anything manually. And I might have made the wrong choices in that program. But that's all I did.

Singularity
Posts: 152
Joined: Sat Jan 22, 2011 9:55 pm

Postby Singularity » Sun Sep 13, 2015 5:16 pm

The only reasonable solutions seems to be
  1. \nicefrac{\bm 1}{\bm 4}


If the top or bottom (numerator/denominator in mathspeak) has more than one character, I assume you will need yet another set of braces
  1. \nicefrac{\bm{numerator}}{\bm{denominator}}

But then, usually you use regular \frac when you have long top or bottom.


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 3 guests