Fix code language
This commit is contained in:
		@@ -13,11 +13,11 @@ format: html</pre>
 | 
			
		||||
<li>
 | 
			
		||||
<p>Transiently, by calling <code>quarto::quarto_render()</code> by hand:</p>
 | 
			
		||||
<div class="cell">
 | 
			
		||||
<pre data-type="programlisting" data-code-language="downlit">quarto::quarto_render("diamond-sizes.qmd", output_format = "docx")</pre>
 | 
			
		||||
<pre data-type="programlisting" data-code-language="r">quarto::quarto_render("diamond-sizes.qmd", output_format = "docx")</pre>
 | 
			
		||||
</div>
 | 
			
		||||
<p>This is useful if you want to programmatically produce multiple types of output since the <code>output_format</code> argument can also take a list of values.</p>
 | 
			
		||||
<div class="cell">
 | 
			
		||||
<pre data-type="programlisting" data-code-language="downlit">quarto::quarto_render("diamond-sizes.qmd", output_format = c("docx", "pdf"))</pre>
 | 
			
		||||
<pre data-type="programlisting" data-code-language="r">quarto::quarto_render("diamond-sizes.qmd", output_format = c("docx", "pdf"))</pre>
 | 
			
		||||
</div>
 | 
			
		||||
</li>
 | 
			
		||||
</ol></section>
 | 
			
		||||
@@ -41,7 +41,7 @@ Output options</h1>
 | 
			
		||||
<p>Note the special syntax (<code>pdf: default</code>) if you don’t want to override any of the default options.</p>
 | 
			
		||||
<p>To render to all formats specified in the YAML of a document, you can use <code>output_format = "all"</code>.</p>
 | 
			
		||||
<div class="cell">
 | 
			
		||||
<pre data-type="programlisting" data-code-language="downlit">quarto::quarto_render("diamond-sizes.qmd", output_format = "all")</pre>
 | 
			
		||||
<pre data-type="programlisting" data-code-language="r">quarto::quarto_render("diamond-sizes.qmd", output_format = "all")</pre>
 | 
			
		||||
</div>
 | 
			
		||||
</section>
 | 
			
		||||
 | 
			
		||||
@@ -164,7 +164,7 @@ Interactivity</h1>
 | 
			
		||||
htmlwidgets</h2>
 | 
			
		||||
<p>HTML is an interactive format, and you can take advantage of that interactivity with <strong>htmlwidgets</strong>, R functions that produce interactive HTML visualizations. For example, take the <strong>leaflet</strong> map below. If you’re viewing this page on the web, you can drag the map around, zoom in and out, etc. You obviously can’t do that in a book, so Quarto automatically inserts a static screenshot for you.</p>
 | 
			
		||||
<div class="cell">
 | 
			
		||||
<pre data-type="programlisting" data-code-language="downlit">library(leaflet)
 | 
			
		||||
<pre data-type="programlisting" data-code-language="r">library(leaflet)
 | 
			
		||||
leaflet() |>
 | 
			
		||||
  setView(174.764, -36.877, zoom = 16) |> 
 | 
			
		||||
  addTiles() |>
 | 
			
		||||
@@ -192,7 +192,7 @@ format: html
 | 
			
		||||
server: shiny</pre>
 | 
			
		||||
<p>Then you can use the “input” functions to add interactive components to the document:</p>
 | 
			
		||||
<div class="cell">
 | 
			
		||||
<pre data-type="programlisting" data-code-language="downlit">library(shiny)
 | 
			
		||||
<pre data-type="programlisting" data-code-language="r">library(shiny)
 | 
			
		||||
 | 
			
		||||
textInput("name", "What is your name?")
 | 
			
		||||
numericInput("age", "How old are you?", NA, min = 0, max = 150)</pre>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user