• Please use real names.

    Greetings to all who have registered to OPF and those guests taking a look around. Please use real names. Registrations with fictitious names will not be processed. REAL NAMES ONLY will be processed

    Firstname Lastname

    Register

    We are a courteous and supportive community. No need to hide behind an alia. If you have a genuine need for privacy/secrecy then let me know!
  • Welcome to the new site. Here's a thread about the update where you can post your feedback, ask questions or spot those nasty bugs!

Mathematical equations in OPF posts

Doug Kerr

Well-known member
Hi, Ted,

This is from the manual for Writer2LaTeX:

2.2. Using the filters

The filters provided by Writer2LaTeX are all export filters. This means that the filters are to be found in​
the File – Export menu in Writer or Calc.​

There seems to be another extension that will allow input to LibreOffce as LaTex code. I have not really pursued that.

Best regards,

Doug
 

Doug Kerr

Well-known member
A document including (only) this equation in LibreOffice Write (generated in LibreOffice math):

1785354459543.png

generates this LaTex code via the Writer2LaTeX extension (I have omitted some "preamble"):

Code:
\begin{document}
\begin{equation*}
f(x)=\sum _{n=0}^{\infty }\frac{f^{(n)}(x_0)}{n!}(x-x_0)^n
\end{equation*}
\end{document}

Best regards,

Doug
 
Last edited:

Ted Cousins

Member
Hi Doug, thanks for the heads-ups.

I recall that copying and pasting ChatGPT responses into Fora ** or into a plain ANSI text, the rendering would be what looks like LaTex, not the "proper" formula as seen in ChatGPT. Quite tedious editing that into plain ASCII or Unicode for that matter.

So for now I'm sticking with Libre Office Math and copying the formulaic image direct from their "how it looks" pane.

** Google does it here, too, voila:

Google AI said:
The classic photographic exposure metering formula is expressed mathematically as \(\frac{N^2}{t} = \frac{E \cdot S}{C}\), which relates aperture (N), shutter speed (t), scene luminance (E), ISO film speed/ISO (S), and a meter calibration constant (C). Cameras use this relationship to target an 18% middle gray reflection.

I asked a very simple question and they should have probably given me the formula for (K).

I'm not real good at translating the above into plain text or even Unicode.

best,

Ted.
 
Last edited:

Doug Kerr

Well-known member
Hi, Ted,

A small comment on the reflected light metering equation cited by the 'bot:

E is illuminance on the scene not the scene luminance.

It is easy for authors to get those terms mixed up (I do it all the time).

Best regards,

Doug
 

Doug Kerr

Well-known member
Hi, Ted,.

Interestingly enough, this code cited by the 'bot:

Code:
\(\frac{N^2}{t} = \frac{E \cdot S}{C}\)
is accepted by MathMagic, but is rejected as "ill=formed" by the LaTex input facility in Thunderbird.

I seems to object to the enclosure of the entire formula in \) - \).

Indeed, I think if rendered that way, it would be a mathematical curiosity. If rendered as coded, it would look like this (this made by hand in MathMagic):

1785429140557.png


But when that code is loaded into MathMagic, it takes the liberty of making:

1785429256771.png


Interesting.

Best regards,

Doug
 
Last edited:

Doug Kerr

Well-known member
I think the bottom line in the original issue of this thread is:

To include mathematical equations (formulas, expressions) in conventional form in OPF posts, they must be included as "pictures" of the construct.

There are several applications in which we can compose such constructs and see them "in conventional form", from which we can grab them as pictures (perhaps as screen shots, with various tools) and then Paste them into the OPF message composition window.

I think.

Best regards,

Doug
 
Last edited:

Doug Kerr

Well-known member
It is important to note that all files with *.tex filenames that carry a LaTeX description of an equation are not the same.

Various kinds of them have the actual LaTeX code for the equation wrapped in various layers of "wrapper".

The result is that an application than supposedly can open a LaTeX file may be able to deal with some of these forms but not others.

For example, MathMagic Lite will not open a file containing only the LaTeX code for an equation. (Which probably is not any of the recognized kinds of LaTeX "file").

Yet I can have that code on the Windows Clipboard and paste it into a MathMagic Lite equation composition window and (assuming it is valid) Math Magic will replace it with the "developed" equation.

Best regards,

Doug
 

Doug Kerr

Well-known member
I have not yet studied to any degree the StarMath language used to input equations into LibreOffice math. But it seems fairly "logical" in basic uses.

For example, this equation:

1785437554931.png

is entered in StarMath thus:

Code:
G_{%mu %nu} + %LAMBDA g_{%mu %nu}= frac{8 %pi G}{c^4} T_{%mu %nu}

This equation:

1785437650171.png

is entered in StarMath thus:

Code:
%DELTA t' = { %DELTA t } over sqrt{ 1 - v^2 over c^2 }

As I mentioned before, the spaces are mostly gratuitous, and can in general be omitted (except where separating keywords from adjacent elements). So this code produces the same equation:

Code:
%DELTA t'={%DELTA t}over sqrt{1-v^2 over c^2}


Best regards,

Doug
 
Last edited:

Ted Cousins

Member
I think the bottom line in the original issue of this thread is:

To include mathematical equations (formulas, expressions) in conventional form in OPF posts, they must be included as "pictures" of the construct.

Agreed 100% and not just here in OPF but in several other places that I infest ...
 
Last edited:

Doug Kerr

Well-known member
I think if I were to recommend a free-standing, free, WYSIWYG equation editor for both Windows and Mac platforms it would be MathMagic Lite. It is available here:


One caution: If in Windows the display "magnification" is set to greater than 125%, The Styles dialog in MathMagic is not properly presented and the buttons do not work. There is a convenient workaround that nicely overcomes this problem. I will not describe it here, but if anyone runs into that problem let me know and I can give you the solution.

Best regards,

Doug
 

Doug Kerr

Well-known member
My personal preferred workflow for incorporating equations composed in MathMagic Lite into an OPF post is to capture a picture of the equation as shown onscreen in MathMagic Lite with a "screenshot" program that provides for selecting a region to be captured (I use MWSnap). Then I just Paste it into the OPF message composition screen. It generally then needs to be resized (by dragging a corner handle).

But one could also save the equation as, for example, a PNG file and then load that into the OPF composition window (using the "Attach files" button) and call for it to be Inserted as a Full image.

But the pixel resolution of those saved "picture" files is not very high (and I don't know yet how to change that). Typically the "picture grab" technique will lead to a higher pixel resolution.

This is from the exported PNG file:

Quadratic_formula-1002.png

(left at the size it had after loading and inserting).

This is from a "screen grab" of the equation at "400%" zoom:
1785524069933.png

at the size as inserted.

Here is the same but resized to a size roughly comparable to the first example

1785524128365.png


Best regards,

Doug
 

Doug Kerr

Well-known member
Aha! I have found how, in MathMagic Lite, to increase the pixel resolution of exported "picture" files. But it cannot go too far. (in the "paid" versions there is a larger range).

The equation I used above, saved as a PNG file with the pixel resolution at the highest available setting for MathMagic, has pixel dimensions of 221 px × 71 px. That file, loaded here and inserted, looks like this (as inserted):

Quadratic_formula-1002A.png

At the size we would probably want it to be in an actual post, it should look quite spiffy (like so):

Quadratic_formula-1002A.png


Best regards,

Doug
 
Last edited:

Doug Kerr

Well-known member
Now, just to make this have something to do with photography, this is the formula for the illuminance in the image (on the focal plane) from a point on the object ("scene"), for the object at infinity:

Image_illuminance-1001.png

where EI is the illuminance on the image, LO is the luminance of the place on the object, N is the aperture, as an f-number,. and T is the transmittance of the lens.

This formula was composed in MS Word 2003 with the indigenous equation editor, MathType. It was Copied from the Word document in regular view and then Pasted into the equation composition screen in MathMagic Lite. It was then exported as a PNG file. That was loaded here and the image inserted.

Best regards,

Doug
 

Doug Kerr

Well-known member
Of course a quicker route, which I usually use in practice, is to Copy a picture of the equation from the MathType composition window (from inside the MS Word document) and then just Paste it here:

1785530952462.png


Best regards,

Doug
 

Ted Cousins

Member
Of course a quicker route, which I usually use in practice, is to Copy a picture of the equation from the MathType composition window (from inside the MS Word document) and then just Paste it here:

View attachment 14318

Best regards,

Doug
Always in favor of quicker routes, Doug!

Was any adjustment of the image necessary between MathType and here? Or, is what we see above what you saw running MathType at default in MS word?

best,

Ted.
 
Last edited:

Doug Kerr

Well-known member
Hi, Ted,
Was any adjustment of the image necessary between MathType and here? Or, is what we see above what you saw running MathType at default in MS word?
The image in that post was Pasted directly from a screen capture of the equation as seen in the MathType window open in MS Word. There was no image editing done enroute. I did adjust the "display size" of the equation in my post after it had been Pasted there.

As to MathType running at default, I had made several customizations as to fonts to be used for various elements. But it was run in the normal way, accessed in an MS Word document for a formula generated with it (earlier).

Here is the entire MathType window for that formula (display width adjusted):

1785594518629.png


Here is how that area of the source MS Word document looked (display width adjusted):

1785594769587.png


You will note that the title bar of the MathType window shows that it is the Lite mode version of MathType.

When I installed MS Office 2003, MathType (the "full" version) was installed. But there was a clock (10 years, I think), after which the MathType degraded itself into MathType light.

I was given the opportunity to restore it to its full glory, but the cost (only offered on a "subscription" basis) was not at all attractive.

I'm not sure now just what features I lost, but that has not be existential.

I can by the way start MathType on its own (not via MS Word). In that situation there is no route for "output", but of course a screen capture of the equation works there just as well as when MathType is run from an MS Word document.

I have not worked this way in the past, but I may do so in future.

Best regards,

Doug
 

Attachments

  • 1785594638341.png
    1785594638341.png
    11.3 KB · Views: 19
Last edited:

Doug Kerr

Well-known member
Hi, Ted,

LibreOffice Writer will gladly open MS Word document files, which appear in fine form and can then be edited in Writer if desired. It can be saved as a LibreOffice ODT fie.

If the document included a equation created in Word with MathType, it appears in fine shape in Writer.

If I double click on such an equation, MathType opens (just as it would have with the document open in Word). it can then be edited and redeposited in the document.

Best regards,

Doug
 

Ted Cousins

Member
Hi, Ted,

The image in that post was Pasted directly from a screen capture of the equation as seen in the MathType window open in MS Word. There was no image editing done enroute. I did adjust the "display size" of the equation in my post after it had been Pasted there.

As to MathType running at default, I had made several customizations as to fonts to be used for various elements. But it was run in the normal way, accessed in an MS Word document for a formula generated with it (earlier).

Here is the entire MathType window for that formula (display width adjusted):

View attachment 14319

Here is how that area of the source MS Word document looked (display width adjusted):

View attachment 14321


You will note that the title bar of the MathType window shows that it is the Lite mode version of MathType.

When I installed MS Office 2003, MathType (the "full" version) was installed. But there was a clock (10 years, I think), after which the MathType degraded itself into MathType light.

I was given the opportunity to restore it to its full glory, but the cost (only offered on a "subscription" basis) was not at all attractive.

I'm not sure now just what features I lost, but that has not be existential.

I can by the way start MathType on its own (not via MS Word). In that situation there is no route for "output", but of course a screen capture of the equation works there just as well as when MathType is run from an MS Word document.

I have not worked this way in the past, but I may do so in future.

Best regards,

Doug
Thanks for the comprehensive response which I just now read. A pity you couldn't hack that clock!

A few days ago, I posted my current method here


... but the topic seems to be of little interest there.

The preceding post was quite amusing


best,

Ted.
 

Ted Cousins

Member
A few days ago, I posted my current method here:


... but the topic seems to be of little interest there.
I just accidentally shortened that 4 days-old post, trying to bump it, duh.

Ho hum, not much use to us now ...

Ted.
[/QUOTE]
 
Last edited:

Ted Cousins

Member
I just accidentally shortened that 4 days-old post, trying to bump it, duh.

Ho hum, not much use to us now ...

Ted.
[/QUOTE]
Doug, I got a response to that post: it does not bode well for a general idea of posting equations as images. After clicking the .mml file he said it was too small, saying it should be about 3x bigger.

How does it look on your system?


From my desk top !!!

type = full

crop FireFox.jpg


Inserted as Thumbnail

crop FireFox.jpg

Looks like the use of images to show equations gracefully is not universally effective. Telling me how to fix the above on this site is probably not going to help me on DPrevived, DPreview, FocalWorld etc., etc.
 
Last edited:

Ted Cousins

Member
testing half-size image from my hard drive:

crop FireFox HS.jpg


Code:
[ATTACH type="full"]14325[/ATTACH]

Also from web:

crop FireFox HS.jpg


Code:
[img]https://kronometric.org/crop FireFox HS.jpg[/img]
 
Last edited:

Doug Kerr

Well-known member
Doug, I got a response to that post: it does not bode well for a general idea of posting equations as images. After clicking the .mml file he said it was too small, saying it should be about 3x bigger.

How does it look on your system?

This is a screen grab of what I see when I open that link to the MML file (display size slightly reduced):

1785693037468.png

My system chose to open that file in Firefox.

Note that an MML file does not ordinarily include a"picture" of the equation, rather a "vector-like" description (in MathML).

Best regards,

Doug
 
Last edited:

Doug Kerr

Well-known member
Hi, Ted,

In any case, insofar as the OPF post generator, here is a picture of an equation that I had at a nice size in MathMagic when I grabbed it:

1785694820669.png


I left it here at the default display size.

I'm not sure what maneuver your respondent was doing that cast shade on the use of pictures of equations in some context of which I am not clear.

Best regards,

Doug
 
Last edited:

Doug Kerr

Well-known member
Hi, Ted,

I am unsure as to why one would want to "open" an MML file anyway.

How was the MML file in question generated?

Best regards,

Doug
 

Doug Kerr

Well-known member
Him Ted,

If I ask my browser to open:


what is shows me is this:

1785697160423.png


It looks just a little "furry" to me.

The entire picture has pixel dimensions of 344 px × 74 px.

Here is what a little piece of it looks like at "pixel peep" magnification:

1785697435628.png


I suspect that pictures of equations deserve a bit better resolution.

Best regards,

Doug
 
Top