Create a popover using the :::pop[] container directive.
:::pop[tgt1]Ello, poppet!:::
The text in square brackets is the popover target. In this example, the target is tgt1.
The text between the colons is the popover content. In this example, the content is Ello, poppet!
Popovers work by scanning a post from top to bottom in search of each popover target and replacing the target with a button that reveals the corresponding popover content.
```pythonimport pandas as pd #2df = pd.DataFrame({'x': [1,2,3]})```:::pop[#2]Presumably you've already installed pandas. If not, install it with `pip install pandas`:::
import pandas as pd df = pd.DataFrame({'x': [1,2,3]})
We suggest using a unique name for each of your popover targets so that you'll never have to worry about duplicate targets that "compete" for content. But for the curious...
Consider this example Markdown
Lorem (1) ipsum dolor (1) sit amet.:::pop[(1)]AAA::::::pop[(1)]BBB:::
The first (1) will render "AAA" and the second (1) will render "BBB". This is a direct consequence of the logic used for rendering popovers, which works more or less like this š
Popover logic for target <--> content mapping
Identify the first :::pop tag and its targetScan the post from top to bottom, searching for the corresponding targetReplace the target with the corresponding contentsRepeat for the subsequent :::pop tags