Skip to content
Discussion options

You must be logged in to vote

Solve it (very ad-hoc though...)!

Here are the step:

  1. Put the following into a alignmargin.js.
function lookupclassmath(e) {
  if (e.classList.contains('math')) { return e } else { return lookupclassmath(e.parentElement) }
}

const almar = document.getElementsByClassName("almar")
const alref = document.getElementsByClassName("alref")

window.MathJax = {
  startup : {
    pageReady : () => {
      return MathJax.startup.defaultPageReady().then(() => {  
        Array.from(almar).forEach((m, i) => {
          const r = Array.from(alref).filter(e => e.id != '').find(e => e.id.match('\\d')[0] == m.id.match('\\d')[0])
          m.style.top = (r.getBoundingClientRect().top - lookupclassmath(r).g…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
1 reply
@analytic-bias
Comment options

Comment options

You must be logged in to vote
7 replies
@analytic-bias
Comment options

@mcanouil
Comment options

@analytic-bias
Comment options

@analytic-bias
Comment options

@GuillaumeDehaene
Comment options

Answer selected by mcanouil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
latex LaTeX engines related libraries and technologies html Issues with HTML and related web technology (html/css/scss/js) themes Related to HTML theming or any other style related issue (like highlight-style) math any issue related to math support in specific formats
3 participants