ArthurSonzogni / Diagon

Interactive ASCII art diagram generators. :star2:
https://arthursonzogni.com/Diagon/
MIT License
1.48k stars 56 forks source link

Support for subscripts #1

Closed KennethNielsen closed 4 years ago

KennethNielsen commented 4 years ago

Hi This looks like a really cool project.

I'm wondering whether there is support for subscrips?

ArthurSonzogni commented 4 years ago

It looks like there isn't. I will add it soon. Thanks for reporting this!

KennethNielsen commented 4 years ago

No problem and thanks.

ArthurSonzogni commented 4 years ago

I should now be fixed. I will let you confirm this is working the way you intented.

KennethNielsen commented 4 years ago

Hi @ArthurSonzogni thanks so much. There is one minor issue with, but I don't know if it is WontFix since it does make the layout considerations larger. For the usecase that I wanted to use it for, I would often be applying both a subscript and a superscript. But when I do, it seems to use the horizontal position of the ?-script I apply first, which makes it look a little odd.

Example if I want to add super script "i" and subscript Oxygen to an E. If I do E^i_Oxygen it produces:

 i      
E       
  Oxygen

and if I flip them the other way around, E_Oxygen^i, it does:

       i
E       
 Oxygen 

where what I was hoping for is:

 i
E       
 Oxygen 
ArthurSonzogni commented 4 years ago

This sounds like a good thing to do!

ArthurSonzogni commented 4 years ago

Done! I finally added the optimization you suggested in: https://github.com/ArthurSonzogni/Diagon/issues/1#issuecomment-638070807