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

latex2edx local server for edX instance #59

Open
eazaika opened this issue Nov 23, 2018 · 1 comment
Open

latex2edx local server for edX instance #59

eazaika opened this issue Nov 23, 2018 · 1 comment

Comments

@eazaika
Copy link

eazaika commented Nov 23, 2018

My own edx https://sandbox.etu.ru uses xblocks with latex https://studio-input-filter.mitx.mit.edu/latex2edx?raw=1 to compile mathcode. What can I do to make compilation on the local server? After installing repo mitocw/latex2edx what should I do?

$.ajax({
          url: "https://studio-input-filter.mitx.mit.edu/latex2edx?raw=1",
          type: "POST",
          data: "" + hlsdata,
          crossDomain: true,
          processData: false,
          success: function(data) {
              xml = data.xml;
              if (xml.length == 0) {
                  alert('Conversion failed!  error:' + data.message);
              } else {
                  // If a parent CodeMirror editor is open (LaTeX problem being edited), set the text
                  // there. Otherwise, set the text in the active TinyMCE Editor for the case
                  // of an HTML component being edited.
                  var parentCodemirrorEditor = el.closest('.xblock-studio_view').find('.CodeMirror-wrap');
                  if (parentCodemirrorEditor.length > 0) {
                      parentCodemirrorEditor[0].CodeMirror.setValue(xml);
                  }
                  else if (window.tinyMCE !== undefined && window.tinyMCE.activeEditor !== undefined) {
                      window.tinyMCE.activeEditor.setContent(xml);
                  }
                  save_hls(el);
              }
          },
          error: function() {
              alert('Error: cannot connect to latex2edx server');
          }
      });
@jramnai
Copy link

jramnai commented Mar 29, 2019

I also want to do the same, any suggestion or pointer???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants