Closed DominikPeters closed 6 months ago
It looks like there is a new tag "data-nosnippet" which can be added to a div to prevent the contents of the div from appearing in a snippet. I shall add this to the MathJax customization div. But it appears that Bing may not yet support this.
I shall also change the div to display:none instead of class="hidden"
<div class="hidden">
becomes
<div display:none data-nosnippet>
I shall leave this issue open until this change has been made and you see if it works.
One concern I have with converting everything to the MathJax script is that when MathJax changed from v2 to v3 a lot of their LaTeX extensions did not port over immediately. I haven't looked into whether this is likely to affect Lwarp customizations, but we sure don't want a situation where MathJax changes and it takes months to get the Lwarp customizations working again. There are more than 50 LaTeX packages with MathJax support.
In a few cases Lwarp is using the MathJax extensions which became available in MathJax v3, but I have the original Lwarp emulations as backup, stored in comments in the .dtx file, in case MathJax 4 breaks these extensions.
Thanks, that's a good solution. I'll keep an eye out. \def \LWRfootnote {1}\)
is an example search term that surfaces such pages. site:https://tikz.dev/pgfplots
also has examples. I'll update the latter manually to use style="display:none" data-nosnippet
to see what will happen.
The tidy HTML checker complains about my proposal:
<div display:none data-nosnippet>
but is happy with your corrected improvement:
<div style="display:none;" data-nosnippet>
MathJax work as expected either way. I don't know if either will help with Bing. Let me know what you find.
Whether the style should be a CSS class or an explicit style probably won't matter. Either way, I shall add data-nosnippet
.
Now in v0.915.
lwarp adds many mathjax command definitions in a hidden div at the start of the document:
I've had search engines (I believe bing) get confused by this and use it as text snippets in search results. Based on the MathJax documentation, I believe that most of these definitions could instead be put in the "Lwarp MathJax emulation code" inside the
<script>
tag that specifies the mathjax options, along the following lines (the following written with the help of ChatGPT-4):