Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotation doesn't work inside markdown tables #7195

Closed
4 tasks done
adhadse opened this issue May 20, 2024 · 2 comments
Closed
4 tasks done

Annotation doesn't work inside markdown tables #7195

adhadse opened this issue May 20, 2024 · 2 comments
Labels
duplicate Issue is a duplicate of another issue

Comments

@adhadse
Copy link
Contributor

adhadse commented May 20, 2024

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

@squidfunk
Copy link
Owner

Thanks for reporting. This is a known limitation, as stated in our documentation:

Bildschirm­foto 2024-05-20 um 12 39 25

In addition, footnote tooltips are a superior approach to annotations, as they are native Markdown and don't rely on client-side parsing, which is why we recommend them over annotations. However, you'll need to sponsor to use this feature.

@squidfunk squidfunk added the duplicate Issue is a duplicate of another issue label May 20, 2024
@squidfunk
Copy link
Owner

Closing as duplicate of #3453.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issue is a duplicate of another issue
2 participants