Uploaded image for project: 'Zeppelin'
  1. Zeppelin
  2. ZEPPELIN-777

Add math formula support for Markdown interpretter

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.7.0
    • Component/s: None
    • Labels:
      None

      Description

      One of the leading use cases for Zeppelin is for doing collaborative data science. Being able to easily describe the mathematics of algorithms in local notebooks would be a very useful improvement.

        Issue Links

          Activity

          Hide
          danilo.ascione Danilo Ascione added a comment -

          TeX support would be great.

          Show
          danilo.ascione Danilo Ascione added a comment - TeX support would be great.
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user Leemoonsoo opened a pull request:

          https://github.com/apache/zeppelin/pull/1606

          ZEPPELIN-777 Math formula support

              1. What is this PR for?
                This PR adds support for formatting math formula formatting in %html display system using MathJax library.

          Note that, it works

              1. What type of PR is it?
                Feature
              1. Todos
          • [x] - Format math formula with MathJax library
              1. What is the Jira issue?
                https://issues.apache.org/jira/browse/ZEPPELIN-777
              1. How should this be tested?
                try run following codes.
                ```
                %md
                When
                (a
                ne 0
                ), there are two solutions to
                (ax^2 + bx + c = 0
                ) and they are
                $$x = {-b \pm \sqrt {b^2-4ac}

                \over 2a}.$$
                ```
                Note MathJax works better with `markdown.parser.type` property set `pegdown`, in markdown interpreter. With default markdown4j parser, some formula is not well displayed. (for example, ax^2) I think this will not be a big problem because of we'll remove markdown4j https://github.com/apache/zeppelin/pull/1594

          ```
          %sh echo -e "%html \$\$a = b\$\$"
          ```

          ```
          %spark println("%html $$b = c$$")
          ```

              1. Screenshots (if appropriate)
                ![image](https://cloud.githubusercontent.com/assets/1540981/20040864/3b69c540-a414-11e6-8f8a-fdf7ee1370a6.png)
              1. Questions:
          • Does the licenses files need update? yes
          • Is there breaking changes for older versions? no
          • Does this needs documentation? yes

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/Leemoonsoo/zeppelin ZEPPELIN-777

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/zeppelin/pull/1606.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #1606


          commit 05a699939b18332e20b99a0ad4def1fb63b07a24
          Author: Lee moon soo <moon@apache.org>
          Date: 2016-11-06T19:21:02Z

          Format formula using MathJax


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user Leemoonsoo opened a pull request: https://github.com/apache/zeppelin/pull/1606 ZEPPELIN-777 Math formula support What is this PR for? This PR adds support for formatting math formula formatting in %html display system using MathJax library. Note that, it works What type of PR is it? Feature Todos [x] - Format math formula with MathJax library What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-777 How should this be tested? try run following codes. ``` %md When (a ne 0 ), there are two solutions to (ax^2 + bx + c = 0 ) and they are $$x = {-b \pm \sqrt {b^2-4ac} \over 2a}.$$ ``` Note MathJax works better with `markdown.parser.type` property set `pegdown`, in markdown interpreter. With default markdown4j parser, some formula is not well displayed. (for example, ax^2) I think this will not be a big problem because of we'll remove markdown4j https://github.com/apache/zeppelin/pull/1594 ``` %sh echo -e "%html \$\$a = b\$\$" ``` ``` %spark println("%html $$b = c$$") ``` Screenshots (if appropriate) ! [image] ( https://cloud.githubusercontent.com/assets/1540981/20040864/3b69c540-a414-11e6-8f8a-fdf7ee1370a6.png ) Questions: Does the licenses files need update? yes Is there breaking changes for older versions? no Does this needs documentation? yes You can merge this pull request into a Git repository by running: $ git pull https://github.com/Leemoonsoo/zeppelin ZEPPELIN-777 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/zeppelin/pull/1606.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1606 commit 05a699939b18332e20b99a0ad4def1fb63b07a24 Author: Lee moon soo <moon@apache.org> Date: 2016-11-06T19:21:02Z Format formula using MathJax
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user Leemoonsoo commented on the issue:

          https://github.com/apache/zeppelin/pull/1606

          cc @1ambda @AhyoungRyu

          Show
          githubbot ASF GitHub Bot added a comment - Github user Leemoonsoo commented on the issue: https://github.com/apache/zeppelin/pull/1606 cc @1ambda @AhyoungRyu
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user Leemoonsoo commented on the issue:

          https://github.com/apache/zeppelin/pull/1606

          @AhyoungRyu @anthonycorbacho addressed your comments.

          Show
          githubbot ASF GitHub Bot added a comment - Github user Leemoonsoo commented on the issue: https://github.com/apache/zeppelin/pull/1606 @AhyoungRyu @anthonycorbacho addressed your comments.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user AhyoungRyu commented on the issue:

          https://github.com/apache/zeppelin/pull/1606

          Tested and it works well as expected πŸ‘

          Show
          githubbot ASF GitHub Bot added a comment - Github user AhyoungRyu commented on the issue: https://github.com/apache/zeppelin/pull/1606 Tested and it works well as expected πŸ‘
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user tae-jun commented on the issue:

          https://github.com/apache/zeppelin/pull/1606

          So cooool! πŸ‘

          Show
          githubbot ASF GitHub Bot added a comment - Github user tae-jun commented on the issue: https://github.com/apache/zeppelin/pull/1606 So cooool! πŸ‘
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user minahlee commented on the issue:

          https://github.com/apache/zeppelin/pull/1606

          It works with dev mode (`grunt serve`) but doesn't work if you build source with mvn.
          Attaching screenshot:
          <img width="1274" alt="screen shot 2016-11-07 at 11 46 33 pm" src="https://cloud.githubusercontent.com/assets/8503346/20061744/8b2b1508-a544-11e6-8347-00ad672fd6b9.png">

          Show
          githubbot ASF GitHub Bot added a comment - Github user minahlee commented on the issue: https://github.com/apache/zeppelin/pull/1606 It works with dev mode (`grunt serve`) but doesn't work if you build source with mvn. Attaching screenshot: <img width="1274" alt="screen shot 2016-11-07 at 11 46 33 pm" src="https://cloud.githubusercontent.com/assets/8503346/20061744/8b2b1508-a544-11e6-8347-00ad672fd6b9.png">
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user rawkintrevo commented on the issue:

          https://github.com/apache/zeppelin/pull/1606

          @Leemoonsoo awesome work! so happy to see this coming through!

          I am running into the same problem as @minahlee Thoughts on why `mvn` build wouldn't make this come out right?

          Show
          githubbot ASF GitHub Bot added a comment - Github user rawkintrevo commented on the issue: https://github.com/apache/zeppelin/pull/1606 @Leemoonsoo awesome work! so happy to see this coming through! I am running into the same problem as @minahlee Thoughts on why `mvn` build wouldn't make this come out right?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user Leemoonsoo commented on the issue:

          https://github.com/apache/zeppelin/pull/1606

          @minahlee @rawkintrevo I have fixed the problem. Now packaged version works as well.

          Show
          githubbot ASF GitHub Bot added a comment - Github user Leemoonsoo commented on the issue: https://github.com/apache/zeppelin/pull/1606 @minahlee @rawkintrevo I have fixed the problem. Now packaged version works as well.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user rawkintrevo commented on the issue:

          https://github.com/apache/zeppelin/pull/1606

          @Leemoonsoo still not working for me, but it could be on my end- I have a hell of a time with git

          Did a fetch /hard reset within the last hour.
          ```bash
          $ git fetch leemoonsoo
          $ git reset --hard leemoonsoo/zeppelin-777
          $ mvn clean package -DskipTests
          <build success>
          $ bin/zeppelin-daemon.sh start
          ```

          Cleared browser cache / history / app data.

          ![screenshot from 2016-11-08 10-57-45](https://cloud.githubusercontent.com/assets/5852441/20108606/3bbcfece-a5a2-11e6-9533-d01304ea91f8.png)

          Show
          githubbot ASF GitHub Bot added a comment - Github user rawkintrevo commented on the issue: https://github.com/apache/zeppelin/pull/1606 @Leemoonsoo still not working for me, but it could be on my end- I have a hell of a time with git Did a fetch /hard reset within the last hour. ```bash $ git fetch leemoonsoo $ git reset --hard leemoonsoo/zeppelin-777 $ mvn clean package -DskipTests <build success> $ bin/zeppelin-daemon.sh start ``` Cleared browser cache / history / app data. ! [screenshot from 2016-11-08 10-57-45] ( https://cloud.githubusercontent.com/assets/5852441/20108606/3bbcfece-a5a2-11e6-9533-d01304ea91f8.png )
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user Leemoonsoo commented on the issue:

          https://github.com/apache/zeppelin/pull/1606

          @rawkintrevo I clean cloned this PR, build and tried with browser cache clean, but couldn't reproduce the problem. Could you see `zeppelin-web/dist/jax` directory after the build?

          Show
          githubbot ASF GitHub Bot added a comment - Github user Leemoonsoo commented on the issue: https://github.com/apache/zeppelin/pull/1606 @rawkintrevo I clean cloned this PR, build and tried with browser cache clean, but couldn't reproduce the problem. Could you see `zeppelin-web/dist/jax` directory after the build?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user rawkintrevo commented on the issue:

          https://github.com/apache/zeppelin/pull/1606

          lgtm. +1 to merge

          again, awesome add @Leemoonsoo

          Show
          githubbot ASF GitHub Bot added a comment - Github user rawkintrevo commented on the issue: https://github.com/apache/zeppelin/pull/1606 lgtm. +1 to merge again, awesome add @Leemoonsoo
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user Leemoonsoo commented on the issue:

          https://github.com/apache/zeppelin/pull/1606

          Thanks @rawkintrevo and @minahlee for the review.

          Merge to master if there's no further comment.

          Show
          githubbot ASF GitHub Bot added a comment - Github user Leemoonsoo commented on the issue: https://github.com/apache/zeppelin/pull/1606 Thanks @rawkintrevo and @minahlee for the review. Merge to master if there's no further comment.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/zeppelin/pull/1606

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/zeppelin/pull/1606
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user giaosudau commented on the issue:

          https://github.com/apache/zeppelin/pull/1606

          I build a distribution from source code but it's failed because of missing /jax /extesions/
          Did you guys test this case?
          How to fix it?
          Thanks.

          Show
          githubbot ASF GitHub Bot added a comment - Github user giaosudau commented on the issue: https://github.com/apache/zeppelin/pull/1606 I build a distribution from source code but it's failed because of missing /jax /extesions/ Did you guys test this case? How to fix it? Thanks.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user tae-jun commented on the issue:

          https://github.com/apache/zeppelin/pull/1606

          @giaosudau Hi! Thanks for sharing the issue

          Could you please share your building command line and error log?

          I don't know why, but I guess MathJax library wasn't downloaded from bower.

          Show
          githubbot ASF GitHub Bot added a comment - Github user tae-jun commented on the issue: https://github.com/apache/zeppelin/pull/1606 @giaosudau Hi! Thanks for sharing the issue Could you please share your building command line and error log? I don't know why, but I guess MathJax library wasn't downloaded from bower.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user giaosudau commented on the issue:

          https://github.com/apache/zeppelin/pull/1606

          @tae-jun
          No error at building source code.
          But the error happens when I deploy with ZEPPELIN_SERVER_CONTEXT_PATH is /zeppelin/

          ![Log](http://i.imgur.com/DE1Ugix.jpg)

          Show
          githubbot ASF GitHub Bot added a comment - Github user giaosudau commented on the issue: https://github.com/apache/zeppelin/pull/1606 @tae-jun No error at building source code. But the error happens when I deploy with ZEPPELIN_SERVER_CONTEXT_PATH is /zeppelin/ ! [Log] ( http://i.imgur.com/DE1Ugix.jpg )
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user tae-jun commented on the issue:

          https://github.com/apache/zeppelin/pull/1606

          @giaosudau Thanks for the prompt response!

          So you mean it doesn't happen without ZEPPELIN_SERVER_CONTEXT_PATH?
          I've never used that option so I might not be helpful ^^;

          But could you please check `$ZEPPELIN_HOME/zeppelin-web/bower_components/MathJax/jax` directory exists? To ensure that bower downloaded dependencies well πŸ˜„

          Show
          githubbot ASF GitHub Bot added a comment - Github user tae-jun commented on the issue: https://github.com/apache/zeppelin/pull/1606 @giaosudau Thanks for the prompt response! So you mean it doesn't happen without ZEPPELIN_SERVER_CONTEXT_PATH? I've never used that option so I might not be helpful ^^; But could you please check `$ZEPPELIN_HOME/zeppelin-web/bower_components/MathJax/jax` directory exists? To ensure that bower downloaded dependencies well πŸ˜„
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user giaosudau commented on the issue:

          https://github.com/apache/zeppelin/pull/1606

          @tae-jun
          I checked there is a folder MathJax in the source I use to build but what I mean here is the URL calling jax lib was wrong. You can check the URL of jax in the image above.
          =>>> It must be append /zeppelin/jax will be right and I already tested if I change url to this it works.
          That mean configuration of this library was wrong and I already have the library included.

          Show
          githubbot ASF GitHub Bot added a comment - Github user giaosudau commented on the issue: https://github.com/apache/zeppelin/pull/1606 @tae-jun I checked there is a folder MathJax in the source I use to build but what I mean here is the URL calling jax lib was wrong. You can check the URL of jax in the image above. =>>> It must be append /zeppelin/jax will be right and I already tested if I change url to this it works. That mean configuration of this library was wrong and I already have the library included.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user tae-jun commented on the issue:

          https://github.com/apache/zeppelin/pull/1606

          @giaosudau You clarified the issue! Would you like to create a [JIRA](https://issues.apache.org/jira/browse/ZEPPELIN) ticket for that? Then other developers will see the issue. Since this PR is already merged, so it seems to be handled on another PR. Thanks.

          Show
          githubbot ASF GitHub Bot added a comment - Github user tae-jun commented on the issue: https://github.com/apache/zeppelin/pull/1606 @giaosudau You clarified the issue! Would you like to create a [JIRA] ( https://issues.apache.org/jira/browse/ZEPPELIN ) ticket for that? Then other developers will see the issue. Since this PR is already merged, so it seems to be handled on another PR. Thanks.
          Hide
          githubbot ASF GitHub Bot added a comment -
          Show
          githubbot ASF GitHub Bot added a comment - Github user giaosudau commented on the issue: https://github.com/apache/zeppelin/pull/1606 @tae-jun https://issues.apache.org/jira/browse/ZEPPELIN-1723
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user tae-jun commented on the issue:

          https://github.com/apache/zeppelin/pull/1606

          @giaosudau Thanks! πŸ‘ I appreciate it πŸ˜„

          Show
          githubbot ASF GitHub Bot added a comment - Github user tae-jun commented on the issue: https://github.com/apache/zeppelin/pull/1606 @giaosudau Thanks! πŸ‘ I appreciate it πŸ˜„

            People

            • Assignee:
              moon Lee moon soo
              Reporter:
              rawkintrevo Trevor Grant
            • Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development