mkdocs-material icon indicating copy to clipboard operation
mkdocs-material copied to clipboard

Annotation doesn't work inside markdown tables

Open adhadse opened this issue 1 year ago • 0 comments

Context

I'm trying with latest mkdoks-material (9.5.23) and following the reference for adding annotation. I know annotation doesn't work inside katex, so I tried adding it outside, and since tables also can't add the annotation with { .annotate } I tried wrapping the table inside inside a <div class="annotate">. image

  • Currently it appears at the top left of the page and sticks there, instead of sticking to the annotation button.

Bug description

I tried something like this:

<div class="annotate" markdown>
| $P$                                 | $Q$                                 | $P \implies Q$                         |
| ----------------------------------- | ----------------------------------- | -------------------------------------- |
| $\textcolor{#f56c42}{\text{false}}$ | $\textcolor{#f56c42}{\text{false}}$ | $\textcolor{#07fc03}{\text{true}}$ (1) |  
| $\textcolor{#f56c42}{\text{false}}$ | $\textcolor{#07fc03}{\text{true}}$  | $\textcolor{#07fc03}{\text{true}}$ (2) |
| $\textcolor{#07fc03}{\text{true}}$  | $\textcolor{#f56c42}{\text{false}}$ | $\textcolor{#f56c42}{\text{false}}$    |
| $\textcolor{#07fc03}{\text{true}}$  | $\textcolor{#07fc03}{\text{true}}$  | $\textcolor{#07fc03}{\text{true}}$     |
</div>

1. The formula doesn't state when $P$ is _not true_, it's assumed maybe the robot has antenna, maybe it doesn't.
2. The formula doesn't state when $P$ is _not true_, it's assumed maybe the robot has antenna, maybe it doesn't.

This does produce the annotation button, but upon clicking it doesn't show the annotation text.

Related links

Reproduction

9.5.23-annotation-inside-table-does-not-appear.zip

Steps to reproduce

  1. The above zip file includes all the required things to reproduce the above bug.
  2. Install mkdocs-material 9.5.23
  3. Set mkdocs.yaml as :
site_name: My Docs

theme:
  name: material

markdown_extensions:
  - pymdownx.highlight:
      anchor_linenums: true
      line_spans: __span
      pygments_lang_class: true
  - pymdownx.inlinehilite
  - pymdownx.snippets
  - pymdownx.superfences
  - pymdownx.mark
  - pymdownx.details
  - admonition
  - footnotes
  - attr_list
  - tables
  - md_in_html

plugins:
  - info
  1. add table content as:

<div class="annotate" markdown>
| hello | world|
| ---   | --- |
| i     | text (1)|
</div>

1. a text should be shown test 1

Browser

Edge

Before submitting

adhadse avatar May 20 '24 03:05 adhadse