Jump to content

Math Support (LaTex)?


Recommended Posts

Original thread: https://forums.getpaint.net/topic/1309-plug-in-model-for-tools/

 

 

Hi,

 

I just would like to update this post some.

 

I teach physics for highschool, and since the covid19 lockdown I have been using paint.net extensively to create on-the-fly diagrams and schematics while giving virtual lessons, with a simple screen sharing app. I use paint.net because it's simple and free, and I can then post our work together easily later on my website.

 

My students reported that I do so with such skill and speed that they decided to install paint.net themselves to create stuff like I do.

 

I find myself wishing we could add a math plugin that's easy to use in real time for the virtual lessons to be more comfortable.

For instance, adding a latex converter field in the toolbar would be a major plus. It would save me about a third of the time devoted to our lessons.

I've looked at the Dr Scott's Markup Renderer plugin, but it's just too slow if I have to implement 3 steps to get what I need each time.

 

So, I am allocating some time to create my own plugin to render on-the-fly latex in my diagrams.

I think adding a tool to do just that could be beneficial for math and physics teachers alike.

 

Hope my argument makes a point.

 

Cheers,

Edited by BoltBait
Split from original thread
Link to comment
Share on other sites

7 hours ago, physics_teacher said:

am allocating some time to create my own plugin to render on-the-fly latex in my diagrams.

I wish you well with this. If you need assistance just ask.

Link to comment
Share on other sites

9 hours ago, physics_teacher said:

For instance, adding a latex converter field in the toolbar would be a major plus.

 

A plugin cannot add items to the toolbar.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

I've been playing with this. Here's a rough first draft.

 

MathLaTex.zip

 

Copy MathLatex.dll to the \Effects\ folder.

 

Copy wpfMath.dll to the paint.net installation folder.

 

Find the plugin in Effects > Text

Link to comment
Share on other sites

1 hour ago, Ego Eram Reputo said:

Copy wpfMath.dll to the paint.net installation folder.

 

This would not work for the Windows Store version.

 

You should think about using ILMerge to merge wpfMath.dll into MathLatex.dll, if the wpfMath license allows it.

This would simplify distribution of the final plugin.

  • Upvote 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

Good idea. I'll give it a spin this weekend.

 

There's a bit more to do as I rushed the whole thing. Its the first plugin I've built with @toe_head2001's VS templates. They are pretty impressive! Also the first time I've had a dependency to think about.

 

I'm pretty sure I'm copying the work surface badly 😕 reckon you proper programmers would shudder 😈

Link to comment
Share on other sites

6 minutes ago, BoltBait said:

In PreRender() do it this way:


wrk.CopySurface(src);

 

 

Depending on your Effect, it's not always necessary to copy the entire Surface in PreRender().  Spend less CPU cycles by constraining it to the active selection bounds.

Rectangle selection = EnvironmentParameters.SelectionBounds;
wrk.CopySurface(src, selection.Location, selection);
  • Upvote 1

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...