title: Print HTML formatted text in Jupyter with R from the list of citations of loaded packages
body: <p>I have a R variable containing some html content inside, for exemple :</p>
  <pre><code>myvar = &quot;&lt;h3&gt;Section Title&lt;/h3&gt;&quot;
  </code></pre>
  <p>I would like to print it not as <code>&lt;h3&gt;Section Title&lt;/h3&gt;</code> but as a formated h3 title in html or markdown that jupyter notebook understands.</p>
  <p>I have been looking a bit everywhere and found <code>htmlwidget</code> or <code>knitr</code> but I feel like it needs a HTML file. What I would like to do is just displaying a variable.
  I have tried also with <code>htmltools</code> package and the <code>HTML()</code> function, but no success...</p>
  <pre><code>myvar = &quot;&lt;h3&gt;Section Title&lt;/h3&gt;&quot;
  # I would expect that I can do something like:
  print(HTML(myvar), format='html')
  # But it doesn't work, I just get:
  # =&gt; &lt;h3&gt;Section Title&lt;/h3&gt;
  </code></pre>
  <p>And to be very clear, the goal is also that when I save the notebook as HTML or as PDF, the html is displayed formatted (and not as raw text)</p>
  <p>In Fine the goal is to display the citations for loaded packages, in a aesthetic way. I know that I can use <code>print(citation(&quot;packagename&quot;), style='html')</code> to output it as HTML but I can't find how to format the HTML properly. That's the reason my idea is to capture this output in a variable and output it as formatted HTML.</p>