title: Display several code chunks in a concise way
body: <p>I'm creating a blog with <code>blogdown</code> in which I compare code from R and code from Stata. I would like to show both codes so that the user can compare how it's done in R and in Stata. Howewer, putting two or more chunks in a row (code for R, code for Stata + output) makes the reading quite uncomfortable.</p>
  
  <p>Several layouts came to my mind to include several chunks but I don't know if they are already implemented or if it's even possible to do so. </p>
  
  <hr>
  
  <p><strong>Have a button to display/hide chunks (one button <em>per chunk</em>)</strong></p>
  
  <p>One idea would be to have:</p>
  
  <ul>
  <li>the R code chunks visible by default in the article,</li>
  <li>the Stata code chunks invisible by default but visible if the user clicks on a button </li>
  </ul>
  
  <p><a href="https://www.jepusto.com/code-folding-with-blogdown-academic/" rel="noreferrer">This person</a> and <a href="https://statnmap.com/2017-11-13-enable-code-folding-in-bookdown-and-blogdown/#" rel="noreferrer">this person</a> succeeded in folding their code chunks in blogdown but apparently it hides or shows every chunks by default. How can I hide only some chunks by default? Is there an option (like the options <code>eval</code>, <code>echo</code>...) that hides or shows code chunk in <code>blogdown</code>?</p>
  
  <hr>
  
  <p><strong>Chunks with "tabs"</strong></p>
  
  <p>The title of this part speaks for itself: is it possible to have tabs in a chunk so that we can switch from one code to the other (just like tabs in web browsers for example)?</p>
  
  <hr>
  
  <p><strong>Display two chunks side by side</strong></p>
  
  <p>In some <code>blogdown</code> themes (maybe all, I don't know), the width is quite reduced and there is some unused space on the sides. Therefore, is it possible to increase the width on some parts of an article and to display two chunks side by side?</p>
  
  <p>Any idea if one of these layouts can be realized in <code>blogdown</code>?</p>