title: Add text with multiple line breaks and italic words to a plot in R
body: <p>I want to add several lines of text to a plot, in which some words are in italics. This is what the text should look like:</p>
  
  <blockquote>
    <p><em>Italic Text:</em> Some<br>
    words with<br>
    new lines.<br>
    <br>
    <em>More italic text:</em> Yet<br>
    more words divided<br>
    by new lines.<br>
    <br>
    <em>Italics again:</em> And more<br>
    text with<br>
    new lines.</p>
  </blockquote>
  
  <p>The following code prints a single line of text with italic words:</p>
  
  <pre><code>plot(c(0, 2), c(0, 2))
  text(1, 1, bquote(
          paste(
              italic("Italic Text:"),
              " Some words with new lines. ",
              italic("More italic text:"),
              "Yet more words divided by new lines. ",
              italic("Italics again:"),
              "And more text with new lines.",
              sep = ""
          )
      )
  )
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/g2pmM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/g2pmM.png" alt="enter image description here"></a></p>
  
  <p>And this creates line breaks, but no italics:</p>
  
  <pre><code>plot(c(0, 2), c(0, 2))
  text(1, 1, "Italic Text: Some\nwords with\nnew lines.\n\nMore italic text: Yet\nmore words divided\nby new lines.\n\nItalics again: And more\ntext with\nnew lines.")
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/8aqvO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8aqvO.png" alt="enter image description here"></a></p>
  
  <p>But when I try to break the text into lines and add italics, the newline characters lead to strange results:</p>
  
  <pre><code>plot(c(0, 2), c(0, 2))
  text(1, 1, bquote(
          paste(
              italic("Italic Text:"),
              " Some\nwords with\nnew lines.\n\n",
              italic("More italic text:"),
              "Yet\nmore words divided\nby new lines.\n\n",
              italic("Italics again:"),
              "And more\ntext with\nnew lines.",
              sep = ""
          )
      )
  )
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/qvgSl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qvgSl.png" alt="enter image description here"></a></p>
  
  <p><code>atop()</code>, as suggested in other answers, only works with two lines.</p>
  
  <p><strong>What's the easiest method to add multiple lines of text with several words in italics to a plot?</strong></p>
  
  <ul>
  <li>Ideally, using only base R.</li>
  <li>And without painfully positioning each line of text separately.</li>
  </ul>