You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I'm currently using MkDocs and Material for MkDocs for building a site for teaching materials and I'm having trouble with annotations in my custom template.
I've developed a custom theme that extends Material for MkDocs for reusing my configurations on several sites.
One of the customizations I've made is to modify main.html template to include a header and footer to every page when printing.
I couldn't zip it with plugin.info because of the customizations.
With this configuration, annotations don't render correctly if placed directly as content.
However, the work nicely inside code blocks.
After investigating a bit, I've found that annotations do some calculations in order to position them properly if inside a table.
Since my layout is inside a <table> element, I assume this is causing the offset error.
I'm kind of lost with this and I don't know how to solve this.
I'd appreciate if anyone could help me fix this or guide me with the possible steps I could follow.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm currently using MkDocs and Material for MkDocs for building a site for teaching materials and I'm having trouble with annotations in my custom template.
I've developed a custom theme that extends Material for MkDocs for reusing my configurations on several sites.
One of the customizations I've made is to modify
main.htmltemplate to include a header and footer to every page when printing.Live actual example of documentation: https://joapuiib.github.io/daw-ed/programacio/dam1s/programacio/
Web site view:
Print page view:
I've created a minimal example with this cutomization available in joapuiib/print-header-custom-template
With this configuration, annotations don't render correctly if placed directly as content.
However, the work nicely inside code blocks.
After investigating a bit, I've found that annotations do some calculations in order to position them properly if inside a table.
Since my layout is inside a
<table>element, I assume this is causing the offset error.Related links and issues:
mkdocs-material/src/templates/assets/javascripts/components/tooltip/index.ts
Lines 127 to 139 in 6f715fb
I'm kind of lost with this and I don't know how to solve this.
I'd appreciate if anyone could help me fix this or guide me with the possible steps I could follow.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions