Does Commonmark support popup definitions for a word?


#1

The Commonmark spec is enormous. I apologize I don’t have time to read the whole thing right now.

Hello everyone
Part of my hobby is to convert PDF of scanned page images to reflowable EPUB text. These books are all at least 100 years old and some are from the 1700s. These old (British) books have a few words that Americans will not know about. I’d like to define a single definition for a word, and whenenver I mark up a word to define, the person can touch/click that word and a popup definition would appear for that word.

p.s. Sorry, I can’t seem to figure out how to add a category to this post after I’ve saved it initially.
Thanks.


#2

The CommonMark spec doesn’t include this feature. There’s a related discussion for adding popover text as an extension.


#3

kullboys noreply@talk.commonmark.org writes:

Part of my hobby is to convert PDF of scanned page images to reflowable EPUB text. These books are all at least 100 years old and some are from the 1700s. These old (British) books have a few words that Americans will not know about. I’d like to define a single definition for a word, and whenenver I mark up a word to define, the person can touch/click that word and a popup definition would appear for that word.

There’s no dedicated syntax for this.

However, if you use pandoc to go from markdown (or
commonmark) to epub, you could write a short lua
filter that would automatically add tool tips around
selected words.

Lua filters are documented here.
There are examples here.
If you need help with this, I suggest you ask on the
pandoc-discuss mailing list.