Formula Master
Scientific documents are where open source tools show their greatest strengths. To save yourself a lot of trouble, however, you need to know how to combine formulas and data into your work. Linux provides the appropriate tools.

Scientific documents are where open source tools show their greatest strengths. To save yourself a lot of trouble, however, you need to know how to combine formulas and data into your work. Linux provides the appropriate tools.
Whether you're working on a thesis, postdoctoral article, or just school homework, you're going to need specialized office software that simplifies the input of formulas or for creating schematics. LaTeX has a good reputation in that area; but, despite its strengths, its complexity often prevents it from being the best choice.
A scientific document, apart from text, often includes mathematical equations, chemical formulas, and experimental schematics. Each component has its corresponding program – that, and the underlying software to edit the text. The underlying software is the core part of the modules responsible for writing scientific documents. I'll describe three different solutions that additionally allow application of math formulas.
The Open/LibreOffice duo is similar in concept to Microsoft Office and is, to a large extent, compatible with the latter, although it does have a few migration problems. The downside of creating a scientific document in Open/LibreOffice, or even in MS Office, is the instability that comes from the large number of files required. The upside of these kinds of programs is that you can build a document without concerning yourself with the file structure.
LyX, on the other hand, is a program that tries to steer a middle course between TeX and a WYSIWYG text editor (LyX actually calls itself "WYSISWYM" – What You See Is What You Mean). What you see on the screen is close to what you'll print out. With the LaTeX typesetting system, however, the end result is usually a bit different. If you want to see how things will look, it's best to use preview mode.
LyX files usually contain only text, and you can build in equations and formulas through links in the text. Thus, the files are typically small TeX files, and the software is very stable. LyX also lets you create a document with mouse clicks. This approach might require some troubleshooting skills, for example, if the software doesn't recognize certain forms because you set a specific class for the document. The structure is based on your specific purpose and is echoed in the format structure.
Finally, Kile makes up the trio of applications I'll cover. Kile is a plaintext editor that nevertheless works with TeX functions. You set the document structure by using entries in the menu. The result is ASCII text with the corresponding TeX macros. Unfortunately, the screen output won't reflect this clearly unless you have an exceptionally visual imagination.
Calculating the preview is standard work for TeX editors. In many cases, it occurs at least once per printed page. The advantage of this approach is a document that all TeXbased systems understand, so you're safe in regard to the software when creating a document with Kile.
All three programs can manage math formulas with no problem. Creating chemical formulas, however, is another story. Open/LibreOffice can handle diagrams of experimental setups reasonably well, but LyX and Kile provide no options in that department.
The formula editors for math symbols use either the WYSIWYG or text concept. The Open/LibreOffice editor uses WYSIWYG: You select the elements by clicking on them in the palette. The formula text then appears in the lower window, where you can enter it directly (Figure 1).
This method has the advantage that even inexperienced users can get the job done quickly. The Office suite authors, however, missed the chance of providing a learning path to the often irreplaceable TeX: The formula text syntax isn't compatible with that of LaTeX.
LyX provides an almost pure WYSIWYG concept (Figure 2). You typically assemble a math expression from the selection of formulas. At the same time, you can also open a text window with the corresponding LaTeX output by selecting View  View Source from the menu.
This view lets you enter elements of the expression directly as text (Figure 3), which is especially important if the item isn't available as a selection but is in the form of a LaTeX expression. In earlier LyX versions, this was especially true of the many real numbers (\mathbb R). Immediately after you enter an expression, you see the result in the window and the editor returns to WYSIWYG mode.
Kile developers gave their product a completely different twist. The program doesn't accept any macro entries, which also applies to math expressions. However, if you install KLatexFormula alongside Kile, you can see the result as a control right away. When you hover over the text section with the math expression, you'll see the corresponding formula (Figure 4).
Clicking a link below the window opens KLaTeXFormula (Figure 5). In the upper window, you see the LaTeX text; in the lower window, you see the rendered version. KLaTeXFormula allows you to assemble math expressions with a mouse click. Unfortunately, this process isn't as easy as LyX or Open/LibreOffice. After creating the expression, you can copy the text from the upper window into Kile and integrate it with the TeX document. KLaTexFormula also lets you save the rendered expression as an image in various formats. You can then use the image in other textprocessing tools.
Surpassing KLaTexFormula in ease of use is EqualX. This program lets you assemble a math expression as easily as using text entry in the lower window and has a clearly arranged library of standard symbols from different scientific fields (Figure 6). You can save the result either as an image or TeX file.
EqualX creates a file when saving that contains the actual expression next to the rendered image so that you can change the expression easily – an essential factor with complex expressions. EqualX documentation is unfortunately sparse, and the current version 0.5.1 won't let you change the predefined libraries.
Formulator is another math expression editor that creates not only images but also MathML code if you wish. It's available in two versions: a paid version and a free version, which you can use in noncommercial environments. The program also allows entry of expressions as text, albeit in MathML syntax, as you can see in the upper right window of Figure 7.
Because TeX lacks an interface, Formulator is especially useful for those wanting to generate MathML code. However, MathML code is less used in printed documents than on the web. Comparing a test quadratic equation in the three formula languages from Open/LibreOffice (Listing 1), LaTeX (Listing 2), and MathML (Listing 3) shows that the code in Open/LibreOffice and LaTeX is much easier to decipher than in MathML.
Listing 1
Quadratic Expression in Open/LibreOffice
x^2+p*x+q=0 dlrarrow x_{1,2}={p over 2} plusminus sqrt{{p^2} over 4 q}
Listing 2
Quadratic Expression in LaTeX
x^2+p*x+q=0\Leftrightarrow x_{1,2}=\frac{p}{2}\pm\sqrt{\frac{p^2}{4}q}
Listing 3
Quadratic Expression in MathML
01 <math display = ,block'> 02 <mrow> 03 <msup> 04 <mi>x</mi> 05 <mn>2</mn> 06 </msup> 07 <mo>+</mo> 08 <mi>p</mi> 09 <mo>∗</mo> 10 <mi>x</mi> 11 <mo>+</mo> 12 <mi>q</mi> 13 <mo>=</mo> 14 <mn>0</mn> 15 <mo lspace='3px' rspace='3px'>⇔</mo> 16 <msub> 17 <mi>x</mi> 18 <mn>1,2</mn> 19 </msub> 20 <mo>=</mo> 21 <mo>−</mo> 22 <mfrac> 23 <mi>p</mi> 24 <mn>2</mn> 25 </mfrac> 26 <mo lspace='2px' rspace='2px'>±</ mo> 27 <apply> 28 <msqrt> 29 <mfrac> 30 <msup> 31 <mi>p</mi> 32 <mn>2</mn> 33 </msup> 34 <mn>4</mn> 35 </mfrac> 36 <mo>−</mo> 37 <mi>q</mi> 38 </msqrt> 39 </apply> 40 </mrow> 41</math>
Writing simple math formulas is easy enough with the aforementioned editors; however, chemical structure formulas are another story. GChemPaint proves suitable here because of its ease of use and extensive library of molecular models. Figure 8 shows a furan structural model developed in 10 steps:
Select the binding to set its strength.
10.Click the binding that should appear as a double bond.
Having the software automatically create the molecular bonds is especially useful when adding atoms to the structure. That also applies to the valences of the added atoms. Plus and minus signs appear for atoms whose bonds aren't saturated. You can add complex molecules from the extensive library (Figure 9) and modify them as desired.
A number of standard chemical formats are available for saving your work, including ChemDraw files, Brookhaven molecular formats, MDL format, and GChemPaint's native format. If you want to use the images in a text document, you can export to PNG and SVG, among others.
Pages: 7
You can edit your LaTeX documents with online editors that run across platforms and are device independent. Documents get saved online, thus giving you and other members of a work group easy access from anywhere.
In the past, publishing a book meant sending it to a publishing house. With Amazon's CreateSpace and Kindle Direct Publishing, you can now publish on your own. This article will guide you through the process.
You can find plenty of spreadsheets offering a multitude of features. The Pythonbased Pyspread demonstrates that a sophisticated spreadsheet application can also be newcomerfriendly.
Using LaTeX and the TikZ package, you can create highquality vector graphics to improve your documents by making them more visually appealing.
Instead of toiling over a graphics layout, you can use Graphviz to concentrate on the essential content and let the software do the design.
© 2022 Linux New Media USA, LLC – Legal Notice