You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by Leemoonsoo <gi...@git.apache.org> on 2016/11/06 19:29:49 UTC

[GitHub] zeppelin pull request #1606: [ZEPPELIN-777] Math formula support

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 <mo...@apache.org>
Date:   2016-11-06T19:21:02Z

    Format formula using MathJax

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1606: [ZEPPELIN-777] Math formula support

Posted by giaosudau <gi...@git.apache.org>.
Github user giaosudau commented on the issue:

    https://github.com/apache/zeppelin/pull/1606
  
    @tae-jun https://issues.apache.org/jira/browse/ZEPPELIN-1723


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1606: [ZEPPELIN-777] Math formula support

Posted by rawkintrevo <gi...@git.apache.org>.
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)



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1606: [ZEPPELIN-777] Math formula support

Posted by tae-jun <gi...@git.apache.org>.
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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1606: [ZEPPELIN-777] Math formula support

Posted by rawkintrevo <gi...@git.apache.org>.
Github user rawkintrevo commented on the issue:

    https://github.com/apache/zeppelin/pull/1606
  
    lgtm. +1 to merge
    
    again, awesome add @Leemoonsoo 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1606: [ZEPPELIN-777] Math formula support

Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the issue:

    https://github.com/apache/zeppelin/pull/1606
  
    @AhyoungRyu @anthonycorbacho addressed your comments.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1606: [ZEPPELIN-777] Math formula support

Posted by tae-jun <gi...@git.apache.org>.
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 \U0001f604 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1606: [ZEPPELIN-777] Math formula support

Posted by giaosudau <gi...@git.apache.org>.
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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1606: [ZEPPELIN-777] Math formula support

Posted by tae-jun <gi...@git.apache.org>.
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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1606: [ZEPPELIN-777] Math formula support

Posted by rawkintrevo <gi...@git.apache.org>.
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?



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1606: [ZEPPELIN-777] Math formula support

Posted by minahlee <gi...@git.apache.org>.
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">



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1606: [ZEPPELIN-777] Math formula support

Posted by tae-jun <gi...@git.apache.org>.
Github user tae-jun commented on the issue:

    https://github.com/apache/zeppelin/pull/1606
  
    @giaosudau Thanks! \U0001f44d I appreciate it \U0001f604 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1606: [ZEPPELIN-777] Math formula support

Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the issue:

    https://github.com/apache/zeppelin/pull/1606
  
    cc @1ambda @AhyoungRyu 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin pull request #1606: [ZEPPELIN-777] Math formula support

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1606: [ZEPPELIN-777] Math formula support

Posted by Leemoonsoo <gi...@git.apache.org>.
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. 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1606: [ZEPPELIN-777] Math formula support

Posted by tae-jun <gi...@git.apache.org>.
Github user tae-jun commented on the issue:

    https://github.com/apache/zeppelin/pull/1606
  
    So cooool! \U0001f44d


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1606: [ZEPPELIN-777] Math formula support

Posted by giaosudau <gi...@git.apache.org>.
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)



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1606: [ZEPPELIN-777] Math formula support

Posted by Leemoonsoo <gi...@git.apache.org>.
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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1606: [ZEPPELIN-777] Math formula support

Posted by AhyoungRyu <gi...@git.apache.org>.
Github user AhyoungRyu commented on the issue:

    https://github.com/apache/zeppelin/pull/1606
  
    Tested and it works well as expected \U0001f44d 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1606: [ZEPPELIN-777] Math formula support

Posted by giaosudau <gi...@git.apache.org>.
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.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1606: [ZEPPELIN-777] Math formula support

Posted by Leemoonsoo <gi...@git.apache.org>.
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?



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---