Recommended Posts

Over here.... https://forums.getpaint.net/topic/116364-math-support-latex/... physics_teacher asked if there was a way to "render on-the-fly latex in my diagrams". Unbelievably, my masterful Dr Scott's Markup Renderer was not doing the job. Wha....?

 

Anyway, I decided to write a much smaller and more specific plugin to render Math LaTeX equations using paint.net.

 

UI.png

 

Download it by hitting the big blue button >> Download

 

Installation:

 

  1. Unzip the file
  2. Copy both DLL files to one of these two locations (depending on which version of paint.net you have installed) ....
  • Classic: your \Effects\ folder.
  • Store:  /My Documents/ paint.net App Files/Effects/

       3. Restart paint.net

       4. find the plugin in Effects > Text Formations

 

Many thanks to toe_head2001 and null54 for their guidance as this plugin was being developed. Because of these guys the plugin scales with the system DPI and also handles paint.net themes.

 

B) enjoy.

  • Like 3
  • Upvote 5

Share this post


Link to post
Share on other sites

Thank you for your hard work!

This plugin only works on latest version of paint.net.

Full error message: PaintDotNet.WorkerThreadException: Worker thread threw an exception ---> System.MissingMethodException: Method not found: 'System.Drawing.Rectangle PaintDotNet.Effects.EffectEnvironmentParameters.get_SelectionBounds()'.

Share this post


Link to post
Share on other sites

Genius.  I love this.  

 

chalk-text.png

 

I did have a crash,  but for some reason it's not showing in the crash log folder.  I entered a formula which was wrong, then pressed Ctrl + F after the plugin closed = crash

 

Repro'ed the crash 

 

Spoiler

File: C:\Users\family\Documents\paint.net App Files\Effects\MathLaTex.dll
      Name: MathLaTex.MathLaTexPlugin
      Version: 1.0.0.27088
      Author: Copyright © Scott Stringer 2020
      Copyright: Renders LaTex equations to the active layer
      Website: https://www.getpaint.net/redirect/plugins.html
      Full error message: PaintDotNet.WorkerThreadException: Worker thread threw an exception ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at PaintDotNet.Surface.CopyFromBitmap(Bitmap bitmap, Boolean detectDishonestAlpha) in D:\src\pdn\src\Core\Surface.cs:line 983
   at MathLaTex.MathLaTexPlugin.OnSetRenderInfo(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs)
   at PaintDotNet.Effects.BackgroundEffectRenderer.ThreadFunction() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 267
   --- End of inner exception stack trace ---
   at PaintDotNet.Effects.BackgroundEffectRenderer.DrainExceptions() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 458
   at PaintDotNet.Menus.EffectMenuBase.DoEffect(Effect effect, EffectConfigToken token, Result`1 lazySelectionScans, Result`1 lazyRegionToRenderScans, Result`1 lazyClipMaskRenderer, Surface originalSurface, Exception& exception) in D:\src\pdn\src\PaintDotNet\Menus\EffectMenuBase.cs:line 0

 

Edited by welshblue
  • Upvote 1

Share this post


Link to post
Share on other sites
10 hours ago, welshblue said:

I entered a formula which was wrong, then pressed Ctrl + F after the plugin closed = crash

Yeh. Don't do that :mrcyan: 

 

Thanks for the crash report. I'll have a look at it tomorrow.

Share this post


Link to post
Share on other sites

Is there any specific syntax for brackets and braces ?
Normally for "{" it is :

\{

but the plugin says:

Quote

Error: Unknown symbol or command or predefined TexFormula: '{'

 

Thanks!

Share this post


Link to post
Share on other sites

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.

Sign in to follow this