show_answers: Show solutions in an etude document

Description Usage Arguments Details

View source: R/show_answers.R

Description

Calling show_answers(TRUE) causes the etude document to display answers. Answers can be marked in either of two ways:

Usage

1
2
3
4
show_answers(
  flag = TRUE,
  format = ifelse(knitr::is_latex_output(), "latex", "html")
)

Arguments

flag

logical. If TRUE (default) show the chunks marked with the etude engine as specially formatted solutions

format

Whether the document is intended for translation to latex or to html. Determined automatically by default.

Details

  1. a chunk with engine etude

  2. an inline chunk calling ans(your_text)

When show_answers(TRUE) has been called, the multiple choice questions created by true_and_false() or choose_one() will, **if they are being rendered as static HTML, will show the answers along with each multiple-choice item. Note that if the document is compiled to learnr, those static answers won't be shown. Instead, it's the user's dynamic interaction with the learnr document that sets whether the user sees answers.


dtkaplan/etude documentation built on Oct. 19, 2020, 7:56 p.m.