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

SVG2 Implementation note: figure 6.3.1 not Formatting/rendering #10

Closed
MadLittleMods opened this issue Feb 16, 2015 · 12 comments
Closed

Comments

@MadLittleMods
Copy link
Contributor

In the SVG2 Appendix C: Implementation Requirements document, figure 6.3.1 is not formatting/rendering correctly in Chrome v40.0.2214.111. It does work in Firefox v35.0.1.

I am not sure if this is a problem with the syntax, MathML, MathJax, or Chrome. Should it just be converted to an image like the others?

Figure 6.3.1 was an image in the previous draft

I sent a message to the mailing list before I discovered the SVG WG on GitHub and thought this might be more appropriate.

@heycam
Copy link
Contributor

heycam commented Feb 16, 2015

Thanks for filing the issue. Yes it should be converted to use MathJax using the markup format that some of the formulae in painting.html have been (<div role="math" ...><math xmlns="..." ...>). Please feel free to file a PR if you have time! 😄

@MadLittleMods
Copy link
Contributor Author

@heycam Your response is a bit confusing to me. Figure 6.3.1 is in the MathML format. In Chrome, when you look at the dev console, you see Uncaught ReferenceError: local is not defined from load-mathjax.js:3 which is I assume is the problem. The other equations work because they are images.

But I assume you mean it should be converted over to LaTeX MathJax. I'll make a PR.

Rendered demo

\[
\begin{pmatrix}
  x\\ 
  y
\end{pmatrix}
=
\begin{pmatrix} 
  cos\phi     & -sin\phi\\
  sin\phi     & cos\phi
\end{pmatrix}
\cdot
\begin{pmatrix}
  r_xcos\theta\\
  r_ycos\theta
\end{pmatrix}
+
\begin{pmatrix}
  c_x\\ 
  c_y
\end{pmatrix}
\]

@heycam
Copy link
Contributor

heycam commented Feb 16, 2015

Thanks, Eric. I've found a problem with the MathJax script reference from the spec, which I'll look into.

Here is an example of one I converted to MathJax earlier: https://github.com/w3c/svgwg/blob/master/master/painting.html#L1186

So that uses MathML and a "readable" plain text version. But LaTeX should work too, as we're using the MathJax version that should accepts that and MathML. (And for a more complex thing like this matrix, the LaTeX itself might be the best "readable" plain text version we can provide.)

@MadLittleMods
Copy link
Contributor Author

@heycam How do I build the site to test my changes? I assume it has something to do with https://github.com/MadLittleMods/svgwg/tree/master/tools/publish

@heycam
Copy link
Contributor

heycam commented Feb 16, 2015

Yes those scripts are used for building the spec. If you have the right build prerequisites installed, you can just run make from within the root of the checkout (i.e. the svgwg directory). You will need make, python, perl, node (will it work with io.js, not sure, haven't tested!) and rsync.

@heycam
Copy link
Contributor

heycam commented Feb 16, 2015

OK I fixed the problem with loading MathJax in f301d27 and 15663b5.

@MadLittleMods
Copy link
Contributor Author

Do you still want to use LaTeX for that formula? And maybe convert the others eventually.

@heycam
Copy link
Contributor

heycam commented Feb 16, 2015

I guess MathML (still handled by MathJax) is slightly preferable, as then if MathJax doesn't work then at least there is a chance of viewing something. Although maybe seeing the LaTeX fallback is better? Let's stick with MathML for now and if the WG decides to switch to LaTeX for the source we'll do that later.

@MadLittleMods
Copy link
Contributor Author

kk, Thank you for the quick response and resolution.

@heycam
Copy link
Contributor

heycam commented Feb 16, 2015

Are you still able to convert the markup of those formulae in implnote.html to the format as used in painting.html (e.g. with the wrapping <div role="math"> etc.)? That still needs to be done.

@heycam heycam reopened this Feb 16, 2015
@MadLittleMods
Copy link
Contributor Author

Yes. Sorry it was unclear to me.

@MadLittleMods
Copy link
Contributor Author

Made PR #11 to update implnote.html Figure 6.3.1 markup.

boggydigital pushed a commit that referenced this issue Feb 5, 2016
As discussed on the meeting
(https://www.w3.org/2016/02/05-svg-minutes.html) there is nothing
special about sizing or presenting SVG in foreignObject context and we
already specify the relationship between CSS containing block and SVG
viewport in https://svgwg.org/svg2-draft/coords.html#ViewportSpace.

This resolves the issue #10 as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants