[ 
https://issues.apache.org/jira/browse/CASSANDRA-16906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17688693#comment-17688693
 ] 

Lorina Poland commented on CASSANDRA-16906:
-------------------------------------------

Perhaps @Anthony Grasso (@ossarga) will have a comment on why this is not 
working?

So, I ran a test using my local environment (not Cassandra's), and with the 
addition of 2 items, I got the formulas to display correctly. The two items 
were:
 # add `:stem: latexmath` to the 2nd line of the data_modeling_refining.adoc 
file.
 # add some code to the UI using supplemental/partials/footer-scripts.hbs (I 
chose to use an override, rather than copy to the ui).

I then modified 
cassandra/doc/modules/cassandra/pages/data_modeling/data_modeling_refining.adoc 
to add the 2nd line (github.com/polandll/cassandra, branch: CASS-16906).

I additionally modified site-ui/src/partials/footer-scripts.hbs with the same 
code bit (github.com/polandll/cassandra-website, branch: CASS-16906).

I tried a local build in my cassandra-website fork using:

./run.sh website build -g -u 
cassandra:/Users/lorinapoland/CLONES/polandll-cassandra -b cassandra:CASS-16906

per the README instructions. The HTML generated on my local machine is 
identical to the cassandra-website generated HTML. For example, they both have: 
{code:java}
<div class="stemblock">
<div class="content">
\[N_v = N_r (4 - 3 - 0) + 0 = 1N_r\]
</div>
</div> {code}
But my HTML renders the equations, and the cassandra-website generated HTML 
does not.

The included code in the footer-scripts.hbs is:
{code:java}
{{#with (resolvePage page.relativeSrcPath model=false)}}
    {{#unless (eq asciidoc.attributes.stem undefined)}}
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
  messageStyle: "none",
  tex2jax: { inlineMath: [["\\(", "\\)"]], displayMath: [["\\[", "\\]"]], 
ignoreClass: "nostem|nolatexmath" },
  asciimath2jax: { delimiters: [["\\$", "\\$"]], ignoreClass: 
"nostem|noasciimath" },
  TeX: { equationNumbers: { autoNumber: "none" } }
})
MathJax.Hub.Register.StartupHook("AsciiMath Jax Ready", function () {
  MathJax.InputJax.AsciiMath.postfilterHooks.Add(function (data, node) {
    if ((node = data.script.parentNode) && (node = node.parentNode) && 
node.classList.contains("stemblock")) {
      data.math.root.display = "block"
    }
    return data
  })
})
{code}

> DOC - Formulae in Evaluating DM page does not display correctly
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-16906
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16906
>             Project: Cassandra
>          Issue Type: Task
>          Components: Documentation
>            Reporter: Takuya inagaki
>            Assignee: Lorina Poland
>            Priority: Normal
>              Labels: doc
>         Attachments: スクリーンショット 2021-08-31 18.03.57.png
>
>
> In latest document, all of formulas does not display correctly.
> please refer to the following 
> [document|https://cassandra.apache.org/doc/latest/cassandra/data_modeling/data_modeling_refining.html]
>  and attached image.
>  
> h3. Environment
> browser: chrome 92.0.4515.159
> os: macOS Big Sur 11.5.2
>  
> h3. Slack 
> [https://the-asf.slack.com/archives/CJZLTM05A/p1630400708095100]
> https://the-asf.slack.com/archives/CJZLTM05A/p1630400951095900



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to