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

New line options #67

Merged
merged 4 commits into from Nov 19, 2022
Merged

New line options #67

merged 4 commits into from Nov 19, 2022

Conversation

ShahriarKh
Copy link
Contributor

@ShahriarKh ShahriarKh commented Nov 18, 2022

I expanded the "function" syntax to allow more options:
color, graphType, nSamples, range and closed.

With these new options, functions can be written like:

fn=x+12@color=green@graphType=polyline@range=[2,8]

and the spacing and the order don't matter:

color = #4390ba @ range =[2 ,15] @graphType =polyline@fn = x ^ PI

I chose @ as a separator because other characters are likely to appear in math equations. Also, the # may appear in color because it also accepts HEX codes.

@leonhma
Copy link
Owner

leonhma commented Nov 19, 2022

All right I have to check and try this...

@leonhma
Copy link
Owner

leonhma commented Nov 19, 2022

First of all, this is a great idea to have some more customizability for your plots. That being said, the previous format (f(x)=...) doesn't work anymore. I am fine with having a not-so-human-friendly format in the code block that gets pasted into the markdown, but I think this is more technical than the average user of the GUI expects. Maybe I could try building a list thing (see screenshot, not bad for my first time using figma, eh?), but that would take some time as I am currently busy with exams and school-related stuff...

image

@ShahriarKh
Copy link
Contributor Author

Surely, we need the GUI, and not just for non-tech-savvy users. But on the other hand, most of (if not all) Obsidian users know basic markdown, and I think the syntax is fairly simple to learn:

property=value @ property2=value2 @ ...

So, why not have both? 🙂

@leonhma
Copy link
Owner

leonhma commented Nov 19, 2022

I would say we use the new syntax in the markdown code block. The GUI is just a Zero-Code way for users to generate such a code block. So zero code GUI and your syntax in the markdown code block? I'll merge yours and then go from there with the GUI. Sounds good?

1 similar comment
@leonhma
Copy link
Owner

leonhma commented Nov 19, 2022

I would say we use the new syntax in the markdown code block. The GUI is just a Zero-Code way for users to generate such a code block. So zero code GUI and your syntax in the markdown code block? I'll merge yours and then go from there with the GUI. Sounds good?

@ShahriarKh
Copy link
Contributor Author

Exactly!

@leonhma leonhma merged commit 4056dc3 into leonhma:master Nov 19, 2022
@ShahriarKh ShahriarKh mentioned this pull request Mar 2, 2023
@leonhma
Copy link
Owner

leonhma commented Mar 4, 2023

Okay. I figured out why I didn't release this yet. The new syntax is handy but also incompatible with the old format. If we release this now, all existing code blocks would break and I presume the majority of the current 2,800 users won't be happy. As I said, I am working on version 2 of this plugin, which will have all of these features and more. I can't say when v2 will be released, but it's on my list. Here's what the functions list currently looks like on the v2 branch:
Screenshot 2023-03-04 10 05 18

@ShahriarKh
Copy link
Contributor Author

This looks really good!

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

Successfully merging this pull request may close these issues.

None yet

2 participants