Setup
Initialize Wikipedia Preview by including the following inline code anywhere in your R Markdown document:
Note: If you prefer to have a designated chunk, initialize with the following code instead:
Usage
The library automatically detects Wikipedia links.
Source:
Output:
Sampling via MCMC
You can also make those links stand out and appear different from non-Wikipedia links using the built-in style:
Source:
[Stan](https://mc-stan.org/) samples via
[HMC](https://en.wikipedia.org/wiki/Hamiltonian_Monte_Carlo){.wiki}
Output:
Wikipedia Preview works with all the language editions of Wikipedia.
Source:
At the time of writing this vignette the article on
[Bayesian inference](https://en.wikipedia.org/wiki/Bayesian_inference){.wiki}
is available in 30 languages, including:
- Arabic: [استدلال بايزي](https://ar.wikipedia.org/wiki/%D8%A7%D8%B3%D8%AA%D8%AF%D9%84%D8%A7%D9%84_%D8%A8%D8%A7%D9%8A%D8%B2%D9%8A){.wiki}
- French: [Inférence bayésienne](https://fr.wikipedia.org/wiki/Inf%C3%A9rence_bay%C3%A9sienne){.wiki}
- Japanese: [ベイズ推定](https://ja.wikipedia.org/wiki/%E3%83%99%E3%82%A4%E3%82%BA%E6%8E%A8%E5%AE%9A){.wiki}
Output:
At the time of writing this vignette the article on Bayesian inference is available in 30 languages, including:
- Arabic: استدلال بايزي
- French: Inférence bayésienne
- Japanese: ベイズ推定
Alternative style
The default styling is the one provided and used by Wikimedia’s Inuka team which developed Wikipedia Preview. The author of this package prefers a different styling and has made it available via the use_alt_style
flag when initializing:
Wikipedia links will be marked with a W that looks similar to the Wikipedia logo.