Skip to content

Convert to PreTeXt features #33

Description

@oscarlevin

Add a "convert" command that takes the current editor window, or currently selected text, and converts it to valid PreTeXt. This will not be useful for converting an entire document, but can be helpful if an author pastes in text from a different document, such as LaTeX or markdown.

Specifically, the function should:

  • Guess what format each paragraph of the input is in
  • Replace standard markup from that format with reasonable guesses for equivalent markup in PreTeXt
  • Highlight the changes for review (possibly).

A good first step would be to search for pairs of dollar signs around text (indicating math mode) and replace them with <m>...</m>. But note that this should not happen if the dollar signs are inside a \begin{tikzpicture}...\end{tikzpicture} pair.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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