As an engineer, eventually you will have to insert an equation into your written work or presentation. This can be a struggle as equation editors are not always the friendliest. However, there is good news. The equation editor in Word has improved immensely (I am using version 2010 here). In this blog we look at how to insert an equation into a Word document. As a bonus, there is information on how to insert an equation into a web page with an html code generator website.

In order to start, I went to the Wikipedia website “List of equations in classical mechanics,” [1]. I wanted something with a subscripts and superscripts. I found this equation for resonant frequency.

**Figure 1**

I wanted a radical that encased a formula with an operand as these are often hard to put under the radical sign. In addition, I wanted a numerator and denominator for showcasing these often difficult entries. This equation was perfect.

The struggles with Word have been reduced with the new equation editor (Insert>Equation which is in the box labelled “Symbols”). Reference [2] has a video tutorial to get you started. It helps if you get into the Design Tab in Word. You must click inside the equation for this tab to appear.

**Figure 2**

The Design tab is a welcome addition to Word’s Equation Editor. It has made equation building much easier. It took about a half hour to get the first equation correct. The time was spent looking for methods on the internet and hunting down symbols in the Insert>Symbol tab. After a few tries, I got it to look like this.

**Figure 3**

As you can see, this equation comes out in a clear and crisp image. I haven’t had that success when cutting and pasting equations from MathCAD.

Word remembers the symbols that you insert. Here you can see Omega and “k”. I couldn’t get a “k” that looked like the one in the original equation. Note that text formatting from the Home>font menu doesn’t work inside the equation editor.

**Figure 4**

The symbol editor can be a bit difficult to navigate. Once you get the hang of it, you can find symbols relatively easily. Note that you have to close the box to proceed with writing the equation. Otherwise, Word inserts a symbol every time you click on it.

Word also has some canned equations available too. Here is an example

**Figure 5**

If you wish to insert an equation into a web page, Reference [3] does just that. This web page, Online LaTeX Equation Editor,” uses a menu driven software that creates the html text for inserting into your web page. The page has two boxes displaying the html text. The text in the bottom box (hi -lited blue in the figure) is what you will copy to your web page. There is also a visual representation of the equation showing the final view. This is a rather slick option for those that don’t know html code very well. And the best part about is it’s free. Donations are accepted.

**Figure 6**

Note that there is a warning about reproducing the software in the page source code which states: “This is NOT free software, although it can be used freely. It can only be hosted on a server and/or modify if you own a CodeCogs Commercial License for this product. This can be purchased from CODECOGS

You must retain a copy of this license in all copies of the software,” [5] There could be legal implications for using the software however there is no clear indication of the legalities of inserting the code. I’d run it by your legal department just in case.

I put the html text into Composer, the web page generation software offered by Sea Monkey. The equation looked like the one on the web page. Both versions were a little grainy. Note that I mistakenly added external parenthesis.

**Figure 7**

Here is the html code that the equation editor [3] generated:

Although I like the time saving aspect of the equation generator, it creates a potential problem. The html text directs you to the website were the equation code is stored. It there website ever goes down, you might end up with a blank symbol on your web page. There is also an option on the page to download the image as shown in the following figure.

**Figure 8**

One solution is to cut and paste the graphic form of the equation and then upload the image to your page. It might be even grainier when using the Snipping Tool however it will still be viewable whereas it won’t be if codecogs’s website goes down or they pull your license.

The html text can be inserted easily into a WordPress website as shown below [4]. This is relatively easy to do by switching from the “Visual” view to the “Text” view on the Page Edit page. Again, it’s a bit grainy however it does show the needed information.

**Figure 9**

In a final attempt at getting an image with better clarity, I copied the equation from Word and inserted it into the Composer “Normal” dialog box as shown below (as opposed to inserting it as html code). As you can see, this image (second of the two) is still grainy.

**Figure 10**

Equations are a part of technical writing. As software improves, the task of generating equations gets easier. There are tools available in Word as well as online for generating web page html code. These valuable assets are time savers that allow you to effectively communicate your information.

**References**

- “List of equations in classical mechanics,” From Wikipedia, the free encyclopedia List_of_equations_in_classical_mechanics
- “Microsoft Word 2007 Equation Editor,” Youtube instruction video for Word Equation Editor
- “Online LaTeX Equation Editor – create, integrate and download,” Online Equation editor and html code generator “Copyright (C) 2004-2011 CodeCogs, Zyba Ltd, Broadwood, Holford, TA5 1DU, England. Written by Will Bateman.”
- “Effective Technical Writing : Thesis and Dissertations,” web page
- “Online LaTeX Equation Editor – create, integrate and download,” Online Equation editor and html code generator Source Code view-source: “Copyright (C) 2004-2011 CodeCogs, Zyba Ltd, Broadwood, Holford, TA5 1DU, England. Written by Will Bateman.

This tutorial will be of great help to all engineers in our audience. Very nice presentation and excellent links. Thanks for doing this!

Great article!

I thought I should point out that in the Accessories folder of Windows (certainly Win7 and newer, but probably even further back) there is a tool called “Math Input Panel” in which you can enter your formula freehand using your mouse (or touch if you have that facility) and Windows guesses what you have entered.

However I have struggled at times, especially with things like integral limits, but I am sure with some practice it can be quite helpful. Give it a whirl. It costs nothing and it may work for you.

antedeluvian

Thank you for pointing out this valuable tool. I found it to be cumbersome as well. It does however seem to work after some practice.

It would be nice if there was a conversion software for Excel equations to go back and forth between a hand written or traditionally written version and the Excel syntax version. My initial search on this subject revealed nothing on the first two pages. It does however appear that the website equation creator that I mentioned in the article could be capable of interpreting the Excel formula.

Currently I use MathCAD as a double check for my Excel formulas. I use Excel as it is easier for me to arrange tabular data. In addition the graphing formats offer more options.

Keep the good ideas and feedback coming. The more we share, the easier our jobs become.

Scott

Scott

It would be nice if there was a conversion software for Excel equations to go back and forth between a hand written or traditionally written version and the Excel syntax version.Absolutely!

could be capable of interpreting the Excel formula.We must look into that.

I use Excel as it is easier for me to arrange tabular data. In addition the graphing formats offer more options.I don't know if you followed my series (~14 of them) on using Excel in the context of electronic engineering, here on Planet Analog. You can find them amongst the list of my blogs (all with the word Excel in the title). Here is the list of my blogs.

Keep the good ideas and feedback coming. The more we share, the easier our jobs become.That was my intention as well.

great article

Scott

The Equation editor as you describe it here is also present under the Insert tab in Excel (I am using 2010). However I can find no linkage from the text form of the equation and the actual data- it appears you still have to key in the formula in the same way one has had to do since Visicalc.

Absolutely!

could be capable of interpreting the Excel formula.When I need to include a lot of equations into MS-word documents, I prefer to write the document in libreoffice and then save to .docx.

In libreoffice, you can click on the buttons to get the symbols you need, just as you do in MS-word, but you also have a plain text area below, where you can see the “source code” for your equation (like in the codecogs link provided in this article). From there, you start learning how to write your equation more efficiently using just your keyboard and writing the “source code” directly without the need to search for buttons with the mouse.

Here is an example, using your sample equation:

You can split lines as necessary. You can always use curly brackets to group things in the plain text area. (You can also write {}, with nothing inside, for example to create an empty group, in case you want to create a void area in some part of the equation.)

In the end, if you save the document as a .docx and open it in MS-word, you get native, editable equations of word documents.

In both libreoffice and MS-word, you can save document as .html, in case you need, but unfortunately you always get a raster representation of the equation, instead of vector graphics.

Now regarding vector graphics in html pages, I would suggest trying mathjax. I have never needed to dig very far into it, but it seems you can type equations using MathML, TeX and ASCIImath. Eventually, there are some “web GUIs” to help inserting symbols. The output should work everywhere, as stated in their website.

Both libreoffice and mathjax are free. Otherwise, I would use Wolfram Mathematica, where I can write equations even more efficiently, evaluate them and I can also export them in some vector formats, although I think sometimes that does not work 100% well when inserted into other documents, as it might break some long lines that can eventually exist in the equation.

It may be found easier to write a radical by enclosing the terms in brackets and then raising it to the power 1/2, which has an identical meaning. You can also have higher order roots in the same way e.g. 1/3 power for cube root. The form is also more convenient when the radical is only part of a larger expression.

Scott Hamilton.

Man21 (Scott Hamilton),

I appreciate your feedback in terms of enclosing the radical in brackets and then raising it to a power as a method for presenting an equation. The reason that I wrote this article to begin with is to avoid this technique. My point is that the brain perceives visual stimulus in different ways. In order to save time as well as make intensely technical papers more understandable, I would prefer that equations be written in an easy to interpret manner. Without going into a detailed, graphical explanation, here's how the “bracket method” causes additional taxing of the brain

– I have to identify the opening parenthesis and then find where it closes

– I have to see the power it is raised to with a symbol (“^” in Excel)

– I now see a fraction for the root (1/2, 1/3, etc) which causes my brain to think further

Aside from all of these additional thoughts, more often than not, when I hit “Enter” after typing in an equation in Excel, I get scolded for forgetting something. Usually this is due to not inserting a closing parenthesis after having opened one. I often back up my Excel data with MathCAD becaue of this common error. Whereas MathCAD offers better equation visibility, Excel allows me to view the many points of granularity. The initial graphs (charts in Excel) actually look better in MathCAD however more downstream tweaking in Excel makes for better report data. I find myself using both for reassurance as well as for best portrayal of the results.

In my original blog, I presented a software that generates html text from an equation input. If someone were to make that function available between MathCAD and Excel, it would have a market with a return on investment.

As a landscape artist, I see more and more of the visual world as a way to increase my awareness. My goal when I paint is to take many little brush strokes and add them up in a way that pleases the eye. As an author, I can only describe life to a point with words. When I insert the power of visual presentation, I strengthen my messaging. The same goes for equations. There is much to be gained in effective, visual presentation that educates the brain rather than making it work harder to perceive a concept.

Keep the feedback coming. My thoughts are for generating discussion and opinions rather than forcing my opinion on the audience.

Scott