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

Export to ASCII #211

Open
stschaef opened this issue Feb 20, 2024 · 2 comments
Open

Export to ASCII #211

stschaef opened this issue Feb 20, 2024 · 2 comments
Labels
feature-request new feature

Comments

@stschaef
Copy link

It's lovely to output actual tikz drawings from the editor, but I was wondering if it would be easy/possible to export to ASCII (or possibly Unicode)

My lab does a lot of category theory proofs in agda, and being able to include well-formatted commutative diagrams as comments is often very helpful. However, these are drawn by hand by us and often look messy. A principled method to generate ASCII diagrams would be used by at least 5 of us (and hopefully other people in the community!)

This is a very low priority issue and I've thought of homebaking something myself but have never found the time. I'd love to hear any thoughts on how you think this could leverage existing code

Thanks

@varkor
Copy link
Owner

varkor commented Feb 20, 2024

If there is an algorithm to convert commutative diagrams to ASCII, I would be willing to integrate it in quiver. That is, integration of new export methods is easy. However, an algorithm that produces accurate ASCII seems difficult in all but the simplest cases. It's certainly not something I have time to investigate myself, but if someone else came up with a solution, I would be willing to review it.

@varkor varkor added the feature-request new feature label Feb 20, 2024
@user202729
Copy link

user202729 commented May 3, 2024

Currently there is tex2mail, but...

  1. It's implemented in Perl.

  2. It in my opinion goes a bit too far in the conversion. E.g.

    [~]$ tex2mail <<< 'x^2'
     2
    x 
    
    [~]$ tex2mail <<< '\sqrt{x^2}'
     +--+
     | 2
    \|x 
    

    I don't think it's necessary to move the 2 to the line above.

Looking at https://tex.stackexchange.com/questions/6431/options-for-converting-latex-to-plain-text there doesn't seem to be too many options.

Depends on your editor a saner option (*) might be to install preview-latex or something and somehow make it preview commutative diagram too. (Theoretically possible as long as the editor isn't terminal-only)

(*): More setup cost in the beginning (edit everything in order to support embedding image in code), but seems to me like the "morally correct" solution to the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request new feature
Projects
None yet
Development

No branches or pull requests

3 participants