开发者

How can I create a plugin to input math formulas in Notepad++?

开发者 https://www.devze.com 2023-02-11 03:32 出处:网络
I would like to be able to input some math formula in Notepad++. I\'m trying to get something close to the Microsoft equation (but much simpler)

I would like to be able to input some math formula in Notepad++.

I'm trying to get something close to the Microsoft equation (but much simpler)

Does anyone have any ideas on how to do so?

Update 1:

I did some more research and one solution would be to write a math edi开发者_如何学运维tor instead... I have no idea where or How to start, can someone give me some guidance ?? I mostly write in C++ a tutorial on how to write a math editor in c++ would be great


If you mean that you want equations for quick access within your code so that you don't have to consistently type them, I'm pretty sure there is no way to import those from Notepad++. As Konrad said, it is a plain text editor.

If your intention is for reusable equations, then you could write your own header (such as equations.h). For instance, say you want to make a reusable quadratic equation yourself, you could make a header file program:

static double quadratic(double a, double b, double c)
{

  double x;
    x = (-b + sqrt(pow(b, 2) - (4*a*c))) / (2*a) ;
   return x ;
}

And so long as you put the header file in your program directory and make sure you #include "equations.h", you could call any equations you make in this header.

0

精彩评论

暂无评论...
验证码 换一张
取 消