Difference between revisions of "LibreOffice-Suite-Math-6.3/C2/Markup-language-and-Formula-formatting/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
Line 1: Line 1:
 
Title: Markup Language and Formula Formatting
 
Title: Markup Language and Formula Formatting
  
Keywords: LibreOffice Math, markup language,  Save file,  brackets, font style, font size, alignment, spacing, color command, video tutorial.
+
Keywords: LibreOffice Math, markup language,  Save file,  brackets, font style, font size, alignment, spacing, color command, spoken tutorial, video tutorial.
  
  

Revision as of 13:31, 1 September 2022

Title: Markup Language and Formula Formatting

Keywords: LibreOffice Math, markup language, Save file, brackets, font style, font size, alignment, spacing, color command, spoken tutorial, video tutorial.


Visual Cue Narration
Slide: Title Slide Welcome to this Spoken Tutorial on Markup Language and Formula Formatting.
Slide: Learning Objectives In this tutorial, we will learn:
  • Markup language for writing the formulae.
  • How to use brackets to state the order of the operation.
  • How to format the formulae
Slide: System Requirements This tutorial is recorded using:
  • Ubuntu Linux OS version 18.04 and
  • LibreOffice Suite version 6.3.5
Slide: Prerequisites

https://spoken-tutorial.org

To follow this tutorial, learner should be familiar with Math interface.

If not please access the relevant tutorials on this website.

Click on Show Applications >> Type writer in the search bar that appears.

>> click on the Writer icon.

I have opened the Writer document.
Insert menu >> select the Object.

From the submenu >> select the Formula option.

Now let’s call the Math application inside Writer.


Click on the Insert menu and select the Object.

From the submenu, select the Formula option.


Math application opens up.

Point to the Elements window

Point to the Formula editor window.


We can easily write a formula using the Elements window.


Let’s write a formula using Markup language in the Formula editor.


This is a much faster way of writing a formula.


Markup language for a formula resembles the way we read the formula in English.

Type 4+3=7


Go to the Writer gray box >>

Point to 4+3=7 and 4-3=1.

Let us learn this by writing a few examples.


Type 4 plus 3 equal to 7 in the Formula editor.

Type 4-3=1. Similarly, type 4 minus 3 equal to 1.
In the Writer gray box. Notice the display in the Writer gray box.

The two formulae are shown on the same line.

Cursor on the interface. Let us learn to insert formulae in new lines.
Go to the Formula Editor window >>

type newline.

Go to the Writer gray box >> Point to the new line.

The markup to insert a new line is newline.
Go to the Formula editor window >>

type: Some more example formulae: newline.


Press Enter key.

In the Formula editor window, type Some More Example Formulae newline.

For better readability, we will press the Enter key.

Cursor on the interface.


Type: 1. x >= y newline >> Press Enter.


Go to the Writer gray box >> Point to the last formula.

Now let’s write x greater than equal to y and also number the formulae.


Type 1. x >= y newline and Press Enter


Notice that the Writer gray box has refreshed and the contents are numbered.

Go to the Formula Editor window >>

type: 2. a ^ 2 newline >> press Enter.

Next, let’s write the markup for a squared.


Type 2. a caret 2 newline and press Enter.

Type 3.a caret 10.

Go to the Writer gray box >>

Point to the last formula.

To write the markup for a to the power of 10 type 3. a caret 10 newline.


Notice the mathematical symbols in the Writer gray box.

Go to the Formula editor window >>

type 4. sqrt {16}= 4 newline >> press Enter.


Go to the Writer gray box >> Point to the last formula.

Let us write the markup for square root of 16 = 4.


Type 4. sqrt within curly brackets 16 equal to 4 newline.


Notice the formula in the Writer gray box.

Σ a suffix n, a1 + a2 + a3 + -----+ an.


Go to the Formula editor window >>

type: 5. sum a_n newline >> press Enter.


Go to the Writer gray box >>

Point to the last formula.

Let us write a summation symbol for a suffix n, to denote a1 + a2 + a3 + -----+ so on upto an.


The markup is 5. sum a underscore n newline.


Notice the summation symbol in the Writer gray box.

Go to the Formula editor window >>

type: 6. int f(x) dx newline >> press Enter.


Go to the Writer gray box >>

Point to the last formula.


Type newline

Let us now write the markup for an integral with a function.

Type 6. int f(x) dx newline and press Enter.


Notice the integral symbol in the Writer gray box.

Here I will include one more newline.

Cursor on the interface. Let us learn to use brackets to state the order of the operation in the formula.
In FEW, press Enter, type 5 over x + y For example, how do we write add x and y, then divide the result by 5 ?


Type 5 over x + y newline .

In FEW, add { character before x and } character after y.


Point mouse on the last formula.


Markup:

5 over {x+y}


Point to the curly braces.

Is this really what we wanted to write?


No, we want to add x and y first.


We can do this, by introducing curly brackets around x and y.


The mark up is: ‘5 over x+y in curly brackets.

Cursor on the interface. Let us save the file now.
Click on the File menu >> Save Click on the File menu and select the Save option.
Point to the dialog box.

Point to Name field.


Type MathExample1 in the Name field.

A dialog box, that prompts us to enter the name of the file appears.


I will type the file name file as MathExample1.

Select Desktop location to save the file.


Click on Save button.

On the left side, I will select Desktop as the location to save my file.


Click the Save button at the top right corner of the dialog box.

Point to the MathExample1.odtin the title bar. Observe the change in the title bar now.


It has changed to MathExample1.odt.

Point to the formulae. Now let us learn to format the formulae we wrote.
Go to Writer gray box >>

Point to all formulae.


Go to the menu bar >>

Point to the Format menu.

In the Writer gray box, notice that the formulae are left aligned and numbered.


Let's use the Format menu to format the formulae.

Click on the Format menu >> Alignment. Let us first see the alignment options.

Click on the Format menu and then click on Alignment.

Point to the Alignment dialog box.

Point to Horizontal >>

point to Left.

The Alignment dialog box appears on the screen.

Under Horizontal, Left option is selected by default.


Point to Centered option.

Point to Horizontal >>

Point on the Right.

Click the OK button.

Go to the Writer gray box >>

Point to all formulae.

If you have the default option as Centred, please change it to Left.

You may try the Right alignment option on your own.


Click the OK button at the bottom right corner.

Click on the Format menu >> Fonts.


Point to Fonts dialog box.

Let us change the font style now.

Click the Format menu and select the Fonts option.

The Fonts dialog box appears on the screen.

Point to all categories. Fonts dialog box shows various categories of fonts.
Point to Variables >> Functions >>

Numbers >> Text .

Formula fonts can be used to set different types of fonts for: Variables, Functions , Numbers and Text.
Go to the bottom of the window >>

click on the Modify.


Context menu >> choose Variables.

To modify a font style, click the Modify button at the bottom of the window.


From the drop-down menu, choose Variables category.

Point to Fonts dialog box >> Point to all fonts.


Choose ‘Liberation Sans’.

Under Attributes click the Bold check box.

Click OK button.

Another Fonts dialog box which has different types of fonts appears.


From the list box of fonts, choose Liberation Sans.


Under Attributes click the Bold check box.


Click the OK button to close the dialog box.

Point to the Variable drop-down >> Click OK.


Go to the Writer gray box >>

point to the font of all formulae.

To save the font of the variable click the OK button at the bottom right corner.


In the Writer gray box, notice the change in the font style of the formulae.

Click Format menu >> Font Size. Let us increase the font size of the formulae.

Click the Format menu and then on Font Size.

Point to the Font Sizes dialog box.


Go to Base Size field >> type 18.


Default sizes: Text 100, Indexes 60, Functions 100 Operators 100 Limits 60.

The Font Sizes dialog box appears on the screen.


In the Base Size field, type 18.

Point to Text field >> Indexes field >>

Functions field >> Operators field >> Limits field.

Let’s change the Relative Sizes of Text, Indexes, Functions, Operators and Limits.
Click OK button.


Go to the Writer gray box >>

point to all formulae.

Now click the OK button.

In the Writer gray box, notice the change in the font size of the formulae.

Point to the formulae.

Click on the Format menu >> Spacing.

Next, let us make changes to the spacing of the formulae.


Click on the Format menu and then click on Spacing.

Point to the Spacing dialog box.

Default sizes:

Spacing field 10% Line Spacing field 5%

Root Spacing field 0%


Spacing field >> Type '30’ >>

Point to the right.

Line Spacing field >> Type ‘30’ >> Point to the right.

Root Spacing field >> Type ‘30’

>> Point to the right.

The Spacing dialog box appears on the screen.


Let us change the Spacing, Line spacing and Root spacing each to 30 percent.


As we set the spacing type, preview shows the position of the spacing.


Click on the Category button >> Point to all spacing types.


Click OK.


Go to the Writer gray box >>

point to the spacing between formulae.

We can also select the spacing types by clicking the Category drop down.


Now click the OK button.


In the Writer gray box, notice that spacing between the formulae has changed.

Point to the Elements window. Some more formatting options are available in the Elements window.
Go to the top of the Element window >>

click on the drop-down >> select ‘Formats’.

In the Elements window, click on the Element Categories drop-down.


Select Formats from the list of categories.

Go below the drop-down.


Point to respective symbols.

Point to the formats.


Point to the symbol` ”.


Point to the symbol~ ”.

Notice the various format options in the Element window.


Here we can choose placements for various formats.


For small gaps, there is a back quote character in the window denoting Small Gap.


For long gaps, there is a tilde character in the window denoting Blank.

Point to the fifth example, Let us introduce a long gap in the fifth example.
Go to the Formula Editor window >> go to the fifth example >> click after “5.”.

Go to the Elements window >> click on the symbol ~ ”.


Go to the Writer gray box >> Point to the fifth example.

In the Formula editor window, click after number 5. in the fifth example.

Go to the Elements window and click on the symbol ‘tilde’.


In the Writer gray box, notice the new gap that is created after number 5.

Cursor on the interface. Explore all the formatting options which Math provides on your own.
In FEW, type:

color red 5 over{ x+y} newline


Point to 5.

Now let’s learn to use color command in the markup language.


This command works only on the formula element that is next to the color name.


Let us use the color command for the last formula.


Type color red before 5.


Notice that only 5 is shown in red colour.

In FEW, type:

color red {5 over {x+y}} newline

To colour the entire formula, we have to enclose it within curly brackets.
Ctrl + S Let us save the file now.
Narration only: With this we have come to the end of this tutorial.


Let us summarize.

Slide: Summary In this tutorial, we have learnt:
  • Markup language for writing the formulae
  • How to use brackets to state the order of the operation.
  • How to format the formulae
Slide: Assignment Here is an assignment for you.
  • In the Writer window, call the Math application.
  • Write the following formulae using the Markup:
  • Use Elements dock if necessary.
  • Summation of x squared
  • sin to the power of x plus cos to the power of x is equal to 1
  • Summation from 1 to n of x
  • Use the Operators category to set the limits for summation.
  • Save the file as Math-assignment.odt
Slide:

Assignment

Here is an another assignment for you.
  • Change the font style of the formulae to Lato Black and font size to 20 point.
  • Provide more spacing between the symbols
  • Colour the characters in the formulae to green.
Slide: About Spoken Tutorial Project
  • The video at the following link summarises the Spoken Tutorial project
  • Please download and watch it
Slide: Spoken tutorial workshops
  • We conduct workshops using spoken tutorials and give certificates
  • For more details, please contact us
Slide: Answers for THIS Spoken Tutorial
  • Do you have questions in THIS Spoken Tutorial?
  • Please visit this site
  • Choose the minute and second where you have the question
  • Explain your question briefly
  • The Spoken Tutorial project will ensure an answer
  • You will have to register on this website to ask questions
Slide: Acknowledgement The Spoken Tutorial project is funded by the Ministry of Education, Govt. of India.
Slide: Thank you

Acknowledgement to DesiCrew

This tutorial was originally contributed by DesiCrew Solutions Pvt. Ltd. in 2011

This is Madhuri Ganapathi along with the Spoken Tutorial team from IIT Bombay signing off.

Thank you for watching.

Contributors and Content Editors

Madhurig, Nancyvarkey, Nirmala Venkat