Outils pour utilisateurs

Outils du site


issue71:libreoffice

Ceci est une ancienne révision du document !


Table des matières

1

Have you ever been working in a word processor and needed to insert a formula into the text? Perhaps you were writing a math or scientific paper for college, or even answering a question about statistics. If you need to enter anything beyond elementary math, you will quickly run into formatting issues. LibreOffice overcomes this problem by providing us with the Math or Formula module. You can use the module independently to create formulas, or use it directly in the other modules of LibreOffice. Today, we will learn how to enter formulas in the Math editor, and, in later articles, we will learn how to use formulas in Writer. Open a new Math window by clicking on the Formula button on the LibreOffice Start Center, or through the menus with File > New > Formula. The Formula Window The formula window has three pieces: the preview pane, the formula editor, and the elements window. The preview pane at the top shows you your formula as it is created. The formula editor at the bottom is where you enter your formula. The floating Elements window provides you with shortcuts to different formula elements. Think of the elements as building blocks for creating your formula.

2

Three Ways to Enter Formulas There are three ways to enter formulas into the formula editor: through the Elements window, through a context menu, or by direct entry. The Elements Window The Elements window is divided into two sections. The top section is the category section, and the lower section contains the elements in that category. If you select a category then click on one of the elements in that category, the program will enter the element into the editor with <?> as placeholders for the variables of the element. The first placeholder is highlighted. Use the F4 key to move to the next element. Shift-F4 will move backwards through the placeholders.

To get you familiar with the Elements window, I will walk you through the steps to write a formula using the Elements window. Starting with a new formula window, select the Relations category, then the equals element. <?> = <?> appears in the formula editor. The first <?> is highlighted. Enter the letter “h”. Press F4 to move to the other <?>. Select the Functions category, then the square root element. The <?> is replaced with sqrt{<?>} and the placeholder in the brackets is highlighted. Select the Unary/Binary category, then the addition element. The program inserts <?> + <?> into the square root's brackets. Select the Formats category, then the Superscript Right element. <?>^{<?>} replaces the highlighted placeholder. Enter the letter “a” and press F4 to move to the next placeholder. Enter the the number “2”. Press F4 to move to the next placeholder. Select the Superscript Right from the Formats category. Enter the letter “b” and press F4 to move to the last placeholder. Enter the number “2”. The final result will look like this: and the text in the formula editor is: h = sqrt{a^{2} + b^{2} }

3

The Context Menu The context menu (shown below right) is much like the Elements window. Right-click in the formula editor, and you get a menu of all the categories. Each category has a submenu of the elements. Click on the element to insert it into the formula editor. Follow the example above again, but this time use the right-click context menu to create the formula. You should get the same results. Direct Entry As you work with Math and learn the elements, you can enter the formulas directly in the formula editor. By far, this is the quickest way to enter a formula. Now that you have created the formula twice, using the Elements window and context menu, see if you can enter it directly into the editor without using the element tools. If you need help, just reference the editor text shown above.

4

Special Characters You won't find everything you need in the Elements window and context menu. Many equations use Greek characters and other symbols. LibreOffice Math allows you to enter special characters into your equation. If you find you need a special character not listed in the special characters, you can even add your own. Adding Greek Characters Through the menus Tools > Catalog, you can access the Greek letters through the character subsets Greek and iGreek. Greek is the letters in plain text and iGreek is the letters in italics. Just select the letter you want and click the Insert button. When finished, click the Close button. For direct entry, type in % followed by the Greek letter name. For example, to get the Greek letter pi, enter %pi. To get the uppercase letter, make the name uppercase, %PI. To make the character italics, place a lowercase “i” before the letter's name, %ipi.

5

Other Special Characters Other special characters are found in Tools > Catalog under the Special subset. Select the symbol you need and click the Insert button. As you use and learn the names of the symbols, you can enter them directly using the % and then the name of the symbol. NOTE: The lowercase “i” for italics works with only the Greek letters. We will discuss inserting italics for other elements in the next How-To. Adding Special Characters If the catalog does not have the special character you need, you can add it to the catalog. One such character is the prime symbol. Let's add it to our special subset. Tools > Catalog and select the Special symbol set. Click on the Edit button. This bring up the Edit Symbol dialog. For the font select DejaVu Sans, and for the subset select General Punctuation. The symbol you want is Ux2023. For the symbol name type in prime. Click the Add and OK buttons. The prime symbol has now been added to the Special symbols list. You can use it by selecting it from the catalog, or enter it directly by typing %prime.

6

Conclusions Math allows you to create formulas you can insert into your documents. You have three methods for entering formulas into the formula editor: through the Elements window, through the context menu, and by direct entry. The Elements window and the context menu help you to learn how to enter the different elements of a formula, but once you know how to enter an element, direct entry is the quickest way to create a formula. In the next LibreOffice How-To, we will look at ways to format our formulas so they look the way you want them.

issue71/libreoffice.1373888520.txt.gz · Dernière modification : 2013/07/15 13:42 de auntiee