Skip to content

linebreaks incompatible with href using latex input and HTML-CSS output #1022

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

Closed
lionelperrin opened this issue Jan 27, 2015 · 6 comments
Closed
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Available v2.7

Comments

@lionelperrin
Copy link

When I turn on linebreaks: { automatic: true } then the links in my formula are not rendered.
When I turn off linebreaks, the links are rendered as expected.

Here follows an example of tex formula:
$$ \href(/audit/45, A) + \href(/audit/46, B) + \href(/audit/47, C) $$

I've reproduced with MathJax 2.3.0 and MathJax 2.4.0

Regards,

Lionel

@pkra
Copy link
Contributor

pkra commented Jan 27, 2015

I'm unable to reproduce this. Can you share a live sample (e.g., on jsbin, codepen etc) where this fails?

FWIW, the syntax is $$ \href{url}{math} $$ (see the docs)

@lionelperrin
Copy link
Author

You can try with the following code. I reproduced it on jsbin: http://jsbin.com/lizanadiro/3/

In case you need it:

<head><script type="text/x-mathjax-config">
MathJax.Hub.Config({
  "HTML-CSS": {
    linebreaks: { automatic: true },
  }
  });
  </script>
  <script type="text/javascript"
  src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</head>
<body>
  <div style='width: 500px'>
  $$ \href{http://docs.mathjax.org/}{SomethingQuiteLongTooFillTheWholeScreen} + \href{http://docs.mathjax.org/}{SomethingQuiteLongTooFillTheWholeScreenToo} + \href{http://docs.mathjax.org/}{AnotherSomethingQuiteLongTooFillTheWholeScreen} + \href{http://docs.mathjax.org/}{And A LastSomethingQuiteLongTooFillTheWholeScreen} $$
  </div>
</body>

@pkra
Copy link
Contributor

pkra commented Jan 28, 2015

Thanks for following up. Strange; I could've sworn I did something similar yesterday and failed to reproduce. Oh well, I can reproduce it in your example.

Thanks so much for the report. We'll look into it.

@pkra pkra added Accepted Issue has been reproduced by MathJax team Investigate and removed Cannot Reproduce labels Jan 28, 2015
@pkra pkra removed the Investigate label Apr 15, 2015
@pkra pkra added this to the A future release milestone Apr 15, 2015
@pkra pkra modified the milestones: MathJax v2.x.x, A future release Apr 20, 2016
dpvc added a commit to dpvc/MathJax that referenced this issue Jul 6, 2016
@dpvc
Copy link
Member

dpvc commented Jul 6, 2016

The issue1022 branch of my fork of MathJax handles the hrefs during line breaks.

dpvc added a commit that referenced this issue Jul 23, 2016
Handle hrefs during line breaking.  #1022
@dpvc
Copy link
Member

dpvc commented Jul 23, 2016

==> Merged.

@dpvc dpvc added Merged Merged into develop branch and removed Ready for Review labels Jul 23, 2016
@dpvc dpvc closed this as completed Jul 23, 2016
@dpvc
Copy link
Member

dpvc commented Aug 18, 2016

==> In testsuite

MathMLToDisplay/Topics/LineBreak/issue1022.html

dpvc added a commit to mathjax/MathJax-test that referenced this issue Aug 18, 2016
@dpvc dpvc added v2.7 Fixed and removed Merged Merged into develop branch labels Jan 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Available v2.7
Projects
None yet
Development

No branches or pull requests

3 participants