How to get `mtext()` with partial bold text?

r

Solution

Complex text editing can be done with `expression`. See `?plotmath` for a list of commands.

mtext(expression(paste("only ", bold("a"), " should be bold")), 1, 1)

Problem

I would like to add a text to my plot so that one letter, a, appears bold. I started with the following, but the result is not what I need: ``` plot(1:5,axes=F) mtext(c(only a should be bold),1:1,font=2) ``` What should I do to make only a bold?

Original source