title: How to only make one legend name italic in base R plot?
body: <p>I want to add a legend to a plot in which <strong>only one of the legend names is italicized</strong>. I'm using <code>plot()</code> in base R.</p>
  
  <ul>
  <li>However, I need that italicized line to contain variable numbers, so I use <code>bquote</code>.</li>
  </ul>
  
  <p>What I've tried does not work:</p>
  
  <pre><code>  a &lt;- 2 ; b &lt;- 5
    plot(a,b)
    l1 &lt;- bquote(Italic ~ .(a) + .(b))
    l2 &lt;- bquote(a + b)
    legend(x='topright',legend = bquote(italic(.(l1))))
    legend(x='topleft',legend = c(bquote(italic(.(l1))),l2))
  </code></pre>
  
  <ul>
  <li>Notice that when I leave the expression on its own (RIGHT LEGEND), it italicizes correctly. However, when I add the text for other legend lines, it messes up (LEFT LEGEND).</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/OXxnV.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OXxnV.jpg" alt="enter image description here"></a></p>
  
  <p>How do I properly do this?</p>
  
  <p><sup> Note: I'd rather have a solution that <em>doesn't</em> require multiple calls to <code>legend()</code>. </sup></p>