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

Convert to PreTeXt features #33

Open
oscarlevin opened this issue May 17, 2023 · 0 comments
Open

Convert to PreTeXt features #33

oscarlevin opened this issue May 17, 2023 · 0 comments

Comments

@oscarlevin
Copy link
Owner

oscarlevin commented May 17, 2023

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.

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

1 participant