Closed szcf-weiya closed 3 years ago
also reported in http://disq.us/p/2e8ldh3
also, find a similar issue reported in https://stackoverflow.com/questions/39372511/mathjax-add-offset-for-the-target-eqref-link-of-equation-when-there-is-a-to
use padding-top
and margin-top
(https://www.cnblogs.com/shenjp/p/11088344.html), and the results is
https://www.cnblogs.com/shenjp/p/11088344.html
.mjx-mtd:target {
padding-top: 50px;
}
https://stackoverflow.com/questions/10732690/offsetting-an-html-anchor-to-adjust-for-fixed-header
:target::before {
content: '';
display: block;
height: 180px;
margin-top: -180px;
}
mkdocs-material
on https://github.com/szcf-weiya/techNotes, but it does not have such an issue,scroll-margin-top
(https://developer.mozilla.org/zh-CN/docs/Web/CSS/scroll-margin-top), and the commit is quite simple,scroll-margin-top
has been mentioned in https://stackoverflow.com/questions/4086107/fixed-page-header-overlaps-in-page-anchorsso I try this method, and finally, it works. But at first, it still fails,
and it is so strange that only negative values work!
then I found there is an argument, overflow
for the whole mathjax display,
without this option, it works well!
Also check that only remove overflow
is not enough.
And also find that the latest mkdocs-material
does not have such setting for mathjax.
sometimes the link locates a wrong position, for example,![Peek 2021-01-06 20-54](https://user-images.githubusercontent.com/13688320/103770698-66b32b80-5061-11eb-91db-0f0a7ee5ec29.gif)
(3.65)
and(3.66)
, as shown in the following gif, https://esl.hohoweiya.xyz/03-Linear-Methods-for-Regression/3.7-Multiple-Outcome-Shrinkage-and-Selection/index.html#mjx-eqn-3.66