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

mathjax link to equation #173

Closed
szcf-weiya opened this issue Jan 14, 2019 · 3 comments
Closed

mathjax link to equation #173

szcf-weiya opened this issue Jan 14, 2019 · 3 comments
Labels

Comments

@szcf-weiya
Copy link
Owner

szcf-weiya commented Jan 14, 2019

sometimes the link locates a wrong position, for example, (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
Peek 2021-01-06 20-54

@szcf-weiya szcf-weiya added the bug label Jan 14, 2019
@szcf-weiya
Copy link
Owner Author

szcf-weiya commented Jan 7, 2021

@szcf-weiya
Copy link
Owner Author

method 1 (not proper)

use padding-top and margin-top (https://www.cnblogs.com/shenjp/p/11088344.html), and the results is
image

method 2 (not proper)

https://www.cnblogs.com/shenjp/p/11088344.html

.mjx-mtd:target {
  padding-top: 50px;  
}

image

method 3 (not work)

https://stackoverflow.com/questions/10732690/offsetting-an-html-anchor-to-adjust-for-fixed-header

:target::before {
    content: '';
    display: block;
    height:      180px;
    margin-top: -180px;
}

image

@szcf-weiya
Copy link
Owner Author

szcf-weiya commented Jan 7, 2021

so I try this method, and finally, it works. But at first, it still fails,
Peek 2021-01-07 11-17
and it is so strange that only negative values work!

then I found there is an argument, overflow for the whole mathjax display,

Peek 2021-01-07 11-21

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.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant