Forum Bugs

KaTeX CSS math accent rendering

ldbeth
The minimal example is shown below. The bar accent is rendered more towards left in Prince than in browser (Safari).
The HTML is statically generated using KaTeX. The problem is with span.accent-body that by manually setting the style="left: -0.1944em;" the rendering in Prince may be corrected to normal. But I would like to know if this is a bug that cause Prince renders the result differently than web browsers.

<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.10/dist/katex.min.css">
</head>
<body>
  <p>This is
  <span class="katex">
    <span class="katex-html" aria-hidden="true">
      <span class="base">
        <span class="strut" style="height: 0.8201em;"></span>
        <span class="mord accent">
          <span class="vlist-t">
            <span class="vlist-r">
              <span class="vlist" style="height: 0.8201em;">
                <span class="" style="top: -3em;">
                  <span class="pstrut" style="height: 3em;"></span>
                  <span class="mord mathnormal" style="margin-right: 0.0278em;">D</span>
                </span>
                <span class="" style="top: -3.2523em;">
                  <span class="pstrut" style="height: 3em;"></span>
                  <span class="accent-body" style="left: -0.1944em;">
                    <span class="mord">ˉ</span>
  </span></span></span></span></span></span></span></span></span></p>
</body>
</html>
  1. left Safari right Prince.png19.1 kB