Skip to content

Major upcoming functionality for mystjs #838

@rowanc1

Description

@rowanc1

Over the last several months and at the last two team meetings @fwkoch, @stevejpurves and myself have been showing some of the new work on mystjs, which you can see/demo/try here: https://js.myst.tools

There is a ✨ton✨ of new functionality, including:

Where we are today

A lot of the code for mystjs was created for the Curvenote CLI (MIT licensed), some background on that here, and currently, much of the code for mystjs is actually currently hosted in https://github.com/curvenote/curvenote. Over the past few months we have been working (primarily with @choldgraf, @fperez, @colliand and @mmcky) to upstream this functionality into mystjs, this has taken the form of pulling out relevant functionality into non-curvenote-based tools that can be both open in the community and source-code sense.

By end of October

This will create some major changes to the mystjs repository. Our plan is to move to a mono-repository (using turbo + npm workspaces), with the mystjs repo containing the following packages:

  • citation-js-utils utility functions to deal with citations
  • intersphinx a command line tool and package for reading and writing o
  • jtex a templating library (see docs)
  • mystjs the current MyST parser, with extensibility
  • myst-cli this will provide CLI functionality for myst build mystdoc.md
  • myst-cli-utils some shared utils between intersphinx, jtex, and myst-cli
  • myst-common Some common utilities for working with ASTs
  • myst-frontmater definitions and validation for scientific authorship/affiliation frontmatter (see docs)
  • myst-templates types and validation for templates (including jtex, and some word templates coming soon!)
  • myst-to-docx convert myst documents to word docs!
  • myst-to-react create basic, ideally unthemed react components for content only
  • myst-to-tex convert myst to latex, to be used in combination with jtex to create stand alone latex documents
  • myst-transforms a number of transformations for use with myst AST to transform, e.g. links, citations, cross-references, admonitions
  • simple-validators validation utilities, that print all sorts of nice warnings

All of these are already packages that are available on npm, and if you want to contribute or poke around in the next month, we welcome PRs in the current repo!

Major pieces of work left

  • Split out the CLI from Curvenote specific functionality. The current CLI allows you to pull content from Curvenote APIs, authenticate, deploy etc. This won't be part of the mystjs CLI.
  • Allow for templates for the website. Currently there are a few assumptions for the default Curvenote theme. The myst-to-react tools are pretty close to being able to be reused across templates, but the web-server/theme needs to be split out more effectively. (nested under this is another task to improve the routing for content pages, which has too many assumptions built in and needs to be generalized).

In Screenshots

Export of MyST markdown files to PDFs, with 422 journal templates in the new myst-templates org
image

Cross-references with content, which works across pages (powered by a myst-spec content API)
spec-recursion

Interactive citations, figures, and table references.
curvenote-for-publishing

MyST demo component, which can now download word docs as well completely in the browser. :)
myst-demo-recurrsion

Questions and Feedback?!

Some of the push for this is to have robust javascript tools that are accessible in the future by tools like Jupyter (e.g. extending jupyterlab-myst) and interactive scientific journals. In working through this there is certainly overlap with the existing tools in the JupyterBook/MyST ecosystem. We have been investing in standardizing MyST as a markup language and AST, to ensure compatibility, but I am sure this effort opens up questions/concerns/uncertainty/feedback. I think what probably would be appropriate would be a blog article announcing some of this work in October, and it would be helpful to have some feedback on what we should address or spend time thinking through before a wider announcement. I would love feedback!

I am super excited by some of the developments recently in the MyST/JupyterBook community, and am glad that we can contribute to this community. Thanks and looking forward to feedback/questions! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions