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

Default to latex output #387

Open
lukew3 opened this issue Dec 6, 2022 · 1 comment · Fixed by #402
Open

Default to latex output #387

lukew3 opened this issue Dec 6, 2022 · 1 comment · Fixed by #402
Assignees

Comments

@lukew3
Copy link
Owner

lukew3 commented Dec 6, 2022

Funcs should generate latex output by default, but can be converted to asciimath or other with kwarg. Conversion can be handled by the Generator class using a LaTeX to asciimath library. This must be done so that output doesn't have to be written for seperate outputs inside of each func. LaTeX should be able to easily convert to asciimath but not the other way around. May be more appropriate to call output "tex" instead of "latex" since we are only interested in styling, not building entire documents.

Checkpoints:

  • Remove format kwarg from functions and only export to latex
    • Inline latex blocks should start and end with $
      • Problems with text will not be enclosed in delimiters, only numbers and math operators.
  • In __call__ method of generator class, enable formatting output of self.func to asciimath if latex flag or format flag is present.
    • Maybe also be able to change latex delimiters to \\( and )\\. Should just give a kwarg with custom delimiter string
      • $$ and \\( \ )\\ are block delimiters, but I don't think we need these.
    • Should it default to asciimath because that is what people are familiar with or try to push latex adoption?
@lukew3 lukew3 self-assigned this Dec 19, 2022
@fredguth
Copy link

I believe that MathJax and pandoc can do that conversion. Is it ok to use external libs or you want the parsers being part of your lib and everything in Python?

@lukew3 lukew3 changed the title Default to latex export Default to latex output Dec 19, 2022
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

Successfully merging a pull request may close this issue.

2 participants