LaTeX to edX

Author courses for open edX using LaTeX


MIT announces the release of version 1.1 of the open-source latex2edx compiler for generating interactive MITx / edX courses from LaTeX

This system is particularly useful for producing interactive course content where the expressive power of LaTeX is helpful, e.g. with math, physics, CS content. latex2edx provides interactivity via the introduction of a basic new macro, the "answer box" \edXabox, which defines a mechanism for student input, as well as how that input is to be graded. Also introduced are structural macros for defining course structure.

latex2edx has been used to produce many MITx on edX courses, including 8.01x, 8.02x, 16.101x, and others. On-campus, it has been used in the residential MITx system for courses including 6.341, 6.s064, 8.21, 8.421, 18.03, 18.05, and 18.06. It may be used by authors to generate both an online course, and a PDF file, from a single set of source (e.g. *.tex) files.

Together with this release are latex2dnd and a demo course

  • latex2dnd:

    An open-source package for generating graphical drag-and-drop problems, complete with draggable labels, problem image, and solution image, from an input latex file.


  • An open-source demo course:

    generated via latex2edx, with examples of basic problems, text, and video modules, as well as advanced problems using custom graders written in python, and graphical input via javascript.

    Examples included:

    • Numerical response with inline labels
    • Custom response problem with two inputs
    • Formula response problem checking mathematical equations
    • Matrix expression equality testing (for math expressions with nonabelian operators)
    • Quantum mechanics ket input (i.e. checking expressions with vectors)
    • Adaptive hints using "hint_fn" scripts
    • Drag and drop problem created via latex2dnd
    • Graphical input via jsxgraph, using jsinput + customresponse

    The source code for the demo course is here:

    Here are some example screenshots of the course content:

    These are from a forthcoming course:

  • git2edx:

    A convenient way to develop content for edX using latex2edx is to develop your content using a git repository, e.g. with If you do so, the git2edx tool:

    can be used to trigger an automatic upload of your course content (stored in the git repo), via a webhook, to your open edX site. This upload happens via the "import" function available in edX Studio (the "CMS" part of open edX).

    git2edx needs to be installed and running on your own server, and configured with access credentials for your edX site. It works fine with the main and edge studio sites run by

    git2edx is employed to load the latex2edx-demo course from to

We welcome contributions to make these better!