spirit-code / spirit

Atomistic Spin Simulation Framework
http://spirit-code.github.io
MIT License
117 stars 52 forks source link

Exporting documentation #613

Open GPMueller opened 2 years ago

GPMueller commented 2 years ago
Originally posted by **Sid281216** February 8, 2022 in discussion #612 Hi, Equations in the documentation does not appear : in .mk files after build on windows, and on the readthedocs website https://spirit-docs.readthedocs.io/en/latest/core/docs/Definitions.html . But it works from GitHub repo website, there is a way to download a pdf of the docs directly from GH and still have equations ?
GPMueller commented 2 years ago

The svg document contains

  * {
    fill: black;
  }
  @media (prefers-color-scheme: dark) {
    * {
      fill: white;
    }
  }

You can check this for example by opening this equation%0A%5Cend%7Balignedat%7D) and checking the contents in the browsers "inspect" feature.

So it seems to me that the prefers-color-scheme: dark has the unintended effect that if the browser is set to dark mode, the equations will be white and therefore vanish on the white background because RTD is not. I was able to verify the equations show up if I set my browser settings to "light theme".

Sid8899 commented 2 years ago

Yes the problem was comming from there thanks, so to be able to have equations in Readthedocs website I changed my Edge navigator settings to light theme. And to be able to have them in markdown files(opened with VSCode) after spirit build, I had to change to light theme all Windows (W11). If I download a pdf of the docs from readthedocs website, equation still not apppear..

GPMueller commented 2 years ago

I don't know about the generated pdf, sorry. But at some point I believe the docs-page should be replaced by a docusaurus-generated one, which has its own light-/dark-mode switch, so I think the equations should always show up there. But I cannot tell when I'll have time to do that.