0% found this document useful (0 votes)
49 views234 pages

P1S2 RM

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views234 pages

P1S2 RM

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 234

Unit-1

Module – 1
What is LibreOffice?
LibreOffice is a powerful and free office suite, a successor to OpenOffice(.org), used by millions of people around the
world. Its clean interface and feature-rich tools help you unleash your creativity and enhance your productivity. LibreOffice
includes several applications that make it the most versatile Free and Open-Source office suite on the market: Writer (word
processing), Calc (spreadsheets), Impress (presentations), Draw (vector graphics and flowcharts), Base (databases), and
Math (formula editing).

What is Writer (word processing)?


It provides the usual features of a word processor: enter and edit text, spelling check, thesaurus, hyphenation, autocorrect,
find and replace, automatic generation of tables of contents and indexes, mail merge, and others.
In addition, Writer provides these important features:

• Templates and styles


• Page-layout methods, including frames, columns, and tables
• Embedding or linking of graphics, spreadsheets, and other objects
• Built-in drawing tools
• Master documents—to group a collection of documents into a single document
• Change tracking during revisions
• Database integration, including a bibliography database
• Export to PDF, including bookmarks

Styles are central to using Writer. Using styles, you can easily format your document consistently and change the format
with minimal effort. A style is a named set of formatting options. Writer defines several types of styles, for different types
of elements: characters, paragraphs, pages, frames, and lists.

1.1. Creating/Starting a new document


From the operating system menu, in the same way that you start other programs. When Open Office is installed on your
computer, in most cases a menu entry for each component was added to your system menu. If you are using an Ubuntu, you
should see the LibreOffice icon in the Applications folder. When you double-click this icon, Open office opens at the Start
Center.

From the Applications Menu When Open Office is open but no document is open (for example, if you close all the open
documents but leave the program running), the Applications Menu is shown. Click one of the icons to open a new document
of that type, or click the Templates icon to start a new document using a template. If a document is already open in Open
Office, the new document opens in a new window.
When Open Office is open, you can also start a new document in one of the following ways.
1. Press the Control+N keys.
Page 1 of 61
2. Use File > New > Text Document.
3. Click the New button on the main toolbar.

Opening an existing document


When no document is open, the Start Center provides an icon for opening an existing document or choosing from a list of
recently-edited documents.

You can also open an existing document in one of the following ways. If a document is already open in Open Office, the
second document opens in a new window.
• Choose File > Open....
• Click the Open button on the main toolbar.
• Press Control+O on the keyboard.
• Use the Open Document or Recent Documents selections on the
• Use the Open Document or Recent Documents selections on the Quickstarter.

In each case, the Open dialog box appears. Select the file you want, and then click Open. If a document is already open in
Open Office, the second document opens in a new window.

In the Open dialog box, you can reduce the list of files by selecting the type of file you are looking for. For example, if you
choose Text documents as the file type, you will only see documents Writer can open (including *.odt, *.doc, *.txt). This
method opens Word (*.doc) files as well as Open Office files and other formats.

You can also open an existing Writer document using the same methods you would use to open any document in your
operating system.

If you have associated Microsoft Office file formats with OpenOffice.org, you can also open these files by double-clicking
on them. Recent Documents

Saving a document
To save a new document in Writer, do one of the following:
• Press Control+S.
• Choose File > Save.
• Click the Save button on the main toolbar.

When the Save As dialog box appears, enter the file name, verify the file type (if applicable), and click Save. To save an
open document with the current file name, choose File > Save. This will overwrite the last saved state of the file.

Saving a document automatically


You can choose to have Writer save your document automatically at regular intervals. Automatic saving, like manual saving,
overwrites the last saved state of the file. To set up automatic file saving:
1) Select Tools > Options > Load/Save > General.
Page 2 of 61
2) Click on Save Auto Recovery information every and set the time interval. The default value is 15 minutes. Enter
the value you want by typing it or by pressing the up or down arrow keys.

Undoing and redoing changes


When a document is open, you can undo the most recent change by pressing

Control+Z, or clicking the Undo icon on the Standard toolbar, or choosing Edit > Undo from the menu bar.
The Edit menu shows the latest change that can be undone.

Click the small triangle to the right of the Undo icon to get a list of all the changes that can be undone. You can select
multiple changes and undo them at the same time.

After changes have been undone, Redo becomes active. To redo a change, select Edit > Redo, or press Control+Y or click

on the Redo icon . As with Undo, click on the triangle to the right of the arrow to get a list of the changes that can
be reapplied. rabbit

Closing a document
To close a document, choose File > Close or click the Close icon on the document window. In Windows XP, this icon looks
like the X in the red box shown in Figure 18. If more than one Open Office window is open, each window looks like the
sample shown on the left in Figure 18. Closing this window leaves the other Open Office windows open. If only one Open
Office window is open, it looks like the sample shown on the right in Figure 18. Notice the small black X below the larger
X in the red box. Clicking the small black X closes the document but leaves Open Office open. Clicking the larger X closes
Open Office completely.

If the document has not been saved since the last change, a message box is displayed. Choose whether to save or discard
your changes.
• Save: The document is saved and then closed.
• Discard: The document is closed, and all modifications since the last save are lost.
• Cancel: Nothing happens, and you return to the document.

Page 3 of 61
1.2. Parts of the main Writer window
Title bar
The Title bar is located at the top of the Writer window. It shows the file name of the current document. When the document
is not yet named, the document name will appear as Untitled X, where X is a number. Untitled documents are numbered in
the order in which they are created.
Menu bar
The Menu bar is located just below the Title bar in Windows and Linux and at the top of the screen in macOS. When you
select one of the menus, a submenu drops down to show further options, including:
• File contains commands that apply to the entire document such as Open, Save, Print, and Export as PDF.
• Edit contains commands for editing the document such as Undo: xxx (where xxx is the command to undo) and
Find & Replace. It also contains commands to cut, copy, and paste selected parts of your document.
• View contains commands for controlling the display of the document such as Zoom and Web Layout.
• Insert contains commands for inserting elements into your document such as headers, footers, and pictures.
• Format contains commands, such as Styles and Formatting, Paragraph,and Bullets and Numbering, for
formatting the layout of your document
• Table shows all commands to insert and edit a table in a text document.
• Tools contain functions such as Spelling and Grammar, Customize, and Options.
• Window contains commands for the display window.
• Help contains links to the OpenOffice.org Help file, What’s This?, and information about the program

Sidebar
The Sidebar is normally open by default on the right side of the Writer window, as shown in Figure 1. If necessary, select
View > Sidebar on the Menu bar to display it. The Sidebar also has a Hide/Show icon, as shown in Figure 2. When the
Sidebar is closed, it can be opened by clicking this icon, which will be on the far-right side of the window.
The Writer Sidebar contains six decks by default: Properties, Page, Styles (also shown as Styles and Formatting in some
installations), Gallery, Navigator, and Style Inspector. Each deck can be opened by clicking its corresponding icon on the
Tab bar to the right of the sidebar.
Two additional decks are available when Experimental Features is enabled in Tools > Options > LibreOffice > Advanced:
Manage Changes and Design. These decks are not covered in this book.

Page 4 of 61
To undock the Sidebar and make it floating, and to dock a floating Sidebar, use the drop-down list in the Sidebar Settings
above the Tab bar. From the same list, you can use the Customization menu to choose which tabs you want to include in
the Sidebar.

Page 5 of 61
Toolbars
Writer has several types of toolbars: docked (fixed in place), floating, and tear-off. Docked toolbars can be moved to
different locations or made to float, and floating toolbars can be docked. The top toolbar, just under the Menu bar, is called
the Standard toolbar. It is consistent across the OpenOffice.org applications (Writer, Calc, Draw, Impress).

The second toolbar at the top is the Formatting bar. It is a context-sensitive; that is, it shows the tools relevant to the cursor’s
current position or selection. For example, when the cursor is on a graphic, the Formatting bar provides tools for formatting
graphics; when the cursor is in text, the tools are for formatting text.

Displaying or hiding toolbars


To display or hide toolbars, choose View > Toolbars, then click on the name of a toolbar in the list. An active toolbar shows
a check mark beside its name. Tear-off toolbars are not listed in the View menu.

Moving toolbars
To move a docked toolbar, place the mouse pointer over the toolbar handle, hold down the left mouse button, drag the
toolbar to the new location, and then release the mouse button

Floating toolbars
Writer includes several additional context-sensitive toolbars, whose defaults appear as floating toolbars in response to the
cursor’s current position or selection. For example, when the cursor is in a table, a floating Table toolbar appears, and when
the cursor is in a numbered or bullet list, the Bullets and Numbering toolbar appears. You can dock these toolbars to the top,
bottom, or side of the window.

To move a floating toolbar, click on its title bar and drag it to a new location.

Status bar
The Writer status bar is located at the bottom of the workspace. It provides information about the document and convenient
ways to quickly change some document features.

Page 6 of 61
Page number
Shows the current page number, the sequence number of the current page (if different from the page number), and the total
number of pages in the document. For example, if a document has 14 pages and you restarted page numbering at 1 on the
third page, its page number is 1, its sequence number is 3, and the total number of pages is 14; this field would show 1 3/14.
If any bookmarks have been defined in the document, a right-click on this field pops up a list of bookmarks; click on the
required one to go to the bookmark. To jump to a specific page in the document, double-click on this field. The Navigator
opens. Click in the Page Number field in the Navigator and type the sequence number of the required page. After a brief
delay, the display jumps to the selected page.

Page style
Shows the style of the current page. To change the page style, right-click on this field. A list of page styles pops up; choose
a different style by clicking on it. To edit the current page style, double-click on this field. The Page Style dialog box opens.

Language
Shows the language for the selected text. Click to open a menu where you can choose another language for the selected text
or for the paragraph where the cursor is located. You can also choose None (Do not check spelling) to exclude the text from
a spelling check or choose More to open the Character dialog box.

Insert mode
Click to toggle between Insert and Overwrite modes when typing. In Insert mode, any text after the cursor position moves
forward to make room for the text you type; in Overwrite mode, text after the cursor position is replaced by the text you
type.

Selection mode
Click to toggle between STD (Standard), EXT (Extend), ADD (Add) and BLK (Block) selection. EXT is an alternative to
Shift+click when selecting text.

Unsaved changes
An asterisk (*) appears here if changes to the document have not been saved.

Rulers
To show or hide rulers, choose View > Ruler. To enable the vertical ruler, choose Tools > Options > OpenOffice.org
Writer > View and select Vertical ruler.

Page 7 of 61
Figure: Turning on the vertical ruler

1.3. Formatting Characters


You can apply many formats to characters using the buttons on the Formatting toolbar. Below the figure shows the
Formatting toolbar as a floating toolbar, customized to show only the buttons for character formatting.

1. Open Styles and Formatting Window 9. Subscript


2. Apply Style 10. Increase Font dialog box
3. Font Name 11. Reduce Font
4. Font Size 12. Font Color
5. Bold 13. Highlighting
6. Italic 14. Background Color
7. Underline 15. Open Character Format
8. Superscript

Tip To remove manual formatting, select the text and choose Format > Default Formatting from the main menu bar, or
right-click and choose Default Formatting from the pop-up menu.

Auto formatting:
You can set Writer to automatically format parts of a document according to the choices made on the Options page of the
AutoCorrect dialog box (Tools > AutoCorrect Options).

To automatically format the file according to the options you have set, choose Format > AutoCorrect and select or
deselect the items on the submenu.

While Typing
Automatically formats the document while you type.

Apply
Automatically formats the document.

Apply and Edit Changes


Automatically formats the file and then opens a dialog box where you can accept or reject the changes.

AutoCorrect Options
Opens the AutoCorrect dialog above that picture.

Page 8 of 61
1.4. Formatting Paragraphs
You can apply many formats to paragraphs using the buttons on the Formatting toolbar. Figure shows the Formatting toolbar
as a floating toolbar, customized to show only the buttons for paragraph formatting.

Figure1: Formatting toolbar, showing icons for paragraph formatting

1. Open Styles and formatting window


2. Apply Style
3. Align Left
4. Centered
5. Align Right
6. Justified
7. Line Spacing: 1
8. Line Spacing: 1.5
9. Line Spacing: 2
10. Numbering On/Off
11. Bullets On/Off
12. Decrees Indent
13. Increase Indent
14. Paragraph format dialog Box

Page 9 of 61
Below the figure shows examples of the text alignment options.

Figure: Text alignment options

When using justified text, the last line is by default aligned to the left; however, if so desired, you can also align the last
line to the center of the paragraph area or justify it so that spaces are inserted between the words in order to fill the whole
line. In the case where the last line consists of a single word, you can also have this word stretched to cover the whole
line. Figure 8 shows an example of the effect obtained when setting each of these options.

Figure: Four choices for the last line of a justified paragraph

These options are controlled in the Alignment page of the Format > Paragraph dialog box.

Figure: Options for the last line of a justified paragraph


Setting tab stops and indents
The horizontal ruler shows both the default tab stops and any tab stops that you have defined. Tab settings affect
indentation of full paragraphs (using the Increase Indent and Decrease Indent icons on the Formatting toolbar) as well
as indentation of parts of a paragraph (by pressing the Tab key on the keyboard).

Using the default tab spacing can cause formatting problems if you share documents with other people. If you use the
default tab spacing and then send the document to someone else who has chosen a different default tab spacing, tabbed
material will change to use the other person’s settings. Instead of using the defaults, define your own tab settings, as
described in this section.

Page 10 of 61
To define indents and tab settings for one or more selected paragraphs, double-click on a part of the ruler that is not
between the left and right indent icons to open the Indents & Spacing page of the Paragraph dialog box. Double-click
anywhere between the left and right indent icons on the ruler to open the Tabs page of the Paragraph

Figure: Specifying tab stops and fill characters


Changing the default tab stop interval
Any changes to the default tab setting will affect the existing default tab stops in any document you open afterward, as
well as tab stops you insert after making the change.

To set the measurement unit and the spacing of default tab stop intervals,
go to Tools > Options > OpenOffice.org Writer > General.

Picture: Selecting a default tab stop interval


You can also set or change the measurement unit for rulers in the current document by right-clicking on the ruler to
open a list of units, as shown in Figure. Click on one of them to change the ruler to that unit. The selected setting applies
only to that ruler.

Picture: Changing the measurement unit for a ruler


1.4.1. Styles/What are Styles?
Most people are used to writing documents according to physical attributes. For example, you might specify the font
family, font size, and weight (for example: Helvetica 12pt, bold). Styles are logical attributes. We use styles every day.
For example, there are two styles of personal computer: desktop and laptop. Each has its own distinctive set of properties.
You never say “my computer is a low-weight, one-piece unit with an LCD screen attached to a rectangular casing
containing the computing components and the keyboard”. Instead, you could say that you have a laptop. OpenOffice
styles are a way to do the same thing for your document. Using styles means that you could stop saying “font size 14pt,
Times New Roman, bold, centered” and start saying “title” for describing that particular font usage. In other words,
styles mean that you shift the emphasis from what the text looks like to what the text is.
Page 11 of 61
What Use Styles?
Styles help improve consistency in a document. They also make major formatting changes easy. For example, you might
decide to change the indentation of all paragraphs or change the font of all titles. For a long document, this simple task
could be prohibitive. Styles make the task easy.

Style categories
Open Office Writer has five style categories:
• Paragraph styles affect entire paragraphs represented with those styles.
• Character styles affect a block of text inside a paragraph.
• Page styles affect page formatting (page size, margin, and the like).
• Frame styles affect frames and graphics.
• List styles affect outlines, numbered lists, and bulleted lists.

In the same way that characters are the building blocks for creating words, paragraphs are the building blocks of every
document. Headings (subheads) are paragraphs; headers, footers, and numbered lists are also paragraphs.

Applying styles
Styles can easily be applied by means of the Styles and Formatting window. However, alternative ways exist to apply
certain styles, as explained in this section.

Applying paragraph styles


The most used style when drafting a document is the paragraph style. Open Office offers two quick alternatives to the
Styles and Formatting window to apply this category of style: the Apply Style menu and the Format Paintbrush icon.

Pcture: Applying Style


When a paragraph style is in use in a document, the style name appears on the Apply Style menu near the left end of the
formatting bar, to the right of the Styles and Formatting icon. You can select styles from this menu, just as you can from
the Styles and Formatting window. To apply a style from this menu, click on the desired style or use the up or down
arrow keys to move through the list, then press Enter to apply the highlighted style.

The format paintbrush can be used to apply a certain paragraph style to another paragraph (or group of paragraphs).

Start by placing the cursor inside the paragraph you want to copy, then press the Format Paintbrush icon in
the standard toolbar. The cursor changes into an ink bottle. Select now the paragraphs to which you want to apply the
copied style. Note that it is not required to select the whole paragraph.

Page 12 of 61
Example: Applying a paragraph style
Let's see the three methods described above in action with an example.

1) Create a new document (choose File > New > Text Document or press Control+N).
2) Type the words Heading 1 in the new document, but do not press Enter so that the cursor remains in that same
line where you typed.

3) Click the Styles and Formatting icon located on the Formatting Bar or press the F11 key. This opens the
Styles and Formatting window in below Figure.
4) Make sure the window is showing the Paragraph Styles section—click on the top-left icon of the Styles and
formatting window.

Figure : Click on the Styles and Formatting icon to bring up the window

Double-click the Heading 1 entry of Styles and Formatting ( below Figure). This does two things:
• Gives the line (actually, its entire paragraph) you typed the Heading 1 style.
• Adds Heading 1 to the Apply Style menu.

Figure: Applying paragraph styles

1.4.2. Applying character styles


Open the Styles and Formatting window (press F11) and click the second button in the top bar. The list of available
character styles is displayed. To apply a character style, follow these steps:
1) Select the block of text where you wish to apply the style. 2) Double-click the appropriate character style in the Styles
and Formatting window. Some examples include:

Page 13 of 61
This example uses the Open Office-supplied Strong Emphasis character style.
Definition: A statement describing the meaning of a word or phrase.

One difference between character styles and paragraph styles is the need for selecting text
(highlighting). Character styles require you to select the text you want to apply them to; paragraph styles
do not.

Unset/undo character styles


Sometimes, you will want to remove the formatting from a block of text. You must resist the temptation to do this
manually. This will only cause trouble down the road. There are three easy ways to remove character formatting:

• Right-click and choose Default Formatting.


• Choose Format > Default Formatting from the menu bar
• If you have the Styles and Formatting window open, double-click the Default character style.

1.5. Selecting text


Before you can do anything with text, you need to select it. Selecting text in Writer is similar to selecting anything in
other applications. In addition to selecting blocks of text, you can select items that are not consecutive, and columns
(vertical blocks) of text

Selecting items that are not consecutive


To select nonconsecutive items (as shown in Figure) using the mouse:
1) Select the first piece of text.
2) Hold down the Control (Ctrl) key and use the mouse to select the next piece of text.
3) Repeat as often as needed. Now you can work with the selected text (copy it, delete it, change the style, and so on).

To select nonconsecutive items using the keyboard:


1) Select the first piece of text. (For more information about keyboard selection of text, see the topic “Navigating
and Selecting with the Keyboard” in the OpenOffice.org Help (F1).)
2) Press Shift+F8. This puts Writer in “ADD” mode. The word ADD appears on the Status Bar.
3) Use the arrow keys to move to the start of the next piece of text to be selected. Hold down the Shift key and
select the next piece of text.
4) Repeat as often as required.
Now you can work with the selected text. Press Esc to exit from this mode.

Figure: Selecting items that are not next to each other

Cutting, copying, and pasting text


Cutting and copying text in Writer is similar to cutting and copying text in other applications. You can copy or move
text within a document, or between documents, by dragging or by using menu selections, icons, or keyboard shortcuts.
You can also copy text from other sources such as Web pages and paste it into a Writer document.
To move (cut and paste) selected text using the mouse, drag it to the new location and release it. To copy selected text,
hold down the Control key while dragging. The text retains the formatting it had before dragging.
Page 14 of 61
When you paste text, the result depends on the source of the text and how you paste it. If you click on the Paste icon,
then the pasted text keeps its original formatting (such as bold or italics). Text pasted from Web sites and other sources
may also be placed into frames or tables. If you do not like the results, click the Undo icon or press Control+Z.

To make the pasted text take on the formatting of the text surrounding where it is pasted, you can:
• Edit > Paste Special, or
• Click the triangle to the right of the Paste icon, or
• Click the Paste icon without releasing the left mouse button.

Then select unformatted text from the resulting menu.

Figure : Paste Special menu


The range of choices on the Paste Special menu varies depending on the origin and formatting of the text (or other
object) to be pasted. See Figure for an example with text on the clipboard.

This example includes the formatting option DDE link. DDE is an acronym for Dynamic Data Exchange, a mechanism
whereby selected data in document A can be pasted into document B as a linked, ‘live’ copy of the original. It would be
used, for example, in a report written in Writer containing time-varying data, such as sales results sourced from a Calc
spreadsheet. The DDE link ensures that, as the source spreadsheet is updated so is the report, thus reducing the scope
for error and reducing the work involved in keeping the Writer document up to date.

Page 15 of 61
Module – 2
1.6. Bullets and Numbering
Bullets and numbering are used to emphasize list of things and make list easy to read and follow. It provides an excellent
way to segregate, list and organize information for a reader. You can control the appearance, or format a bulleted or
numbered list.

 Use paragraph styles List 1, List 2, List 3, and so on for creating bulleted lists. These styles use Bullet list styles.
 Use paragraph styles Numbering 1, Numbering 2, Numbering 3, etc, for creating numbered lists. These styles
use the list styles called Numbering 1, Numbering 2, etc.

Style of Bullets and Numbering

The default type of bullet is ( …. ) and the default type of numbering is (1, 2, 3 ……). The style of bullets and numbering
can be changed by applying the following steps:

 Select the text to be bulleted


 Format -> Bullets and Numbering
 Select Bullets Tab
 The Bullets and Numbering dialog box appears where different styles of bullets are displayed
 Click on the required style Click Ok button
 The selected text is bulleted.
 The bullets and numbering dialog box with the bullets tab is displayed in Figure.

Creating a new outline level:


1. If necessary, press Enter to begin a new line.
2. Press tab. Each time you press Tab the line indents to be next outline level. Presenting Enter creates a new
line at the same level as the previous one. To return to the previous level, press Shift+Tab.

If the text is not typed, then apply the steps above and then type the text, the newly entered text will appear in bulleted
form.

To apply Numbering
1. Select the text to be numbered
2. Format -> Bullets and Numbering
3. Select Numbering Type Tab
4. The Bullets and Numbering dialog box appears where different styles of numbering are displayed
5. Click on the particular style
6. Click Ok button
Page 16 of 61
7. The selected text is numbered.

The bullets and numbering dialog box with the numbering type tab is displayed in Figure.

If the text is not typed, then apply the steps above and then type the text, the newly entered text will appear in numbered
form.

Turning off Bullets and Numbering

As you can quickly add bullets or numbers to existing text by clicking on the icons, the bullets and numbers can be
removed easily. Select the text where the bullets and numbers are to be removed.

 Click on the bullets icon again to remove bullets.

 Click on the numbering icon again to remove numbering.

1.6.1. Changing the appearance of the list

You can fully customize the appearance of a list, changing the bullet type or numbering for the entire list or for single
entry. All the changes can be made using the Bullets and Numbering dialog box, which is accessed by selecting Format
> Bullets and Numbering or by clicking on the Bullets and Numbering icon on the text formatting toolbar.

Selecting the entries


For the entire list:
1. Select the entire list or click on the gray border of the text box so that just the green resizing handles are
displayed.
2. Select Format > Bullets and Numbering or click on the Bullets and Numbering icon.
3. The Bullets and Numbering dialog box contains five tabs: Bullets, Numbering type, Graphics, Position, and
Customize.
a. If a bulleted list is needed, select the desired bullet style from the six default styles available on the
Bullets page.
b. If a graphics style is needed, select one from those available on the Graphics page.
c. If a numbered list is needed, select one of the 6 default numbering styles on the Numbering type page.

Bullets, Numbering type and Graphics pages

These three tabs contain predefined formatting for either the bullet type (Bullets and Graphics tabs) or for the numbering.
To apply a specific one, it is sufficient to click on the image. A thick border will indicate the selection.
Page 17 of 61
Position page
Use the Position page to fine tune the indentation and spacing of the bullet point and its text. This page is particularly
effective when used in combination with the Customize page.

To set up an outline level, first select it from the list on the left-hand side of the page. Then set the Indent, which is the
spacing between the bullet or number and the text. If you select the Relative option, the indent value will be measured
relative to the previous level and not from the margin.

The numbering alignment is only useful when creating a numbered list; use it to specify the alignment of the numbers.
For example, you may want to align them to the right to line up one and two-digit numbers in a pleasing way.

To fully appreciate how the Numbering alignment works, try to create a numbered list with more than 10 elements and
make sure that enough room has been made for a two (or more) digit number.

The Position page is not available if you are modifying a presentation style or graphics style, however the same effects
can be obtained by using the Indents and Spacing page of the dialog box for creating or modifying a slide (see Figure
10).

1.7. Finding and Replacing


Writer has a Find and Replace feature that automates the process of searching for target text (whether it be a particular
word, type of formatting or string of wildcard characters) inside a document. This is particularly handy in long
documents. In addition to finding and replacing words and phrases, you can:

 Use wildcards and regular expressions to fine-tune a search.


 Find and replace specific formatting.
 Find and replace paragraph styles.

To display the Find & Replace dialog box, use the keyboard shortcut Control+F or select Edit > Find & Replace.

1. Type the text you want to find in the Search for box.
2. To replace the text with different text, type the new text in the Replace with box.
3. You can select various options such as matching the case, matching whole words only, or doing a search for
similar words. (See below for some other choices.)
4. When you have set up your search, click Find. To replace text, click Replace instead.

Page 18 of 61
If you click Find All, Writer selects all instances of the search text in the document. Similarly, if you click Replace All,
Writer replaces all matches.

Note: Use Replace All with caution; otherwise, you may end up with some hilarious (and highly embarrassing)
mistakes. A mistake with Replace All might require a manual, word-by-word, search to fix, if mistakes are not
discovered in time to undo.

Find and replace specific formatting:

A very powerful use of Find & Replace takes advantage of the format option. For example, you might want to replace
underlined words with italics.

On the Find & Replace dialog box with More Options displayed, follow the instructions below:

To search for text with specific formatting, enter the text in the Search for box. To search for specific formatting only,
delete any text in the Search for box. Click Format to display the Text Format (Search) dialog box. The tabs on this
dialog box are similar to those on the Paragraph format and Paragraph Style dialog boxes. Choose the formats you want
to search for and then click OK. The names of selected formats appear under the Search for box. For example, you might
search for all text in 14-point bold Helvetica. To replace text as well as formatting, type the replacement text in the
Replace with box. Click Find, Find All, Replace, or Replace All.

Find & Replace Specific Text & Formatting:


 To search for specific text with specific formatting (for example, the word hello in bold), specify the formatting,
type the text in the Search for box and leave the Replace with box blank.
 To remove specific character formatting, click Format, select the Font tab, then select the opposite format (for
example, No Bold).
 The No Format button on the Find & Replace dialog box clears all previously selected formats.
 Click Find, Find All, Replace, or Replace All.

Unless you plan to search for other text using those same attributes, click No Format to remove the attributes after
completing your search. If you forget to do this, you may wonder why your next search fails to find words you know
are in the document.

Find and replace paragraph styles:


If you combine material from several sources, you may discover that lots of unwanted paragraph styles have suddenly
shown up in your document. To quickly change all the paragraphs of one (unwanted) style to another (preferred) style:

1. On the expanded Find & Replace dialog box, select Search for Styles. (If you have attributes specified, this
option is labeled Including Styles.) The Search for and Replace with boxes now contain a list of styles.
Page 19 of 61
2. Select the styles you want to search for and replace.
3. Click Find, Find All, Replace, or Replace All.

Repeat steps 2 and 3 for each style that you want to replace.

Use wildcards (regular expressions):


Wildcards (also known as regular expressions) are combinations of characters that instruct Open Office how to search
for something. Regular expressions are very powerful but not very intuitive. They can save time and effort by combining
multiple finds into one.

Table 1 shows a few of the regular expressions used by Open Office.


One of the most common mistakes when using regular expressions is to try to search for a character that is defined as
a wildcard, such as brackets or dots. If you need to search for such a character, type a backslash (\) before it. This
instructs Open Office to treat the character following the backslash as a normal character. For example, to find the text
$5.00 ($ and. are wildcard characters), you would conduct a search using \$5\.00.

To use wildcards and regular expressions when searching and replacing:

1. On the Find & Replace dialog box, click More Options to see more choices. On this expanded dialog box,
select the Regular expressions option.
2. Type the search text, including the wildcards, in the Search for box and the replacement text (if any) in the
Replace with box. Not all regular expressions work as replacement characters; the line break (\n) is one that
does work.
3. Click Find, Find All, Replace, or Replace All (not recommended).

Table-1: Examples of search wildcards (regular expressions)

To find Use this expression Examples and comments


Any single character . b.d finds bad, bud, bid, and bed.
Characters at the beginning of
a paragraph ^chars ^term
Characters at the end of a
paragraph chars$ term.$

One of the specified characters [xyz] b[iu]n finds bin and bun.
Any single character in this [r-t]eed finds reed, seed, and teed; ranges must be in
range [x-y] alphabetically ascending order.

Page 20 of 61
Any single character except the
characters inside the brackets [^x] p[^a]st finds post and pest, but not past.
The beginning of a word \<start \<log finds logbook and logistics, but not catalog.
The end of a word end\> log\> finds catalog, but not logistics.

A paragraph marker $ Does not work as a replacement character. Use \n instead.


An empty paragraph ^$
An tab character \t

Finds a line break that was inserted with Shift+Enter. When


A line break \n used as a replacement character, it inserts a paragraph marker.

Find and replace specific formatting:

A very powerful use of Find & Replace takes advantage of the format option. For example, you might want to replace
underlined words with italics. On the Find & Replace dialog box (with More Options displayed):

1. To search for text with specific formatting, enter the text in the Search for box. To search for specific formatting
only, delete any text in the Search for box.
2. Click Format to display the Text Format (Search) dialog box. The tabs on this dialog box are similar to those
on the Paragraph format and Paragraph Style dialog boxes. Choose the formats you want to search for and then
click OK. The names of selected formats appear under the Search for box. For example, you might search for
all text in 14-point bold Helvetica.
3. To replace text, enter the replacement text in the Replace with box. To search for specific text with specific
formatting (for example, the word “hello†in bold), specify the formatting, put the text in the Search for box
and leave the Replace with box blank. To remove specific character formatting, click Format, select the Font
tab, then select the opposite format (for example, No Bold). The No Format button on the Find & Replace
dialog box clears all previously selected formats.
4. Click Find, Find All, Replace, or Replace All.

1.8. What is a hyperlink

Page 21 of 61
A hyperlink, or simply a link, is a reference to data that the user can follow by clicking or tapping. A hyperlink points
to a whole document or to a specific element within a document. Hypertext is text with hyperlinks. The text that is linked
from is called anchor text. A software system that is used for viewing and creating hypertext is a hypertext system, and
to create a hyperlink is to hyperlink (or simply to link). A user following hyperlinks is said to navigate or browse the
hypertext.

The document containing a hyperlink is known as its source document. For


example, in an online reference work such as Wikipedia, or Google, many words
and terms in the text are hyperlinked to definitions of those terms. Hyperlinks are
often used to implement reference mechanisms such as tables of contents,
footnotes, bibliographies, indexes, letters and glossaries.

In some hypertext, hyperlinks can be bidirectional: they can be followed in two


Figure 1 several documents being
directions, so both ends act as anchors and as targets. More complex arrangements
connected by hyperlinks
exist, such as many-to-many links.

Working with hyperlinks


When you type text (such as a website address or URL) that can be used as a hyperlink, and then type a space, Open
Office formats the URL automatically, creating the hyperlink and applying to the text a color and underlining. If this
does not happen, you can enable this feature using Tools > AutoCorrect > Options and selecting the URL Recognition
option.

Tip
If you do not want Open Office to convert a specific URL to a hyperlink, select Edit > Undo Insert from the menu bar
or press Control+Z immediately after the formatting has been applied.

Inserting hyperlinks
You can also insert and modify links using the Hyperlink dialog. To display the dialog, click the Hyperlink icon on the
Standard toolbar or select Insert > Hyperlink from the menu bar. To turn existing text into a link, highlight it before
opening the Hyperlink dialog.

Figure: Hyperlink dialog showing details for Internet links

On the left hand side, select one of the four types of hyperlink:

Page 22 of 61
 Internet: a web address, normally starting with http://
 Mail & News: for example an email address.
 Document: the hyperlink points to another document or to another place in the presentation.
 New document: the hyperlink creates a new document.

The top right part of the dialog changes according to the choice made for the hyperlink type. A full description of all the
choices, and their interactions, is beyond the scope of this chapter. Here is a summary of the most common choices used
in presentations. For an Internet type hyperlink, choose the type of hyperlink (choose between Web, FTP or Telnet), and
enter the required web address (URL).

For a Mail and News type hyperlink, specify whether it is a mail or news link, the receiver address and for email, also
the subject. For a Document type hyperlink, specify the document path (the Open File button opens a file browser);
leave this blank if you want to link to a target in the same presentation. Optionally specify the target in the document
(for example a specific slide). Click on the Target icon to open the Navigator where you can select the target, or if you
know the name of the target, you can type it into the box.

For a New Document type hyperlink, specify whether to edit the newly created document immediately or just create it
(Edit later) and the type of document to create (text, spreadsheet, etc.). For a presentation, Edit now is the more likely
choice. The Select path button opens a directory picker.

The Further settings section in the bottom right part of the dialog is common to all the hyperlink types, although some
choices are more relevant to some types of links.

 Set the value of Frame to determine how the hyperlink will open. This applies to documents that open in a Web
browser.
 Form specifies if the link is to be presented as text or as a button.
 Text specifies the text that will be visible to the user.
 Name is applicable to HTML documents. It specifies text that will be added as a NAME attribute in the HTML
code behind the hyperlink.
 Event button: this button will be activated to allow Open Office to react to events for which the user has written
some code (macro). This function is not covered in this book.

Editing hyperlinks
To edit a hyperlink, you can either click anywhere in the link text, or position the cursor in the link text using the arrow
keys, and then open the Hyperlink dialog by clicking the Hyperlink icon on the Standard toolbar or selecting Edit >
Hyperlink from the menu bar. To activate a hyperlink, that is, to open the URL in your default browser, it is necessary
to hold down the Control key while clicking on the link. A tooltip is displayed reminding you to press the Control key
when the mouse pointer hovers over the hyperlink text.

Tip
If you need to edit several hyperlinks, you can leave the Hyperlink dialog open until you have edited all of them. Be
sure to click Apply after each one. When you are finished, click Close.

Page 23 of 61
Module – 3
Images can be added to a document in several ways: by inserting an image file, directly from a graphics program or a
scanner, or from the Gallery.
1.9. Inserting an image file
When the image is in a file stored on the computer, you can insert it into a document using the following method.
When the image is in a file stored on the computer, you can insert it into a LibreOffice document using any of the
following methods.
Drag and drop
This method embeds (saves a copy of) the image file in the Writer document. To link the file instead of embedding it,
hold down the Ctrl+Shift keys while dragging the image.
1) Open a file browser window and locate the image you want to insert.
2) Drag the image into the Writer document and drop it where you want it to appear. A faint vertical line marks where
the image will be dropped.
Insert Image dialog
1) Click in the Writer document where you want the image to appear.
2) Choose Insert > Image on the Menu bar or click the Insert Image icon on the Standard toolbar.
3) On the Insert Image dialog, navigate to the file to be inserted, and select it.
4) At the bottom of the dialog (Figure) is a Link option. Select Preview to show a thumbnail of the selected image on
the right, as in the example.
5) Click Open.

Page 24 of 61
Copy and paste
Using the clipboard, you can copy images into a LibreOffice document from another LibreOffice document and from
other programs. To do this:
1) Open both the source document and the target document.
2) In the source document, select the image to be copied.
3) Press Ctrl+C (or right-click and select Copy in the context menu) to copy the image to the clipboard.
4) Switch to the target document.
5) Click to place the cursor where the image is to be inserted.
6) Press Ctrl+V (or right-click and select Paste in the context menu) to insert the image.
Inserting Shapes to document
To insert shapes from the OpenOffice Writer , carry out the steps given below
1. Choose View >>> Toolbars >>> Drawing from the menu bar
2. Select the required shape from drawing bar see above the Status bar in OpenOffice Writer window.
3. Now hold left mouse button and drag mouse pointer where you want to insert shapes.
1.9.1. Positioning images within the text
When you add an image to a text document, you need to choose how to position it with respect to the text and other
images. Positioning is controlled by four settings:
 Arrangement refers to the placement of an image on an imaginary vertical axis. Arrangement controls how
images are stacked upon each other or relative to the text.
 Alignment refers to the vertical or horizontal placement of an image in relation to the chosen anchor point.
 Anchoring refers to the reference point for the images. This point could be the page or frame where the object
is, a paragraph, or even a character. An image always has an anchor point.

Page 25 of 61
 Text wrapping refers to the relation of images to the surrounding text, which may wrap around the image on
one or both sides, be overprinted behind or in front of the image, or treat the image as a separate paragraph or
character.
The settings can be accessed in several ways, depending on the nature of the images:
 In the Format menu: Anchor, Wrap, and Arrange (for images and drawing objects).
 In the context menu displayed when you right-click the image; this menu also includes an Align submenu.
 For images, on the Type and Wrap tabs of the Image dialog. You cannot control the arrangement or alignment
using the dialog.
 For drawing objects, on the Position and Size tab of the Position and Size dialog. To open the dialog, right-
click the drawing object and choose Position and Size in the context menu.
 For an embedded object (such as a Calc spreadsheet or Draw document), on the OLE-Object toolbar.
1.9.2. Arranging images
Arranging an image means to determine its position relative to other images or text. Arranging is only relevant when
objects are overlapping. You can choose between four common settings, plus a fifth special setting for drawing
objects:
Bring to Front
Places the image on top of any other images or text.
Forward One
Brings the image one level up in the stack. Depending on the number of overlapping objects, you may need to apply
this option several times to obtain the desired result.
Back One
Sends the image one level down in the object stack.
Send to Back
Sends the image to the bottom of the stack.
To Background / To Foreground
Only available for drawing objects; moves the drawing object behind or in front of the text respectively.
1.9.3. Using the Image toolbar
When you insert an image or select one already present in the document, the Image toolbar appears. You can set it to
always be present (View > Toolbars > Image) and choose whether to float or dock it. Two other toolbars can be
opened from this one: the Image Filter toolbar, which can be torn off and placed elsewhere on the window, and the
Color toolbar, which opens as a separate floating toolbar.
From these three toolbars, you can apply small corrections to the image or obtain special effects: transparency, color
adjustment, flipping and rotating, and applying special-effects filters.

Page 26 of 61
Image filters
Table 7 provides a short description of the available filters. The best way to understand them is to see them in action.
Experiment with the different filters and filter settings, remembering that you can undo all the changes by pressing
Ctrl+Z or Alt+Backspace or by selecting Edit > Undo.
Image mode
You can change color images to grayscale, to black-and-white, or to a watermark by selecting the image and then
selecting the relevant item from the Image Mode list.
Flip vertically, horizontally or in 90° rotations
To flip an image vertically, horizontally, or rotate it by ninety degrees, select the image, and then click the relevant
button on the image toolbar.
Transparency
Increase the percentage value in the Transparency box on the image toolbar to make the image more transparent. This
is particularly useful when creating a watermark or when placing the image in the background.
Color
Use this toolbar to modify the individual RGB color components of the image (red, green, blue) as well as the
brightness, contrast, and gamma of the image. If the result is not satisfactory, you can press Ctrl+Z to restore the
default values.

Page 27 of 61
1.10. Creating drawing objects
To begin using the drawing tools, display the Drawing toolbar (Figure) by clicking View > Toolbars > Drawing or by
clicking on the Show Draw Functions icon on the standard toolbar. The Drawing toolbar may appear at the bottom or
left side of the workspace. You can move it to another location and dock it, or float it and move it to a convenient
place on the screen.

To use a drawing tool:

1. Click in the document where you want the drawing to be anchored. You can change the anchor later, if necessary.
2. Select the tool on the Drawing toolbar (Figure 253). The cursor changes to a drawing-functions pointer and the
normal Formatting toolbar changes to the Drawing Object Properties toolbar (Figure 254).
3. Move the cross-hair pointer to the place in the document where you want the image to appear and then click-
and-drag to create the drawing object. Release the mouse button. The selected drawing function remains active,
so that you can draw another object of the same type.
4. To cancel the selected drawing function, press the Esc key or click the Select icon (the arrow) on the Drawing
toolbar.
5. You can now change the properties (fill color, line type and weight, anchoring, and others) of the drawing object
using either the Drawing Object Properties toolbar (Figure 254) or the choices and dialogs reached by right-
clicking on the drawing object.

Page 28 of 61
1.11. Audio and video
Although linked audio and video files are irrelevant when a Writer document is printed, if the document is opened on
a computer or exported to PDF or HTML, you can play the files by clicking on the links.
Using media files
To insert a media file into your document:
1. Choose Insert > Media > Audio or Video on the Menu bar to open the Insert Audio or Video dialog.
2. Select the media file to insert and click Open to place the object in the document.
Writer only links media files and does not embed a media file into a document. Therefore if a document is moved to a
different computer, any links will be broken and the media files will not play. To prevent this from happening:
1. Place any media files that are included in a document in the same folder where the document is stored.
2. Insert the media file in the document.
3. Send both the document and any media files to the computer which is to be used for the document and place
both files in the same folder on that computer.
Using the Gallery
To insert media clips directly from the Gallery:
1) Go to the Gallery on the Sidebar.
2) Browse to a theme containing media files (for example, Sounds).
3) Click the movie or sound to be inserted and drag it into the document area.
Media playback
The Media Playback toolbar is automatically opened when a media file is selected. The default position of the toolbar
is at the bottom of the workspace, just above the Drawing toolbar.
However, this toolbar can be undocked and placed anywhere. If the toolbar does not open, go to View > Toolbars >
Media Playback on the Menu bar.
The Media Playback toolbar contains the following tools:
• Insert Audio or Video – opens the Insert Audio or Video dialog.
• Play, Pause, Stop – controls media playback.
• Repeat – if selected, media will continuously repeat playing until this tool is deselected.
• Position (Playback slider) – selects the position to start playing from within the media file.
• Timer – displays current position of the media clip and length of media file.
• Mute – when selected, the sound will be suppressed.
• Volume – adjusts the volume of the media file.
• Media path – the location of the file on the computer.
• View (Scaling drop-down menu) – only available for movies; allows scaling of the clip.

1.12. Mathematical Operations, Formula Insertions


Go to Insert > Object > Formula on the Menu bar to create a formula (equation). A formula can also be inserted as
an OLE object; see page 9 for more information.
Page 29 of 61
When creating or editing a formula, the Math menu becomes available.

When creating formulas, take care about the font sizes to make sure they are similar in size to fonts used in the
document. To change font attributes of a Math object, double-click in the formula to enter edit mode and go to
Format > Font Size on the Menu bar. To change font type, use Format > Fonts.

What is Math?
Math is OpenOffice.org (OOo)’s component for writing mathematical equations. It is most commonly used as an
equation editor for text documents, but it can also be used with other types of documents or stand-alone. When used
inside Writer, the equation is treated as an object inside the text document.

Getting started

To insert an equation, go to Insert > Object > Formula.

The equation editor opens at the bottom of the screen, and the floating Selection window appears. You will also see a
small box (with a gray border) in your document, where the formula will be displayed, as shown in Figure 418.

Entering a formula

There are three ways to enter a formula:


• Select a symbol from the Selection window.
• Right-click on the equation editor and select the symbol from the context menu.
• Type markup in the equation editor.
The context menu and the Selection window insert the markup corresponding to a symbol. Incidentally, this provides
a convenient way to learn the OOoMath markup.

Note: Click on the document body to exit the formula editor. Double-click on a formula to enter the formula editor
again.

Page 30 of 61
The Selection window

The simplest method for entering a formula is the Selection window, shown in Figure 419.

Categories

Symbols

The Selection window is divided into two main portions.


 The top shows the symbol categories. Click on these to change the list of symbols.
 The bottom shows the symbols available in the current category.
 You can hide (or unhide) the Selection window with View > Selection.
For this example we will enter a simple formula: 5×4 On the Selection window:
1)Select the top-left button of the categories (top) section (Figure 420).
2)Click on the multiplication symbol (shown in Figure 420).

When you select the multiplication symbol on the Selection window, two things happen:

• The equation editor shows the markup: <?> times <?>


• The body of the document shows a gray box with the figure:

The <?> symbols (Figure 421) are placeholders that you can
replace by other text. The equation will update
automatically, and the result should resemble Figure 422.

Page 31 of 61
Right-click menu
Another way to access mathematical symbols is to right-click on the equation editor. This produces a menu as shown
in Figure 423.

Note: The entries in this menu correspond exactly to those in the Selection window.
Markup:
You can type the markup directly on the equation editor. For example, you can type 5 times 4 to obtain 5×4 . If you
know the markup, this can be the fastest way to enter a formula.

Tip: As a mnemonic, the formula markup resembles the way the formula reads in English.

Below is a short list of common equations and their corresponding markup.

Greek characters:

Another way to enter Greek characters is by using the catalog window. Go to Tools > Catalog. The catalog window is
shown in Figure 424. Under Symbol Set, select Greek and double-click on a Greek letter from the list.

Page 32 of 61
Example 2: 𝜋 ≃ 3.14159

For this example we will suppose that:

• We want to enter the above formula (the value of pi rounded to 5 decimal


places).
• We know the name of the Greek character (pi).
• But we do not know the markup associated with the ≃ symbol.
Step 1: Type % followed by the text pi. This displays the Greek character .

Step 2: Open the Selection window (View > Selection).

Step 3: The ≃ symbol is a relation, so we click on the relations button . If you hover the
mouse over this button you see the tooltip Relations (Figure 425).
Step 4: Delete the <?> text and add 3.14159 at the end of the equation. Hence we end up with the markup %pi simeq
3.14159. The result is shown in Figure 426.

Formula layout
The most difficult part of using OOoMath comes when writing complicated equations. This section provides some
advice about writing complex formulas.

Brackets are your friends


OOoMath knows nothing about order of operation. You must use brackets to state the order of operations explicitly.
Consider the following example:

Page 33 of 61
Equations over more than one line

Suppose you want to type an equation covering more than one line. For

x=3
example :
y =1

Your first reaction would be to simply press the Enter key. However, if you press the Enter key, though the markup goes
to a new line, the resulting equation does not. You must type the newline command explicitly. This is illustrated in the
table below.

Common problem areas


How do I add limits to my sum/integral? The sum and int commands can (optionally) take the parameters from and
to These are used for lower and upper limits respectively. These parameters can be used singly or together. Limits for
integrals are usually treated as subscripts and superscripts.

How do I make a derivative? Making derivatives essentially comes down to one trick: Tell OOo it's a fraction.

In other words, you have to use the over command. Combine this with either the letter (for a total derivative) or the
partial command (for a partial derivative) to achieve the effect of a derivative.

Page 34 of 61
Module – 4
1.13. Working with Tables
Tables are a useful way to organize and present large amounts of information, for example:

• Technical, financial, or statistical reports.


• Product catalogs showing descriptions, prices, characteristics, and photographs of products.
• Bills or invoices.
• Lists of names with address, age, profession, and other information.

Tables can often be used as an alternative to spreadsheets to organize materials. A well-designed table can help readers
understand better what you are saying. While you would normally use tables for text or numbers, you could put other
objects, such as pictures, in cells.

The Table menu and toolbar


All of the table commands described in this chapter are conveniently located in the main menu under the Table item
and on the Table toolbar, shown in Figure.

Table 1 describes the effects of using these icons. When you create a table or select an existing table, the Table toolbar
may be displayed automatically, or you can manually display it by clicking View > Toolbars > Table. The toolbar
can float over the main Writer window (as shown in Figure ), or it can be docked along any edge of the main window.

Figure : Table toolbar

1 Table 9 Top 17 Select Column


2 Line Style 10 Center (vertical) 18 Select Row
3 Line Color (border) 11 Bottom 19 AutoFormat
4 Borders 12 Insert Row 20 Table Properties
5 Background Color 13 Insert Column 21 Sort
6 Merge Cells 14 Delete Row 22 Sum
7 Split Cells 15 Delete Column
8 Optimize 16 Select Table

Table 1: Functions of the icons on the Table toolbar

Sno Name Description


1 Table Opens the Insert Table dialog box where you can set up and insert a table into the
document, name the table for use with the Navigator, and set some other options. If you
press the small black triangle pointing down next to the icon, you can use the mouse to
drag to select the number of rows and columns to include in the table.
2 Line Style Opens the Border Style window where you can modify the border line style.
3 Line Color Opens the Border Color window where you can modify the border color.

Page 35 of 61
(border)
4 Borders Opens the Borders window where you can select which sides of the table or of the selected
cells will have a border.
5 Background Opens the Background toolbar where you can select the background color of the table or
Color of the selected cells.
6 Merge Cells Combines the selected cells into a single cell. Refer to Merging and splitting cells for an
example of using this button.
7 Split Cells Opens the Split Cell dialog box where you can define how to split a cell. Refer to Merging
and splitting cells for an example of using this button.
8 Optimize Opens the a drop down menu with four options you can use to let OOo optimize the
distribution of the columns or rows or optimize the row height or column width.
9 Top Press this button to align the contents of the selected cells to the top of the cell.
10 Center Press this button to align the contents of the selected cells to the vertical center of the cell.
(vertical)
11 Bottom Press this button to align the contents of the selected cells to the bottom of the cell.
12 Insert Row Inserts a row below the selected row.
13 Insert Inserts a column after the selected column.
Column
14 Delete Row Deletes the selected row(s) from the table.
15 Delete Deletes the selected column(s) from the table.
Column
16 Select Table Selects the entire table.
17 Select Selects the column in which the cursor is positioned.
Column
18 Select Row Selects the row in which the cursor is positioned.
19 AutoFormat Opens the AutoFormat dialog box where you can select among several predefined
formatting sets. Each set is characterized by its own fonts, shading, and borders styles.
You can also select AutoFormat from the Insert Table dialog box.
20 Table Opens the Table Format dialog box where you can control all the properties of the table,
Properties for example name, alignment, spacing, column width, borders, and background.
21 Sort Opens the Sort dialog box where you can specify the sort criteria for the selected cells.
22 Sum Activates the Sum function. Refer to “Using spreadsheet functions in a table” for an
example of using this function.

1.13.1. Creating a table

Before you insert a table into a document, it helps to have an idea of the visual result you want to obtain as well as an
estimate of the number of rows and columns required. Every parameter can be changed at a later stage; however, thinking
ahead can save a large amount of time as changes to fully formatted tables often require a significant effort.

Inserting a new table To insert a new table, position the cursor where you want the table to appear, then use any of
the following methods to open the Insert Table dialog box:

 From the main menu, choose Table > Insert > Table.
 Press Control+F12.

 From the Standard toolbar, click the Table icon Here you can specify
the properties for the new table.
Under Name, you can enter a different name than the OOo-generated default for the table. This might come in handy
when using the Navigator to quickly jump to a table
Page 36 of 61
Under Size , specify the initial number of columns and rows for the new table. You can change the size of the table
later, if necessary

Figure 1: Inserting a new table using the Insert Table dialog box

Under Options, set up the initial table characteristics. Selecting the options in this section of the dialog produces
the following results:

• Heading — Defines the first row(s) in the table as headings. The default Table Heading paragraph style is
applied to the heading rows and thus makes the text centred, bold, and italic. You can edit the OOo-predefined
Table Heading paragraph style in the Styles and Formatting window to change these default settings. When
splitting a table into two tables, the Heading row(s) are copied in the second table.
• Repeat heading — Repeats the heading row(s) of the table at the top of subsequent pages if the table
spans more than one page.
The first ... rows —Specifies the number of rows to be repeated. Default is 1.
• Don’t split table — Prevents the table from spanning more than one page. This can be useful if the table starts
near the end of a page, and would look better if it were completely located on the following page. If the table
becomes longer than would fit on one page, you will need to either deselect this option or manually split the
table.
• Border — Surrounds each cell of the table with a border. This border can be modified or deleted later.

The AutoFormat button opens a dialog box from which you can select one of the many predefined table layouts.
See “Automatic formatting of tables” for more information.

After making your choices, click OK. Writer creates a table as wide as the text area (from the left page margin to the
right page margin), with all columns the same width and all rows the same height. You can then adjust the columns and
rows later to suit your needs.

Creating nested tables You can create tables within tables, nested to a depth only limited by imagination and
practicality. Figure 2 demonstrates a simple, two-level example.

To achieve this, simply click in a cell of an existing table and use any of the methods mentioned in “Inserting a new
table” above.

Figure 2: Nested table example. The shaded table is nested in a cell of the larger table.

Page 37 of 61
Create a table from formatted text It is possible to create a table starting from plain text by means of the Table >
Convert > Text to Table menu. In order for this command to work effectively, the starting text needs to have clear
demarcation between what will become the columns of the table. Paragraph marks indicate the end of a row.

To convert text to a table, start by selecting the text you want to convert and choose Table > Convert > Text to
Table to open the dialog shown in Figure 3.

In the top part of the dialog, select the symbol that separates the columns. This would normally be a tab, but it could
be a semicolon or comma if you are importing a CSV file. The other options in this dialog are the same as those in the
dialog used to insert a table shown in Figure 1.

Figure 3: Dialog box to configure the text to table conversion

Example

In this example we will convert the following text into a table.


Row 1 Column 1; Row 1 Column 2; Row 1 Column 3
Row 2 Column 1; Row 2 Column 2; Row 2 Column 3

In this case, the separator between elements is a semicolon. By selecting the text and applying the conversion, we
obtain the following result.

Row 1 Column 1 Row 1 Column 2 Row 1 Column 3


Row 2 Column 1 Row 2 Column 2 Row 2 Column 3

Note that, unlike when creating a table with other mechanisms, the conversion from text to table preserves the
paragraph style applied to the original text.

You can also use the Convert menu to perform the opposite operation; that is, to transform a table into plain text.
This may be useful when you want to export the table contents into a different program.

To transform a table into text, place the cursor anywhere in the table, choose Table > Convert > Table to Text in the
main menu, pick the preferred row separator, and click OK to finish.

1.13.2. Formatting the table layout


Formatting a table is, generally speaking, a two-step process: formatting of the table layout (the subject of this section)
and formatting of the table text (the subject of the next section).

Page 38 of 61
Formatting the layout normally involves one or more of the following operations: adjusting the size of the table and its
position on the page, adding or removing rows or columns, merging and splitting individual cells, changing borders and
background.

Default parameters

If you create a table using the Insert Table dialog box or the Table icon on the Standard toolbar and activate the Heading
option, the following defaults are set:

• The cells in the heading row (or rows) use the Table Heading paragraph style. In the default template, the text
is centered and set with a bold and italic font.
• The remaining cells use the Table Contents paragraph style, which, in the default template, is identical
to the Default paragraph style.
• The default table occupies all the space from margin to margin (text area).
• The default table has thin black borders around each cell (grid).

Resizing and positioning the table


Using the default settings, any newly created table will occupy the entire width of the text area. This is sometimes what
you want, or you may prefer a smaller table. To quickly resize a table, first move the mouse to either the left or right
edge. When the cursor changes shape into a double arrow, drag the border to the new position. This operation only
changes the size of the first or last column; it does not change the alignment of the table on the page.

If you need more precise control over the size and position of the table on the page, open the Table Format
dialog box by choosing Table > Table Properties or by right-clicking anywhere in the table and choosing Table from
the pop-up menu. Select the first page of the dialog box (Table).

Figure 4: The Table page of the Table Format dialog box

On this page you can set the alignment of the table, choosing among the following options:

• Automatic: the default setting for a table.


• Left: aligns the table with the left margin.
• Right: aligns the table with the right margin.
• From Left: lets you specify under Spacing exactly how far from the left margin the table is placed.
• Center: aligns the table in the middle between the left and right margins. If the table width is greater than the
margin, the table will extend outside of the margins.
• Manual: lets you specify the distances from both left and right margins under Spacing.
Selecting an alignment option other than Automatic activates the Width field in the Properties section, where you can
enter the desired size of the table. Select Relative to see the width as percentage of the text area.
Page 39 of 61
In the Spacing section, use the Above and the Below boxes to modify the separation between the text and the table.
When the size of the table is less than the size of the text area, OOo will insert some values in the Left and Right boxes.
You can only change both values if you select Manual alignment and you can change the Left box value only when
you select the From Left alignment. Note that the sum of the table width, and the values in the Left and Right boxes,
needs to equal the width of the text area.

Resizing rows and columns


You can adjust the height of rows and the width of columns in a table in several ways.
• Move the mouse next to the edge of the cell and when a double-headed arrow appears, click and hold the left
mouse button, drag the border to the desired position, and release the mouse button.
• On the horizontal ruler, column dividers are marked by a pair of thin gray lines; the vertical ruler indicates row
dividers in the same way. You can resize a row or column by holding the mouse button down on the appropriate
divider and dragging it to the desired location.
• Use the keyboard as described below.
Selecting Table > Autofit from the main menu also offers some resizing options:
• The Optimal Column Width or Optimal Row Height options make the selected columns or rows as
narrow as possible while still fitting their contents.
• Selected columns and rows can be distributed evenly to quickly bring them back to all being the same
width or height.

For greater control over the width of each column, use the Columns page of the Table Format dialog box.

Figure 5: Table Format dialog box: Columns page

Right-click on the table and choose Table from the pop-up menu or choose Table > Table Properties from the menu
bar. On the Table Format dialog box, select the Columns tab.

• Adapt table width: If a table already stretches to the page margins, it cannot stretch any wider and the Adapt table
width option is not available. If the table is narrower, increasing the width of a column will increase the width of
the whole table.
• If the table width already extends pasts the margins with the Adapt table width option checked, attempting to change
a column width will automatically decrease that column’ s size so that the table will now shrink to the page margins
while keeping any other column sizes intact.
• Adjust columns proportionally results in all columns changing their widths by the same percentage when one is
changed. For example, if you reduce by half the size of a column, all the other columns sizes will be halved.
• Remaining space shows how much further the table can expand before hitting the limit of the margins. This value
cannot be edited and will not be negative in the event that the table width is already larger than the space between
the left and right margins.
• Under Column width, each individual column can be adjusted. If you have more than six columns, use the
arrows at the right and left to view them all.

Rather than start from the Table Format dialog box, it is often more efficient to make rough adjustments to a new table
using the mouse, and then fine tune the layout using the Columns page in conjunction with the Table page of the Table
Format dialog box.
Page 40 of 61
It is also possible to resize a table using only the keyboard. This is on occasions easier than using the mouse.
1) Place the cursor on the cell whose size you want to change.
2) Press and hold the Alt key while using the arrow keys to change the size.

To adjust the resizing parameters and behavior for keyboard handling, choose Tools > Options > OpenOffice.org
Writer > Table.

Use the Row and Column values in the Move cells section to determine the amount of change produced by a single
keystroke while resizing. In the Behavior of rows/columns section you can choose one of the following three strategies
when resizing:

• Fixed: select this if you want the resizing to only affect the adjacent cell, and not the entire table. The width of
the table does not change when resizing its cells.
• Fixed, proportional: when resizing a cell with this option selected, all the other cells are also resized proportionally,
Also in this case the width of the table remains constant.
• Variable: this is the default value. Resizing a cell affects the table size. For example, when you widen a cell,
the width of the table increases.
Inserting rows and columns
To insert any number of rows or columns:

1. Place the cursor in the row or column where you want to add new rows or columns and right-click.
2. On the pop-up menu, choose Row > Insert or Column > Insert. This will display a dialog box where you can
select the number of rows or columns to add, and whether they appear before or after the selected one.
3. Set Amount to the number of rows or columns to insert, and Position to Before or After.
4. Click OK to close the dialog box.
5. Clicking on the Insert Row icon on the Table toolbar inserts one row below the selected one. Clicking on the Insert
Column icon on the Table toolbar inserts a column after (to the right of) the selected one.

You can also quickly insert a row or a column using only the keyboard:

1) Place the cursor in the row or column next to the row or column you want to insert.
2) Press Alt+Insert to activate keyboard handling.
3) Use the arrow keys as desired to add a row or column:
Left to insert a new column to the left of the cell where the cursor is located. Right to insert a new column to the
right of the cell where the cursor is.

Down to insert a new row below the cell where the cursor is.

Up to insert a new row above the cell where the cursor is.

The above keyboard technique can also be used to delete rows or columns by substituting the Alt+Insert
keystroke combination in Step 2 with Alt+Delete.

Merging and splitting cells

To merge a group of cells into one cell:

1. Select the cells to merge.


2. Right-click and choose Cell > Merge on the pop-up menu, or choose Table > Merge Cells from the menu bar.

To split a cell into multiple cells:

1) Position the cursor inside the cell.


2) Right-click and choose Cell > Split on the pop-up menu, or choose Table > Split Cells from the menu bar.

Page 41 of 61
3) Select how to split the cell. A cell can be split either horizontally (create more rows) or vertically (create more
columns), and you can specify the total number of cells to create.
It is generally a good rule to merge and split cells after completing other layout formatting. This is because some
operations such as deleting a column or a row may produce a result difficult to predict when applied to a table with
merged or split cells.

Specifying table borders

On the Table Format dialog box, select the Borders tab.

Here you can set borders for a whole table or groups of cells within a table. In addition, a shadow can be set
for the whole table.

Borders have three components: where they go, what they look like, and how much space is left around them.

• Line arrangement specifies where the borders go. If a group of cells is selected, the border will be applied only to
those cells. You can specify individually the style of the border for the outside edges of the selected cells as well as
for the cell divisions. Writer provides five default arrangements but you can just as easily click on the line you want
to customize in the User-defined area to get exactly what you want. When multiple cells are selected, the User-
defined area allows you to select the edges of the selection as well as the cell dividers. By clicking at the intersection
of the lines, you can modify multiple borders simultaneously. For example, in Figure 6 the right edge and horizontal
separators are modified with a single operation.

Figure 6: Table Format dialog box: Borders page

• Line specifies what the border looks like: the style and color. There are a number of different styles and colors to
choose from. The Line Style and Color will apply to those borders highlighted by a pair of black arrows in the
User-defined map on the left hand side of the dialog box.

• Spacing to contents specifies how much space to leave between the border and the cell contents. Spaces can be
specified to the left, right, above, and below. Check Synchronize to have the same spacing for all four sides. This
spacing is like a padding and it is not factored in when calculating the text measurements.
• Shadow style properties always apply to the whole table. A shadow has three components: where it is, how far
from the table it is cast, and what color it is.
• If Merge adjacent line styles is checked, two cells sharing a common border will have their borders merged, rather
than being side by side.

To reset everything if you are having problems with borders, right-click in

Page 42 of 61
Tip the table and choose Table or choose Table > Table Properties from the menu bar. On the Borders
tab, select the Set No Borders icon under Line arrangement: Default (the box on the left).

Selecting background colors and graphics


A table background can greatly improve the readability of the data, visually highlight important parts of the table (such
as the heading or a specific cell), or just make the table more appealing. You can choose between two types of
background when formatting the table: solid color or graphic. The background can be applied to the whole table, to a
single cell, or to a row. The background selected for a cell will be in front of the row background which in turn will
hide the table background.

The row background option is quite handy when you want to create alternate color rows or assign a different
background to the heading of the table. The tables in this guide adopt this technique.

To set the background for a cell, row, or table:

1) Place the cursor anywhere inside the cell, row or table you want to work with. If you want to apply a background
to a group of cells, select the group.
2) Right-click and choose Table from the pop-up menu, or choose Table > Table Properties from the main menu.
3) In the Table Format dialog box, select the Background tab.

Figure 7: Table Format dialog: inserting a graphic background

4) In the For section, chose whether to apply the settings to cell, row, or table.
 If you choose Cell, changes apply only to the selected cells, or the cell where the cursor currently resides.
Even when selecting a group of cells, the background settings are applied to each cell individually.
 If you choose Row, changes affect the entire row where the cursor resides.
 If you choose Table, changes will set the background for the entire table, regardless of the cursor position or
selected cells.
5) In the As section, choose whether the background is a color or a graphic.
To apply a color, select the color and click OK. Remember that you can add custom colors by choosing Tools
> Options > Colors.
To apply a graphic:
a) First select the graphic from your computer’s file system with the Browse button. (Writer supports a large
number of graphics formats.)
b) You can use the Link option to link the graphic file. If it is linked, changes to the graphic (for example, if
you edit it in a different software package) are reflected in your document. However, you also need to keep
the linked graphic file with the document file. If, for example, you email the document without the graphic
file, the graphic will no longer be visible.
c) Under Type, select the type of placement for the graphic.

Page 43 of 61
• If you choose Position, you can select in the position map where the graphic will be displayed in the
selected area.
• If you choose Area, the graphic is stretched to fill the whole area.
• If Tile, the graphic is tiled (repeated horizontally and vertically) to fill the area.
d) If the Preview option is checked, the graphic displays in the pane on the right.
e) To apply the graphic, click OK.
Figure 8 shows an example of a table set with a background image, and the first row background colored. As you can
see, the row background covers the table background.

Figure 8: Example of table with different row and table backgrounds

Displaying or hiding table boundaries


A table boundary is a set of pale (usually gray) lines around the cells when viewed on-screen in OOo. These boundaries
are not printed; their only function is to help you see where the table cells are. To display the table the same way on the
screen as on the printed page, with no boundary lines, right- click on the table and choose Table Boundaries from the
pop-up menu. Repeat this to have the boundaries appear again.

Formatting the table text


Once the table layout is satisfactory, you can move on to formatting the text in the individual cells. You can apply
manual formatting as with any other paragraph in the text, but it is highly recommended, for the sake of consistency
and ease of maintenance, that you define your own paragraph and character styles.

Besides the paragraph and character styles, there are other aspects to consider when placing text in a table cell; such as
text flow, alignment and orientation.

You can format each cell independently of other cells, or you can simultaneously format a group of cells by
selecting them before applying the desired formatting.

Vertical alignment
By default, text entered into a table is aligned to the top-left of the cell. You can change the default for the entire
table, as described above, or for individually selected cells.

To vertically align the text in specific cells:

• Place the cursor in the cell you wish to change, or click and drag to select multiple cells.
• Right-click in the selected area and choose Cell > Center, Top, or Bottom in the pop-up menu to vertically align
the text as desired.
Number formats
The number format can be set for a whole table or group of cells. For example, cells can be set to display in a particular
currency, to four decimal places, or in a particular date format.

Number recognition specifies that numbers in a text table are recognized and formatted as numbers. If number
recognition is selected, numbers are automatically bottom-right aligned. Number recognition option can be enabled
under Tools > Options > OpenOffice.org Writer > Table.

Page 44 of 61
Select the cells to format, then right-click and choose Number Format from the pop-up menu. The Number Format
dialog box opens for you to set options for various categories of numerical data.
• In the Category list, select the category you want, such as currency, date, or text.
• In the Format list, choose a format for the category you just selected.
• For some categories, such as date, you may wish to change the language using the Language list while for other
numerical categories the Options section of the dialog box allows you to customize the appearance.

Rotating text in a table cell


You can rotate text in a table cell by 90 or 270 degrees. Text rotation is useful when you have long headings for
narrow columns.
• Select the text to be rotated and then choose Format > Character.
• On the Position page, in the Rotation / scaling section, choose the rotation angle and click OK
.

1.13.3. Additional table operations


Adding a caption You can easily add a caption to any table. Writer will keep track of all your captioned tables,
automatically number them, and update any links to them.

To add a caption to a table:


1) Place the cursor in the table.
2) Right-click and choose Caption from the pop-up menu. Alternatively, the Insert > Caption menu option
becomes available whenever your cursor is inside a table cell.
3) Enter the text for your caption, your category selection, the numbering style, separator, and position (above or
below the table).
4) Click OK.

Once the category, numbering style and separator are established in the Caption dialog box, you can edit them in
the document if you choose.

Note However, doing so may damage the automatic numbering and reference links. If you need to establish the
numbering and reference link for the caption, you can choose to leave your caption blank in the Caption dialog box
and add it later.

Writer supplies five different category labels for captions:

i) <None> ii) Drawing iii) Table iv) Illustration and v) Text.

Page 45 of 61
You can also create your own category labels, formatting, and separators. For example, you might want your tables to be
labeled as Fantasia, formatted with roman numerals, and using a period (‘.’) as a separator, as follows:

Fantasia I. Interesting data

Fantasia II. More interesting data

Fantasia III. Yet more interesting data

To accomplish this:

1) Open the Caption dialog box following the instructions above.


2) In the Category field, select the text and type the word Fantasia.
3) In the Numbering drop-down, select the Roman ( I II III) option.
4) In the Separator field, select the text and type a period (.) followed by a space.

Additional options for numbering captions by chapter are available under the Options button in the Captions dialog box.
Some of these settings which refer to the outline level will only have an effect if you are using outline level paragraph styles
on the chapter headings within your document

By adding chapter numbers to your captions, OOo will restart the caption numbering for each chapter it encounters. For
example, if the last figure caption you create in chapter 1 is Figure 1.15, and the next figure caption you create is in chapter
2, the numbering will start over at Figure 2.1.

Options available to chapter numbering for captions include the following:

• Use Level to specify the outline levels that triggers a restart of the numbering as well as how many levels of outline
numbering are shown before the table number. An example may be useful. Suppose your document uses Heading 1
style for chapters and Heading 2 style for sub-headings, and that this is how you set up your outline numbering. If you
want all the tables in a chapter (that is, between two Heading 1 paragraphs) to be numbered sequentially independently
of the sub heading they are under, select 1 as Level. If instead you want to restart the numbering at each sub-heading
select level 2.
• Use the Separator field to establish the separator between the chapter number and figure number.
• Use Character style to set a character style for the caption. This is useful if the separator of your choice is not a symbol
included in the default font type of your document or if you want the caption to have a special color, size and so on.
• The Apply border and shadow option does not apply to table captions. OOo normally wraps the objects you can
add a caption to in a frame, but not for tables.
• Use Caption order to specify whether you want the category or numbering to appear first in the caption.
All of the features described above can also be set up to automatically apply to any new tables you create in your
document.

To automatically caption all your tables:

1) Place the cursor in a table.


2) Right-click and choose Caption > AutoCaption from the pop-up menu.
3) Select OpenOffice.org Writer Table and select the settings you want and click OK. This dialog box is
covered in more detail in Chapter 2 (Setting up Writer).
When AutoCaption is enabled for tables, any new tables will be captioned according to your selections in the AutoCaption
dialog box; however, you will need to add the specific text for each caption onto the table manually.

Automatic formatting of tables

Page 46 of 61
Using AutoFormat, you can apply an elaborate format to your table with just a few clicks. AutoFormat is somewhat similar
to paragraph styles and will enable you to obtain consistent looking tables across your document. You can also create your
own table formats and save them as another AutoFormat option.

To apply an AutoFormat, place the cursor anywhere in the table and choose Table > AutoFormat. This opens the dialog
box shown in Figure 12.

Select from the list on the left the Format most suitable for your table and click OK to apply it. Clicking the More button
opens another section of the dialog box where you can rename the selected table format scheme as well as decide which
parts of the predefined formatting you want to apply to your table. You can selectively apply the number format, the font,
the alignment, the border, or the pattern

Figure 12: The table AutoFormat dialog

To create your own AutoFormat, proceed as follows:

1) Create a table and manually format it as you wish, including borders, spacing of text from the top and bottom borders,
fonts to be used in the table heading and data cells, and background colors.
2) Position the cursor anywhere in the table and then click Table > AutoFormat.
3) On the AutoFormat dialog box, click Add and give the table format a name in the Add AutoFormat dialog box and
click OK.
4) The newly named AutoFormat now appears as an available format. Click OK to close the AutoFormat dialog box.

Merging and splitting tables


One table can be split into two tables, and two tables can be merged into a single table. Tables are split only horizontally
(the rows above the split point are put into one table, and the rows below into another).

To split a table:

1) Place the cursor in a cell which will be in the top row of the second table after the split (the table splits immediately
above the cursor).
2) Right-click and choose Split Table in the pop-up menu. You can also use Table > Split Table from the menu bar.
3) A Split Table dialog box pops up. You can select No heading or an alternative formatting for the heading—the top
row(s) of the new table.
4) Click OK. The table is then split into two tables separated by a blank paragraph.
To merge two tables:

Page 47 of 61
1) Delete the blank paragraph between the tables. You must use the Delete key (not the Backspace key) to do this.
2) Select a cell in the second table.
3) Right-click and choose Merge Tables in the pop-up menu. You can also use Table > Merge Table from the menu
bar.
Deleting a table
To delete a table:

1) Click anywhere in the table.


2) Choose Table > Delete > Table from the main menu.
(Or)

1) Select from the end of the paragraph before the table to the start of the paragraph after the table.
2) Press the Delete or the Backspace key.

Copying a table
To copy a table from one part of the document and paste it into another part:

1) Click anywhere in the table.


2) From the main menu choose Table > Select > Table.
3) Press Control+C or click the Copy icon on the Standard toolbar.
4) Move the cursor to the target position and click on it to fix the insertion point.
5) Press Control+V or click the Paste icon in the Standard toolbar.

Moving a table
To move a table from one part of a document to another part:

1) Click anywhere in the table.


2) From the main menu, choose Table > Select > Table.
3) Press Control+X or click the Cut icon in the Standard toolbar. (This step removes the contents of the cells but
leaves the empty cells, which must be removed in step 6.)
4) Move the cursor to the target position and click on it to fix the insertion point.
5) Press Control+V or click the Paste icon in the Standard toolbar. (This pastes the cells and their contents and
formatting.)
6) Return to the original table, click somewhere in it and then choose Table > Delete > Table from the main menu.
Inserting a paragraph before or after a table
To insert a paragraph before a table, position the cursor before any text or other contents in the first (upper left-hand) cell
and press Alt+Enter. To insert a paragraph after a table, position the cursor after any text in the last (lower right-hand) cell
and press Alt+Enter.

Page 48 of 61
Module – 5
1.14. Header and Footer
Header and footer are areas in the top and the bottom page margins, where you can add text or graphics. Headers and footers
are added to the current page style. Any page that uses the same style automatically receives the header or footer that you
add. You can insert Fields, such as page numbers and chapter headings, in headers and footers in a text document.

Documents look nice when you add header and footer in them. If you are making a professional document, writing a book,
or any project – headers and footers are must.

The header contains, in general, the document type which describes the document itself. It might contain chapter names as
well if you are writing a book.

Footer in general consists of page numbers and other basic fields.

Adding header and footer is very easy in LibreOffice Writer.

How to Add Header and Footer in Writer


Open any Writer document

From Menu click Insert -> Header and Footer -> header Or, Footer -> Default Style.

Header and Footer Menu

Once you click, you would see an editable section at the top and at the bottom based on what you have clicked.

Format Footer – Writer

You can also see a popup button giving you all the options to modify, delete, format the looks of header and footer.

Page 49 of 61
Format Header – Writer

You can click on Format header or Format Footer and it would bring up the Page style window which contains different
formatting options of Header and Footer (default style).

Header and Footer Style – Page Style

You can increase the length, add lines, add background image in header and footer using different options.

Let’s take a look at two common use-cases of header and footer.

Add Page Number, Total Page Count in Header or Footer

To add page numbers and total page counts – e.g. Page 1 of 3 – click on the popup menu. Or go to insert menu  field and
choose page number or page count.

Insert Page number – count – Writer

Page 50 of 61
Add a line in Header or Footer

To add lines click on format header or footer – depending on where you want it.

Lines in Header and Footer – Writer

Then in the Page style window, go to the Borders tab. Under Line arrangements, select where you would like to place the
line, change the line width, color, style (dotted, dashes, etc,) and press OK.

Header and Footer in Writer

You can also choose Format - Page, click the Header or Footer tab, and then select Header on or Footer on. Clear the Same
content left/right check box if you want to define different headers and footers for even and odd pages.

1.15. Spelling and Grammar Checking in Writer


LibreOffice Writer supports multiple language dictionaries that are used to validate the grammar of the words as you type
alongside spelling. The Writer shows red color curved line under the incorrect word in the document after it validates against
the supported dictionary. And grammar errors are shown blue color curved underline against phrases.

Page 51 of 61
Incorrect word – Writer

How to Enable Automatic Spelling and Grammar Check

There are two ways to check spelling and grammar.

A) Manual mode and B) Automatic Mode as you type.

To enable the automatic spelling and grammar check, go to Menu Tools → Options. From the left side menu,
select Language under Language Settings. Make sure to choose appropriate language under “Default Languages for
Documents” – e.g. Western: English (USA).

Go to Writing Aids Option to the left and under options choose ‘Check spelling as you type’ and ‘Check grammar as you
type’.

Press OK.

Now Go to the “English Sentence Checking” option and select options under Grammar Checking and Punctuation.

Page 52 of 61
Grammar-settings

Now you can see red curly underline on words that have spelling errors.

And the blue line shows only grammar errors as per your chosen options.

Page 53 of 61
1.16. Saving Documents
Click the Save icon or press the shortcut keys Ctrl+S.
The document is saved under its path and name on the current local data medium or network drive or on the Internet,
overwriting any file of the same name.

When you save a new file for the first time, the Save As dialog opens, in which you can enter a name, folder and drive or
volume for the file. To open this dialog, choose File - Save As.

1.16.1. Saving Documents in Other Formats


Choose File - Save as. You will see the Save as dialog.
In the Save as type or File type list box, select the desired format.
Enter a name in the File name box and click Save.

Automatic extension to the file name


When saving a file, LibreOffice always appends an extension to the file name, except when the file name already has an
extension that matches the file type. See the list of ODF extensions.

Some examples for the automatic extensions are listed in the following table:

You enter this file name You select this file type File is saved with this name

my file ODF Text my file.odt

my file.odt ODF Text my file.odt

my file.txt ODF Text my file.txt.odt

my file.txt Text (.txt) my file.txt

1.16.2. Protecting Documents in LibreOffice


All documents that are saved in OpenDocument format can be saved with a password. Documents that are saved with a
password cannot be opened without the password.
Turning on protection: Choose File - Save As and mark the Save with password check box. Save the document.
Page 54 of 61
Turning off protection: Open the document, entering the correct password. Choose File - Save As and clear the Save with
password check box.
Note: Information entered in File - Properties is not encrypted. This includes the name of the author, creation date, word
and character counts.
Protecting a document with password
To protect a document using a password while saving follow these steps.
From the File menu, click Save As. In the Save As dialog, mark the “Save with Password” option (see below).

Save-with-Password-Option

Click Save.

Enter your own password in the “Set Password” window.

You can also mark the document as Read-Only and can be editable once correct password is entered.

Press Ok.

Set the document password

Page 55 of 61
You are all set. Now anyone who opens the file would get below password prompt and the document is visible only with a
correct password.

Password prompt – Open

Remove the Password


To remove the password which is set using the above steps, simply open the file with the correct password.

Go to Save As dialog again, uncheck the Save with Password option.

Save the file.

This would remove the password from your LibreOffice document.

Protecting Revision Marking


With every change made in LibreOffice Writer, the review function records who made the change. This function can be
turned on with protection, so that it can only be turned off when the correct password is entered. Until then, all changes will
continue to be recorded. Acceptance or rejection of changes is not possible.

Turning on protection:

Choose Edit - Track Changes - Protect. Enter and confirm a password of at least one character.

Turning off protection:

Choose Edit - Track Changes - Protect. Enter the correct password.

Remember
If you forget/lose the password which was used to protect the document, you would never be able to open the document as
LibreOffice encrypts the document with strong encryption. So, it is recommended to save the password or memorize it.

Close

Closes the current document without exiting the program.

To access this command...

Choose File – Close

The Close command closes all of the open windows for the current document.

If you have made changes to the current document, you are prompted if you want to save your changes.

Close Window

If additional views of the current document were opened by Window menu - New Window, Ctrl+W or Alt+F4 commands
will close only the current view. Ctrl+F4 will close the all widows.

Page 56 of 61
Exit

Closes all LibreOffice programs and prompts you to save your changes. This command does not exist on macOS systems.

To access this command...

Choose File - Exit

Ctrl+Q

Page 57 of 61
Multiple Choice Questions
1. Header and footer is available in which of the following menu ?
a) file menu
b) insert menu
c) view menu
d) edit menu
2. to check the grammar we should go to which of the following menu ?
a) tool menu
b) view menu
c) insert menu
d) edit menu
3. to close an open document, we should go to which of the following menu ?
a) file menu
b) insert menu
c) view menu
d) edit menu
4. which of the following is the default extension of the libreoffice writer file ?
a) .obt
b) .doc
c) .odt
d) .odi
5. what is the default save location of LibreOffice writer ?
a) desktop
b) downloads
c) document
d) none of the above
6. Where is the footnote located in libreoffice writer ?
a) bottom of the page
b) top of the page
c) bottom of the document
d) top of the document
7. What is shortcut key for Closes all LibreOffice programs ?
a) Ctrl+C
b) Ctrl+V
c) Ctrl+Q
d) None of the above
8. What is the shortcut key for saving LibreOffice writer ?
a) Ctrl+C
b) Ctrl+V
c) Ctrl+Q
d) Ctrl+S
9. Can’t protect the libreoffice writer with a password ?
a) True
b) False
10. What is the default file name in Libreoffice writer ?
a) New file
b) Odt file
c) Untitled 1
d) None of the above
11. Recently deleted files are stored in?
a) Recycle bin
b) Desktop
c) Taskbar
Page 58 of 61
d) My Computer
12. A small part of taskbar that has icons of background running applications is
a) Start button
b) Quick launch
c) Task bar
d) System tray
13. To hide or view Ruler we should go to which of the following menus?
a) Tools menu
b) Insert menu
c) View Menu
d) Edit Menu
14. Which of the following is the default extention of the writer file?
a) .obt
b) .doc
c) .odt
d) .docx
15. Which of the following technique to select a sentence in writer?
a) Single click
b) Double click
c) Triple click
d) None of the above
16. Which of the folliwng is a shortcut key to Redo any operation?
a) Ctrl+r
b) Ctrl+y
c) Ctrl+x
d) Ctrl+z
17. Keyboard shortcut to italic for the selected text is?
a) Ctrl+u
b) Shift+u
c) Ctrl+i
d) Ctlr+L
18. Which option should be used to type H20, to get?
a) Bold
b) Superscript
c) Subscript
d) Underline
19. What is the Default Font Size in libreoffice writer?
a) 12
b) 10
c) 15
d) 8
20. Ruler option is found in which menu?
a) Insert
b) Home
c) View
d) Tools
21. LibreOffice writer in which menu are the commands like Bold, Italic, Underline?

Page 59 of 61
a) Style
b) Edit
c) Insert
d) Format
22. Which one is the shortcut key to save the document?
a) Ctrl+s
b) Ctrl+z
c) Ctrl+shift+s
d) All of the above
23. In writer document, text is aligned to the _________ margin by default
a) Left
b) Right
c) Center
d) None of the above
24. Writer opens a text document file with the default file name?
a) Untitled 1
b) Untitled i
c) Untitled A
d) Untitled
25. To paste text from clipboardin the document, being edited, press key(s)?
a) Ctrl+x
b) Ctrl+A
c) Ctrl+V
d) None of the above
26. The text of your opened writer document can be selected by?
a) Ctrl+O
b) Ctrl+A
c) Ctrl+S
d) Ctrl+X
27. The Del key deletes the character?
a) From the right of the cursor
b) From the left of the cursor
c) From the top of the cursor
d) None of the above
28. Ctrl+C is equivalent with?
a) Cut
b) Copy
c) Paste
d) None of the above
29. In writer, the last things can reverse or repeat by?
a) Undo
b) Redo
c) Ctr+z
d) All of the above
30. Writer text can be underlined by?
a) Ctrl+b
b) Ctrl+L’

Page 60 of 61
c) Ctrl+U
d) None of the above
31. Drop caps are applied to?
a) Characters
b) Words
c) Sentences
d) All of the above

Descriptive Questions
1. What is a Writer? Explain its features.
2. How do you create new document and explain it.
3. Explain about all parts of the main writer window(all bars)
4. Explain status bar and its features.
5. Explain about all formatting characters
6. Explain about all paragraph formats
7. What are styles? Explain its categories
8. How do you select the text? And explain in different ways to selection text
9. Explain cut, copy and paste
10. Explain undo and redo options.
11. What do you mean by indentation is a document? List two types of indentation.
12. What do you mean by alignment of text? How many types of alignments are available in writer?

Page 61 of 61
Unit-2 :: Office Calc
Module-1
Introduction:
Calc is the free spreadsheet program you've always needed. Newcomers find it intuitive and easy to learn, while
professional data miners and number crunchers appreciate the comprehensive range of advanced functions. Built-in
wizards guide you through choosing and using a comprehensive range of advanced features

2.1.What is Calc?
Calc is the spreadsheet component of LibreOffice. You can enter data (usually numerical) in a spreadsheet and then
manipulate this data to produce certain results. Alternatively, you can enter data and then use Calc in a ‘What if...’ manner
by changing some of the data and observing the results without having to retype the entire spreadsheet or sheet.
LibreOffice Calc is a spreadsheet application that you can use to calculate, analyze, and manage your data. You can also
import and modify Microsoft Excel spreadsheets.
Other features provided by Calc include:
 Functions, which can be used to create formulas to perform complex calculations on data.
 Database functions to arrange, store, and filter data.
 Data statistics tools, to perform complex data analysis.
 Dynamic charts, including a wide range of 2D and 3D charts.
 Macros for recording and executing repetitive tasks; scripting languages supported include LibreOffice Basic, Python,
BeanShell, and JavaScript.
 Ability to open, edit, and save Microsoft Excel spreadsheets.
 Import and export of spreadsheets in multiple formats, including HTML, CSV, PDF, and Data Interchange Format.

2.2.Spreadsheets, sheets, and cells


Calc works with documents called spreadsheets. Spreadsheets consist of a number of individual sheets, each sheet
containing cells arranged in rows and columns. A particular cell is identified by its row number and column letter.
Cells hold the individual elements – text, numbers, formulas, and so on – that make up the data to display and manipulate.
Each spreadsheet can have up to 10,000 sheets and each sheet can have a maximum of 1,048,576 rows and 1,024
columns.

2.3.Creating, opening, and saving spreadsheets


You can start a new calc, blank document in LibreOffice in several ways.
When LibreOffice is running but no document is open, the Start Center (below figure) is shown. Click one of the icons to
open a new document of that type, or click the Templates icon to start a new calc Spreadsheet document using a template.

1
2.3.1. Opening existing documents
You can also open an existing document in one of the following ways:
• When no document is open, click Open File or Remote files in the Start Center to reach the Open dialog.
• Go to File > Open or File > Open Remote… on the Menu bar to reach the Open dialog.
• Use the keyboard shortcut Ctrl+O to reach the Open dialog.
• If a document is already open, click the Open icon on the Standard toolbar and select from a list of available
documents from the Open dialog, or click Open Template… to select a template.
• Click the small triangle to the right of the Open icon and select from a list of recently opened documents.
• When no document is open, double-click on a thumbnail of recently opened documents displayed in the Start
Center. You can scroll up or down in the Start Center to locate a recently opened document.
When using the Open dialog, navigate to the folder you want and select the file you want, and then click Open. If a
document is already open in LibreOffice, the second document opens in a new window.

In the Open dialog, you can reduce the list of files by selecting the type of file you are looking for. For example, if you
choose Text documents as the file type, you will only see documents Writer can open (including .odt, .doc, .txt); if you
choose Spreadsheets, you will see .ods, .xls, and other files that Calc opens.
You can also open an existing document that is in a format that LibreOffice recognizes by double-clicking on the file icon
on the desktop or in a file manager such as Windows Explorer. LibreOffice has to be associated with file types that are not
ODF files for the appropriate LibreOffice component to open.

2.3.2. Saving documents


You can save documents as follows:
• Save command – use if you are keeping the document, its current filename and location.

2
• Save Remote - use if your document is already stored in a remote server or will be stored in a remote server.
• Save As – use if you want to create a new document, or change the filename and/or file format, or save the file in
a different location on your computer.
• Save a copy - use if you want to save a copy of your current document and keep it open for more editing.
• Save All - use to save all the files open in your current session.

2.4.Calc main window


When Calc is started, the main window opens (below figure). The various parts of this display are explained below.

Title bar
The Title bar, located at the top, shows the name of the current spreadsheet. When the
Spreadsheet is newly created; its name is Untitled X, where X is a number. When you save a
Spreadsheet for the first time, you are prompted to enter a name of your choice.

Menu bar
Under the Title bar is the Menu bar. When you choose one of the menus, a list of options appears. You can also
modify/customiae the Menu bar based on the requirements
 File – contains commands that apply to the entire document, such as Open, Save, Wizards, Export as PDF, Print,
Digital Signatures, and Templates.
 Edit – contains commands for editing the document, such as Undo, Copy, Find and Replace, Track Changes.
 View – contains commands for modifying how the Calc user interface looks, such as Toolbars, View Headers, Full
Screen, Zoom.
 Insert – contains commands for inserting elements into a spreadsheet, such as Image, Chart, Text Box, Headers and
Footers.
 Format – contains commands for modifying the layout of a spreadsheet, such as Cells, Page, AutoFormat Styles,
Align.
 Styles – contains options for applying and managing styles, such as Heading 1, Footnote, Manage Styles.
 Sheet – contains commands for inserting and deleting elements and modifying the entire sheet, such as Delete Rows,
Insert Sheet, Rename Sheet, Navigate.
3
 Data – contains commands for manipulating data in your spreadsheet, such as Define Range, Sort, AutoFilter,
Consolidate, Statistics.
 Tools – contains functions to help check and customize a spreadsheet, for example Spelling, Share Spreadsheet,
Macros, Options.
 Window – contains two commands; New Window and Close Window. Also shows all open windows in other
LibreOffice applications.
 Help – contains links to LibreOffice Help (included with the software), User Guides, and other miscellaneous
functions; for example restart in Safe Mode, License Information, Check for Updates, About LibreOffice.

Formula Bar
The Formula Bar is located at the top of the Calc workspace. It is permanently docked in this position and cannot be used
as a floating toolbar. However, it can be hidden or made visible by going to View > Formula Bar on the Menu bar.

Figure 4: Formula Bar


From left to right in Figure 4, the Formula Bar consists of the following:
 Name Box – gives the current active cell reference using a combination of a letter and number, for example A1. The
letter indicates the column and the number indicates the row of the selected cell. If you have selected a range of cells
that is also a named range, the name of the range is shown in this box. You can also type a cell reference in the Name
Box to jump to the referenced cell. If you type the name of a named range and press the Enter key, the named range is
selected and displayed
 Functions Wizard – opens a dialog from which you can search through lists of available functions and formulas. This
can be very useful because it also shows how the functions are formatted.
 Select Function – performs a calculation on the numbers in the cells above the selected cell and then places the result
in it. If there are no numbers above the selected cell, then the calculation operates on the cells to the left. The
calculation to be performed is selected from a drop-down menu containing options for Sum, Average, Min, Max, and
Count. The Alt+= keyboard shortcut is equivalent to clicking the Select Function icon and selecting the Sum option.
 Formula – inserts an equals (=) sign in the selected cell and the Input line, allowing a formula to be entered.
 Input line – displays the contents of the selected cell (data, formula, or function) and allows you to edit the cell
contents. To turn the Input line into a multiline input area for very long formulas, click the Expand Formula Bar icon
on the right. To edit inside the Input line area, click in the area, then type your changes.

2.4.1.Spreadsheet layout

Individual cells
The main section of the screen displays the cells in the form of a grid, with each cell located at the intersection of a
column and a row.
At the tops of the columns and the left ends of the rows are a series of header boxes containing letters and numbers. The
column headers use alpha characters that start with A and increase to the right. The row headers use numerical characters
that start at 1 and increase down.
These column and row headers form the cell references that appear in the Name Box on the Formula Bar (Figure 4). If the
headers are not visible on the spreadsheet, go to View > Headers on the Menu bar.

Sheet tabs
A spreadsheet file can contain many individual sheets. At the bottom of the grid of cells in a spreadsheet are sheet tabs
(Figure 3). Each tab represents a sheet in a spreadsheet. You can create a new sheet by clicking on the plus sign to the left
of the sheet tabs or by clicking in the blank space to the right of the sheet tabs.
Clicking on a tab makes an individual sheet active. When a sheet is active, the tab is highlighted.
To select multiple sheets, hold down the Ctrl key while clicking on the sheet tabs.
4
To change the default name for a sheet (Sheet1, Sheet2, and so on):
1) Right-click on the sheet tab and select Rename Sheet in the context menu. In the dialog that opens, type in a new
name for the sheet.
2) Click OK when finished to close the dialog.
To change the color of a sheet tab:
A. Right-click on the sheet tabs and selects Tab Color in the context menu to open the Tab Color dialog (below picture).
B. Select a color and click OK when finished to apply the color and close the dialog.

To add new colors to this color palette, see “Adding custom colors” in Chapter 14, Setting up and customizing.

2.4.2.Selecting items in a spreadsheet

Selecting cells
Click in the cell. You can verify the selection by looking in the Name Box on the Formula Bar

Range of contiguous cells


A range of cells can be selected using the keyboard or the mouse.
To select a range of cells by dragging the mouse cursor:
1) Click in a cell.
2) Press and hold down the left mouse button.
3) Move the mouse to highlight the desired block of cells, then release the left mouse button.
To select a range of cells without dragging the mouse:
A. Click in the cell which is to be one corner of the range of cells.
B. Move the mouse to the opposite corner of the range of cells.
C. Hold down the Shift key and click.
To select a range of cells using Extending selection mode:
1. Click in the cell which is to be one corner of the range of cells.
2. Right-click in the Selection mode field on the Status Bar and select Extending selection.
3. Click in the cell in the opposite corner of the range of cells.
To select a range of cells without using the mouse:
A. Select the cell that will be one of the corners in the range of cells.
B. While holding down the Shift key, use the cursor arrows to select the rest of the range

5
To select a range of cells using the Name Box:
 Click in the Name Box on the Formula Bar (Figure 4 on page 18).
 Enter the cell reference for the upper left-hand cell, followed by a colon (:), and then the lower right-hand cell
reference, then press the Enter key. For example, to select the range that would go from A3 to C6, enter A3:C6.

Range of non-contiguous cells


To select a range of non-contiguous cells using the mouse:
1) Select the first cell or range of cells using one of the methods above.
2) Move the mouse pointer to the start of the next range or single cell.
3) Hold down the Ctrl key and click or click-and-drag to select another range of cells to add to the first range.
4) Repeat as necessary.
To select a range of cells using Adding selection mode:
 Right-click in the Selection mode field on the Status Bar and selection Adding selection.
 Click or click-and-drag to select ranges of cells to add to the selection.

2.5.Navigation and selection shortcuts


Shortcut Keys Effect
Ctrl+Home Moves the cursor to the first cell in the sheet (cell A1)
Ctrl+End Moves the cursor to the last cell on the sheet that contains data
Home Moves the cursor to the first cell of the current row
End Moves the cursor to the last cell of the current row in a column containing data
Ctrl+Left Arrow Moves the cursor to the left edge of the current data range. If the column to the left of the cell that
contains the cursor is empty, the cursor moves to the next column to the left that contains data.

Ctrl+Right Arrow Moves the cursor to the right edge of the current data range. If the column to the right of the cell
that contains the cursor is empty, the cursor moves to the next column to the right that contains
data.
Ctrl+Up Arrow Moves the cursor to the top edge of the current data range. If the row above the cell that contains
the cursor is empty, the cursor moves up to the next row that contains data.

Ctrl+Down Arrow Moves the cursor to the bottom edge of the current data range. If the row below the cell that
contains the cursor is empty, the cursor moves down to the next row that contains data.

Ctrl+Shift+Arrow Selects all cells containing data from the current cell to the end of the continuous range of data
cells, in the direction of the arrow pressed. If used to select rows and columns together, a
rectangular cell range is selected.
Ctrl+Page Up Moves one sheet to the left. In the page preview it moves to the previous print page.

Ctrl+Page Down Moves one sheet to the right. In the page preview it moves to the next print page.
Page Up Moves the viewable rows up one screen.
Page Down Moves the viewable rows down one screen.
Alt+Page Up Moves the viewable columns one screen to the left.
Alt+Page Down Moves the viewable columns one screen to the right.
Shift+Ctrl+Page Up Adds the previous sheet to the current selection of sheets. If all the sheets in a spreadsheet are
selected, this combination only selects the previous sheet. Makes the previous sheet the current
sheet.
Shift+Ctrl+Page Adds the next sheet to the current selection of sheets. If all the sheets in a spreadsheet are
6
Down selected, this combination only selects the next sheet. Makes the next sheet the current sheet.
Ctrl+* Selects the data range that contains the cursor. A range is a contiguous cell range that contains
data and is bounded by empty rows and columns. The “*” key is the multiplication sign on the
numeric key pad.
Ctrl+/ Selects the matrix formula range that contains the cursor. The “/” key is the division sign on the
numeric key pad.
Enter — in a By default, moves the cursor down one cell in a selected range. To specify the direction that the
selected cursor moves, choose Tools > Options > LibreOffice Calc > General.
Range

Function key shortcuts


Shortcut key Effect
F1 Displays the LibreOffice help browser. When the help browser is already open F1 jumps to the main
help page
Shift+F1 Displays context help
Ctrl+F1 Displays the comment that is attached to the current cell
F2 Switches to Edit mode and places the cursor at the end of the contents of the current cell. If the
cursor is in an input box in a dialog that has a Minimize button, the dialog is hidden and the input
box remains visible. Press F2 again to show the whole dialog.
Ctrl+F2 Opens the Function Wizard.
Shift+Ctrl+F2 Moves the cursor to the input line where you can enter a formula for the Current cell.
Ctrl+F3 Opens the Manage Names dialog
F4 Shows or Hides the Database explorer.
F5 Shows or hides the Navigator

7
Module-2
2.6.Rows and Columns operations:
2.6.1.Inserting Rows and Columns
When you insert columns or rows, the cells take the formatting of the corresponding cells in the column to the left or the
row above.
a. Single column or row
Using the Sheet menu:
1) Select a cell, column, or row where you want the new column or row inserted.
2) Go to Sheet on the Menu bar. For columns, select Sheet > Insert Columns and then select Columns Before
or Columns After. For rows, select Sheet > Insert Rows and then select Rows Above or Rows Below.
Using the context menu:
1) Select a column or row where you want the new column or row inserted.
2) Right-click the column or row header.
3) Select Insert Columns Before / After or Insert Rows Above / Below in the context menu.
b. Multiple columns or rows
Multiple columns or rows can be inserted at once rather than inserting them one at a time.
1) Highlight the required number of columns or rows by holding down the left mouse button on the first one and
then dragging across the required number of identifiers.
2) Proceed as for inserting a single column or row above. The number of columns or rows highlighted will be
inserted.

2.6.2.Deleting columns and rows


Single column or row
To delete a single column or row, do one of the following:
• Select a cell in the column or row you want to delete, right-click and select
Delete in the context menu, select Sheet > Delete Cells on the Menu bar, or
press Ctrl+- to open the Delete Cells dialog (Figure 1). Select Delete entire
column(s) or Delete entire row(s) and click OK.
• Select a cell in the column or row you want to delete and select Sheet >
Delete Columns or Sheet > Delete Rows.
• Right-click the header of the column or row that you want to delete and
select Delete Columns or Delete Rows in the context menu.
Figure 1: Delete Cells dialog
Multiple columns or rows
To delete multiple columns or rows, do one of the following:
• Select a range of cells across the columns or rows you want to delete, right-click and select Delete in the context
menu, select Sheet > Delete Cells on the Menu bar, or press Ctrl+- to open the Delete Cells dialog. Select Delete
entire column(s) or Delete entire row(s) and click OK.
• Select a range of cells across the columns or rows you want to delete and select Sheet >Delete Columns or Sheet >
Delete Rows.
• Highlight the required columns or rows by holding down the left mouse button on the header of the first one and then
dragging across the required number of headers. Then right-click on one of the selected column or row headers and
select Delete Columns or Delete Rows in the context menu.
Deleting cells
1) Select the cell or cells you want to delete.

8
2) Select Sheet > Delete Cells, press Ctrl+- , or right-click on one of the selected cells and select Delete in the context
menu.
3) Select the option you require from the Delete Cells dialog and click OK.

2.7.Hyperlink:
You can insert and modify hyperlinks using the Hyperlink dialog (Figure 2). To display this dialog, choose Insert>
Hyperlink on the Menu bar, or click the Insert Hyperlink icon on the Standard toolbar, or press Ctrl + K .

Figure 2: Hyperlink dialog showing details for the Internet category

On the left side of the dialog, select one of the four categories of hyperlink:
• Internet: The hyperlink points to a WWW (World Wide Web) or FTP (File Transfer Protocol) address.
• Mail: The hyperlink points to an email address.
• Document: The hyperlink points to a location in either the current document or another existing document.
• New Document: Opening the hyperlink creates a new document.

Figure 3 shows the Hyperlink dialog with the Internet category and the Web hyperlink type selected. The Further Settings
area is provided for all four hyperlink categories. The controls above the Further Settings area vary dependent on which of
the four hyperlink categories is selected on the left side of the dialog.
A full description of all the choices and their interactions is beyond the scope of this chapter. The following is a summary
of the most common choices used in Calc spreadsheets.
a. Internet:
– Web / FTP: Select the type of hyperlink. On selection of the FTP
option, the controls above the Further Settings area change to those
shown in Figure 3.
– URL: Enter the required web address.
– Text: Text specifies the text that will be visible to the user. If you
do not enter anything here, Calc will use the full URL or path as the
link text. Note that if the link is relative and you move the file, this
text will not change, though the target will.
– Login name: If necessary, enter your login to access the URL.
Only applicable for FTP hyperlinks.
– Password: If necessary, enter your password to access the URL.
Only applicable for FTP hyperlinks. Figure 3: FTP specific controls on the Hyperlink
dialog

9
– Anonymous user: Mark this option to access the URL anonymously. Only applicable for FTP hyperlinks.
b. Mail:
For Mail hyperlinks, the controls above the Further Settings
area change to those shown in Figure 4.
– Recipient: Enter the email address of the recipient, or
select the address from an existing database accessed by
clicking the Data Sources button.
– Subject: Enter the text to be used as the subject line of the
message.
The Text field (shown in the Hyperlink Type area in Figures 2
and 3, is provided within the Further Settings area for Mail,
Document, and New Document hyperlinks. Its function for
these hyperlinks is as described above for Internet hyperlinks.
Figure 4: Mail controls on the Hyperlink dialog
c. Document:
For document hyperlinks, the controls above the Further Settings area change to those
shown in Figure 5.
– Path: Specify the path of the file to be opened. Leave this blank if you want to
link to a target in the same spreadsheet. The Open File icon opens a file browser
for you to locate the document to be opened.
– Target: Optionally specify the target in the document (for example a specific
sheet). Click on the Target in Document icon to open a Navigator window where
you can select the target, or if you know the name of the target, you can type it
into the box. Figure 5: Document controls on the Hyperlink dialog
d. New Document:
For New Document hyperlinks, the controls above the Further Settings area
change to those shown in Figure 6.
– Edit now / Edit later: Specify whether to edit the newly created
document immediately or just create it.
– File: Enter the name of the file to be created. The Select Path icon opens
a directory picker dialog.
– File type: Select the type of document to be created (for example, text
document, spreadsheet, or drawing).

Figure 6: New Document controls on the Hyperlink dialog

2.8.Freezing rows and columns:


Freezing is used to lock rows across the top of a spreadsheet or to lock columns on the left of a spreadsheet. Then, when
moving around within a sheet, the cells in frozen rows and columns always remain in view.
Figure 7 shows some frozen rows and columns. The heavier horizontal line between rows 3 and 23 and the heavier
vertical line between columns F and Q indicate that rows 1 to 3 and columns A to F are frozen. The rows between 3 and
23 and the columns between F and Q have been scrolled off the page. To freeze rows or columns:
1) Click on the row header below the rows you want the freeze or click on the column header to the right of the
columns where you want the freeze. To freeze both rows and columns, select the cell (not a row or column) that is
below the row and to the right of the column that you want to freeze
2) Go to View on the Menu bar and select Freeze Rows and Columns. A heavier line appears between the rows or
columns indicating where the freeze has been placed.
10
Figure
7:
Frozen
rows
and
columns

Unfreezing:
To unfreeze rows or columns, go to View on the Menu bar and click Freeze Rows and Columns to toggle it off. The
heavier lines indicating freezing will disappear.

2.8.Format Menu {Alt + O}:


Format means "to decorate ". This menu is used to make a text beautiful and attractive. Various options are given under
LibreOffice Calc Format Menu , which are as follows-

Text:
It is used to format the text written in the document. Many options
have been given under this, as you can see in the image below-
 Bold {Ctrl + B}: It is used to make the selected text thicker.
 Italic {Ctrl + I}: It is used to skew the selected text.
 Underline {Ctrl + U}: It is used to draw a line below the selected
text.
 Double Underline: It is used to put two lines below the selected
text.
 Strikethrough: It is used to cut the selected text in the middle. It
is used in such a place where we have to show the mistake. Like-
Rs. 25 Rs.20, i.e. the cost of the article has decreased from 25 to
20.
 Overline: It is used to place a line above the selected text.
 Superscript {Ctrl + Shift + P}: It is used to raise the selected
text above the baseline (as a power). For example- (A+B) 2 =A 2
+B 2 +2AB
 Subscript {Ctrl + Shift + B}: It is used to move the selected text
below the baseline (as a power).
Eg- C 6 H 12 O 6
 Shadow: It is used to cast a shadow on the selected text.
 Outline: It is used to view only the outline of the selected text
 Wrap Text: It is used to write multiple lines in the same cell.
 Uppercase: It is used to write the selected text in capital letter. Like- SEEGYAN.COM
 Lowercase: It is used to write the selected text in small letter. eg- segyan.com
 Cycle Case {Shift + F3}: In MS Word, this option is known as Change Case. It is used to move from one case to
another.
 Sentence Case: It is used to put the selected text in sentence case. Like- See gyan is an educational website.
 Capitalize Every Word: It is used to capitalize the first letter of each word of the selected text. Like- See Gyan Is
An Educational Website.
11
 Toggle Case: It is used to convert the first letter of each word of the selected text to a small letter. Like- sEE gYAN
iS aN eDUCATIONAL wEBSITE.

 Spacing: It is used to set space. Many options have been given under this, as you can see in the image below:

Line Spacing:

It is used to set the distance between two lines. Ctrl+5 sets the distance between two lines to 1.5 points and Ctrl+2 sets
the distance between two lines to 2 points.
Note: By Default Line Spacing is 1.
 Increase Paragraph Spacing: It is used to increase the distance between two paragraphs.
 Decrease Paragraph Spacing: It is used to reduce the distance between two paragraphs.
 Increase Indent: It is used to move the paragraph to the right side.
 Decrease Indent: It is used to move the paragraph to the left side.
Align:
It is used to set the alignment. Many options have been given under this, as you can see in the image below:
o Left {Ctrl + L}: It is used to align the selected text to the left
side.
o Centered {Ctrl + E}: It is used to center the selected text.
o Right {Ctrl + R}: It is used to align the selected text to the right
side.
o Justified {Ctrl + J} : It is used to make the paragraph equal on
both sides (Left+Right).
o Top: It is used to set an object above the Anchor Point.
o Center : It is used to set an object in the middle of the Anchor
Point. It is also called Anchor to Middle.
o Bottom: It is used to set an object below the Anchor Point.

Number Format:
It is used to do the formatting of a number entered in a cell.
Various options have been given under this, as you can see in the
image below:
Note:- Remember the shortcut key of each number formatting, it is
asked in the exam.

12
Clone Formatting: It is used to copy the formatting of a cell and apply it to another cell, that is, it works like the
Format Painter of MS Word.
Clear Direct Formatting {Ctrl + M}: It is used to end the formatting of a cell.
Cells {Ctrl+1}: It is used to do the formatting of Active Cells. On clicking this option, a dialog box called Format Cells
opens, in which various options are given to format the cells. Like - Numbers, Font, Font Effect, Alignment, Border,
Background etc.

Rows: It is used to do the formatting of the row. There are many options under this, which you can see in the image
below:
Note : - By default (preset), Row Height - 0.18" , but it can be
set to a maximum of 39.37" .

Columns: It is used to do the formatting of the column. There are


many options under this, which you can see in the image below:
Note : - By default (preset), Column Width - 0.89" , but
it can be set to a maximum of 39.37" .

Merge Cells: It is used to select two or more cells and merge


them into one. There are many options under this, which you can
see in the image below:

Character: On clicking this option, a dialog box called Character opens, in which Font, Font Size and Font Style can be
set.

Paragraph: It is used for setting paragraphs. Like- Indent, Spacing, Alignment, Tab, Drop Cap etc.
Page: Page settings like- Page Size, Orientation, Header and Footer etc. It is used to set.
Print Ranges: It is used to print the selected cell range. There are
many options under this, which you can see in the image below:

Conditional: It is used to do the formatting of a cell based on a condition. Many options have been given under this, as
you can see in the image below:

13
Auto Format Styles: Under this, different styles of formatting the cell have already been given, which can be selected
and formatted by the cell.

Spreadsheet Theme: It is used to apply different types of themes


on Spreadsheet.

Image: It is used to set the image. There are many options under
this, which are shown in the image below:

Chart: It is used to convert the chart created by Insert Menu into


an image.

Object: It is used to set an object i.e. Image.


Name: It is used to name the selected object.
Description: t is used to write something about the selected object.
Anchor: It is used to set the position of an object.
Arrange: It is used to organize two objects.
Flip: It is used to change the position of the selected object.

14
Module-3
2.9.Mathematical operations in LibreOffice Calc
Mathematical operations must begin with an = symbol. When typing directly, you normally need to start a formula with =.
You can use the following operators in Libre Office Calc:

2.9.1.Arithmetical Operators
These operators return numerical results.

Operator Name Example


+ (Plus) Addition 1+1
- (Minus) Subtraction 4-2
* (asterisk) Multiplication 2*2
/ (Slash) Division 9/3
^ (Caret) Exponentiation 3^2

2.9.2.Relational operators
These operators return either true or false.

Operator Name Example


= (equal sign) Equal A1=B1
>(Greater than) Greater than A1>B1
<(Less than) Less than A1<B1
>= (Greater than or equal to) Greater than or equal to A1>=B1
<= (Less than or equal to) Less than or equal to A1<=B1
<>(Inequality) Inequality A1<>B1

15
2.9.3.Text operators
The operator combines separate texts into one text.

Operator Name Example


&(And) text concatenation AND "Sun"&"day" is "Sunday"

2.10.Functions in LibreOffice Calc


Opens the Function Wizard, which helps you to interactively create formulas. Before you start the Wizard, select a cell
from the current sheet, in order to determine the position at which the formula will be inserted. You can enter formulas in
two ways. One method is to use the Function Wizard or the equivalent facilities in the Functions deck of the Sidebar. The
second method is to type directly into the cell or into the Input line.

Shortcut to access function wizard Ctrl+F2


or
Choose Insert menu - Function.
or

On Formula Bar, click


The Function Wizard has two tabs: Functions is used to create formulas, and Structure is used to check the formula
build.

16
2.11.Functions by Category
This section describes the functions of Libre Office Calc. The various functions are divided into categories in the Function
Wizard.

a. Database
17
This section deals with functions used with data organized as one row of data for one record.

b. Date & Time


These spreadsheet functions are used for inserting and editing dates and times.
You can use TODAY()function to enter today’s date. This function doesn’t take any argument. You can enter it to any
cell to show the current date.

Remember,
whenever you open the Calc spreadsheet, the date is updated with the current date.

c. Financial
This category contains the mathematical finance functions of LibreOffice Calc.

d. Information
This category contains the Information functions.

e. Logical
This category contains the Logical functions.

f. Mathematical
This category contains the Mathematical functions for Calc.

18
g. Array
This category contains the array functions.

h. Statistical
This category contains the Statistics functions.
Below example returns the count of 20 in the range A1:A7. In this below example, number 20 is present twice in the
range. Thus the result is 2.
=COUNTIF(A1:A7,20)

i. With Number as Cell Reference: You can also specify 20 as a cell reference. The result would be similar.
COUNTIF would try to count the value specified in cell D1.
=COUNTIF(A1:A7,D1)

19
j. Spreadsheet: This section contains descriptions of the Spreadsheet functions together with an example.

k. Text
This section contains descriptions of the Text functions.

l. Add-in
This category contains the add-in functions.

2.12.Protect sheet and workbook


Protecting a sheet with password:
To protect a sheet using a password follow these steps.
From the Tools menu, Choose protect sheet option the below shown dialog box appear

20
Create a password and then confirm the password.
Click OK to save the changes and close the dialog.

To remove password for protected sheet Tools menu> choose protect sheet the below dialog will appear

enter correct password and click OK button.

Protecting Workbook in LibreOffice Calc

All documents that are saved in Open Document format can be saved with a password. Documents that are saved with a
password cannot be opened without the password.

Turning on protection:
Choose File - Save As and mark the Save with password check box. Save the Workbook.

Turning off protection:


Open the Workbook, entering the correct password. Choose File - Save As and clear the Save with password check box.

Note: Information entered in File - Properties is not encrypted. This includes the name of the author, creation date, word
and character counts.

Protecting a workbook with password


To protect a document using a password while saving follow these steps.
From the File menu, click Save As. In the Save As dialog, mark the “Save with Password” option (see below).

21
Save-with-Password-Option
Click Save.
Enter your own password in the “Set Password” window.
You can also mark the document as Read-Only and can be editable once correct password is entered.

Press Ok.

Now anyone who opens the file would get below password prompt and the document is visible only with a correct
password.

22
Password prompt – Open

Remove the Password


To remove the password which is set using the above steps, simply open the file with the correct password.
Go to Save As dialog again, uncheck the Save with Password option.
Save the file.
This would remove the password from your LibreOffice document.

2.13.Filters
Filters and advanced filters allow you to work on certain filtered rows (records) of a data range. In the spreadsheets in
LibreOffice there are various possibilities for applying filters.
1) One use for the Auto Filter function is to quickly restrict the display to records with identical entries in a data field.
2) In the Standard Filter dialog, you can also define ranges which contain the values in particular data fields. You can
use the standard filter to connect the conditions with either a logical AND or a logical OR operator.
3) The Advanced filter allows up to a total of eight filter conditions. With advanced filters you enter the conditions
directly into the sheet.

2.13.1.Applying Auto Filter


Filters the records, based on the content of the currently selected data field.

Auto Filter

The Auto Filter function inserts a combo box on one or more data columns that lets you select the records (rows) to be
displayed.
1. Select the columns you want to use Auto Filter on.
2. Choose Data - Filter – Auto Filter. The combo box arrows are visible in the first row of the range selected.
3. Run the filter by clicking the drop-down arrow in the column heading and choosing an item. Only those rows
whose contents meet the filter criteria are displayed. The other rows are filtered. You can see if rows have been
filtered from the discontinuous row numbers. The column that has been used for the filter is identified by a
different color for the arrow button.

23
To stop using Auto Filter, re-select all cells selected in step 1 and once again choose Data - Filter – Auto Filter.

2.13.2.Standard Filter
Allows you to set the filtering options.
Use the Standard Filter to refine and to combine Auto Filter search options.
Example

Select row 1 headers and Choose Data - Filter – More filters - Standard Filter, and then apply the conditions. (see
below image)

24
Before click OK button choose options and select copy result to for select cell where you want keep your filtered data.(in
example G1 cell selected)
After you click OK, only the filtered rows will be displayed.
Output of the above example see below image(G1:K3)

2.13.3.Applying Advanced Filters


1. Copy the column headers of the sheet ranges to be filtered into an empty area of the sheet, and then enter the
criteria for the filter in a row beneath the headers. Horizontally arranged data in a row will always be logically
connected with AND, and vertically arranged data in a column will always be logically connected with OR.
2. Once you have created a filter matrix, select the sheet ranges to be filtered. Open the Advanced Filter dialog by
choosing Data - Filter - Advanced Filter, and define the filter conditions.
3. Then click OK, and you will see that only the rows from the original sheet whose contents have met the search
criteria are still visible. All other rows are temporarily hidden and can be made to reappear with the Format -
Row - Show command.

Example

25
Copy row 1 with the required row headers (field names), to row 17, for example. Enter the filter conditions like below

image (row 18 and 19) Now


Select the data from A1:E13 and then
Choose Data - Filter – More filters - Advanced Filter, and then select the range A17:C19.

Before click OK button choose the cell where you want keep your filtered data.(in example F17 cell selected)
After you click OK, only the filtered rows will be displayed.
Output of the above example see below image (cell range F17:J19)

26
Descriptive Questions
1. How do you select items in a spread sheet? Explain it with steps
2. What is a calc/spreadsheet and explain its features.
3. What is a formula bar? Explain it.
4. Explain about the spreadsheet layout.
5. Write short note on any 5 short cut keys.
6. Explain the steps to insert single and multiple columns and rows?
7. Explain the steps to delete single and multiple columns and rows?
8. What are the categories of Hyperlink? Explain about any two categories?
9. Explain the steps to freezing and unfreezing rows and columns?
10. Explain any five options of Format Menu?
11. Write about Arithmetical, Comparative and Text operators with example?
12. Explain function categories in the Function Wizard with example. ?
13. Write the steps involved in sheet protection and workbook protection. ?
14. Explain about different kinds of filters ?

Multiple Choice Questions:


1. A function should start with __________________ ?
a. “ = “ sign
b. Numbers
c. Alphabets
d. All of the above
2. in ___________ menu auto filter available ?
a. Insert
b. Data
c. View
d. Edit
3. What is the shortcut used to open Function Wizard in LibreOffice Calc ?
a. Alt+F2
b. Ctrl+F5
c. Ctrl+F2
d. F2
4. How many spreadsheets on LibreOffice Calc by default ?
a. 0
b. 1
c. 2
d. 3
5. what will be the value of =10*20/4*8 in LibreOffice Calc ?
a. 6.35
b. 8
c. 400
d. 600
6. in which menu protect sheet option available ?
a. Tools menu
b. Data menu
c. Sheet menu
27
d. Insert menu
7. The combination of the column letter and row number for a cell in Calc spreadsheet is called ?
a. Cell reference
b. Cell identity
c. Cell identification Number
d. None of the above
8. which function we use for today's date ?
a. =date()
b. =today()
c. =today_date()
d. All of the above
9. Which type of formulas and functions are present in spreadsheet ?
a. Mathematical
b. Financial
c. Logical
d. All of the above
10. What is called to filter data ?
a. Sorting
b. Inserting
c. Filtering
d. Deleting
11. Which is used to calculate and analyze a set of numbers?
a. Improve
b. Calc
c. Database
d. Impress
12. Spreadsheet/Calc, sometimes is called as?
a. Cells
b. Worksheet
c. Menus
d. Notebook pages
13. The cells are addressed in terms of?
a. Row and column labels
b. Row labels
c. Rows
d. Columns
14. Which of the following data can be typed into a spreadsheet cell?
a. Formulae
b. Text
c. Numbers
d. All of the these
15. Address of first cell in the worksheet is?
a. A
b. A0
c. A1
d. 1A
16. In a spreadsheet, letters are used to represent___________?

28
a. Cells
b. Rows
c. Columns
d. Blocks
17. In a spreadsheet, tool used to construct formulas is called?
a. Formula bar
b. Filter
c. Auditing toolbar
d. Format printer
18. Functions in MS Excel must begin with?
a. An ( ) sign
b. An Equal sign
c. A Plus sign
d. A > sign
19. The basic unit of a worksheet into which you enter data in calc called as a?
a. Cell
b. Table
c. Box
d. Column
20. How many sheets are there, by default when we create a new calc sheet?
a. 1
b. 3
c. 4
d. 5
21. What is called horizontal row in spreadsheet?
a. Column
b. Row
c. Cell
d. Sheet
22. What is called vertical row in spreadsheet?
a. Column
b. Row
c. Cell
d. Sheet
23. What is the shortcut key for clear Direct Formatting?
a. Cntrl + F
b. Cntrl + C
c. Cntrl + M
d. Cntrl+ R
24. Which of the following is the category of Hyperlink?
a. New Picture
b. Image link
c. Internet
d. None
25. What is full form of FTP?
a. File Transfer Protocol
b. Format Text Pattern

29
c. File Tele Permission
d. File Transfer Permission
26. What is the shortcut key for superscript?
a. Cntrl + Shift + S
b. Cntrl + Shift + P
c. Cntrl + Shift + B
d. Cntrl + Alt + P
27. What is the shortcut key for subscript?
a. Cntrl + Shift + S
b. Cntrl + Shift + P
c. Cntrl + Shift + B
d. Cntrl + Alt + P
28. What is full form of URL?
a. Uniform Resource Locator
b. Universe Resource Locator
c. Uniform Router Locator
d. None

30
Unit 3:: Office Impress
Module 1
3.1. Introduction to Impress
LibreOffice Impress is a free and open-source presentation program available for Linux, Windows and Mac. It comes
with lots of features and compatibility with Microsoft PowerPoint as well. Here is a basic guide of creating a simple
presentation using Impress

What is an Impress?
Impress is the presentation (slide show) program included in LibreOffice. You can create slides that contain many
different elements, including text, bulleted and numbered lists, tables, charts, and a wide range of graphic objects such
as clipart, drawings and photographs.

What is a presentation?
A presentation is a series of still images projected into a screen. A slide is like a page in a document. Every presentation
consists of a number of slides that describe a topic with text or graphics. The presenter shows the slides in a display
device (projector, monitor) while he speaks to the audience.

Creating/Starting Impress
From the system Start menu: If you are using an Ubuntu, you should see the LibreOffice icon in the Applications
folder. When you double-click this icon, LibreOffice opens at the Start Centred.
From an existing presentation file: When LibreOffice is open, you can also start a new document in one of the
following ways.
 Choose File > New > Presentation
 Click the New button on the main toolbar.
 Press the Ctrl+N keys.

3.2. The Main Impress Window


The Impress main window has three parts: the Slides pane, Workspace, and Sidebar. Other parts of the Impress window
include the Title Bar, Menu, Toolbars and Status Bar. These parts are similar to the Writer main window. As stated
in the beginning of the course, all components of LibreOffice share common features and have a consistent user
interface.

1
Slides pane:
The Slides pane contains thumbnail pictures of the slides in your presentation; in the order the slides will be shown.
Clicking a slide in this pane selects it and places it in the Workspace. In general we use the slides pane to manage the
slides of a presentation.
Sidebar:
The sidebar has seven sections. To expand a section you want to use, click on its icon or click on the small triangle at
the top of the icons and select a section from the drop down list. Only one section at a time can be open.
Properties

Shows properties of the selected object. When you select a slide it shows the slide layouts included within
Impress.
Slide Transition

Slide Transitions affect how the presentation advances to the next slide. Impress has several transition effects
available. The default is set to No Transition.
Animation

A variety of animations can be used to emphasize or enhance different elements of each slide. The Custom
Animation section provides an easy way to add, change, or remove animations.
Master Pages/Slides

Here you define the page (slide) style for your presentation. Impress includes several designs of Master Pages
(slide masters). One of them – Default – is blank, and the rest have background and styled text.
Styles and Formatting

Here you can edit and apply styles like in Writer.


Gallery

Open the Impress gallery where you can insert an object (graphic, sound or video) from the LibreOffice Gallery
into your presentation.
Navigator

Opens the Impress navigator, in which you can quickly move to another slide or select an object on a slide.
Workspace
The workspace (normally the centre of the main
window) opens in the Normal view. It has four standard
views i.e View > Normal, Outline, Notes, and Slide
Sorter

Toolbars
Many toolbars can be used during slide creation; they
can be displayed or hidden by going to
View > Toolbars on the main menu bar.
Standard Toolbar
The standard toolbar contains the most frequently used
commands. It has some similarities with Writer but has some commands specific to Impress.

3.3. New presentation


When you create a new presentation, Impress shows only one slide in the Slides pane and Workspace. You can add new
slides or duplicate slides to your presentation as follows.

2
3.3.1 Inserting new slide
A new slide is inserted into a presentation using one of the following methods.
1. Go to Slide > New Slide on the Menu bar.
2. Right-click in the Slides pane and select New Slide from the context menu.
3. Use the keyboard shortcut Ctrl+M .
3.3.2 Master Slides
In addition to careful planning of the content, you need to plan the appearance of the presentation. For example:
● What colour combinations (background and text) will look good and also be easy for your audience to read?
● Do you want particular text and a picture to appear on all the slides? For example a company name and logo.
You can change the appearance of slides as you develop the presentation, but planning ahead will save you time in the
long run.

3.4. What is Slide Master?


A slide master is a slide that is used as the starting point for other slides.
It is similar to a page style in LibreOffice Writer as it controls the basic
formatting of all slides based on it. A slide presentation can have more
than one slide master. Therefore to change the appearance of a
presentation you must change or edit the Slide Master.

A master slide has a defined set of characteristics, including the


background colour, graphic, or gradient. It also can include objects (for
example, logos, decorative lines) in the background; headers and footers;
placement and size of text frames; and text formatting.

Note: LibreOffice uses three terms for one concept: slide master, master
slide, and master page. All refer to a slide which is used to create other
slides.
Applying master slides
To apply a master slide to all slides or selected slides in a presentation:
1. Click on the Master Slides icon to open the Master Slides deck
on the Sidebar
2. Right-click on the master slide you want to use in the Used in This
Presentation section
in the Master Slides deck on the Sidebar.
3. Select Apply to All Slides or Apply to Selected Slides from the context menu.

3.4.1 Creating a New Master slides


Creating a new master slide is carried out when Impress is in Master View.

1. Go to View > Master Slide on the main menu bar to open Master View in the Workspace. The Master View
toolbar also opens. If the Master View toolbar does not open, go to View > Toolbars on the main menu bar and
select Master View.
2. Create a new master slide using one of the following methods and a new master slide appears in the Slides Pane:
– Click on New Master in the Master View toolbar.
– Right-click on a master slide in the Slides Pane and select New Master from the context menu.
– Go to Slide > New Master on the Menu bar.
3. Rename the new master slide using one of the following methods and open the Rename Slide dialog:
 Click on Rename Master in the Master View toolbar.
 Right-click on the new master slide in the Slides Pane and select Rename Master from the context
menu.

3
4. Enter a memorable name for the new master slide in the Name text box, then click on OK to save the changes
and close the dialog.
5. Make sure the new master slide is selected in the Slides Pane and add all the text, graphics and master elements
that you want to use for the new master slide. The chapters in this user guide give more information on adding,
editing, formatting and managing the different types of objects on a master slide.
6. When finished creating a new master slide, use one of the following methods to return to Normal View:
 Click on Close Master View on the Master View toolbar.
 Go to View > Normal on the Menu bar.
7. Save the presentation file before continuing.

3.4.2.Editing Master Slides


The following items can be changed on a master slide:
◆ Background (colour, gradient, hatching, or bitmap)
◆ Background objects (for example, adding a logo or decorative graphics)
◆ Text attributes for the main text area and notes
◆ Size, placement, and contents of header and footer elements to appear on every slide.

Editing a master slide is as follows:


Select View > Master Slide from the Menu bar. This also opens the Master View toolbar Select a master slide you
want to edit in the Slides Pane so that it appears in the Workspace
When a slide master is opened for editing, it contains five areas, as shown in the image below.

Now you can select any of these objects and start making changes. Any changes made to one slide when in Master View
mode will appear on all slides using this slide master.

Edit the title Text Area


Select the Text Area Auto-layout box

Using the Properties section in the sidebar start formatting the text box and text properties. In this example, we can
change the font colour and set a gradient area colour.

4
Edit the Object Area
In a similar way you can modify the Object Area Auto-layout text box. Here for example you can
change the bullets style using the menu command Format > Bullets and Numbering.

Selecting and applying backgrounds

You can style a master slide by setting a background color, gradient or bitmap image as follows:

I. Go to Slide >Properties from the menu bar


II. Right click into object area then click Properties> page setup dialog box opens

3.5. Headers and footers


The master slide contains placeholders for header and footer text. There you can type a date, page numbering or any
other information you want to appear.

To set headers and footers choose Insert > Header and Footer from the main menu.
In the Header and Footer dialog window set the required values and click Apply to All. To apply to the current slide
only use the Apply command.

Date and Time: Set a fixed value or a variable date. A variable date always displays the current data.
5
Footer: In Footer text type general information about the presentation. You can type for example the presentation title,
author or company name.

Slide number: Displays the current slide number.

Do not show on first slide: Choose this option if you don't want header and footer text to appear on the first slide.

The image below shows the final result after setting the date, footer and number fields for all slides.

3.6. Working with styles


A style is a set of formats that you can apply to selected elements such as slides, text, lists, frames, borders, lines and
area fills in a presentation to quickly set or change their appearance. Applying a style means applying a group of formats
at the same time providing a consistent look to your presentation. For example, to manually change an attribute on the
same object type on every slide in your presentation is time consuming and prone to errors. Using styles reduces time
and provides greater accuracy.

3.6.1. Accessing styles


Use one of the following methods to access or modify styles available in Impress:
● Use the keyboard shortcut F11 (Windows and Linux)
● Go to Format > Styles on the Menu bar.
● Click on Styles on the Sidebar to open the Styles deck.
Impress has two types of styles available:
1. Presentation styles - for formatting text
2. Drawing styles - for graphic objects

3.6.2. Presentation styles


Presentation styles in Impress are used when creating a presentation using one of the Impress slide layouts. It cannot be
created or deleted, but can be formatted, modified or updated to your requirements. These presentation styles are divided
into four categories.
● Background and Background objects – are used to format objects on the default master slides such as icons,
decorative lines, and shapes.
● Notes – formats the text used in presentation notes.
● Outline 1 thru Outline 9 – are used for the different levels of the outline to which they belong. For example,
Outline 2 is used for the sub-points of Outline 1, Outline 3 is used for the sub-points of Outline 2 and so on.
● Subtitle and Title – formats the text used for any titles or subtitles used on slides.

6
3.6.3. Drawing styles
Drawing styles in Impress define the characteristics of graphic objects (including text objects) that you place on a slide.
These styles include attributes for line, area, shadowing, transparency, text, connectors and dimensioning. Drawing
styles included with Impress cannot be deleted, but you can format, modify and update drawing styles.

For example, if you need to create organization charts in your presentation, you will probably want all of the objects to
have a consistent appearance, such as line style, font type, shadow, and so on. The easiest way to achieve this result with
the minimum effort is to use a drawing style for the objects and apply it to each object. The major benefit is that if you
decide to change, say, the background colour of objects, all you need to do is modify the style rather than each individual
object.

3.6.4. Editing styles


Formatting presentation and drawing styles can be carried out in either Normal or Master Slide view. Formatting options
are available in dialogs for each style or using Format in the Menu bar.

1. Go to Format > Styles > Edit Style on the Menu bar


(Or)
Right-click on the highlighted style in the Styles deck on the Sidebar to open the formatting dialog for the
selected style.
2. Use the various options available in the tabbed pages of the dialog to format the style.
3. Click OK to save your formatting changes and close the dialog.

3.7. Working with templates


A template is a special type of presentation that you use as a basis to create your presentations. For example, you can
create a template for business presentations so that any new presentation has your company logo, name and information
on the first slide and the remaining slides in your presentation only show the company logo and name.

Templates can contain anything that presentations can contain, such as text, graphics, a set of styles, and user-specific
setup information. All document types created using LibreOffice are based on templates. You can create a specific
template for any document type (text, spreadsheet, drawing, presentation). If you do not specify a template when you
start a new document, then the default template for that type of document is used.

However, Impress is a little different from other LibreOffice components, in that it starts with the Select a Template
dialog box, unless you have decided to turn off this dialog in LibreOffice options. When you create a presentation, if
the template dialog is active, it opens offering several choices for templates as a starting point for your presentation.

7
If you have turned off the Select a Template dialog when creating a new presentation, LibreOffice uses the LibreOffice
default template for presentations. If you have defined your own default template, LibreOffice uses your default template
when you create a presentation.

Creating templates
Create a template and save it to a template folder as follows:
1. Open the presentation that you want to use for a template, or open a template that you want to use as a basis for
your template.
2. Add and format content and styles to your presentation.
3. Go to File > Templates > Save As Template on the Menu bar to open the Save as Template dialog box
4. Enter a name for the new template in the Template Name text box.

5. Select a destination folder for the new template.


6. If required, select the option Set as default template to use as the default template the next time you open
LibreOffice and do not select a template.
7. Click on Save to save your template and close the Save as Template dialog. Your templates will appear in the
LibreOffice start up window and the Select a Template dialog the next time you start LibreOffice.

3.7.1. Organizing templates


LibreOffice can only use templates that are in LibreOffice template folders (categories). You can create new LibreOffice
template folders or categories and use them to organize your templates. For example, separate template categories for
different projects or clients. You can also import and export templates.
Creating template categories
1. Go to File > Templates > Manage Templates on the Menu bar.
2. Click on Settings and select New Category from the context menu.
3. Enter a category name in the Enter Category name text box that has opened.
4. Click OK to save your new category and the category will appear in the drop down list for categories filter at
the top of the Select a Template dialog.
Importing templates
If the template that you want to use is in a different location on your computer, you must import it into a LibreOffice
template folder for LibreOffice to recognize the template.
1. Go to File > Templates > Manage Templates on the Menu bar.
2. Click Import and the Select Category dialog opens.
3. Select a category from the displayed list or select Create a New Category in the Select Category dialog.
8
4. In the file browser window that opens, navigate to the folder where your template is located on your computer
that you want to import.
5. Select the template and click Open. The file browser window closes and the template appears in the selected
category.
Exporting templates
1. Go to File > Templates > Manage Templates on the Menu bar.
2. Select the template you want to export, then click on Export to open a file browser window.
3. Navigate to the folder where you want to export the template and click on Select. The template is exported and
the file browser window closes.

9
Module-2
3.8. Adding and Formatting Text
Introduction
This chapter describes the different ways to add text to slides and format the text. Text in slides is contained in text
boxes.
There are two ways to add text boxes to a slide:

 Choose a predefined layout from the Layouts section of the Tasks pane, containing text elements as described
in Chapter 1. These text boxes are called Auto-Layout text boxes.
 Create a text box using the text tool in the Drawing toolbar.

This chapter describes how to create, modify, use, and delete text boxes. It also discusses the various types of text that
can be inserted and explains how to format the text. Finally, it provides information on how to insert special forms of
text such as numbered or bulleted lists, tables, fields and hyperlinks.

3.8.1. Working with text boxes


Adding text boxes to slides is carried out using one of the following methods:
• Use a predefined Impress layout which includes Auto-Layout text boxes.
• Create a text box using the Insert Text Box for a horizontally aligned text box on the Standard toolbar or the
Drawing toolbar.
• Create a text box using the Insert Vertical Text for a vertically aligned text box on the Standard toolbar or the
Drawing toolbar
• Use the keyboard shortcut F2 to insert a horizontally aligned text box.

3.8.2. Using text boxes created from the Layout pane


In Normal view:
 Click in the text box that reads Click to add text.
 Type or paste your text in the text box.
These text boxes are known as Auto-Layout text boxes.

Using text boxes created from the text box tool

In Normal View:Click on the Text icon on the Drawing toolbar. If the toolbar with the text icon is not visible,
choose View > Toolbars > Drawing.
a. Click and drag to draw a text box on the slide. This sets the width. Do not worry about the height—the text
box will expand if needed as you type. To reposition the text box to a different part of the slide, see “Moving
a text box” ; to change the width, see “Resizing a text box”.
b. Release the mouse button when finished. The cursor appears in the text box, which is now in edit mode
(gray hashed border; see Figure 1).
c. Type or paste your text in the text box.
d. Click outside the text box to deselect it.
Note: In addition to the normal text boxes where text is horizontally
aligned, it is possible to insert text boxes where the text is aligned
vertically. This choice is available only when Asian languages are
enabled in Tools > Options > Language Settings > Languages.

Click on the icon in the drawing toolbar to create a vertical text


box. Note that when editing the contents, the text is displayed
horizontally.
10
Figure 1: Selected text box and text toolbar
3.8.3. Moving a text box
In Normal view, notice how the pointer changes from an
arrow to an I-beam as you move it over the text in a text
box.
1) Click when the pointer becomes an I-beam. The
text box is now in edit mode. In this mode a gray
border is visible around the text box edges.
2) Move the I-beam (or pointer) over the gray border.
Notice how it changes shape, becoming the usual
“move” symbol (for example, a hand).
3) When the “move” symbol appears, click once.
Blue selection handles appear.
4) Click anywhere in the text box or on the gray
border (except for the blue handles) and drag to move the text Figure 2: Moving a text box
box. A semi-transparent copy of the
box shows where your text box will be placed. See Figure 2.
5) Release the mouse button when the text box is in the desired position. To return to edit mode, click outside the
text box area and then repeat step 1) of this procedure.

3.8.4. Resizing a text box


In Normal view, enter edit mode by clicking on the text box, then move
the mouse to the gray edge of the text box. When the cursor shape
changes, click the left mouse button again. The text box should now
display blue resizing handles. Move the pointer over any handle. Notice
how the pointer changes shape, indicating in what direction the text box
will be resized. The corner handles change the two dimensions of the
text area simultaneously, while the four handles at the center of each
side modify only one dimension. When the two-headed arrow is
displayed, click and drag to resize the text box.
Figure 3: Resizing a text box
Tip: To maintain the proportions of a text box while resizing, press and
hold the Shift key, then click and drag. Make sure to release the mouse button before releasing the Shift key.
Impress also provides a different type of text box which resizes horizontally to automatically fit the text as it is inserted.

To insert an auto-resizing text box, click on the icon in the text toolbar (see Figure 1) and then click on the place
in the slide where you want the first letter of the text to appear. If the text toolbar is not visible, choose View > Toolbars >
Text.
For more accurate control over the shape, size and position of the text box, instead of using the mouse, use the Position
and Size dialog box. Select the text box, then press F4 or select Format > Position and Size from the menu bar.

3.8.5. Deleting a text box


1) Click the text once to display the gray border.
2) Move the cursor to the edge of the text box and click the left mouse button. The gray border now shows blue
selection handles.
3) Press Delete.

Tip: Sometimes it is faster to to delete a text box by dragging a selection rectangle around the text box and then hitting
the Delete key. Take care to avoid selecting and accidentally deleting other text boxes or shapes.

11
3.8.6. Inserting text
Pasting text
Text may be inserted into the text box by copying it from another document and pasting it into Impress. However, the
pasted text will probably not match the formatting of the surrounding text or that of the other slides in the presentation.
This may be what you want on some occasions; however in most cases you want to make sure that the presentation style
is consistent. There are several ways to ensure consistency; these methods are explained below.

Pasting unformatted text


It is normally good practice to paste text without formatting and apply the formatting later. To paste without formatting,
either press Control+Shift+V, then select unformatted text from the dialog box that appears, or click on the
small black triangle next to the paste symbol in the standard toolbar and select unformatted text.
The unformatted text will be formatted with the outline style at the cursor position in an Auto-Layout text box or with
the default graphic style in a normal text box.

Formatting pasted text


If pasting the text into an Auto-Layout area, then to give the pasted text the same look and feel of the rest of the
presentation apply the appropriate outline style to the text. To do so:
1) Paste the text in the desired position. Do not worry if it does not look right: it will in a minute.
2) Select the text you have just pasted (see “Selecting text” on page 54 for details on how to do that).
3) Select Format > Default formatting from the menu bar. This operation will assign one of the nine Presentation
styles to the text (depending on where the insertion is made).
4) Use the four arrow buttons in the Text Formatting toolbar to move the text to the appropriate position
and give it the appropriate outline level. The button with the arrow pointing left promotes the list
entry by one level (for example from Outline 3 to Outline 2), the right arrow button demotes the list entry by
one level, the up and down arrow buttons move the list entry.
5) Apply manual formatting as required to sections of the text (to change font attributes, tabs, and so on).

If you are pasting text into a text box, you can still use styles to quickly format the text. Note that only one graphic style
can be applied to the copied text. To do this:
1. Paste the text in the desired position.
2. Select the text you have just pasted.
3. Select the desired graphic style.
4. Apply manual formatting as required to sections of the text.

Tip: Presentation styles are very different from Writer styles and are applied in quite a different way.

Inserting special characters


To insert special characters, such as copyright, math,
geometric, or monetary symbols, or characters from
another language:
1. Click in the place in the text where you want to
insert the character.
2. Choose Insert > Special Character. The Special
Characters dialog box appears. Alternatively if
the icon is visible, you can click this to bring up
the Special Characters dialog box.
3. Choose the font and character subset from the
Font and Subset drop-down menus.
4. Click the character you want to insert. You may
have to scroll to find the one you want.
5. Click OK.
12
Characters you select will be inserted in the order they were selected. If you accidentally click the wrong character,
clicking another character will only add it to the ones being inserted. Click Delete (all the characters selected will be
deleted), then click the correct characters. Alternatively, you can also go ahead and insert all the selected characters and
delete any unwanted ones from the document, as special characters behave like any other character.

Inserting non-breaking spaces and hyphens


Where it is not desirable for words separated by a space or by a hyphen to span over two lines, or where an optional
hyphen is desired, you can insert a special formatting mark.

To access the Formatting marks options, select from the menu bar Insert > Formatting marks. Impress supports three
formatting marks:
 Non-breaking space: A non-breaking space between two words prevents these two words being separated over
two lines. Press Ctrl+Shift+Spacebar on the keyboard to insert a non-breaking space.
 Non-breaking hyphen: A non-breaking hyphen keeps the two words separated by the hyphen on the same line.
 Optional hyphen: An invisible hyphen that is activated (thus breaking the word) only when the word is too
long to fit on one line.

3.9. Introduction to formatting text


The appropriate use of text formatting can give a presentation a consistent look and a dynamic feel, and it can even
enhance the audience’s understanding of your message by preventing distracting elements.

When you enter text, either in an Auto-Layout text box or in a normal text box, it is formatted with a set of predefined
attributes known as a style. The style used depends on the outline level of the point where the text was entered for Auto-
Layout text boxes (for example, if you are entering a level 2 item, Impress will format it according to the Outline 2
presentation style) or the Default Graphic style for text boxes.

Formatting text may require some intervention in three areas:


 The character attributes (for example the font colour)
 The paragraph attributes (for example the alignment)
 The list attributes (for example the type of bullet)

In some cases it is quicker and more efficient to apply manual formatting; but in situations where you need to perform
the same modifications to many different parts of the presentation, the use of styles is recommended. Both these
techniques are described here.

3.9.1. Selecting text


Text must be selected before it can be formatted.
 To format all the text in a text box, click once on the text, then click once on the border of the text box. The
green resizing handles are displayed. Now any formatting changes will apply to all the text in the text box.
 To format only part of the text, click once on the text, then select the text to be formatted by clicking and
dragging (highlighting) over it. You can also use keyboard combinations to select text: move the cursor where
you want to begin your selection, press Shift and then use the arrow buttons to extend your selection. Formatting
changes will apply only to the selected text.

3.9.2 Using styles to format text


Impress has two categories of styles: presentation styles and graphics styles. Presentation styles are used on text inserted
into an Auto-Layout area, slide master backgrounds, and background objects. However, for text inserted in a text box or
a graphic object, you need to apply a graphic style.
In this chapter we focus mostly on Presentation styles. For information on graphic styles, see Chapter 6 (Formatting
Graphic Objects).

13
3.9.3 Modifying a presentation style
To modify a presentation style, follow these steps:
1. Open the Styles and Formatting window by pressing F11 or selecting Format > Styles and Formatting from
the menu bar.
2. Select the style category by clicking on either the Presentation Styles icon at the top of the Style and Formatting
window.
3. Right-click on the style to be modified and select Modify from the pop-up menu.

The top portion of the dialog box for a presentation style is shown in Figure 4.
Figure 4: The dialog box for a presentation style
This
dialog
box
consists
of 14 pages, which can be divided in two groups: those that determine the formatting of the text and those that determine
the properties of the slide master background and the background objects.

There is no difference between the parameters that characterize a style and the attributes given manually to portions of
text; in fact the pages that open when applying formatting manually are the same that you configure in the style dialog
box.

3.9.4 Updating a style from a selection


To update a style from a selection:
1. Select an item that has the format you want to adopt as a style.
2. In the Styles and Formatting window, select the style you want to update, and then click the Update Style icon

Figure: Updating a style from a selection


3.9.5 Applying a presentation style
To apply a presentation style, move the paragraph to the appropriate outline level as described in “Changing the order
of the outline level lines”. This is different from Writer, where you select the desired style from the Styles and Formatting
window.

3.10. Formatting characters


To view the character formatting options, select Format > Character or click the Character button on the Text
Formatting toolbar. (If a toolbar with the text icon is not visible, choose View > Toolbars > Text Formatting.) The
Character dialog box appears. Note that character styles do not exist in Impress.

Font page
Use the Font page to select the desired font type, its base attributes (Italic, Bold, etc.) as well as the size. A sample of
the font is displayed in the lower part of the dialog box. You can also specify the language of this style.
If Asian language support has been enabled (Tools > Options > Language Settings > Languages), the Font dialogue box
appears like below figure

14
The page is divided into three parts. The top and bottom parts have the same functionality as described above, while in
the middle part you can specify the Asian text font and its attributes.

Font Effects page


Use the Font Effects page to apply special effects to the text,
such as over lining and underlining, colour, shadow and so
on. As for the Font page, a sample of the text is displayed in
the lower part of the dialog box allowing a quick visual
check of the effects applied. This page is available when
creating or modifying a presentation style or a graphics style.

Figure: Advanced options for the character can be set in the font effect page.
Position page
The Position page has advanced options to customize text. This page is not available when creating or modifying a
presentation style or a graphics style. Use this page to set the text position relative to the baseline when you need to
insert subscripts or superscripts.
To create a superscript or subscripts do the following:
1. Select Superscript or Subscript as applicable.
2. Specify the amount by which the text should be raised (superscripts) or lowered (subscripts).
3. Specify the dimensions of the character relative to the baseline character size (in percentage).
The amount by which the text is raised or lowered can be set to automatic by selecting Automatic.
Two more position attributes can be set on this page:
• The (width) scaling of the text, which specifies the percentage of the font width by which to compress or expand
the individual characters of the selected text.
• The spacing between the characters of the font, which can be defined in number of points. Selecting the Pair
kerning checkbox causes LibreOffice to automatically adjust the spacing between certain pairs of characters to
visually improve the appearance. For example, when writing a V followed by an A (VA) the spacing between
the two letters is reduced (strong kerning) as can be easily seen when compared with, say, VS which is not a
kerning pair.

15
3.11. Formatting paragraphs
To view the paragraph formatting options, select Format > Paragraph or click the Paragraph button on the Text
Formatting toolbar. If a toolbar with the text icon is not visible, choose View > Toolbars > Text Formatting. The
Paragraph dialog box is shown. It contains three pages that are described in detail below. If Asian language support has
been activated, a page called Asian Typography is also displayed.

Indents and Spacing page


The Indents and Spacing page, shown in Figure 39, has four sections:
 Indent: modifies the indentation of the text (before and after) as well as the indentation of the first line.
 Spacing: defines the space before and after each paragraph formatted with the style.
 Line spacing: determines the spacing between two lines formatted with the style. Note that selecting
Proportional spacing requires specifying the percentage of a line to be used as spacing; 100% corresponds to a
single line, 200% to a double line, 50% to half a line. If Leading is selected, specify the amount of line spacing
in your default unit of measurement.
 Preview area: provides a visual representation of the settings before you apply them.

Figure: Indent & Spacing popup window

The Indents and Spacing page is also available when creating or modifying a graphics style or when modifying a
presentation style.

Alignment page
Use the Alignment page to determine the text alignment: Left, Right, Center, or Justified. A preview shows the effects
of the changes.

Figure: Alignment tab of paragraph style

The same choices can be accessed from the Text Formatting toolbar. This page is also available when creating or
modifying a graphics style, or modifying a presentation style.
16
Tabs page
Use the Tabs page to set tab stops. To delete an existing tab stop, select it in the list and click the Delete button. To delete
all the tab stops, click the Delete All button.
To create a new tab stop:
1. Set the size of the tab stop in the edit box on the left.
2. Select the type. If you set the type to Decimal, specify in the box below the character to be regarded as the
decimal point.
3. Select a fill character which will be drawn from the tab insertion point up to the tab stop. You can choose any
character to act as fill character.
4. Click the New button to apply the new tab stop.
This page is available in the Format > Paragraph dialog box and in the Graphics Styles dialog box.

3.12. Creating bulleted and numbered lists


The procedure to create a bulleted or numbered list varies depending on the type of text box used, although the tools to
manage the list and customize the appearance are the same. In text boxes created automatically by Impress (called Auto-
Layout), the outline styles available are by default bulleted lists, while for normal text boxes an additional step is required
to create a bulleted list.

3.12.1. Creating lists in Auto-Layout text boxes


Every text box included in the available layouts is already formatted as a bulleted list, therefore to create a bulleted list
the only necessary steps are:
1. From the Layout pane, choose a slide design that contains a text box. Those are easily recognizable from the
thumbnail.
2. Click in the text box that reads Click to add an outline.
3. Type the text, and then press Enter to start a new bulleted line.
The default list type is a bulleted list. To customize the list appearance or to change from bulleted to numbered and vice
versa.

Tip: Press Shift+Enter to start a new line without creating a new bullet or number. The new line will have the same
indentation as the previous line. Click the bullets icon on/off on the text formatting toolbar for a line without bullet. If
the text formatting toolbar is not showing, enable it by selecting View > Toolbar > Formatting in the menu bar.

Creating lists in other text boxes


To create a list in a text box, follow these steps:
1. Place the cursor in the text box.
2. Click the Bullets On/Off button in the text formatting toolbar.
3. Type the text and press Enter to start a new bulleted line.
Creating a new outline level
1. If necessary, press Enter to begin a new line.
2. Press Tab or click the indentation arrows in the Text Formatting toolbar. Each time you press Tab or click the
right arrow, the line indents to the next outline level. Pressing Enter creates a new line at the same level as the
previous one. To return to the previous level, press Shift+Tab or click the left arrow.
In the Auto-Layout text boxes, promoting or demoting an item in the list corresponds to applying a different outline
style, so the second outline level corresponds to Outline 2 style, the third to Outline 3 style and so on. As a consequence,
a change in the level also produces other changes (for example font size, bullet type, and so on).

17
3.12.2 Changing the appearance of the list
You can fully customize the appearance of a list, changing the bullet type or numbering for the entire list or for single
entry. All the changes can be made using the Bullets and Numbering dialog box, which is accessed by selecting Format >
Bullets and Numbering or by clicking on the Bullets and Numbering icon on the text formatting toolbar.
Selecting the entries
For the entire list:
1. Select the entire list or click on the gray border of the text box so that just the green resizing handles are
displayed.
2. Select Format > Bullets and Numbering or click on the Bullets and Numbering icon.
3. The Bullets and Numbering dialog box (Figure 44) contains five tabs: Bullets, Numbering type, Graphics,
Position, and Customize.
◦ If a bulleted list is needed, select the desired bullet style from the six default styles available on the Bullets
page.
◦ If a graphics style is needed, select one from those available on the Graphics page.
◦ If a numbered list is needed, select one of the 6 default numbering styles on the Numbering type page.
Later in this section is an explanation on how to add further bullets and numbering styles to the existing ones.
For a single line in the list:
1. Click anywhere in the line to place the cursor in it.
2. Follow steps 2–3 of the previous instruction set.
If the list was created in an Auto-Layout text box, then an alternative way to change the entire list is to modify the
Outline styles. Changes made to the outline style will apply to all the slides using them, so be careful before using this
command. The pages related to list management are described below.
Position page
Use the Position page, shown in above page, to fine tune the indentation and spacing of the bullet point and
its text. This page is particularly effective when used in combination with the Customize page.
To set up an outline level, first select it from the list on the left hand side of the page. Select level 1 – 10 to
modify all the levels simultaneously. Then set the Indent, which is the spacing between the bullet or number and the
text. If you select the Relative option, the indent value will be measured relative to the previous level and not from the
margin.
The numbering alignment is only useful when creating a numbered list; use it to specify the alignment of the
numbers. For example, you may want to align them to the right to line up one- and two-digit numbers in a pleasing way.
The Position page is not available if you are modifying a presentation style or graphics style; however the same
effects can be obtained by using the Indents and Spacing page of the dialog box for creating or modifying a slide.
Customize page
Use the Customize page, shown in Figure 46, to alter the style of all the outline levels. The options available on
this page depend on the type of marker selected for the list. Select first the level you want to modify on the left hand
side of the box. To modify all levels at once, select 1 – 10 as the level. Because the levels are arranged in a hierarchical
structure, a change to, for example, the font attribute of any level propagates through all the lower levels.
Depending on the numbering style selected in the Numbering box (bullet, graphic, numbering), some of the following
options may become available on the page:
 Before: Enter any text to appear before the number (for example, Step).
 After: Enter any text to appear after the number (for example, punctuation marks).
 Colour: Pick the colour for the list marker (number or bullet character).
 Relative size: Specify the size of the number relative to the size of the characters in the paragraph of the list.
 Start at: Enter the first value of the list (for example, you might want the list to start at 4 instead of 1).
 Character button: Click this button to select the character for the bullet.
 Graphics selection button: Opens a gallery of available graphics or allows the selection of a file on the hard disk
to be used as a marker.

18
 Width and Height: Specify the dimensions of the graphic marker.
 Keep ratio checkbox: If selected, the ratio between the width and the height of the graphic marker is fixed.
The right hand side of the screen shows a preview of the modifications made. To revert to the default values, click the
Reset button in the bottom right corner. Using the Customize page, you can create complex structured layouts, for
example a nested list with numbering followed by bullets Figure 48: Nested list with mixture of numbers and bullets

19
Module-3

3.13. Adding & formatting picture

INTRODUCTION

Pictures are often used in presentations as they can convey a large amount of information more quickly than the written
word. They can also give the presentation a professional look by adding a company logo. You may also want to use
Impress to create a presentation consisting only of pictures, such as a slideshow of holiday snapshots to share with
friends. This chapter describes how to insert and format pictures.

3.13.1. Inserting a picture from a file


Inserting a picture from a file is quick and easy. First choose the slide layout, as described in Chapter 1 (Introducing
Impress). Most layouts include a set of icons for inserting objects, but you can insert a picture into any slide.
Whether you are using an Auto-Layout for the placement of the picture, or you are just inserting a picture, follow these
steps:
1. Click on the Insert Picture icon or choose Insert > Picture > From file from the menu bar.
2. In the Insert picture dialog box, navigate to the directory containing the desired picture.
3. Select the file. LibreOffice recognizes a large number of image types. If the Preview option (in the lower left-
hand area) is selected, a thumbnail of the selected file will be displayed in the prview in below picture

Figure1: Slide with a placeholder for inserting objects

4. Click Open to place the picture on the current (selected) slide. The picture is now displayed on the slide with
green resizing handles around it.
Notice in the Insert picture dialog box the two options Link and Preview. Their position is determined by the operating
system, but they are normally in the bottom- left part of the dialog box.
Select the Link option to insert the picture as a link to the file rather than embedding the file itself. In general, it is
preferable to embed images so that the presentation can be copied to other computers; however, on some occasions it
makes sense to link the image rather than embed it. These include:
 When the image file is quite large (linking rather than embedding will dramatically reduce the size of the
presentation file)
 When the same image file is used in many presentations (for example when using the same background image
for all the presentations created)
 When the linked file will be available when loading the presentation (for example if the presentation is a slide
show of holiday pictures).
3.13.2. Inserting a picture from a scanner
Inserting an image from a scanner is normally fairly straightforward. Make sure that the scanner is supported by the
SANE system if you are running the Linux (or other UNIX-like) operating system, or TWAIN if you are using a
Windows version, and that it is already configured on the machine on which OOo is running. In case more than one
scanner or equivalent devices are present, select the source from Insert > Picture > Scan > Select Source.
20
To insert an image from the scanner:
1. Prepare the image in the scanner and make sure that the scanner is ready.
2. Choose Insert > Picture > Scan > Request.
3. The rest of the procedure depends on the scanner driver and interface. You will normally be required to specify
the resolution, a scan window and other parameters. Consult the scanner’s documentation for more information.
4. When the image is ready, Impress places it in the slide. At this point it can be edited as any other image.
3.13.3. Inserting a picture from the Gallery
The Gallery contains a collection of images that you can use in a presentation. You can also add your own images to the
Gallery, making it an essential tool for creating presentations quickly and with a consistent look. The Gallery is available
in all components of OpenOffice.org. Choose Tools > Gallery or click the Gallery icon on the Drawing toolbar.

Figure: Inserting an image from the Gallery


The Gallery displays categories of themes with images stored under each category. Select a theme from the left pane
and then scroll as necessary through the right pane to find a suitable image. Click on the image and drag it onto the
workspace.
3.13.4. Adding images to the Gallery
You can add new images to themes which you created, or to themes like My themes that can be edited:
1. Right-click on the theme name in the list of themes and choose Properties from the pop-up menu.
2. Click the Files tab, if necessary.
3. Click Add.
4. Select a file and click Open. The image is added to the theme.
3.13.5. Deleting images from the Gallery
To delete an image from a theme:
1. Right-click on the image in the Gallery window.
2. Choose Delete from the pop-up menu. A message appears, asking if you want to delete this object.
3. Click Yes.
3.13.6. Formatting pictures
This section discusses the formatting of pictures inserted with one of the methods explained in “Inserting pictures”.
Moving a picture
1. Click the picture, if necessary, to show the green resizing handles.
2. Move the pointer over the picture until the pointer changes shape. On most operating systems, the cursor
associated with moving objects is a four headed arrow, but it may also be a hand or some other symbol.
3. Click and drag the picture to the desired position.
21
4. Release the mouse button.
Resizing a picture
1. Click the picture to show the green resizing handles.
2. Position the pointer over one of the green resizing handles. The pointer changes shape giving a graphical
representation of the direction of the resizing.
3. Click and drag to resize the picture.
4. Release the mouse button when satisfied with the new size.
The corner handles resize both the width and the height of the graphic object simultaneously, while the other four handles
only resize one dimension at a time.
Rotating a picture
As with the position of the image on the page, rotation of a picture can be done manually or using a dedicated dialog
box. The Rotation dialog box is described in Chapter 6 (Formatting Graphic Objects). To rotate a picture manually, do
as follows:
1. Select the picture if necessary so that the green handles around it show.
2. Click the Rotate button on the Drawing toolbar. This toolbar is usually located at the bottom the screen, but it
can be undocked and used as a floating toolbar. If the toolbar is not showing, select View > Toolbars > Drawing.
3. Eight red circular handles replace the green square handles, as shown in Figure. Move the mouse over one of
the corner handles and the mouse cursor shape will change. Click the mouse and move in the direction in which
you want to rotate the picture.

Figure: Shape showing the red rotating handles

4. When satisfied, release the mouse button.


To restrict the rotation angles to multiples of 15 degrees, press the Shift key while rotating the graphic. This is very
handy to rotate pictures of right angles, for example from portrait to landscape or vice versa.
3.13.7. Formatting using the Picture toolbar
When a picture is selected, the Picture toolbar becomes available. This toolbar provides a number of formatting options
which are described in this section. If the picture toolbar does not appear when an image is selected, display it by
selecting View >
Toolbars > Picture from
the menu bar.

Figure: The Picture toolbar


3.13.8. Applying filters

Use the icon on the toolbar to apply various filters to the selected picture. The best way to judge if a filter works
for your picture is to try it. To apply a filter:
1. Select the image so that the green handles around it are displayed.

2. Click on the icon in the Picture toolbar. The toolbar will expand to show the icons in Figure A.

22
Figure A: The graphic filters available in Impress

3. Select the filter you wish to apply. To show the name of the filter, hover the mouse pointer over the icon and
filters available in wait for the tooltip to appear.
3.13.9. Changing the graphics mode
Use the graphics mode drop-down list in the Picture toolbar to change the mode of the image. Choose between:
Default: no changes to the graphic object.
Grayscale: the image is converted to scales of gray.
Black/White: each pixel of the image is converted to black or white depending on the brightness value.
Watermark: adjusts the brightness of the image making it suitable to be used as a watermark. For more information on
inserting watermarks in the presentation, refer to Chapter 2 (Slide Masters).
3.13.10. Adjusting the colour

Clicking the colour adjustment button on the Picture toolbar opens the colour adjustment dialog box. Use this
dialog box to modify the individual colour components of the image (red, green, blue) as well as the brightness, contrast,
and gamma of the image. If the result is not satisfactory, press Ctrl+Z to restore the default values.

Figure: The color adjustment dialog box

Increasing the gamma value of a picture makes it more suitable to be used as a background or watermark as it will
interfere less with a dark text.
Setting the object transparency:

Modify the percentage value in the Transparency box on the Picture toolbar to make the image more
transparent. Note that this is different from the transparency settings for a line or a shape (described in Chapter 5). As
with the gamma value, increasing the transparency of a picture makes the picture blend more smoothly in the
background, making the overlay text easier to read.

Adjusting the line, area and shadow settings


These settings are not very commonly used for images, with the exception of the shadow setting, which applies a shadow
to the image.
3.14. Cropping pictures
Impress provides two ways to crop a picture: interactively or using a dialog box. The interactive method is easier to use,
but the dialog box provides more precise control. You can use both methods: first cropping interactively, then using the
dialog box to fine tune the result.

23
To crop a selected picture interactively, click the Crop icon on the Picture toolbar . A set of crop marks appears
around the picture

Figure: Interactive crop marks

When you place the cursor over any of the crop marks, the cursor changes shape. Drag the mark to crop the picture.
Click outside the picture to deactivate cropping mode.
Press the Shift button while working on the crop marks to produce the following effects:
 For a corner mark, the two sides of the picture forming the corner are cropped proportionally with the picture
anchored to the opposite corner mark.
 For a side mark, both dimensions are changed proportionally with the image anchored to the opposite side mark.
Deleting a picture
1. Click on the picture, if necessary, to show the green resizing handles.
2. Press Delete.

24
Module-4
3.15. Animations
Animated slide transitions can be added between slides to give your presentation a more professional look when
you change to the next slide. However, Impress also allows you to add animations onto the slidesto create more
interest in your presentation.
An animation consists of a sequence of images or objects called frames that are displayed in succession when
the animation runs. Each frame may contain one or more objects. For example, make bullet points appear one by
one; make pictures, shapes or other objects appear singly or as a group onto a slide. Animations can be controlled
using the keyboard, mouse click, or automatically in a timed sequence.
If you want to add animations to slides in your presentation, click on Animation on the Sidebar to open the Animation
deck giving access to the various animation options as follows:
 Animation category.
 Animation effect.
 How the animation starts.
 Animation direction, duration and delay.
 Automatic preview.

3.16. Creating an animation


1. Select an object on a slide.
2. Open the Animation deck in the Sidebar {Figure 156) using one of the followingmethods:
a. Click on Animation on the Sidebar.
b. Right-click on a selected object and select Animation from the context menu.
c. Go to View > Animation on the Menu bar.
3. Click on Add Effect to add the selected object into the Animation preview box.
4. Select a category type from the options available in the Category drop down list.
5. Select an animation effect from the options available in the Effects list.
6. Select how the animation starts from the options available in the Start drop down list.
7. Select how the animation appears from the options available in the Direction drop downlist.
8. Enter a time in seconds for how long the animation lasts in the Duration box.
9. Enter a timing delay in seconds for when the animated object appears in thepresentation
in the Delay box.

Figure 156 : Animation deck on Sidebar

10. If necessary, click on Options to open the Effect Options dialog to set any effect options
required for the animation, then click OK to close the dialog.
11. If necessary, change the order of when the selected object appears in the animation using
Move up or Move Down below the Animation preview box.
12. Click on Play to preview the animation effect.
25
13. If necessary, select Automatic Preview so that each times the animation is changed,there is
a preview of the effect.
14. When you are satisfied, run the slide show to check your presentation.

3.17. Animation options


The available option on the Animation deck on the Sidebar allows you to control how an objectis animated on a
slide.
 Adds Effect - click on this tool to add a selected object to the Animation review box and add
animation effects to the object.
 Remove Effect - click on this tool to remove a selected object and its animated effects from the
Animation preview box.
 Move Up - click on this tool to move the selected object and its animation effect up theorder of
animation effects that have been applied to an object.
 Move Down - click on this icon to move the selected animation effect down the order of
animation effects that have been applied to an object.
 Category - select a category from the options available in the drop down list.
 Effect - select an animation effect from the options available in the list.
 Start - select from the drop-down list how an animation effect starts when running an
animation:
o On click - the animation stops at this effect until the next mouse click.
o With previous - the animation runs immediately.
o After previous - the animation runs as soon as the previous animation ends.
 Direction - select from the drop-down list how an animation effect appears on the slide.The
options available depend on the animation effect selected.
 Options - click this icon to open the Effect Options dialog where you can select, adjustand apply
options to the animation effect and timing.
 Duration - select the duration in seconds of the selected animation effect.
 Delay - select the delay in seconds of when the animation effect starts.
 Automatic Preview - select this option to automatically preview an animation effect when it
is applied to an object.
 Play - click on this icon to test run the animation.

Figure 157 : Effect Options dialog - Effect page

3.18. Effect Options dialog

Effect page
The Effect page (Figure 157) contains the following options:
 Direction - specifies the direction for the animation effect.
 Sound - select a sound from the drop-down list when the animation effect is run.
26
 After animation - select from the drop-down list what happens after an animation effectends.
o Don't dim - no after-effect runs.
o Dim with color- after the animation a dim color fills the shape.
o Hide after animation - hides the shape after the animation ends.
o Hide on next animation - hides the shape on the next animation.
 Dim color - select a dim color from the available color palettes.
 Text animation - select the animation mode for the text in an object:
o All at once - animates the text all at once.
o Word by word - animates the text word by word.
o Letter by letter - animates the text letter by letter.
 Delay between characters - specifies the percentage of delay between animations ofwords or letters.

3.19. Timing page


The Timing page (Figure 158) contains the following options:
 Start - displays the start property of the selected animation effect.
o On click - the animation stops at this effect until the next mouse click.
o With previous - the animation runs immediately.
o After previous - the animation runs as soon as the previous animation ends.
 Delay - specifies a delay in seconds before the effect starts.

 Speed - specifies the duration in seconds of the effect.


 Repeat - specifies whether and how to repeat the current effect. Enter the number ofrepeats,
or select from the list:
o None -the effect is not repeated.
o Until next click - the animation is repeated until the next mouse click.
o Until end of slide - the animation repeats as long as the slide is displayed.
 Rewind when done playing - specifies whether to let the animated object returns to itsstarting
state after the animation ends.
 Animate as part of click sequence - specifies whether to let the animation start in the normal
click sequence.
 Starts effect on click of - specifies whether to let the animation start when a specifiedshape is
clicked. Select the shape by its name from the drop-down list.

3.20. Text Animation page


The Text Animation page (Figure 159) contains the following options and only appears when text is selected
for animation:
 Group text - specifies how the text is animated
o As one object- the whole text object is animated.
27
oAll paragraphs at once - all text paragraphs are animated.
oBy XX level paragraphs - text for the outline level selected is animated. The options
available depend on how many outline levels there are in the animated text.
 Automatically after - specifies a delay in seconds before the text animation effectstarts.
 Animate attached shape - animates an object that contains text.
 In reverse order - text paragraphs are animated in reverse order.

3.21. Animated images


You can animate drawing objects, text objects, and graphic objects (images) on your slides to make your
presentation more interesting. LibreOffice Impress provides has a simple animationeditor where you can create
animation images (frames) by assembling objects from your slide.The animation effect is achieved by rotating
through the static frames that you create.

3.21.1. Creating animated image


 Select an object or group of objects that you want to include in your animation and go to Insert > Media>
Animated Image to open the Animation dialog (Figure160).
 Add an object or objects using one of the following methods:
o Click on Apply Object to add a single object or a group of objects to the current animation
frame.
o Click on Apply Objects individually button to
create a separate animation frame for each of the
selected objects.
 In Animation Group, select Bitmap object.
 Enter the frame (image) number in the Image Number
box for the image you want tosetup.
 In Duration specify the duration time in seconds for
displaying a frame.
 Specify the number of times a frame is displayed in the
animation sequence in LoopCount. This is called
looping.
 Repeat Steps 4 thru 6 for each image or object used for
the animated image.
 Click on Create and the animated image appears
centrally on the slide.

If the image to be copied consists of several objects, you can choose to treat each object as a separate
frame. In this case, click on Apply Objects Individually.
Remember that each object will be centered in the animation.

28
3.21.2. Animation dialog controls
 First Image - jumps to the first image in the animation sequence.
 Backwards - plays the animation backwards.
 Stop - stops playing the animation.
 Play - plays the animation.
 Last Image - jumps to the last image in the animation sequence.
 Image Number - indicates the position of the current image in the animation sequence. If you want
to view another image, enter its number or click the up and down arrows.
 Duration - enter the number of seconds to display the current image. This option is onlyavailable if
you select Bitmap object in Animation group.
 Loop Count - sets the number of times that animation will play. If you want the animation to
play continuously, select Max. This option is only available if you select Bitmap object in
Animation group.
 Apply Object - adds selected object or objects as a single image.
 Apply Objects Individually - adds an image for each selected object. If you select a grouped
object, an image is created for each object in the group.

You can also select an animation, such as an animated GIF, and click this icon toopen it for editing.
When you are finished editing the animation, click Create to insert a new animation into your slide.

 Delete Current Image - deletes the current image from the animation sequence.
 Delete All Images - deletes all images in the animation.
 Number - total number of images in the animation.
 Group object - assembles images into a single object so that they can be moved as agroup. You
can still edit individual objects by double-clicking the group in the slide.
 Bitmap object - combines images into a single image.
 Create - inserts the animation into the current slide.

3.22. Slide shows


Running a slide show
Open your presentation and start the slide show using one of the following methods:
 Use the keyboard shortcut F5 to start from the first slide or Shift+F5 to start from the current slide.
 Go to Slide Show > Start from First Slide or Start from Current Slide on the main menu bar.

Rehearse Timings:
1) Select Slide Show > Rehearse Timings on the main menu bar. The slide show starts in Full-screen mode and
a timer appears in the lower left corner of the display.
2) When you want to advance to the next slide, click on the timer to set the time duration for the displayed slide
and advance to the next slide. To keep the default time duration for a slide, click the slide and not the timer.
3) Continue until the time duration is set for all slides in the slide show. Impress records the time duration set for
each slide.
4) To exit from rehearsal timing of the slide show, press the Esc key, or click on the slide.

29
Custom Slide show:

To show the slides in a different order, you can either rearrange them in the Slides pane or
Slide Sorter view in the Workspace, or set up a custom slide show.

You can define as many custom slide shows as you require from one set of slides. In a custom slide show, you can select
which slides to include as well as the order in which they are shown.
Any hidden slides will not appear in a custom slide show.
Creating custom slide show
1) Go to Slide Show > Custom Slide Show on the main menu bar to open the Custom Slide Shows dialog.
2) Click on New and the Define Custom Slide Show dialog opens (Figure 239).
3) Type a name for the new custom slide show in the Name text box.
4) In the Existing slides list, select the slides to include in the show.
5) Click the >> button to include the slides in the Selected slides list. You can select and include several slides
at the same time. Hold down the Shift key and click the first and last slide in a group to select that group, or
hold down the Ctrl key and click on individual slides to select them.
6) If required, rearrange the slide order in the Selected slides list. Click on a slide name and drag it to a new
position in the list, then release the mouse button.
7) Click OK to save the custom slide show and return to the Custom Slide Shows dialog.
8) To activate a custom show, select it in the list in the Custom Slide Shows dialog and then select the Use
custom slide show option.
9) Click Start to test the custom slide show or click OK to close the Custom Slide Shows dialog.

Editing custom slide show


a. Go to Slide Show > Custom Slide Show on the main menu bar to open the Custom Slide Shows dialog.
b. Select the name of the custom slide show you want to edit and click on Edit and the Define Custom Slide
Show dialog opens.
c. Add slides, remove slides, change the slide order, or change the name of the custom slide show in the Define
Custom Slide Show dialog.
d. Click OK to save the custom slide show and return to the Custom Slide Shows dialog. 5) Click OK to close
the Custom Slide Shows dialog.

Copying custom slide show


 Go to Slide Show > Custom Slide Show on the main menu bar to open the Custom Slide Shows dialog.
 Select the title of the custom slide show you want to copy and click on Copy. The name of the selected
custom slide show is repeated with the word (Copy 1) added to the name.
 Select the name of the copied custom slide show and click on Edit and the Define Custom Slide Show
dialog opens.
 Change the name of the copied custom slide show in the Define Custom Slide Show dialog.
 Click OK to save the copied custom slide show and return to the Custom Slide Shows dialog.
 Click OK to close the Custom Slide Shows dialog.

30
Deleting custom slide show
 Go to Slide Show > Custom Slide Show on the main menu bar to open the Custom Slide Shows dialog.
 Select the name of the custom slide show you want to delete and click on Delete. Deletion is immediate and
no confirmation message appears.
 Click OK to close the Custom Slide Shows dialog.

3.23. Slide Show options


 Go to Slide Show > Slide Show Settings on the main menu bar to open the Slide Show Settings dialog
(Figure 235).
 Select the options you want to use for your slide show.
 Click OK to save your changes and close the Slide Show Settings dialog.

Slide Show settings


 Range – select which slides to include in the slide show.
i)All slides – includes all slides except for those slides marked Hidden. Slides are shown in the sequence they
occur in the file. To change the sequence, either rearrange the slides in the slide sorter or select the custom
slide show option.
ii) From – starts the show at the slide selected from the drop down list. For example, you might have several
slides at the beginning that describe you and your company, but when you present this show to your work
colleagues, you may want to skip that introduction.
iii) Custom slide show – shows the slides in a different sequence that you have previously set up. This setting
is not available until you have set up a custom slide show. You can set up as many different custom shows
as you wish from one set of slides and they will appear in the dropdown list for this option.
 Presentation Mode – select how the slides will be displayed.
i) Full screen – shows the slides full screen without the LibreOffice program controls visible and exits the
show after the last slide.
ii) In a window – runs the slide show in the Impress window and exits the show after the last slide.
iii) Loop and repeat after – restarts the slide show after the last slide has displayed and after the specified length
of time delay. A pause slide is displayed between the last slide and the start slide. Press the Esc key at any
time to stop the show. If zero is entered as time delay, the show restarts immediately without showing a
pause slide.
iv) Show logo – shows the LibreOffice logo on the pause slide when Loop and repeat after option is selected.
 Options – determine how the slide show runs as a presentation
i) Change slides manually – prevents slides from changing automatically even if an automatic transition has
been set up.
ii) Mouse pointer visible – shows the mouse pointer during a slide show. If you do not have a laser pointer or
other device to highlight items of interest during the show, this can be useful.
31
iii) Mouse pointer as pen – enables you to write or draw on slides during the presentation. Anything you write
with the pen is not saved when you exit the slide show. The color of the pen cannot be changed.
iv) Animations allowed – displays all frames of animated GIF files during the slide show. If this option is not
selected, only the first frame of an animated GIF file is displayed. This has nothing to do with the slide
animations described in “Animations” on
v) Change slides by clicking on background – advances to the next slide when you click on the background of
a slide. You can also press the spacebar on the keyboard to advance to the next slide.
vi) Presentation always on top – prevents any other program window from appearing on top of the presentation.
 Multiple Displays – determines how the slide show is displayed.
i) Presentation display – select from the drop down list which display to use for full screen slide show mode.
Only available if the computer being used for the slide show is connected to more than one monitor.

9. Inserting hyperlinks
1. Go to Insert > Hyperlinks on the main menu bar or use the keyboard shortcut Ctrl+K to open the
Hyperlink dialog (Figure 89).

2. On the left hand side, select the type of hyperlink you want to insert. The top right part of the dialog
changes depending on the hyperlink type. A full description of all options, and their interactions, is
beyond the scope of this chapter. A summary of the most common choices used in a presentation is given
below.
3. Create your hyperlink using the dialog, then click Apply to insert the hyperlink into your slide. The
hyperlink is inserted into a text box.
4. Click Close or OK to close the dialog.

3.24. Hyperlink types


 Internet (Figure 89) – select either Web or FTP protocol. Enter the required web address in the URL: text
box and a name for the hyperlink in the Text: text box.
 Mail (Figure 90) – enter email details in Recipient and the subject of the link in Subject.

 Document (Figure 91) – creates a hyperlink to another document or to another place in a document,
commonly referred to as a bookmark. Enter the details in the Path text box, or click on Open File to open

32
a file browser. Leave this blank if you want to link to a target in the same presentation. Optionally, you can
specify a target, for example a specific slide. Click on Target in Document to open a dialog where you can
select the target. If you know the name of the target, you can type it into the Target text box.

 New Document (Figure92) – creates a hyperlink to a new document. Select Edit now to edit the newly
created document immediately or Edit later to only create the hyperlink. Choose the type of document to
create from the File type drop down list. Click on Select path to open a file browser so that you can choose
a directory for the new document.

 The Further Settings section on the Hyperlink dialog is common to all the hyperlink types, although some
choices are more relevant to some types of links.
 Frame – set the value to determine how the hyperlink will open. This applies to documents that open in a
web browser.
 Form – specifies if the link is to be presented as text or as a button.
 Text – specifies the text that will be visible to the user.
 Name – applicable to HTML documents. It specifies text that will be added as a NAME attribute in the
HTML code behind the hyperlink.

3.24.1. Formatting hyperlinks


A hyperlink is inserted in the center of the current slide. To edit the text, the size of a hyperlink text box, or to reposition
the hyperlink on the slide:
a. Select it by dragging a selection across the text to display the text box border and selection handles. Do not
click on the hyperlink because this will open the hyperlink.
b. Right-click on the selected hyperlink and select the type of formatting you want to change from the options
available in the context menu.
c. To reposition hyperlink, click and drag on the border to move the hyperlink on the slide.
d. Select Position and Size from the context menu or press the F4 key to open the Position and Size dialog
where you can change the options to move the hyperlink or resize the text box.

33
Questions:
1. What are the steps to create animations in IMPRESS?
2. Briefly explain about animation options and settings?
3. What are the steps to create custom slide show?

Objective Questions:
1. What is the shortcut key for slideshow?
a. F6
b. F5
c. F7
d. F2
2. What is the shortcut key for current slideshow?
a. Ctrl+F5
b. Alt+F5
c. Shift+F5
d. None of the above
3. In which menu do you find Hyperlink Command?
a. Insert
b. Edit
c. Format
d. View
4. Where do you find Animation command from the below?
a. Edit
b. File
c. View
d. Format

34
1.1. Introduction to latex
LATEX (pronounced lay-tek ) is a document preparation system for producing
professional-looking documents, it is not a word processor. It is particularly suited to
producing long, structured documents, and is very good at typesetting equations. It is
available as free software for most operating systems.

LATEX is based on TEX, a typesetting system designed by Donald Knuth in 1978 for
high quality digital typesetting. TEX is a low-level language that computers can work
with, but most people would find difficult to use; so LATEX has been developed to make
it easier. The current version of LATEX is LATEX2e.

But then what is a typesetting program?

To answer this, let us look at the various stages in the preparation of a document using
computers.

1. The text is entered into the computer.


2. The input text is formatted into lines, paragraphs and pages.
3. The output text is displayed on the computer screen.
4. The final output is printed.

In most word processors all these operations are integrated into a single application
package. But a typesetting program like TEX is concerned only with the second stage
above. So to typeset a document using TEX, we type the text of the document and the
necessary formatting commands in a text editor (such as Emacs in GNU/Linux) and then
compile it. After that the document can be viewed using a previewer or printed using a
printer driver.

TEX is also a programming language, so that by learning this language, people can write
code for additional features. In fact LATEX itself is such a (large) collection of extra
features. And the collective effort is continuing, with more and more people writing extra
packages.

If you are used to producing documents with Microsoft Word, you will find that LATEX
is a very different style of working. Microsoft Word is “What You See Is What You Get”
(WYSIWYG), this means that you see how the final document will look as you are
typing. When working in this way you will probably make changes to the document's
appearance (such as line spacing, headings, page breaks) as you type. With LATEX you
do not see how the final document will look while you are typing it – this allows you to
concentrate on the content rather than appearance.

A LATEX document is a plain text le with a .tex file extension. It can be typed in a
simple text editor such as Notepad, but most people find it is easier to use a dedicated
LATEX editor. As you type you mark the document structure (title, chapters,
subheadings, lists etc.) with tags. When the document is finished you compile it – this
means converting it into another format.

Several different output formats are available, but probably the most useful is Portable
Document Format (PDF), which appears as it will be printed and can be transferred easily
between computers.

1.2. Advantages of using LaTeX


When people from the WYSIWYG world meet people who use LATEX, they often
discuss “the advantages of LATEX over a normal word processor” or the opposite. The
best thing to do when such a discussion starts is to keep a low profile, since such
discussions often get out of hand. But sometimes there is no escaping ...

So here is some ammunition. The main advantages of LATEX over normal word
processors are the following:

 Beautifully Typeset Output.


LaTeX is designed by mathematicians for producing beautifully typeset mathematics.
Not only are the equations and mathematical symbols beautifully rendered, but
LaTeX also does an exceptional job at handling visual components such as fonts,
spacing, and line breaks.
 Structured Files.
LaTeX has the author specify various elements of the document, such as title, authors,
chapter and section headings, environments for theorems and proofs, appendices, and
the bibliography.
 Management of Internal References.
Latex has outstanding features, such as, automatic numbering of equations, chapters
and sections, figures, and tables. LaTeX elegantly handles numbering and internal
referencing within a document.
 Customizable.
LaTeX has a coherent package system that makes it relatively easy for users to write
extension packages to provide additional features. Since LaTeX is so popular, there
are a very large number of such extension packages already freely available online.
This means that you will often be able to achieve special effects by finding and using
a package already in existence, instead of having to create it yourself.
 User-Friendly.
Most LaTeX programs have a very user-friendly interface. Moreover, since LaTeX
has existed for so long, there is a great deal of good documentation.
 Commonly Used.
LaTeX is most commonly used among mathematicians at the present time. This
means it is easy to share documents with others and to collaborate with co-authors.
 Easily Converted Files.
LaTeX files contain markup language that enables them to be readily converted to
other outputs (e.g., PDF or HTML), allowing you to change or share your document
more easily than if it was in another format.
 Extremely Stable
It's extremely stable, no matter how complex the documents are. Even complex
structures such as footnotes, references, table of contents, and bibliographies can be
generated easily.
 Latex Vx MS Word.
Tools like MS word or open office writer are recommended for low complexity
documents if the complexity increases at one stage it is impossible to draw some kind
of diagrams, math formulas etc but by using latex we can draw them. Here latex takes
less time when compare with open office writer or ms word. It will not crash like
word processor.
 Compatibility
It has no compatibility issues. Latex is available on windows and all UNIX systems,
including Mac and Linux. Therefore the system runs on almost any hardware
platform available.

Latex widely used in academia, scientific documents, journals and used in


many fields like mathematics, statistics, computer science, engineering, chemistry,
physics, economics, linguistics, quantitative psychology, philosophy, and political
science. It also has a prominent role in the preparation and publication of books and
articles that contain complex multilingual materials, such as Tamil, Sanskrit and
Greek

LATEX also has some disadvantages, and I guess it’s a bit difficult for me to find any
sensible ones, though I am sure other people can tell you hundreds ;-

 Although some parameters can be adjusted within a predefined document layout, the
design of a whole new layout is difficult and takes a lot of time.
 It is very hard to write unstructured and disorganized documents.

We can use different software’s like texstudio, texlive, texWroks, Lyx, TexnicCenter,
miktex, texmaker etc to product latex documents, sometimes it may depend on the
Operating system.
1.3. Detailed explanation of latex software installation
LaTeX is a markup language for describing a document. It can also be defined as a
document preparation system. LaTeX is mainly used to create technical or scientific
articles, papers, reports, books or Ph.D. thesis.

There are a number of LaTeX distributions you can install on Ubuntu. One such
distribution is TeX Live.

1. To install Tex Live LaTeX distribution on ubuntu use the following command.

sudo apt-get install texlive-full

2. To edit LaTeX documents we need an editor. There are a number of LaTeX


editors you can find. I recommend Texmaker, a cross-platform LaTeX editor. To
install Texmaker on Ubuntu use following command.

sudo apt-get install texmaker

3. To open Texmaker on Ubuntu use following command.

texmaker

4. Now let's create a simple document using Texmaker. Click on File -> New and
insert following lines in the blank document.

\documentclass{article}
\begin{document}
Hello world!
\end{document}

5. Now save the document as a 'tex' file by clicking File -> Save. Compile the
document clicking the arrow Quick Build.
1.4. Creating first latex document
The main structure of a LATEX input file is divided into two parts (Fig. 1.4) –
preamble and body. The first part is the preamble that contains the global processing
parameters for the entire document to be produced, such as the type of the document,
page formatting, header and footer setting, inclusion of LATEX packages for supporting
additional instructions, and definitions of new instructions.

The simplest preamble is \documentclass{dtype}, where dtype in {} is a


mandatory argument as the class (or type) of the document, such as letter, article, report,
or book. In the default setting, \documentclass{} prints a document on letter-size paper in
10 point fonts (1 point ≈ 0.0138 inch ≈ 0.3515mm). Different user-defined formats for a
document can be obtained through various options to \documentclass{}, in which case it
takes the form of \documentclass[fo1,fo2,...]{dtype} with fo1, fo2, etc., in [] as the
options (multiple options can be inserted in any order separating two options by a
comma), e.g., \documentclass[a4paper,11pt]{article} for printing an article on A4 paper
in 11 point fonts.

As shown in Fig. 1.4, the main body of a LATEX input file starts with
\begin{document} and ends with \end{document}. The entire contents to be printed in
the output are inserted within the body, mixed with various LATEX instructions. Any
text entered after \end{document} is simply skipped.

A simple LATEX input file and its output.


\documentclass{article}
\begin{document}
LaTeX is a macro package for typesetting documents. It is a language-based
approach, where LaTeX instructions are interspersed with the text file of a
document, say myfile.tex, for obtaining the desired output as myfile.dvi. The
myfile.dvi file can then be used to generate myfile.pdf file.
\end{document}
A Sample output of the above LATEX file

In any case, every LATEX document requires only two commands. The first of these is
\documentclass{article}, which tells LATEX that you will be creating an article. There
are other document classes, such as letter or book, but article is the default and works
well for most documents. Every LATEX command has the same syntax as
\documentclass{article}: a command begins with a backslash and any arguments it takes
are surrounded in curly braces. The \documentclass command takes a single argument,
and other commands take no arguments or more than one.

The second requirement is the two lines containing \begin{document} and


\end{document}. The first tells LATEX to begin making the document; the second tells
LATEX that the document is finished. Consequently, any text appearing between these
two lines will be incorporated into the document and any text appearing after
\end{document} will be ignored.

The space between \documentclass{article} and \begin{document} is called the preamble


or the top matter. It contains commands that modify global document parameters, such as
the typeface or the appearance of headers and footers.
1.5. Basic typesetting commands
1.5.1. Spaces
“Whitespace” characters, such as blank or tab, are treated uniformly as “space” by
LATEX. Several consecutive whitespace characters are treated as one “space”.
Whitespace at the start of a line is generally ignored, and a single line break is treated as
“whitespace”.

Example
Latex Input

Latex Output

Some more commands for spaces

Horizontal space
 \hspace{length}, \hpace*{length}  leave out given horizontal space
The \hspace command adds horizontal space. The length argument
can be expressed in any terms that LaTeX understands: points,
inches, (units of em, ex, in, pt, pc) etc. It is a rubber
length. You can add both negative and positive space with a
\hspace command; adding negative space is like backspacing.

LaTeX normally removes horizontal space that comes at the


beginning or end of a line. To preserve this space, use the
optional * form

Example
Latex Input

Latex Output
 \hfill, \hrulefill, \dotfill  fill out all available horizontal space with a line or
with dots
The \hrulefill fill command produces a “rubber length” which
can stretch or shrink horizontally. It will be filled with a
horizontal rule.

Example
Latex Input

Latex Output

The \dotfill command produces a “rubber length” that fills


with dots instead of just white space

Example
Latex Input

Latex Output

Vertical space
 \vfill  strech vertical space so that it fills all empty space
The \vfill fill command produces a rubber length (glue) which
can stretch or shrink vertically as far as needed. It’s
equivalent to \vspace{\fill} (see \hfill).
 \vspace{length}. \vspace*{length}  leave out given vertical space.
The \vspace command adds vertical space. The length of the
space can be expressed in any terms that LaTeX understands,
i.e., points, inches, etc. You can add negative as well as
positive space with an \vspace command.
LaTeX removes vertical space that comes at the end of a page
and starting of the page. If you don't want LaTeX to remove
this space, include the optional * argument. Then the space is
never removed.
Example
Latex Input

Latex Output

 \addvspace{length}  extend the vertical space until it reaches length.


The \addvspace command normally adds a vertical space of
height length. However, if vertical space has already been
added to the same point in the output by a previous \addvspace
command, then this command will not add more space than needed
to make the natural length of the total vertical space equal
to length.

Example
Latex Input

Latex Output
Below a description of available units in LATEX.

Abbreviation Value
a point is approximately 1/72.27 inch, that means about 0.0138 inch or
pt 0.3515 mm (exactly point is defined as 1/864 of American printer’s
foot that is 249/250 of English foot)
mm a millimeter
cm a centimeter
in inch
roughly the height of an 'x' (lowercase) in the current font (it depends
ex
on the font used)
roughly the width of an 'M' (uppercase) in the current font (it depends
em
on the font used)
math unit equal to 1/18 em, where em is taken from the math symbols
mu
family

1.5.2. Line Breaks


An empty line between two lines of text defines the end of a paragraph. Several empty
lines are treated the same as one empty line. The text below is an example. On the left
hand side is the text from the input file, and on the right hand side is the formatted output.

Example
Latex Input

Latex Output

Some more commands for line break


 \\  (two backslashes) start a new paragraph.
 \\*  start a new line but not a new paragraph.
 \newline  requests a new line.
 \hfill  command produces a “rubber length” which has no natural space but
can stretch or shrink horizontally as far as needed
 \linebreak & \nolinebreak  Forcing & avoiding line breaks.

1.5.3. Page Breaks


LaTeX starts new pages asynchronously, when enough material has accumulated to fill
up a page. Usually this happens automatically, but sometimes you may want to influence
the breaks

 \cleardoublepage Start a new right-hand page or start new odd numbered page.
 \clearpage Start a new page.
 \newpage Start a new page.
 \enlargethispage Enlarge the current page a bit.
 \pagebreak & \nopagebreak  Forcing & avoiding page breaks.

Example
Latex Input

Example
Latex Input

1.5.3 Special Characters (or) Reserved characters


The following characters play a special role in LaTeX and are called “reserved
characters” or “special characters”.
# $ % & ~ _ ^ \ { }

Whenever you write one of these characters into your file, LaTeX will do something
special. If you simply want the character to be printed as itself, include a \ in front of the
character. For example, \$ will produce $ in your output.
The meanings of these characters are:

 \  (backslash) starting commands, which extend until the first non-


alphanumerical character. The space following the command is swallowed. The
following line results in what expected: Ex: The \TeX nician is an expert in
\TeX{} language
 ~  (tilde) unbreakable space, use it whenever you want to leave a space which
is unbreakable, and cannot expand or shrink, as e.g. in names: A.~U.~Thor.
 $  (dollar sign) to start and finish math mode or the standard, in-line, math
mode. Ex: $Math expression here$
 _  (underscore) for subscripts in math mode.
 ^  (hat) for superscripts in math mode.
 {}  (curly brackets) to group and separate commands from its surroundings.
Must appear in pairs or highlight the beginning and the end of a command or an
environment
 %  starts a comments, everything that follow on the same line is not interpreted,
read or compiled by LATEX
 &  columns are separated using the & symbol,
 \\  the line is terminated using the \\ symbol.
 #  it is used to identification of lables

As you will see, these characters can be used in your documents all the same by using a
prefix backslash:

Example
Latex Input

Latex Output

1.5.4. LATEX Commands

 LATEX commands are case sensitive


 Some commands require a parameter, which has to be given between curly braces
{ } after the command name.
 Some commands take optional brackets [ ].

\command[optional parameter]{parameter}
The next examples use some LATEX commands. Don’t worry about them; they
will be explained later.

Some more useful commands


 \LaTeX to print LATEX
 \TeX to print TEX
 \today to print the date, today is: April 5, 2018

Example
Latex Input

Latex Output

Example
Latex Input

Latex Output

1.5.5. Comments
When LATEX encounters a % character while processing an input file, it ignores the rest
of the present line, the line break, and all whitespace at the beginning of the next line.
This can be used to write notes into the input file, which will not show up in the printed
version.

The % character can also be used to split long input lines where no whitespace or line
breaks are allowed.
For longer comments you could use the comment environment provided by the verbatim
package. Add the line \usepackage{verbatim} to the preamble of your document as
explained below to use this command.

Example
Latex Input

Latex Output

Example
Latex Input

Latex Output

1.5.6. Sectioning elements


When writing a paper, it's necessary to structure the content into logic units. To achieve
this, LaTeX offers us commands to generate section headings and number them
automatically. The commands to create section headings are straightforward:

The table has each sectioning-command in LATEX. All are available in all of LATEX’s
standard document classes book, report, and article, except that \chapter is not available
in article.
Example
Latex Input

Latex Output

1.5.7. Page styles with Headers and footers


The style of a page determines where LATEX places the components of that page, such
as headers and footers, and the text body. This includes pages in the main part of the
document but also includes special pages such as the title page of a book, a page from an
index, or the first page of an article.
The package fancyhdr is very helpful for constructing page styles. See its documentation
on CTAN.
 \maketitle  generates a separate title page
The \maketitle command generates a title on a separate title page—except in
the article class, where the title is placed at the top of the first page. Information
used to produce the title is obtained from the following declarations:

 \author{names} authors of the paper


\author{name \and name2}
The \author command declares the document author(s), where the argument is a
list of authors separated by \and commands. Use \\ to separate lines within a
single author’s entry—for example, to give the author’s institution or address.

 \date{text} date of writing


\date{text}
The \date command declares text to be the document’s date. With
no \date command, the current date (see \today) is used.

 \thanks{text} acknowledgement footnote


\thanks{text}
The \thanks command produces a \footnote to the title, usually used for credit
acknowledgements.

 \title{text} title of the paper


\title{text}
The \title command declares text to be the title of the document. Use \\ to force a
line break, as usual.

Example
Latex Input

 \pagenumbering{style} choose numbering

\pagenumbering{num_style}

Specifies the style of page numbers. Possible values of num_style are:


 arabic: Arabic numerals
 roman: Lowercase roman numerals
 Roman: Uppercase roman numerals
 alph: Lowercase letters
 Alph: Uppercase letters

Example
Latex Input

 \pagestyle{option} prescribe style from now on

\pagestyle {option}

The \pagestyle command changes the style from the current page on throughout
the remainder of your document. The valid options are:

 plain: This is the default style. The header is empty and the footer
contains page numbers in the centre
 empty: Both the header and footer are cleared (blank) in this page style.
 myheadings: The footer is empty in this page style. The header contains
the page number on right side (on even pages) or on left side (on odd
pages) along with other user-supplied information; there is an exception
for the first page of each chapter, where the footer contains centered page
number while the header is blank.
 headings: Puts running headings on each page. The document style
specifies what goes in the headings. The command \pagestyle{headings}
sets the page style called headings to the current document.
Example
Latex Input

Style customization in single-sided documents


Styles can be modified beyond the standard layouts by means of fancyhdr. Below
is an example.

To customize the footer and header in your document first import the package
fancyhdr with

\usepackage{fancyhdr}
After that, the "fancy" style is set by \pagestyle{fancy}. The command \fancyhf{}
clears the header and footer, otherwise the elements of the default "plain" page
style will appear.

Below, a description of the rest of the commands and a few more whose usage is
similar.

\rhead{Overleaf}

Prints the text included inside the braces on the right side of the header.

\lhead{Guides and tutorials}

Prints the text set inside the braces on the left side of the header.

\chead{ }

Similar to the previous commands, in this case the text is centred on the
header.

\rfoot{Page \thepage}

Prints the word "Page" and next the page number which is automatically
set by \thepage on the right side of the footer. See the reference guide for a
list of commands that automatically generate content (Section numbers,
chapters and so on).

\lfoot{ }

This prints the parameter passed inside the braces on the left side of the
footer.

\cfoot{ }

Similar to the previous two commands, prints its parameter on the centre
of the footer.

1.5.8. Footnotes
Footnotes can be produced in one of two ways. They can be produced with one
command, the \footnote command. They can also be produced with two commands, the
\footnotemark and the \footnotetext commands. See the specific command for
information on why you would use one over the other.

Adding a footnote to your document is straightforward


Example
Latex Input

1.5.8.1. Basic usage


\footnote[number]{text}
The \footnote command places the numbered footnote text at the bottom of the current
page. The optional argument, number, is used to change the default footnote number.
This command can only be used in outer paragraph mode.

Example
Latex Input

\footnote[10]{footnotes working fine}


Adds a footnote using "10" as reference mark. Unless you have a good reason to
do this, it's not recommended because the footnote counter is not altered and you
may end up with two different footnotes with the same mark.
\footnotemark
Prints a foot note mark but without the actual footnote. This is helpful to write the
actual footnote text in a new line.
\footnotetext{Second footnote}
Prints the footnote corresponding to the previous \footnotemark.
1.5.8.2. Footnotes with multiple references
We can add several references to a single footnote mark
Example
Latex Input
1.6. Font Families, Sizes and Styles
Two important aspects of selecting a font are specifying a size and a style. The LATEX
commands for doing this are described here.

1.6.1. Font styles


There are LATEX commands for a variety of font effects

Example
Latex Input

Latex Output
1.6.2. Font Sizes
The following standard type size commands are supported by LATEX. The table shows
the command name and the corresponding actual font size used (in points) with the
„10pt‟, „11pt‟, and „12pt‟ document size options, respectively

The commands as listed here are “declaration forms”. The scope of the declaration form
lasts until the next type style command or the end of the current group. You can also use
the environment form of these commands; for instance, \begin{tiny}...\end{tiny}.

Example
Latex Input

Latex Output
1.6.3. Font Families
The following commands are for use as font families

 Serif (default)  \textrm{atext} or {\rm atext}


 Sans serif  \textsf{atext} or {\sf atext}
 Typewriter  \texttt{atext} or {\tt atext}

The following commands are for use in math mode. They are not cumulative, so
\mathbf{\mathit{symbol}} does not create a boldface and italic symbol; instead, it will
just be in italics. This is because typically math symbols need consistent typographic
treatment, regardless of the surrounding environment.

 \mathrm  Roman, for use in math mode.


 \mathbf  Boldface, for use in math mode.
 \mathsf  Sans serif, for use in math mode.
 \mathtt  Typewriter, for use in math mode.
 \mathit (\mit)  Italics, for use in math mode.
 \mathnormal For use in math mode, e.g., inside another type style
declaration.
 \mathcal  Calligraphic letters, for use in math mode.

1.7. The Layout of the Document


1.7.1. Document class options
The document‟s overall class is defined with this command, which is normally the first
command in a LATEX source file.

The first information LATEX needs to know when processing an input file is the type of
document the author wants to create. This is specified with the \documentclass command.

\documentclass[options]{class}

Here class specifies the type of document to be created. Table 1.7(a) lists the document
classes explained in this introduction. The LATEX 2e distribution provides additional
classes for other documents, including letters and slides.

The options parameter customizes the behavior of the document class. The options have
to be separated by commas. The most common options for the standard document classes
are listed in Table 1.7(b)

Example: An input file for a LATEX document could start with the line

\documentclass[11pt,twoside,a4paper]{article}
which instructs LATEX to typeset the document as an article with a base font size of
eleven points, and to produce a layout suitable for double sided printing on A4 paper.

article For a journal article, a presentation, and miscellaneous general use.


book Full-length books, including chapters and possibly including front matter,
such as a preface, and back matter, such as an appendix
letter Mail, optionally including mailing labels
report For documents of length between an article and a book, such as technical
reports or theses, which may contain several chapters.
slides For slide presentations—rarely used today. In its place the beamer package is
perhaps the most prevalent
Table 1.7(a)

You can specify global options or class options to the \documentclass command by
enclosing them in square brackets. To specify more than one option, separate them with a
comma.

\documentclass[option1,option2,...]{class}

Here is the list of the standard class options.

10pt, 11pt, 12pt Sets the size of the main font in the document. If no option
is specified, 10pt is assumed.
a4paper, letterpaper, Defines the paper size. The default size is letterpaper.
a5paper, b5paper,
executivepaper,
and legalpaper
fleqn Typesets displayed formulae left-aligned instead of centred
leqno Put equation numbers on the left side of equations; default
is the right side
titlepage, notitlepage Specifies whether a new page should be started after the
document title or not. The article class does not start a new
page by default, while report and book do.
onecolumn, twocolumn Typeset in one or two columns; default is onecolumn.
twoside, oneside Selects one- or two-sided layout; default is oneside, except
that in the book class the default is twoside.
For one-sided printing, the text is centered on the page. For
two-sided printing, the \evensidemargin (\oddsidemargin)
parameter determines the distance on even (odd) numbered
pages between the left side of the page and the text‟s left
margin, with \oddsidemargin being 40% of the difference
between \paperwidth and \textwidth, and \evensidemargin
is the remainder.
landscape Selects landscape format; default is portrait
openright, openany Determines if a chapter should start on a right-hand page; default
is openright for book, and openany for report
1.8. Packages
LaTeX offers a lot of functions by default, but in some situations it can become in handy
to use so called packages. To import a package in LaTeX, you simply add the
\usepackage directive to the preamble of your document:

(A package contains a set of commands that are not built into the core of LaTeX)

If you want to include graphics, coloured text or source code of package from a file into
your document, you need first to have this package installed and then to tell LATEX
about it the preamble section using the \usepackage command

\usepackage{ mypackage}

With this command LATEX will load the package mypackage, before continuing to
process the rest of the .tex file.

Some packages do have options, that you can specify using keywords, separated by a
coma, in between [ ] before the package name

\usepackage[option1,option2,option3]{mypackage}

The Comprehensive TeX Archive Network (CTAN) is the central place for all kinds of
material around TeX and LaTeX. CTAN has currently over 4,000 packages. Most of the
packages are free and can be downloaded and used immediately.

You can browse list of TeX and LaTeX packages and class files on CTAN subpage
http://www.ctan.org/pkg/.

1.8.1. Install a package


When using Linux or Mac, most packages will already be installed by default and it is
usually not necessary to install them. In case of Ubuntu installing texlive-full from the
package manager would provide all packages available. The MiKTeX bundle in
Windows will download the package if you include it to your document.

1.8.2. Purpose of packages


There are countless packages; all for different purposes, here some of the most useful
packages. To typeset math, LaTeX offers (among others) an environment called equation.
Everything inside this environment will be printed in math mode, a special typesetting
environment for math. LaTeX also takes care of equation numbers for us:
Example
Latex Input

Latex Output

1.8.3. Using / Including a package


The automatic numbering is a useful feature, but sometimes it's necessary to remove
them for auxiliary calculations. LaTeX doesn't allow this by default, now we want to
include a package that does:

Example
Latex Input

Latex Output

1.8.4. Functionality of some important packages


1.8.4.1. amsmath
The amsmath package provides a handful of options for displaying equations.
You can choose the layout that better suits your document, even if the equations
are really long, or if you have to include several equations in the same line.
The standard LaTeX tools for equations may lack some flexibility, causing
overlapping or even trimming part of the equation when it's too long. We can
surpass these difficulties with amsmath.
Including the amsmath package
This is a simple step, if you use LaTeX frequently surely you already know this.
In the preamble of the document include the code:

\usepackage{amsmath}

Writing a single equation


To display a single equation, as mentioned in the introduction, you have to use the
equation* or equation environment, depending on whether you want the equation
to be numbered or not. Additionally, you might add a label for future reference
within the document.

Example
Latex Input

Latex Output

Displaying long equations


For equations longer than a line use the multline environment. Insert a double
backslash to set a point for the equation to be broken. The first part will be
aligned to the left and the second part will be displayed in the next line and
aligned to the right.

Again, the use of an asterisk * in the environment name determines whether the
equation is numbered or not.
Example
Latex Input
Latex Output

Aligning several equations


If there are several equations that you need to align vertically, the align
environment will do it:

Example
Latex Input

Latex Output

Usually the binary operators (>, < and =) are the ones aligned for a nice-looking
document.

As mentioned before, the ampersand character & determines where the equations
align. Let's check a more complex example:

Example
Latex Input
Latex Output

Here we arrange the equations in three columns. LaTeX assumes that each
equation consists of two parts separated by a &; also that each equation is
separated from the one before by an &.

Again, use * to toggle the equation numbering. When numbering is allowed, you
can label each row individually.

Grouping and centering equations


If you just need to display a set of consecutive equations, centered and with no
alignment whatsoever, use the gather environment. The asterisk trick to set/unset
the numbering of equations also works here.

Example
Latex Input

Latex Output

1.8.4.2. geometry
The page dimensions in a LaTeX document are highly configurable and the geometry
package offers a simple way to change the length and layout of different elements
such as the paper size, margins, footnote, header, orientation, etc.
Suppose you have to create a document in a4paper and the text shouldn't exceed 6 in
width and 8 in height. To create it with geometry is easy, include this one line in the
preamble:

\usepackage[a4paper, total={6in, 8in}]{geometry}


Paper size, orientation and margins are the most common page elements that must
be changed depending on the type of document. To set the desired values there
are two ways, either you pass them as parameters to the \includepackage
statement as in the example above, or use a \geometry command in the preamble.
For example, let's create a document with legal paper size, landscape orientation
and a 2 in margin:

\usepackage[legalpaper, landscape, margin=2in]{geometry}

You can achieve the same thing in a slightly different way:

\usepackage{geometry}
\geometry{legalpaper, landscape, margin=2in}

1.8.4.3. colours
There are several elements in LaTeX whose colour can be changed to improve the
appearance of the document. The simplest manner to use colours in your LATEX
document is by importing the package color or xcolor. Both packages provide a
common set of commands for colour manipulation, but the latter is more flexible
and supports a larger number of colour models so is the recommended approach.
Below an example:
In this example, the package xcolor is imported with

\usepackage{xcolor}

then the command \color{blue} sets the blue colour for the current block of
text. In this case for the itemize environment.

The colour of a second block of text, delimited by { and }, is set to red with the
command \color{red}, then a 0.5mm-thick horizontal ruler is inserted by
\rule{\linewidth}{0.5mm}.

The amount of available colour names depends on the driver, usually the next
colours can be used with any driver: white, black, yellow, green, blue, purple cyan
and magenta.

Example
Latex Input

Latex Output

Two new commands are also presented in the example:

\textcolor{red}{easily}
Changes the colour of inline text. Takes two parameters, the colour to use
and the text whose colour is changed. In the example the word easily is
printed in red
\colorbox{BurntOrange}{this text}
Changes the background colour of the text passed as second parameter. In
the example the words this text are printed in BurntOrange.
Creating your own colours
It is possible to define your own colours, the manner in which the colour is
defined depends on the preferred model. Below an example using the 4 colour
models typically supported by any driver.

The command \definecolor takes three parameters: the name of the new colour,
the model, and the colour definition. Roughly speaking, each number represent
how much of each colour you add to the mix that makes up the final colour.

 rgb: Red, Green, Blue. Three comma-separated values between 0 and 1


define the components of the colour.
 RGB: The same as rgb, but the numbers are integers between 0 and 255.
 cmyk: Cyan, Magenta, Yellow and blacK. Comma-separated list of four
numbers between 0 and 1 that determine the colour according to the
additive model used in most printers.
 gray: Grey scale. A single number between 0 and 1.

In the example, mypink1, mypink2 and mypink3 define the same colour but for
different models. You can actually see that the one defined by cmyk is slightly
different.
1.9. Exercise
1. Create a document with the title Hello World!, your name, and todays date. Include in
the document the following text "Hello World! Today I am learning LaTeX." The
solution should look like this (but with todays date):

Solution:

2. Add to the document you created in exercise 1 the following text:


"LaTeX is a great program for writing math. I can write in line math such as a^2 + b^2 =
c^2. I can also give equations their own space: gamma^2 +theta^2 = omega^2"
Your final document should look like this:
Solution

3. What are the benefits of Latex?


4. Explain typesetting commands Spaces (Horizontal and Vertical) with example?
5. Explain typesetting commands Line Breaks and Page Breaks with example?
6. What are the reserved characters in Latex? Procedure to include in our document? Write
about meanings of each character?
7. Write some default Latex commands?
8. Write Latex code to create a title of the document by using \maketitle command as
mentioned below document?

9. Explain about all footnote options in Latex? Write Latex code to create footnote with
automatic reference and manual reference?
10. Difference between \footnotemark and \footnotetext commands in Latex?
11. List out Latex commands for Font Styles? Write Latex code to create document with each
Font Style for the text “My Name is : XXXXX”
12. What are the Latex commands for Font Sizes?
13. Explain \documentclass command with all possible parameters of class and options
14. What is Latex package? What are the advantages of Latex package?
15. What are the functionalities of below packages?
a. amsmath
b. colours
16. What are the Sectioning elements available in Latex? Write Latex code to create a
document with Sectioning elements as mentioned below?

17. Write LaTex commands to create the following document (example 1).
18. Write the LaTex commands to format the text as given below.

19. Write the LaTex commands to format the text as given below.

20. Write the LaTex commands to format the text as given below. (Paragraph space, new
para and new line)
Packages
If you define a lot of new environments and commands, the preamble of your document will get
quite long. In this situation, it is a good idea to create a LaTeX package containing all your
command and environment definitions.

Syntax:

\usepackage{package_name}

Examples:

1. \usepackage{amsmath}
2. \usepackage{graphicx}
3. \usepackage{array}

Some list of packages reference given below.

Package name Description


Inputenc To choose the encoding of the input text. You might need it if you are
writing documents in a language other than English.
Amsmath It contains the advanced math extensions for LaTeX. The complete
documentation should be in your LaTeX distribution; the file is
called amsdoc, and can be dvi or pdf.
Amssymb It adds new symbols in to be used in math mode.
Array It extends the possibility of LaTeX to handle tables, fixing some bugs and
adding new features. Using it, you can create very complicated and
customized tables.
Graphic Allows you to insert graphic files within a document.
mhchem allows you to easily type chemical species and equations. It automatically
formats chemical species so you don't have to use subscript commands. It
also Allows you to draw chemical formulas.
Geometry For easy management of document margins and the document page size
wrapfig Allows figures or tables to have text wrapped around them
Enumitem Adds support for arbitrarily-deep nested lists (useful for outlines)
Color The color package provides both foreground (text, rules, etc.) and back-
ground colour management; it uses the device driver configuration mecha-
nisms of the graphics package to determine how to control its ouptut.
Multirow Create tabular cells spanning multiple rows
Tabu Flexible LATEX tabulars
chemfig Draw molecules with easy syntax
Example:
Blindtext – Producing 'blind' text for testing
The package provides the commands \blindtext and \Blindtext for creating ‘blind’ text useful in
testing new classes and packages, and \blinddocument, \Blinddocument for creating an entire
random document with sections, lists, mathematics, etc.
The package supports three languages, english, (n)german and latin; the latin option provides a
short “lorem ipsum” (for a fuller lorem ipsum text, see the lipsum package).
Input:

Output:
Lists
Lists are basic elements in a document, when used correctly they keep concepts organized and
structured. From this topic, we can learn how to create and modify numbered and unnumbered
lists in LATEX; it is pretty straightforward and doesn't require you do add any additional
packages. For unordered lists, LaTeX provides the itemize environment and for ordered lists
there is the enumerate environment. The elements within both environments have to be
declared beginning with the \item command. The following code examples show how to use the
most common types of lists you're going to use in your document.

Unordered lists:
The unordered (unnumbered) lists are produced by the itemize environment. Each entry must
be preceded by the control sequence \item.

Ordered lists:
If you want to add an ordered list, you simply have to replace itemize with enumerated
environment and LaTeX will take care of the enumeration for you. Ordered list have the same
syntax inside a different environment:
Nested Lists:
Sometimes you also have to list things, which have some kind of sub-category. For this reason,
LaTeX allows you to nest list environments and it will fix the indentation and numbering
accordingly. In LATEX you can insert a list inside another list. The above lists may be included
within one another, either mixed or of one type, to a depth of four levels.
Example 1: It includes ordered list
Example 2: It contains ordered and unordered lists
List styles
As many other LATEX elements, unordered and ordered list styles can be personalized.

Ordered lists
The numbering styles change depending on the depth of the nested lists:

The default numbering scheme is:


Arabic number (1, 2, 3, ...) for Level 1
Lowercase letter (a, b, c, ...) for Level 2
Lowercase Roman numeral (i, ii, iii, ...) for Level 3
Uppercase letter (A, B, C, ...) for Level 4.
These numbers can be changed by redefining the commands that typeset the numbers of various
list levels. For example:
Input:

Output:

The command \renewcommand{\labelenumii}{\Roman{enumii}} changes the second level to


upper case Roman numeral. It is possible to change the labels of any level,
replace labelenumii for one of the listed below.
\theenumi for Level 1
\theenumii for Level 2
\theenumiii for Level 3
\theenumiv for Level 4
The command must be placed in the preamble to change the labels globally or right
before \begin{enumerate} to change labels only in this list. In numbered lists the counter is
incremented by \item before it is printed, and starts from 1, a, i, A, I. This can be changed:
Input:

Output:

To change the start number or letter you must use the \setcounter command. In the example, to
change the start number of level 2 to V the command \setcounter{enumii}{4} was used.
To set the start number to any other counter change enumii for any of these:
 enumi for Level 1
 enumii for Level 2
 enumiii for Level 3
 enumiv for Level 4
Unordered lists:
The label scheme of unordered lists also changes depending on the depth of the nested list:
Input:

Output:

The default label scheme for itemized lists is:

 Level 1 is \textbullet (•),


 Level 2 is \textendash (–) ,
 Level 3 is \textasteriskcentered (*)
 Level 4 is \textperiodcentered (·).

These labels can be changed by redefining the commands that typeset them for various list
levels. For example, to change Level 1 to black square and Level 2 to White Square we'll use:

Input:
Output:

The mathematical symbols used in the previous example belong to the amssymb package, so
you have to add \usepackage{amssymb} to your preamble.
“enumitem” package provides user control over the layout of the three basic list environments:
enumerate, itemize and description. It supersedes both enumerate and mdwlist (providing well-
structured replacements for all their functionality), and in addition provides functions to
compute the layout of labels, and to ‘clone’ the standard environments, to create new
environments with counters of their own.
To redefine the label use one of the next commands, depending on the level of list mark you
intend to change:

 labelitemi for Level 1


 labelitemii for Level 2
 labelitemiii for Level 3
 labelitemiv for Level 4
Sometimes it's necessary to change the numbering scheme of a list, e.g. you want to use a
different symbol and so forth. You can easily modify the output of the list.
Unordered lists
You can make the following changes easily without loading a package:
%from bullet to dash
\item [--] or \item[$-$]

%from bullet to asterisk


\item[$\ast$]

%use any math character


\item[$\CHARACTER$]

A full working code could look like this:

Output:

If you want to change the symbol for all items of the list, you should preferably use the
enumitem environment, which I will explain using the example of ordered lists.

Ordered lists
Changing this environment is a little more tricky, because there's a lot more logic involved and
the easiest solution is probably using the enumerate or enumitem environments. I will use the
enumerate environment for this purpose. So I will first add this environment to my preamble:
\documentclass{article}
% ...

\usepackage{enumitem}

\begin{document}
We can now use the following options on the enumerate environment:

%Roman numbers
\begin{enumerate}[label=(\roman*)]
%...

% Arabic numbers
\begin{enumerate}[label=\arabic*)]
%...

% Alphabetical
\begin{enumerate}[label=\alph*)]
%...

You can likewise use this to change the symbol of unordered lists:
Input:

Output:

Summary
 Unordered lists can be created using the itemize environment.
 Ordered lists can be created using the enumerate environment.
 Lists can be nested and will be aligned and enumerated properly.
 Use the enumitem package to customize the symbols or enumeration.
LaTeX Tables
Module-I
Tables are a common feature in academic writing, often used to summarize
research results. Mastering the art of table construction in LaTeX is therefore
necessary to produce quality papers and with sufficient practice one can print
beautiful tables of any kind.

Keeping in mind that LaTeX is not a spreadsheet, it makes sense to use a dedicated
tool to build tables and then to export these tables into the document. Basic
tables are not too taxing, but anything more advanced can take a fair bit of
construction; in these cases, more advanced packages can be very useful.
However, first it is important to know the basics. Once you are comfortable with
basic LaTeX tables, you might have a look at more advanced packages or the
export options of your favourite spreadsheet. Thanks to the modular nature of
LaTeX, the whole process can be automated in a fairly comfortable way.

For a long time, LaTeX tables were quite a chaotic topic, with dozens of packages
doing similar things, while not always being compatible with one another.
Sometimes you had to make trade-offs. The situation changed 2010 with the
release of the tabu package which combines the power of longtable, tabularx and
much more. The tabu environment is far less fragile and restricted than the older
alternatives. Nonetheless, before attempting to use this package for the first time
it will be beneficial to understand how the classic environment works, since tabu
works the same way. Note however that the authors of tabu will not fix bugs to
the current version, and that the next version introduces new syntax that will
likely break existing documents.

The tabular environment:


The tabular environment can be used to typeset tables with optional horizontal
and vertical lines. LaTeX determines the width of the columns automatically.

The first line of the environment has the form:

The table spec argument tells LaTeX the alignment to be used in each column and
the vertical lines to insert.
The number of columns does not need to be specified as it is inferred by looking at
the number of arguments provided. It is also possible to add vertical lines between
the columns here. The following symbols are available to describe the table
columns (some of them require that the package array has been loaded):

By default, if the text in a column is too wide for the page, LaTeX won’t
automatically wrap it. Using p{'width'} you can define a special type of column
which will wrap-around the text as in a normal paragraph. You can pass the width
using any unit supported by LaTeX, such as 'pt' and 'cm', or command lengths,
such as \textwidth. You can find a list in chapter Lengths.

The optional parameter pos can be used to specify the vertical position of the
table relative to the baseline of the surrounding text. In most cases, you will not
need this option. It becomes relevant only if your table is not in a paragraph of its
own. You can use the following letters:

To specify a font format (such as bold, italic, etc.) for an entire column, you can
add >{\format} before you declare the alignment. For example
begin{tabular}{ >{\bfseries}l c >{\itshape}r } will indicate a three
column table with the first one aligned to the left and in bold font, the second one
aligned in the center and with normal font, and the third aligned to the right and
in italic. The "array" package needs to be activated in the preamble for this to
work.
In the first line you have pointed out how many columns you want, their
alignment and the vertical lines to separate them. Once in the environment, you
have to introduce the text you want, separating between cells and introducing
new lines. The commands you have to use are the following:

Note; any white space inserted between these commands is purely down to one's
preferences. It is better to add spaces between to make it easier to read.

Basic solved examples:


This example shows how to create a simple table in LaTeX. It is a three-by-three
table, but without any lines.

Expanding upon that by including some vertical lines:


To add horizontal lines to the very top and bottom edges of the table:

And finally, to add lines between all rows, as well as centering (notice the use of
the center environment)
Module-II
Tables with fixed length:
When formatting a table you might require a fixed length either for each column
or for the entire table. In the example below a fixed column width is established.

First, to use the parameters shown in the example, you must import the package
array in the preamble of your LATEX file with the next command

\usepackage{array}

In the tabular environment, the parameter m{5em} sets a length of 5em for first
column (1cm for the other two) and centres the text in the middle of the cell. The
aligning options are m for middle, p for top and b for bottom. In standard tables
new lines must be inserted manually so the table won't stretch out of the text
area, when using these parameters the text is automatically formatted to fit inside
each cell.

If you don't need to control the width of each cell, but of the entire table and then
distribute the space within evenly, use the package tabularx. See the example
below:

The environment tabularx is similar to tabular but more flexible, it's available after
adding the line \usepackage{tabularx} to the preamble. Notice that the
environment opening statement is different, in the example the table width is set
to 0.8 the width of the text. You can use any of the LATEX units for such length.

The prefix inside braces | >{\raggedright\arraybackslash}X | >{\centering\arraybackslash}X |


>{\raggedleft\arraybackslash}X | sets the alignment of each column: the first one to left,
the second one to center and the third one to right.

Combining rows and columns:


Rows and columns can be combined in a bigger cell. The example below is an
example of the \multicolumn command to combine columns.
To combine rows the package multirow must be imported with

\usepackage{multirow} in your preamble, then you can use the \multirow


command in your document:
Insert an image in LaTeX
Adding a figure or picture
Learn how to insert images and caption them. Examples for a single figure, and
multiple figures next to each other, using the subfigure environment.
From time to time, it’s necessary to add pictures to your documents. Using
LaTeX all pictures will be indexed automatically and tagged with successive
numbers when using the figure environment and the graphicx package.
Example: 1

The code above will create the following pdf:

The figure environment takes care of the numbering and positioning of the
image within the document. In order to include a figure, you must use the
\includegraphics command. It takes the image width as an option in brackets
and the path to your image file. As you can see, \linewidth given into the
brackets, which means the picture, will be scaled to fit the width of the
document. As a result smaller pictures are upscaled and larger pictures
downscaled respectively. As I mentioned before the brackets contain the path
to the image. In this case the image is stored in the same directory as my .tex
file, so I simply put hill.jpg here to include it. For large documents, you
probably want to store image files in a different folder, say we created a folder
images, then we would simply write images/hill.jpg into the braces. In the next
command we set a \caption, which is the text shown below the image and a
\label which is invisible, but useful if we want to refer to our figure in our
document. You can use the \ref command to refer to the figure (marked by
label) in your text and it will then be replaced by the correct number. LaTeX is
smart enough to retrieve the correct numbers for all your images
automatically. Note that you will need to include the graphicx package in order
to use this code.
Image positioning / setting the float
At some point, you will notice that the figure doesn't necessarily show up in
the exact place as you put your code in the .tex file. If your document contains
a lot of text, it's possible that LaTeX will put the picture on the next page, or
any other page where it finds sufficient space. To prevent this behaviour, it's
necessary to set the float value for the figure environment.
Setting the float by adding [h!] behind the figure environment \begin tag will
force the figure to be shown at the location in the document. Possible values
are:
h (here) - same location
t (top) - top of page
b (bottom) - bottom of page
p (page) - on an extra page
! (override) - will force the specified location
However, we have only used the [h!] option so far. The float package
(\usepackage{float}) allows setting the option to [H], which is even stricter,
than [h!].
Multiple images / subfigures in LaTeX
Sometimes when writing a document, adding single images is not optimal,
especially when the reader is supposed to compare several results or graphs.
In such situations, it might be necessary to use a different environment, called
subfigure. The subfigure environment allows you to place multiple images at a
certain location next to each other and the usage is pretty straightforward.

First you need to add the subcaption package to your preamble; next, you
need to add multiple subfigure environments within a figure environment.

Example:
The code above will create the following pdf:

If you look closely, you will see that I've set the width of the image manually:

\begin{subfigure}[b]{0.4\linewidth}

And even though there are two images aligned next to each other, their widths
are both set to 0.4, yet they fill up the whole space. You should always set this
value to .1 less than you expect. If you want to align three images next to each
other, you should consecutively add three subfigures, each with a
0.2\linewidth. I suggest, if you need some other arrangement, you simply play
around with the width factor until you are satisfied with the result. A more
elaborate example with multiple rows and columns could look like this:

Summary:
Use the graphicx package and figure environment to embed pictures
Pictures will be numbered automatically
Change the width of your image by using \includegraphics[width=\linewidth]{}
Refer to pictures in your document by setting a \label and using the \ref tag
Set the position of your image by adding a float option such as [h!]
If you want to show multiple figures next to each other, use the subcaption
package and the subfigure environment
Unsolved Problem set:
1. How to insert an image using graphicspath?
2. Write LaTeX commands to change image size and rotate a picture?
3. How can we create high resolutions and low resolutions pictures?
Multiple choice questions:
1. ______package is required to include or insert an image to LaTeX
document.
a) Amsmath
b) Inputenc
c) Geometry
d) Graphicx
2. _______environment is necessary to add a picture to LaTex document
a) {figure}
b) {itemize}
c) {enumerate}
d) {sanserif}
3. _______environment and package support to create a LaTeX document
with multiple pictures inserted in it?
a) Figure and graphicx
b) itemize and asymb
c) subfigure and subcaption
d) None
Unit-3
One of the greatest strengths of LATEX is its ability to typeset formulas and equations. To make
it easier to enter mathematical text, LATEX has defined several hundred Greek symbols,
mathematical symbols, delimiters, and operators. These are listed in Appendix A of this memo.
LATEX has several modes for setting math text, which are described below. When
inmath mode, LATEX sets type differently than when in text mode.

LaTeX provides a feature of special editing tool for scientific tool for math equations in LaTeX.
In this Unit, you will learn how to write basic equations and constructs in LaTeX, about aligning
equations, stretchable horizontal lines, operators and delimiters, fractions and binomials,
matrices, summations, limitations and integrations.

If your mathematical expressions are particularly complex or sophisticated, you may want
to look at AMS-LATEX, a collection of packages that provides extensions to LATEX‟s
mathematical capabilities. The amssymb package provides additional mathematical symbols;
the amsmath package provides additional environments for building mathematical
expressions

3.1. Mathematical Modes:


LaTeX has three basic modes: a text mode, used for typesetting ordinary text, and two
types of math modes, an ordinary math mode for math formulas set "in-line", and a
display math mode, used for displayed math formulas with separate line.

At any given point during the processing of a document, LaTeX is in one of those three
modes. The behavior of LaTeX depends on the mode it's in. For example, certain
characters (like the underline or caret symbols) are only allowed in a math mode.

3.1.1. Text mode. This is the normal, or default, mode of LaTeX. LaTeX stays in that
mode unless it encounters a special instruction that causes it to switch to one of the math
modes, and it returns to text mode following a corresponding instruction that indicates the
end of math mode.

Example:

Latex Input:
Latex Output:

Some special characters (like the underline or caret symbols) are not allowed in a text
mode.

Example:

Latex Input:

Latex Output:
You will get error like

To overcome this we have to follow math mode only to create document in latex.

3.1.2. In-line Math mode. The Inline math environment is used to typeset short
formulas in the running text. Such formulas are called in-line formulas. LATEX‟s in-line
math environment allows you to place mathematical formulas in the midst of ordinary
text.

Enables you to write formulas as a part of the text. The following paragraph is typical of
the use of in-line math.

It can be achieved in the following 3 ways.

 Math Environment
\begin{math}

....

\end{math}
 LaTeX Shorthand - \( ... \)
 TeX Shorthand - $ ... $

Example:

Latex Input:

3.1.3. Display Math Mode (for unnumbered equations): It is used to typeset


longer formulas. It is better to have long formulas or equations displayed, that is,
indented and with whitespace above and below to the paragraph.

Enables you to write formulas that are not a part of the text/paragraph, thus on a separate
line. The next paragraph illustrates the solution to the quadratic equation:

It can be achieved in the following 3 ways

 Displaymath Environment

\begin{displaymath}

....

\end{displaymath}

 LaTeX Shorthand - \[ ... \]


 TeX Shorthand - $$ ... $$

Example:

Latex Input:

There are a few ways to enter math mode, however the most common is $....$, where the
text within the dollar signs is in the math mode environment. You have already been
using math mode unknowingly by using the \begin{equation} and \end{equation}
commands.

3.2. Basic Mathematical Operators


3.2.1. Arithmetic operations: The plus (+), minus (-), division (/) symbols have the
usual meaning. To denote multiplication explicitly (this is rarely necessary), use \cdot
(producing a centered dot) or \times (producing as "x"). To denote division \div
(producing as ÷)
Example:
Latex Input:

Latex Output:

3.2.2. Comparison or Relational operations: The "equal", "less than", and


"greater than" symbols on the keyboard work as expected; to get "less than or equal", use
"\le"; similarly, "\ge" gives "greater than or equal" and “\ne” gives “not equal”.

Latex Input:
Latex Output:

3.2.3. Square Root: The \sqrt command creates a square root sign for its mandatory
argument. An optional argument for the radicand allows you to construct cube roots, nth
roots, etc.

\sqrt[root]{arg}

Note that the first argument is in brackets[ ]; it’s an optional


argument

The sign automatically grows to fit the argument, as these examples show

Latex Input:

Latex Output:
3.2.4. Superscripts and Subscripts: In math mode, the symbols „^‟ and „_‟ are
used to make superscripts and subscripts. If more than one character is to be used as a
superscript or subscript, enclose the characters in braces.

Latex Input:

Latex Output:

3.2.4. Fractions and Binomial coefficients: The „/‟ can be used to make simple
fractions, but the \frac command is used for most fractions; its two arguments are the
numerator and denominator. Two variations of a fraction are provided by the plain TEX
commands \atop and \choose.

Syntax for Fractions: \frac{numerator}{denominator}

Syntax for Binomial: \binom{numerator}{denominator}

Example:
Latex Input:
Latex Output:

3.2.5. Summations, Products and Integrals:


The symbols for summations, Products and integrals are \sum, \prod and \int,
respectively. These are examples of "large" operators, and their sizes are adjusted by TeX
automatically, depending on the context (e.g., inline vs. display math). Note that the
symbol generated by \sum is very different from the "cap-Sigma" symbol, \Sigma; TeX
uses a simple, but effective scheme to typeset summation, products, integration and limits
also: Namely, lower and upper limits are specified as subscripts and superscripts to \sum,
\prod and \int.

Example on Summations:
Latex Input:

Latex Output:

For example, $\sum_{n=1}^n \frac{n(n+1)}{2}$. (Note that the "lower limit" "n=1" here
must be enclosed in braces.)

Example on Integrals:
Latex Input:
Latex Output:

Example on Products:
Latex Input:

Latex Output:

3.2.6. Limits: The "subscript" trick works also for limits; "\lim" produces the "lim"
symbol, and the expression underneath this symbol (for example, "x tends to infinity") is
typeset as a subscript to \lim: $\lim_{x\to\infty}f(x)=0$. Here "\to" produces the arrow,
and "\infty" (note the abbreviation - \infinity does not work!) produces the "infinity"
symbol. "\limsup" and "\liminf" work similarly, as do "\sup" and "\inf" (for supremum
and infinimum), and "\max" and "\min" (for maximum and minimum). For example,
$\max_{0\le x\le 1}x(1-x)=1/4$.
Example on Limits:
Latex Input:

Latex Output:

3.2.7. Matrices:
The amsmath package provides you with a matrix environment.

Example on Limits:
Latex Input:

Latex Output:

The matrix elements are separated by &; the rows are separated by \\. The basic form
gives no parentheses; for parentheses, use the pmatrix environment; for brackets, the
bmatrix environment; for vertical lines (determinants, for example), the vmatrix
environment; for double vertical lines, the Vmatrix environment.

The environments pmatrix, bmatrix, Bmatrix, vmatrix, and Vmatrix have (respectively) (
), [ ], { }, | |and || || delimiters built in.

Different types of Matrix Environments with examples:

Latex Input:
Latex Output:

3.3. Alphabets and Digits and More on Math Symbols


3.3.1. Greek letters: The commands for Greek letters are easy and intuitive: Just type
$\epsilon$, $\delta$, $\nu$, $\phi$, etc. To get upper case versions of these letters,
capitalize the appropriate command; e.g., $\Delta$ gives a "cap-Delta" (which looks like
a triangle).

3.3.2. Special characters: The most common notation for the reals, rationals, and
integers involves the so-called "blackboard bold" font; to get these symbols use
\mathbb{...} (in math mode): $\mathbb{R}$, $\mathbb{Q}$, $\mathbb{Z}$. Similarly
\mathcal{...} produces a symbol in "script" or "caligraph" font, often used to denote sets:
For example, $\mathcal{A}$ generates "script A".

3.3.3. Brackets and Parentheses or Delimiters: Parentheses and brackets are


very common in mathematical formulas. You can easily control the size and style of
brackets in LaTeX;

Here's how to type some common math braces and parentheses in LaTeX:
The symbol pairs (), [], and \{ \} (note the backslash!) generate round, square, and curly
parentheses in normal size. They work fine in math mode, but mathematical expressions
often look better if the parentheses are enlarged to match the size of the expression. There
are ways to manually enlarge these parentheses (by preceding the symbol with a
command like \big, \bigg, \Big, etc.),

Since mathematical expressions often vary in height, you sometimes need brackets of
varying heights. You can specify a bracket by labelling the left bracket and the right
bracket, then LaTeX will find the height of the expression enclosed by those brackets and
adjust the heights of the brackets accordingly. You specify the brackets by using the
commands \left and \right. Here is an example:
Latex Input:

Latex Output:

3.4. Displayed equations


3.4.1. Single line displays: To get a single line, displayed equation (without
equation number), just use the pair "\[", "\]". If you want TeX to automatically number
the equation, use instead the \begin{equation} ... \end{equation} environment. (The
asterisk variant, \begin{equation*} ... \end{equation*}, turns off the equation numbering,
and is equivalent to typing \[ ... \].)

Latex Input:
Latex Output:

3.4.2. Multi-line equation environments: Things get more complicated if you


have multiline equations that need to be lined up at suitable places. For most situations,
the \begin{align} ... \end{align} environment, and its variant \begin{align*} ...
\end{align*}, are sufficient. As with the equation environment, the asterisk version does
not automatically number equations. The use of align is best illustrated with an example:

Latex Input:

Latex Output:

Here a double backslash (\\) is used to separate the lines, and an ampersand symbol (&) is
used to indicate the place at which the formulas should be aligned. You can include more
than one ampersand symbol per line to specify alignment at multiple columns, but the
number of alignment symbols must be the same for each line of the display. Multiple
alignments are rarely needed; in almost all cases a single alignment symbol, usually
placed right before an equality (or inequality) sign, is enough.

Some more examples for Multiline equations and equation groups


Latex Input:

Latex Output:

3.5. Spacing in math mode


In a math environment, LaTeX ignores the spaces. When typesetting mathematics,
LaTeX puts in spacing according to the normal rules for mathematics texts. If you enter
y=m x then LaTeX ignores the space and in the output the m is next to the x, as y=mx. If
you want different spacing, LaTeX provides the following four commands for use in
math mode:

 \; a thick space
 \: a medium space
 \, a thin space
 \! a negative thin space

In addition, you can make a larger space (about the width of an “M”) with the command
\quad. The command \qquad provides twice as much space.
3.6. Exercises
1. Explain Types of Math modes with examples
2. Create your own LaTeX document with all arithmetic operators
3. Create your own LaTeX document with relational operators
4. What is the command for square root? Write your own mathematical expression with nth
root and as well as default root?
5. What are the command for summation, limits, products and integration? Create your own
LaTeX document with "inline" formula (enclosed in a pair of single dollar signs), then as
a displayed formula (enclosed in a pair \[, \]).
6. How to create Matrix? What are the different types of Matrix Environments? Explain
each Matrix Environment with example?
7. Explain how to format the following formulas.

8. Compare the following commands.

9. Create a LATEX document that formats the text shown below


10. Explain how to format the following formula

11. Explain how you can format the following formula.

12. Explain how to format the following formulas.

13. Explain how to format the following formulas


Short Math Guide for LATEX

Michael Downes, updated by Barbara Beeton


American Mathematical Society

Version 2.0 (2017/12/22), currently available from a link at


https://www.ams.org/tex/amslatex

Contents

1 Introduction 3

2 Inline math formulas and displayed equations 3


2.1 The fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Automatic numbering and cross-referencing . . . . . . . . . . . . . . . . . . 5

3 Math symbols and math fonts 6


3.1 Classes of math symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.2 Some symbols intentionally omitted here . . . . . . . . . . . . . . . . . . . . 6
3.3 Alphabets and digits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.3.1 Latin letters and Arabic numerals . . . . . . . . . . . . . . . . . . . 7
3.3.2 Greek letters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.3.3 Other “basic” alphabetic symbols . . . . . . . . . . . . . . . . . . . . 8
3.3.4 Math font switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.3.5 Blackboard Bold letters (msbm; no lowercase) . . . . . . . . . . . . . 9
3.3.6 Calligraphic letters (cmsy; no lowercase) . . . . . . . . . . . . . . . . 9
3.3.7 Non-CM calligraphic and script letters . . . . . . . . . . . . . . . . . 9
3.3.8 Fraktur letters (eufm) . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.4 Miscellaneous simple symbols . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.5 Binary operator symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.6 Relation symbols: < = >  ∼ and variants . . . . . . . . . . . . . . . . . . 10
3.7 Relation symbols: arrows . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.8 Relation symbols: miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . 11
3.9 Cumulative (variable-size) operators . . . . . . . . . . . . . . . . . . . . . . 12
3.10 Punctuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.11 Pairing delimiters (extensible) . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.12 Nonpairing extensible symbols . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.13 Extensible vertical arrows . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.14 Math accents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.15 Named operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4 Notations 13
4.1 Top and bottom embellishments . . . . . . . . . . . . . . . . . . . . . . . . 13
4.2 Extensible arrows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.3 Affixing symbols to other symbols . . . . . . . . . . . . . . . . . . . . . . . 14
4.4 Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.5 Math spacing commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.6 Dots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.7 Nonbreaking dashes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.8 Roots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.9 Boxed formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

1
Short Math Guide for LATEX, version 2.0 (2017/12/22) 2

5 Fractions and related constructions 16


5.1 The \frac, \dfrac, and \tfrac commands . . . . . . . . . . . . . . . . . . 16
5.2 The \binom, \dbinom, and \tbinom commands . . . . . . . . . . . . . . . . 16
5.3 The \genfrac command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.4 Continued fractions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

6 Delimiters 17
6.1 Delimiter sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
6.2 Vertical bar notations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

7 The \text command 18


7.1 \mod and its relatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

8 Integrals and sums 18


8.1 Altering the placement of limits . . . . . . . . . . . . . . . . . . . . . . . . . 18
8.2 Multiple integral signs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
8.3 Multiline subscripts and superscripts . . . . . . . . . . . . . . . . . . . . . . 19
8.4 The \sideset command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

9 Changing the size of elements in a formula 19

10 Other packages of interest 20

11 Other documentation of interest 21

Acknowledgments and plans for future work


Thanks to all who contributed suggestions, assistance and encouragement. Special thanks
to David Carlisle for repairing unruly macros and to Jennifer Wright-Sharp for applying
consistent editing in AMS style.
Plans for a future edition include addition of an index.
Reports concerning errors and suggestions for improvement should be sent to
tech-support@ams.org .
Short Math Guide for LATEX, version 2.0 (2017/12/22) 3

1. Introduction
This is a concise summary of recommended features in LATEX and a couple of extension
packages for writing math formulas. Readers needing greater depth of detail are referred
to the sources listed in the bibliography, especially [Lam], [AMUG], and [LFG]. A certain
amount of familiarity with standard LATEX terminology is assumed; if your memory needs
refreshing on the LATEX meaning of command, optional argument, environment, package,
and so forth, see [Lam].
Most of the features described here are available to you if you use LATEX with two ex-
tension packages published by the American Mathematical Society: amssymb and amsmath.
Thus, the source file for this document begins with
\documentclass{article}
\usepackage{amssymb,amsmath}
The amssymb package might be omissible for documents whose math symbol usage is rela-
tively modest; in Section 3, the symbols that require amssymb are marked with a or b (font
msam or msbm). In Section 3.3, a few additional fonts are included; the necessary packages
are identified there.
Many noteworthy features found in other packages are not covered here; see Section 10.
Regarding math symbols, please note especially that the list given here is not intended to be
comprehensive, but to illustrate such symbols as users will normally find already present in
their LATEX system and usable without installing any additional fonts or doing other setup
work.
If you have a need for a symbol not shown here, you will probably want to consult The
Comprehensive LATEX Symbol List [CLSL]. If your LATEX installation is based on TEX Live,
and includes documentation, the list can also be accessed by typing texdoc comprehensive
at a system prompt.

2. Inline math formulas and displayed equations


2.1. The fundamentals. Entering and leaving math mode in LATEX is normally done
with the following commands and environments.
inline formulas displayed equations

$ ... $ \[...\] unnumbered


\( . . . \)
\begin{equation*} unnumbered
...
\end{equation*}
\begin{equation} automatically
... numbered
\end{equation}
Note 1. Do not leave a blank line between text and a displayed equation. This allows a page break at that
location, which is bad style. It also causes the spacing between text and display to be incorrect, usually
larger than it should be. If a visual break is desired in the input, insert a line containing only a % at the
beginning. Leave a blank line between a display and following text only if a new paragraph is intended.

Note 2. Do not group multiple display structures in the input (\[...\], equation, etc.). Instead, use a
multiline structure with substructures (split, aligned, etc.) as appropriate.

Note 3. The alternative environments \begin{math} . . . \end{math} and


\begin{displaymath} . . . \end{displaymath} are seldom needed in practice. Using the plain TEX notation
$$ . . . $$ for displayed equations is strongly discouraged. Although it is not expressly forbidden in LATEX,
it is not documented anywhere in the LATEX book as being part of the LATEX command set, and it interferes
with the proper operation of various features such as the fleqn option.

Note 4. The eqnarray and eqnarray* environments described in [Lam] are strongly discouraged because
they produce inconsistent spacing of the equal signs and make no attempt to prevent overprinting of the
equation body by the equation number.

Environments for handling equation groups and multiline equations are shown in Table 1.
Short Math Guide for LATEX, version 2.0 (2017/12/22) 4

Table 1: Multiline equations and equation groups


(vertical lines indicate nominal margins).

\begin{equation}\label{xx}
\begin{split}
a& =b+c-d\\ a=b+c−d
& \quad +e-f\\ +e−f
(1.1)
& =g+h\\ =g+h
& =i =i
\end{split}
\end{equation}
\begin{multline}
a+b+c+d+e+f\\ a+b+c+d+e+f
+i+j+k+l+m+n\\ +i+j+k+l+m+n
+o+p+q+r+s + o + p + q + r + s (1.2)
\end{multline}
\begin{gather}
a_1=b_1+c_1\\ a1 = b1 + c1 (1.3)
a_2=b_2+c_2-d_2+e_2 a2 = b2 + c2 − d2 + e2 (1.4)
\end{gather}
\begin{align}
a_1& =b_1+c_1\\ a1 = b1 + c1 (1.5)
a_2& =b_2+c_2-d_2+e_2 a2 = b2 + c2 − d2 + e2 (1.6)
\end{align}
\begin{align}
a_{11}& =b_{11}&
a_{12}& =b_{12}\\ a11 = b11 a12 = b12 (1.7)
a_{21}& =b_{21}& a21 = b21 a22 = b22 + c22 (1.8)
a_{22}& =b_{22}+c_{22}
\end{align}
\begin{alignat}{2}
a_1& =b_1+c_1& &+e_1-f_1\\ a1 = b1 + c1 + e1 − f1 (1.9)
a_2& =b_2+c_2&{}-d_2&+e_2 a2 = b2 + c2 − d2 + e2 (1.10)
\end{alignat}
\begin{flalign}
a_{11}& =b_{11}&
a_{12}& =b_{12}\\ a11 = b11 a12 = b12 (1.11)
a_{21}& =b_{21}& a21 = b21 a22 = b22 + c22 (1.12)
a_{22}& =b_{22}+c_{22}
\end{flalign}
Note 1. Applying * to any primary environment will suppress the assignment of equation numbers. How-
ever, \tag may be used to apply a visible label, and \eqref can be used to reference such manually tagged
lines. Use of either * or a \tag on a subordinate environment is an error.

Note 2. The split environment is something of a special case. It is a subordinate environment that can
be used as the contents of an equation environment or the contents of one “line” in a multiple-equation
structure such as align or gather.

Note 3. The primary environments gather, align and alignat have subordinate “-ed” counterparts
(gathered, aligned and alignedat) that can be used as components of more complicated displays, or
within in-line math. These “-ed” environments can be positioned vertically using an optional argument
[t], [c] or [b].

Note 4. The name flalign is meant as “full length”, not “flush left” as often mistakenly reported. However,
since a display occupying the full width will often begin at the left margin, this confusion is understandable.
The indent applied to flalign from both margins is set with \multlinegap.
Short Math Guide for LATEX, version 2.0 (2017/12/22) 5

2.2. Automatic numbering and cross-referencing. To get an auto-numbered equa-


tion, use the equation environment; to assign a label for cross-referencing, use the \label
command:
\begin{equation}\label{reio}
...
\end{equation}

To get a cross-reference to an auto-numbered equation, use the \eqref command:


... using equations~\eqref{ax1} and~\eqref{bz2}, we
can derive ...
The above example would produce something like

using equations (3.2) and (3.5), we can derive


In other words, \eqref{ax1} is equivalent to (\ref{ax1}), but the parentheses produced
by \eqref are always upright.
To give your equation numbers the form m.n (section-number.equation-number ), use
the \numberwithin command in the preamble of your document:

\numberwithin{equation}{section}
For more details on custom numbering schemes see [Lam, §6.3, §C.8.4].
The subequations environment provides a convenient way to number equations in a
group with a subordinate numbering scheme. For example, supposing that the current
equation number is 2.0, write
\begin{equation}\label{first}
a=b+c
\end{equation}
some intervening text
\begin{subequations}\label{grp}
\begin{align}
a&=b+c\label{second}\\
d&=e+f+g\label{third}\\
h&=i+j\label{fourth}
\end{align}
\end{subequations}
to get
a=b+c (2.1)
some intervening text

a=b+c (2.2a)
d=e+f +g (2.2b)
h=i+j (2.2c)

By putting a \label command immediately after \begin{subequations} you can get a


reference to the parent number; \eqref{grp} from the above example would produce (2.2)
while \eqref{second} would produce (2.2a).
An example at https://tex.stackexchange.com/questions/220001/ shows a variant
of the above example, with numbering like (2.1), (2.1a), . . . , rather than (2.1), (2.2a), . . . .
This is accomplished by using \tag with a cross-reference to the principal component of
the subequation number.
Short Math Guide for LATEX, version 2.0 (2017/12/22) 6

3. Math symbols and math fonts


3.1. Classes of math symbols. The symbols in a math formula fall into different classes
that correspond more or less to the part of speech each symbol would have if the formula
were expressed in words. Certain spacing and positioning cues are traditionally used for
the different symbol classes to increase the readability of formulas.

Class Description
number Mnemonic (part of speech) Examples
0 Ord simple/ordinary (“noun”) A Φ∞
P0Q R
1 Op prefix operator
2 Bin binary operator (conjunction) +∪∧
3 Rel relation/comparison (verb) =<⊂
4 Open left/opening delimiter ([{h
5 Close right/closing delimiter )]}i
6 Punct postfix/punctuation .,;!

Note 1. The distinction in TEX between class 0 and an additional class 7 has to do only with font selection
issues, and it is immaterial here.

Note 2. Symbols of class 2 (Bin), notably the minus sign −, are automatically printed by LATEX as class 0
(no space) if they do not have a suitable left operand—e.g., at the beginning of a math formula or after an
opening delimiter.

The spacing for a few symbols follows tradition instead of the general rule: although /
is (semantically speaking) of class 2, we write k/2 with no space around the slash rather
than k / 2. And compare p|q p|q (no space) with p\mid q p | q (class-3 spacing).
The proper way to define a new math symbol is discussed in LATEX 2ε font selection
[LFG]. It is not really possible to give a useful synopsis here because one needs first to
understand the ramifications of font specifications. But supposing one knows that a Cyrillic
font named wncyr10 is available, here is a minimal example showing how to define a LATEX
command to print one letter from that font as a math symbol:
% Declare that the combination of font attributes OT2/wncyr/m/n
% should select the wncyr font.
\DeclareFontShape{OT2}{wncyr}{m}{n}{<->wncyr10}{}
% Declare that the symbolic math font name "cyr" should resolve to
% OT2/wncyr/m/n.
\DeclareSymbolFont{cyr}{OT2}{wncyr}{m}{n}
% Declare that the command \Sh should print symbol 88 from the math font
% "cyr", and that the symbol class is 0 (= alphabetic = Ord).
\DeclareMathSymbol{\Sh}{\mathalpha}{cyr}{88}

3.2. Some symbols intentionally omitted here. The following math symbols that
are mentioned in the LATEX book [Lam] are intentionally omitted from this discussion be-
cause they are superseded by equivalent symbols when the amssymb package is loaded. If
you are using the amssymb package anyway, the only thing that you are likely to gain by
using the alternate name is an unnecessary increase in the number of fonts used by your
document.
\Box , see \square 
\Diamond , see \lozenge ♦
\leadsto , see \rightsquigarrow
\Join , see \bowtie ./
\lhd , see \vartriangleleft C
\unlhd , see \trianglelefteq E
\rhd , see \vartriangleright B
\unrhd , see \trianglerighteq D
Short Math Guide for LATEX, version 2.0 (2017/12/22) 7

Furthermore, there are many, many additional symbols available for LATEX use
above and beyond the ones included here. This list is not intended to be comprehensive.
For a much more comprehensive list of symbols, including nonmathematically oriented ones,
such as phonetic alphabetic or dingbats, see The Comprehensive LATEX Symbol List [CLSL].
(Full font tables, ordered by font name, for all the fonts covered by the comprehensive list
are included in the documentation provided by TEX Live: texdoc rawtables. These tables
do not include symbol names.) Another source of symbol information is the unicode-math
package; see [UCM].

3.3. Alphabets and digits


3.3.1. Latin letters and Arabic numerals
The Latin letters are simple symbols, class 0. The default font for them in math formulas
is italic.
AB C DE F GH I J K LM N OP QRS T U V W X Y Z
abcdef ghij klmnopqrstuvwxyz
When adding an accent to an i or j in math, dotless variants can be obtained with \imath
and \jmath:

ı \imath  \jmath ̂ \hat{\jmath}


Arabic numerals 0–9 are also of class 0. Their default font is upright/roman.

0123456789

3.3.2. Greek letters


Like the Latin letters, the Greek letters are simple symbols, class 0. For obscure historical
reasons, the default font for lowercase Greek letters in math formulas is italic while the
default font for capital Greek letters is upright/roman. (In other fields such as physics
and chemistry, however, the typographical traditions are somewhat different.) The capital
Greek letters not present in this list are the letters that have the same appearance as some
Latin letter: A for Alpha, B for Beta, and so on. In the list of lowercase letters there is
no omicron because it would be identical in appearance to Latin o. In practice, the Greek
letters that have Latin look-alikes are seldom used in math formulas, to avoid confusion.

Γ \Gamma α \alpha ν \nu z \digamma


∆ \Delta β \beta ξ \xi ε \varepsilon
Λ \Lambda γ \gamma π \pi κ \varkappa
Φ \Phi δ \delta ρ \rho ϕ \varphi
Π \Pi  \epsilon σ \sigma $ \varpi
Ψ \Psi ζ \zeta τ \tau % \varrho
Σ \Sigma η \eta υ \upsilon ς \varsigma
Θ \Theta θ \theta φ \phi ϑ \vartheta
Υ \Upsilon ι \iota χ \chi
Ξ \Xi κ \kappa ψ \psi
Ω \Omega λ \lambda ω \omega
µ \mu
Short Math Guide for LATEX, version 2.0 (2017/12/22) 8

3.3.3. Other “basic” alphabetic symbols


These are also class 0.

ℵ \alepha ` \ell ∂ \partiala a \Game


i \beth ð \eth ℘ \wp = \Im
k \daleth ~ \hbar s \circledS < \Re
‫ג‬ \gimel } \hslash k \Bbbk
{ \complement f \mho ` \Finv

Note 1. Labels a,b indicate amssymb package, font msam or msbm.

3.3.4. Math font switches


Not all of the fonts necessary to support comprehensive math font switching are commonly
available in a typical LATEX setup. Here are the results of applying various font switches to
a wide range of math symbols when the standard set of Computer Modern fonts is in use. It
can be seen that the only symbols that respond correctly to all of the font switches are the
uppercase Latin letters. In fact, nearly all math symbols apart from Latin letters remain
unaffected by font switches; and although the lowercase Latin letters, capital Greek letters,
and numerals do respond properly to some font switches, they produce bizarre results for
other font switches. (Use of alternative math font sets such as Lucida New Math may
ameliorate the situation somewhat.)

default \mathbf \mathrm \mathsf \mathit \mathcal \mathbb \mathfrak


X X X X X X X X
x x x x x § x x
0 0 0 0 0 0 0 0
[] [] [] [] [] [] [] []
+ + + + + + + +
− − − − − − − −
= = = = = = = =
Ξ Ξ Ξ Ξ Ξ ÷ ≮ 
ξ ξ ξ ξ ξ ξ ξ ξ
∞ ∞ ∞ ∞ ∞ ∞ ∞ ∞
ℵ ℵ ℵ ℵ ℵ ℵ ℵ ℵ
P P P P P P P P

q q q q q q q q
< < < < < < < <

A common desire is to get a bold version of a particular math symbol. For those symbols
where \mathbf is not applicable, the \boldsymbol or \pmb commands can be used.

A∞ + πA0 ∼ A∞ + πA0 ∼ A∞ + π A0 (3.1)

A_\infty + \pi A_0


\sim \mathbf{A}_{\boldsymbol{\infty}} \boldsymbol{+}
\boldsymbol{\pi} \mathbf{A}_{\boldsymbol{0}}
\sim\pmb{A}_{\pmb{\infty}} \pmb{+}\pmb{\pi} \pmb{A}_{\pmb{0}}
The \boldsymbol command is obtained preferably by using the bm package, which provides
a newer, more powerful version than the one provided by the amsmath package. It is usually
ill-advised to apply \boldsymbol to more than one symbol at a time; if such a need seems
to arise, it more likely means that there is another, better way of going about it.
Short Math Guide for LATEX, version 2.0 (2017/12/22) 9

3.3.5. Blackboard Bold letters (msbm; no lowercase)


Usage: \mathbb{R}. Requires amsfonts.

ABCDEFGHIJKLMNOPQRSTUVWXYZ

One lowercase letter is available with a distinct name: k \Bbbk

3.3.6. Calligraphic letters (cmsy; no lowercase)


Usage: \mathcal{M}.

ABC DE F G HI J KLMN OP QRS T U V W X Y Z

3.3.7. Non-CM calligraphic and script letters


(rsfs; no lowercase) Usage: \usepackage{mathrsfs} \mathscr{B}.

A BC DE F G H I J K L M N OPQRS T U V W X Y Z

(eusm; no lowercase) Usage: \usepackage{euscript} \mathscr{E}.

ABCDEFGHIJKLMNOPQRSTUVWXYZ

3.3.8. Fraktur letters (eufm)


Usage: \mathfrak{S}. Requires amsfonts.

ABCDEFGHIJKLMNOPQRSTUVWXYZ

abcdefghijklmnopqrstuvwxyz

3.4. Miscellaneous simple symbols. These symbols are also of class 0 (ordinary) which
means they do not have any built-in spacing.

# \#  \diagup ¬ \neg
& \& ♦ \diamondsuit @ \nexistsa
∠ \angleb ∅ \emptyset 0 \prime
8 \backprime ∃ \exists ] \sharpb
F \bigstara [ \flatb ♠ \spadesuit
 \blacklozenge ∀ \forall ^ \sphericalangleb
 \blacksquare ♥ \heartsuit 
√ \square
\surd
N \blacktrianglea ∞ \infty
> \top
H \blacktriangledowna ♦ \lozenge
4 \triangle
⊥ \bot ] \measuredangleb O \triangledowna
♣ \clubsuit ∇ \nabla ∅ \varnothing
 \diagdown \ \naturalb

Note 1. Labels a,b indicate amssymb package, font msam or msbm.

Note 2. A common mistake in the use of the symbols  and # is to try to make them serve as binary
operators or relation symbols without using a properly defined math symbol command. If you merely use
the existing commands \square or \# the intersymbol spacing will be incorrect because those commands
produce a class-0 symbol.

Note 3. Synonyms: ¬ \lnot


Short Math Guide for LATEX, version 2.0 (2017/12/22) 10

3.5. Binary operator symbols

∗ *  \circleddasha ⊕ \oplus
+ + ∪ \cup \oslash
− - d \Cupa ⊗ \otimes
q \amalg g \curlyveea ± \pm
∗ \ast f \curlywedgea i \rightthreetimesa
Z \barwedgea † \dagger o \rtimesb
\bigcirc ‡ \ddagger \ \setminus
5 \bigtriangledown  \diamond r \smallsetminusb
4 \bigtriangleup ÷ \div u \sqcap
\boxdota > \divideontimesb t \sqcup
\boxminusa ? \star
u \dotplusa
 \boxplusa × \times
[ \doublebarwedgea
 \boxtimesa / \triangleleft
• \bullet m \gtrdotb
. \triangleright
∩ \cap | \intercala
] \uplus
e \Capa h \leftthreetimesa
∨ \vee
· l \lessdotb
\cdot Y \veebara
 \centerdota n \ltimesb ∧ \wedge
◦ \circ ∓ \mp o \wr
~ \circledasta \odot
} \circledcirca \ominus
Note 1. Labels a,b indicate amssymb package, font msam or msbm.
Synonyms: ∧ \land, ∨ \lor, d \doublecup, e \doublecap

3.6. Relation symbols: < = >  ∼ and variants

< < > \geqslanta  \lnapproxb 4 \preccurlyeqa


= =  \gg \lneqb  \preceq
> > ≫ \ggga  \lneqqb  \precnapproxb
≈ \approx  \gnapproxb  \lnsimb  \precneqqb
u \approxeqb \gneqb \lvertneqqb  \precnsimb
 \asymp \gneqqb  \ncongb - \precsima
v \backsima  \gnsimb : \risingdotseqa
6= \neq
w \backsimeqa ' \gtrapproxa ∼ \sim
l \bumpeqa  \ngeqb ' \simeq
R \gtreqlessa
m \Bumpeqa  \ngeqqb  \succ
T \gtreqqlessa
$ \circeqa \ngeqslantb v \succapproxb
∼ ≷ \gtrlessa ≯ \ngtrb < \succcurlyeqa
= \cong
\curlyeqpreca & \gtrsima
2  \nleqb  \succeq
\curlyeqsucca  \gvertneqqb \succnapproxb
3
.  \nleqqb 
≤ \leq
= \doteq \nleqslantb  \succneqqb
+ \doteqdota 5 \leqqa
≮ \nlessb  \succnsimb
P \eqcirca 6 \leqslanta
⊀ \nprecb % \succsima
/ \lessapproxa
h \eqsimb \thickapproxb
Q \lesseqgtra  \npreceqb ≈
1 \eqslantgtra \thicksimb
\lesseqqgtra  \nsimb ∼
0 \eqslantlessa S
, \triangleqa
 \nsuccb
≡ \equiv ≶ \lessgtra
; \fallingdotseqa . \lesssima  \nsucceqb
≥ \geq  \ll ≺ \prec
= \geqqa ≪ \llla w \precapproxb
Note 1. Labels a,b indicate amssymb package, font msam or msbm.
Synonyms: 6= \ne, ≤ \le, ≥ \ge, + \Doteq, ≪ \llless, ≫ \gggtr
Short Math Guide for LATEX, version 2.0 (2017/12/22) 11

3.7. Relation symbols: arrows. See also Section 4.

\circlearrowlefta W \Lleftarrowa - \nwarrow


a →
 \circlearrowright ←− \longleftarrow \rightarrow
x \curvearrowleftb ⇐= \Longleftarrow ⇒ \Rightarrow
y \curvearrowrightb ←→ \longleftrightarrow  \rightarrowtaila
 \downdownarrowsa ⇐⇒ \Longleftrightarrow + \rightharpoondown
 \downharpoonlefta 7−→ \longmapsto * \rightharpoonup
 \downharpoonrighta −→ \longrightarrow  \rightleftarrowsa
←- \hookleftarrow =⇒ \Longrightarrow \rightleftharpoonsa
" \looparrowlefta ⇒ \rightrightarrowsa
,→ \hookrightarrow
# \looparrowrighta \rightsquigarrowa
← \leftarrow
 \Lsha V \Rrightarrowa
⇐ \Leftarrow
a →
7 \mapsto  \Rsha
 \leftarrowtail
( \multimapa & \searrow
) \leftharpoondown
: \nLeftarrowb . \swarrow
( \leftharpoonup  \twoheadleftarrowa
⇔ \leftleftarrows a < \nLeftrightarrowb
 \twoheadrightarrowa
↔ \leftrightarrow ; \nRightarrowb
 \upharpoonlefta
⇔ \Leftrightarrow % \nearrow
 \upharpoonrighta
 \leftrightarrows a 8 \nleftarrowb  \upuparrowsa
\leftrightharpoons a = \nleftrightarrowb
a
! \leftrightsquigarrow 9 \nrightarrowb
Note 1. Labels a,b indicate amssymb package, font msam or msbm.

Synonyms: ← \gets, → \to,  \restriction

3.8. Relation symbols: miscellaneous

 \backepsilonb 7 \ntrianglerightb $ \subsetneqqb


∵ \becausea 4 \ntrianglerighteqb ⊃ \supset
G \betweena 0 \nvdashb c \Supseta
J \blacktrianglelefta 1 \nVdashb ⊇ \supseteq
I \blacktrianglerighta 2 \nvDashb k \supseteqqa
./ \bowtie 3 \nVDashb ) \supsetneqb
a \dashv k \parallel % \supsetneqqb
_ \frown ⊥ \perp ∴ \thereforea
∈ \in t \pitchforka E \trianglelefteqa
| \mid ∝ \propto D \trianglerighteqa
\shortmidb ∝ \varproptoa
|= \models p
\shortparallelb \varsubsetneqb
3 \ni q
\smallfrowna & \varsubsetneqqb
- \nmidb a

/ \notin ` \smallsmilea ! \varsupsetneqb
∦ \nparallelb ^ \smile ' \varsupsetneqqb
@ \sqsubseta M \vartrianglea
. \nshortmidb
v \sqsubseteq C \vartrianglelefta
/ \nshortparallelb \vartrianglerighta
A \sqsupseta B
* \nsubseteqb w \sqsupseteq ` \vdash
" \nsubseteqqb ⊂ \subset \Vdasha
+ \nsupseteqb b \Subseta  \vDasha
# \nsupseteqqb ⊆ \subseteq  \Vvdasha
6 \ntriangleleftb j \subseteqqa
5 \ntrianglelefteqb ( \subsetneqb
Note 1. Labels a,b indicate amssymb package, font msam or msbm.

Synonyms: 3 \owns
Short Math Guide for LATEX, version 2.0 (2017/12/22) 12

3.9. Cumulative (variable-size) operators


R J U Q
\int \bigodot \biguplus \prod
∫ \smallint
H L W
\oint \bigoplus \bigvee
P
\sum
T N V
\bigcap \bigotimes \bigwedge
S F `
\bigcup \bigsqcup \coprod

3.10. Punctuation

. . : : ··· \dotsm
/ / ! ! ... \dotso
| | ? ? ..
. \ddots
, , ··· \dotsb
..
; ; ... \dotsc . \vdots
: \colon ··· \dotsi

Note 1. The : by itself produces a colon with class-3 (relation) spacing. The command \colon produces
special spacing for use in constructions such as f\colon A\to B f : A → B.

Note 2. Although the commands \cdots and \ldots are frequently used, we recommend the more seman-
tically oriented commands \dotsb \dotsc \dotsi \dotsm \dotso for most purposes (see Section 4.6).

3.11. Pairing delimiters (extensible). See Section 6 for more information.


 DE
( ) \langle \rangle
hi lm
[ ] \lceil \rceil
no jk
\lbrace \rbrace \lfloor \rfloor

\lvert \rvert   \lgroup \rgroup

\lVert \rVert   \lmoustache \rmoustache

3.12. Nonpairing extensible symbols


.  

\vert /  \arrowvert  \bracevert
 


/ w
\Vert \backslash w \Arrowvert
w

Note 1. Using \vert, |, \Vert, or \| for paired delimiters is not recommended (see Section 6.2). Instead,
use delimiters from the list in Section 3.11.

Synonyms: k \|

3.13. Extensible vertical arrows


x  x
 \uparrow y \downarrow y \updownarrow
  
~ w ~
w \Uparrow  \Downarrow  \Updownarrow
w w w
Short Math Guide for LATEX, version 2.0 (2017/12/22) 13

3.14. Math accents

x́ \acute{x} x̄ \bar{x} ~x \vec{x} x̊ \mathring{x}


x̀ \grave{x} x̆ \breve{x} ẋ \dot{x} xxx
g \widetilde{xxx}
ẍ \ddot{x} x̌ \check{x} ẍ \ddot{x} xxx
d \widehat{xxx}
...
x̃ \tilde{x} x̂ \hat{x} x \dddot{x}

3.15. Named operators. These operators are represented by a multiletter abbreviation.

arccos \arccos gcd \gcd Pr \Pr


arcsin \arcsin hom \hom proj lim \projlim
arctan \arctan inf \inf sec \sec
arg \arg inj lim \injlim sin \sin
cos \cos ker \ker sinh \sinh
cosh \cosh lg \lg sup \sup
cot \cot lim \lim tan \tan
coth \coth lim inf \liminf tanh \tanh
csc \csc lim sup \limsup lim \varinjlim
−→
deg \deg ln \ln lim \varprojlim
←−
det \det log \log lim \varliminf
dim \dim max \max lim \varlimsup
exp \exp min \min
To define additional named operators outside the above list, use the \DeclareMathOperator
command; for example, after

\DeclareMathOperator{\rank}{rank}
\DeclareMathOperator{\esssup}{ess\,sup}
one could write
\rank(x) rank(x)
\esssup(y,z) ess sup(y, z)
The star form \DeclareMathOperator* creates an operator that takes limits in a displayed
formula, such as sup or max.
When predefining such a named operator is problematic (e.g., when using one in the
title or abstract of an article), there is an alternative form that can be used directly:

\operatorname{rank}(x) → rank(x)

4. Notations
4.1. Top and bottom embellishments. These are visually similar to accents but gen-
erally span multiple symbols rather than being applied to a single base symbol. For ease
of reference, \widetilde and \widehat are redundantly included here and in the table of
math accents.

xxx
g \widetilde{xxx} ← −−
xxx \overleftarrow{xxx}
xxx
d \widehat{xxx} xxx
←−− \underleftarrow{xxx}
−−→
xxx \overrightarrow{xxx}
xxx \overline{xxx}
xxx \underline{xxx} xxx
−−→ \underrightarrow{xxx}
z}|{ ← →
xxx \overleftrightarrow{xxx}
xxx \overbrace{xxx}
xxx
←→ \underleftrightarrow{xxx}
xxx
|{z} \underbrace{xxx}
Short Math Guide for LATEX, version 2.0 (2017/12/22) 14

4.2. Extensible arrows. \xleftarrow and \xrightarrow produce arrows that extend
automatically to accommodate unusually wide subscripts or superscripts. These commands
take one optional argument (the subscript) and one mandatory argument (the superscript,
possibly empty):
n+µ−1 n±i−1
A ←−−−−− B −−−−→ C (4.1)
T

\xleftarrow{n+\mu-1}\quad \xrightarrow[T]{n\pm i-1}

4.3. Affixing symbols to other symbols. In addition to the standard accents (Sec-
tion 3.14), other symbols can be placed above or below a base symbol with the \overset and
\underset commands. For example, writing \overset{*}{X} will place a superscript-size

∗ above the X, thus: X. See also the description of \sideset in Section 8.4.

4.4. Matrices. The environments pmatrix, bmatrix, Bmatrix, vmatrix, and Vmatrix
have (respectively) ( ), [ ], { }, | |, and k k delimiters built in. There is also a matrix en-
vironment without delimiters and an array environment that can be used to obtain left
alignment or other variations in the column specs.
\begin{pmatrix}
β∗
 
\alpha& \beta^{*}\\ α
\gamma^{*}& \delta γ∗ δ
\end{pmatrix}
To produce a small matrix suitable for use in text, there is a smallmatrix environment
(e.g., ac db ) that comes closer to fitting within a single text line than a normal matrix.
This example was produced by
\bigl( \begin{smallmatrix}
a&b\\ c&d
\end{smallmatrix} \bigr)
By default, all elements in a matrix are centered horizontally. The mathtools package
provides starred versions of all the matrix environments that facilitate other alignments.
That package also provides fenced versions of smallmatrix with parallel names in both
starred and nonstarred versions.
To produce a row of dots in a matrix spanning a given number of columns, use \hdotsfor.
For example, \hdotsfor{3} in the second column of a four-column matrix will print a row
of dots across the final three columns.
For piecewise function definitions there is a cases environment:
P_{r-j}=\begin{cases}
0& \text{if $r-j$ is odd},\\
r!\,(-1)^{(r-j)/2}& \text{if $r-j$ is even}.
\end{cases}
Notice the use of \text and the embedded math.
Note. The plain TEX form \matrix{...\cr...\cr} and the related commands \pmatrix, \cases should be
avoided in LATEX (and when the amsmath package is loaded they are disabled).

4.5. Math spacing commands. When the amsmath package is used, all of these math
spacing commands can be used both in and out of math mode.
Abbrev. Spelled out Example Abbrev. Spelled out Example
no space 34 no space 34
\, \thinspace 34 \! \negthinspace 34
\: \medspace 34 \negmedspace 34
\; \thickspace 34 \negthickspace 34
\quad 3 4
\qquad 3 4
Short Math Guide for LATEX, version 2.0 (2017/12/22) 15

For finer control over math spacing, use \mspace and ‘math units’. One math unit, or mu,
is equal to 1/18 em. Thus to get a negative half \quad write \mspace{-9.0mu}.
There are also three commands that leave a space equal to the height and/or width of
a given fragment of LATEX material:
Example Result
\phantom{XXX} space as wide and high as three X’s
\hphantom{XXX} space as wide as three X’s; height 0
\vphantom{X} space of width 0, height = height of X

4.6. Dots. For preferred placement of ellipsis dots (raised or on-line) in various contexts
there is no general consensus. It may therefore be considered a matter of taste. In most
situations, the generic \dots can be used, and amsmath will interpret it in the manner
preferred by the AMS, namely low dots (\ldots) between commas or raised dots (\cdots)
between binary operators and relations, etc. If what follows the dots is ambiguous as to the
choice, the specific form of the command can be used. However, by using the semantically
oriented commands
• \dotsc for “dots with commas”
• \dotsb for “dots with binary operators/relations”
• \dotsm for “multiplication dots”
• \dotsi for “dots with integrals”
• \dotso for “other dots” (none of the above)
instead of \ldots and \cdots, you make it possible for your document to be adapted to
different conventions on the fly, in case (for example) you have to submit it to a publisher
who insists on following house tradition in this respect. The default treatment for the
various kinds follows American Mathematical Society conventions:

We have the series $A_1,A_2,\dotsc$, We have the series A1 , A2 , . . . , the regional


the regional sum $A_1+A_2+\dotsb$, sum A1 + A2 + · · · , the orthogonal product
the orthogonal product $A_1A_2\dotsm$, A1 A2 · · · , and the infinite integral
and the infinite integral Z Z
\[\int_{A_1}\int_{A_2}\dotsi\].
···.
A1 A2

4.7. Nonbreaking dashes. The command \nobreakdash suppresses the possibility of


a linebreak after the following hyphen or dash. For example, if you write ‘pages 1–9’ as
pages 1\nobreakdash--9 then a linebreak will never occur between the dash and the 9.
You can also use \nobreakdash to prevent undesirable hyphenations in combinations like
$p$-adic. For frequent use, it’s advisable to make abbreviations, e.g.,
\newcommand{\p}{$p$\nobreakdash}% for "\p adic" ("p-adic")
\newcommand{\Ndash}{\nobreakdash\textendash}% for "pages 1\Ndash 9"
% For "\n dimensional" ("n-dimensional"):
\newcommand{\n}{$n$\nobreakdash-\hspace{0pt}}
The last example shows how to prohibit a linebreak after the hyphen but allow normal
hyphenation in the following word. (Add a zero-width space after the hyphen.)

4.8. Roots. The command \sqrt produces a square root. To specify an explicit radix,
give it as an optional argument.

r
n 3
\sqrt{\frac{n}{n-1} S} S, \sqrt[3]{2} 2
n−1
Short Math Guide for LATEX, version 2.0 (2017/12/22) 16

4.9. Boxed formulas. The command \boxed puts a box around its argument, like \fbox
except that the contents are in math mode:
η ≤ C(δ(η) + ΛM (0, δ)) (4.2)
\boxed{\eta \leq C(\delta(\eta) +\Lambda_M(0,\delta))}
If you need to box an equation including the equation number, it may be difficult, depending
on the context; there are some suggestions in the AMS author FAQ; see the entry outlined
in red on the page https://www.ams.org/faq?faq_id=290.

5. Fractions and related constructions


5.1. The \frac, \dfrac, and \tfrac commands. The \frac command takes two ar-
guments—numerator and denominator—and typesets them in normal fraction form. Use
\dfrac or \tfrac to overrule LATEX’s guess about the proper size to use for the fraction’s
contents (t = text style, d = display style).
1 1 1
log2 c(f ), log2 c(f ), k log2 c(f ) (5.1)
k k
\begin{equation}
\frac{1}{k}\log_2 c(f),\quad\dfrac{1}{k}\log_2 c(f),
\quad\tfrac{1}{k}\log_2 c(f)
\end{equation}
θ+ψ

<z =  2
2  2 . (5.2)
θ+ψ 1 B
+ log
2 2 A
\begin{equation}
\Re{z} =\frac{n\pi \dfrac{\theta +\psi}{2}}{
\left(\dfrac{\theta +\psi}{2}\right)^2 + \left( \dfrac{1}{2}
\log \left\lvert\dfrac{B}{A}\right\rvert\right)^2}.
\end{equation}

 The \binom, \dbinom, and \tbinom commands. For binomial expressions such as
5.2.
n
k there are \binom, \dbinom and \tbinom commands:
   
k k−1 k k−2
2k − 2 + 2 (5.3)
1 2
2^k-\binom{k}{1}2^{k-1}+\binom{k}{2}2^{k-2}

5.3. The \genfrac command. The capabilities of \frac, \binom, and their variants are
subsumed by a generalized fraction command \genfrac with six arguments. The last two
correspond to \frac’s numerator and denominator; the first two are optional delimiters (as
seen in \binom); the third is a line thickness override (\binom uses this to set the fraction
line thickness to 0 pt—i.e., invisible); and the fourth argument is a mathstyle override:
integer values 0–3 select, respectively, \displaystyle, \textstyle, \scriptstyle, and
\scriptscriptstyle. If the third argument is left empty, the line thickness defaults to
“normal”.
\genfrac{left-delim}{right-delim}{thickness}
{mathstyle}{numerator}{denominator}
To illustrate, here is how \frac, \tfrac, and \binom might be defined.
\newcommand{\frac}[2]{\genfrac{}{}{}{}{#1}{#2}}
\newcommand{\tfrac}[2]{\genfrac{}{}{}{1}{#1}{#2}}
\newcommand{\binom}[2]{\genfrac{(}{)}{0pt}{}{#1}{#2}}
Note. For technical reasons, using the primitive fraction commands \over, \atop, \above in a LATEX doc-
ument is not recommended (see, e.g., https://www.ams.org/faq?faq_id=288, the entry outlined in red).
Short Math Guide for LATEX, version 2.0 (2017/12/22) 17

5.4. Continued fractions. The continued fraction


1
(5.4)
√ 1
2+
√ 1
2+ √
2 + ···
can be obtained by typing
\cfrac{1}{\sqrt{2}+
\cfrac{1}{\sqrt{2}+
\cfrac{1}{\sqrt{2}+\dotsb
}}}
This produces better-looking results than straightforward use of \frac. Left or right
placement of any of the numerators is accomplished by using \cfrac[l] or \cfrac[r]
instead of \cfrac.

6. Delimiters
6.1. Delimiter sizes. Unless you indicate otherwise, delimiters in math formulas will
remain at the standard size regardless of the height of the enclosed material. To get larger
sizes, you can either select a particular size using a \big... prefix (see below), or you can
use \left and \right prefixes for autosizing.
The automatic delimiter sizing done by \left and \right has two limitations: first, it is
applied mechanically to produce delimiters large enough to encompass the largest contained
item, and second, the range of sizes has fairly large quantum jumps. This means that an
expression that is infinitesimally too large for a given delimiter size will get the next larger
size, a jump of 6pt or so (3pt top and bottom) in normal-sized text. There are two or three
situations where the delimiter size is commonly adjusted. These adjustments are done using
the following commands:
Delimiter no size \left \bigl \Bigl \biggl \Biggl
size specified \right \bigr \Bigr \biggr \Biggr
   ! !
c c  c   c  c c
Result (b)( ) (b) b b b b
d d d d d d

The first kind of adjustment is done for cumulative operators with limits, such as summation
signs. With \left and \right the delimiters usually turn out larger than necessary, and
using the Big or bigg sizes instead gives better results:
 p 1/p
p 1/p
X X X X 
 ai xij  versus ai xij
i j i j

\biggl[\sum_i a_i\Bigl\lvert\sum_j x_{ij}\Bigr\rvert^p\biggr]^{1/p}


The second kind of situation is clustered pairs of delimiters, where \left and \right make
them all the same size (because that is adequate to cover the encompassed material), but
what you really want is to make some of the delimiters slightly larger to make the nesting
easier to see.
 
((a1 b1 ) − (a2 b2 )) ((a2 b1 ) + (a1 b2 )) versus (a1 b1 ) − (a2 b2 ) (a2 b1 ) + (a1 b2 )

\left((a_1 b_1) - (a_2 b_2)\right)


\left((a_2 b_1) + (a_1 b_2)\right)
\quad\text{versus}\quad
\bigl((a_1 b_1) - (a_2 b_2)\bigr)
\bigl((a_2 b_1) + (a_1 b_2)\bigr)
Short Math Guide for LATEX, version 2.0 (2017/12/22) 18
0
The third kind of situation is a slightly oversize object in running text, such as db 0 where
the delimiters produced by \left and \right cause too much line spreading. In that case
\bigl and \bigr can be used to produce delimiters that are larger than the base size but
0
still able to fit within the normal line spacing: db 0 .
The mathtools package provides a feature \DeclarePairedDelimiter that can simplify
sizing; see the package documentation for details.

6.2. Vertical bar notations. The use of the | character to produce paired delimiters
is not recommended. There is an ambiguity about the directionality of the symbol that
will in rare cases produce incorrect spacing—e.g., |k|=|-k| produces |k| = | − k|, and
|\sin x| produces | sin x| instead of the correct |sin x|. Using \lvert for a “left vert bar”
and \rvert for a “right vert bar” whenever they are used in pairs will prevent this problem;
compare |−k|, produced by \lvert -k\rvert. For double bars there are analogous \lVert,
\rVert commands. Recommended practice is to define suitable commands in the document
preamble for any paired-delimiter use of vert bar symbols:
\providecommand{\abs}[1]{\lvert#1\rvert}
\providecommand{\norm}[1]{\lVert#1\rVert}
whereupon \abs{z} would produce |z| and \norm{v} would produce kvk.

7. The \text command


The main use of the command \text is for words or phrases in a display. It is similar to
\mbox in its effects but, unlike \mbox, automatically produces subscript-size text if used in
a subscript.
f[xi−1 ,xi ] is monotonic, i = 1, . . . , c + 1 (7.1)
f_{[x_{i-1},x_i]} \text{ is monotonic,}
\quad i = 1,\dots,c+1

7.1. \mod and its relatives. Commands \mod, \bmod, \pmod, \pod deal with the special
spacing conventions of “mod” notation. \mod and \pod are variants of \pmod preferred by
some authors; \mod omits the parentheses, whereas \pod omits the “mod” and retains the
parentheses.
gcd(n, m mod n); x≡y (mod b); x≡y mod c; x≡y (d) (7.2)
\gcd(n,m\bmod n) ;\quad x\equiv y\pmod b
;\quad x\equiv y\mod c ;\quad x\equiv y\pod d

8. Integrals and sums


8.1. Altering the placement of limits. The limits on integrals, sums, and similar
symbols are placed either to the side of or above and below the base symbol, depending on
convention and context. LATEX has rules for automatically choosing one or the other, and
most of the time the results are satisfactory. In the event they are not, there are three LATEX
commands that can be used to influence the placement of the limits: \limits, \nolimits,
\displaylimits. Compare
Z Z
6
z (t)φ(x) z 6 (t)φ(x)
|x−xz (t)|<X0 and |x−xz (t)|<X0

\int_{\abs{x-x_z(t)}<X_0} ... \int\limits_{\abs{x-x_z(t)}<X_0} ...


The \limits command should follow immediately after the base symbol to which it applies,
and its meaning is: shift the following subscript and/or superscript to the limits position,
regardless of the usual convention for this symbol. \nolimits means to shift them to the
side instead, and \displaylimits, which might be used in defining a new kind of base
symbol, means to use standard positioning as for the \sum command.
See also the description of the options intlimits and nosumlimits in [AMUG].
Short Math Guide for LATEX, version 2.0 (2017/12/22) 19

8.2. Multiple integral signs. \iint, \iiint, and \iiiint give multiple integral signs
with the spacing between them nicely adjusted, in both text and display style. \idotsint is
an extension of the same idea that gives two integral signs with dots between them. Notice
the use of thin space (\,) before dx and friends to clarify the meaning.
ZZ ZZZ
f (x, y) dx dy f (x, y, z) dx dy dz (8.1)
A A
ZZZZ Z Z
f (w, x, y, z) dw dx dy dz ··· f (x1 , . . . , xk ) (8.2)
A A

\iint\limits_A f(x,y)\,dx\,dy\qquad\iiint\limits_A
f(x,y,z)\,dx\,dy\,dz\\
\iiiint\limits_A
f(w,x,y,z)\,dw\,dx\,dy\,dz\qquad\idotsint\limits_A f(x_1,\dots,x_k)

8.3. Multiline subscripts and superscripts. The \substack command can be used
to produce a multiline subscript or superscript: for example
X
\sum_{\substack{ P (i, j)
0\le i\le m\\ 0≤i≤m
0<j<n
0<j<n}}
P(i,j)
8.4. The \sideset command. There’s also a command called \sideset, for a rather
special
P purpose:
Q putting symbols at the subscript and superscript corners of a symbol
like or . Note: The \sideset command is only designed for use with large operator
symbols; with ordinary symbols the results are unreliable. With \sideset, you can write
X0
\sideset{}{’} nEn
\sum_{n<k,\;\text{$n$ odd}} nE_n n<k, n odd

The extra pair of empty braces is explained by the fact that \sideset has the capability of
putting an extra symbol or symbols at each corner of a large operator; to put an asterisk
at each corner of a product symbol, you would type
∗ Y∗
\sideset{_*^*}{_*^*}\prod
∗ ∗

9. Changing the size of elements in a formula


The LATEX mechanisms for changing font size inside a math formula are completely different
from the ones used outside math formulas. If you try to make something larger in a formula
with one of the text commands such as \large or \huge:

# {\large \#}

you will get a warning message


Command \large invalid in math mode
Such an attempt, however, often indicates a misunderstanding of how LATEX math symbols
work. If you want a # symbol analogous to a summation sign in its typographical prop-
erties, then in principle the best way to achieve that is to define it as a symbol of type
“mathop” with the standard LATEX \DeclareMathSymbol command (see [LFG]). (This en-
tails, however, getting hold of a math font with a suitable text-size/display-size pair, which
may not be so easy.)
Consider the expression:
n
P
n>0 z \frac{\sum_{n > 0} z^n}
Q k)
1≤k≤n (1 − q {\prod_{1\leq k\leq n} (1-q^k)}
Short Math Guide for LATEX, version 2.0 (2017/12/22) 20

Using \dfrac instead of \frac wouldn’t change anything in this case; if you want the sum
and product symbols to appear full size, you need the \displaystyle command:
X
zn
n>0 \frac{{\displaystyle\sum_{n > 0} z^n}}
Y
(1 − q k ) {{\displaystyle\prod_{1\leq k\leq n} (1-q^k)}}
1≤k≤n

And if you want full-size symbols but with limits on the side, use the \nolimits command
also:
X
zn \frac{{\displaystyle\sum\nolimits_{n> 0} z^n}}
n>0
Y
k
(1 − q ) {{\displaystyle\prod\nolimits_{1\leq k\leq n} (1-q^k)}}
1≤k≤n

There are similar commands \textstyle, \scriptstyle, and \scriptscriptstyle, to


force LATEX to use the symbol size and spacing that would be applied in (respectively)
inline math, first-order subscript, or second-order subscript, even when the current context
would normally yield some other size.
Note: These commands belong to a special class of commands referred to in the LATEX
book as “declarations”. In particular, notice where the braces fall that delimit the effect of
the command:
Right: {\displaystyle ...} Wrong: \displaystyle{...}

10. Other packages of interest


Many other LATEX packages that address some aspect of mathematical formulas are available
from CTAN (the Comprehensive TEX Archive Network). To recommend a few examples:
mathtools Additional features extending amsmath; loads amsmath.
amsthm General theorem and proof setup.
amsfonts Defines \mathbb and \mathfrak, and provides access to many additional
symbols (without names; amssymb provides the names).
accents Under accents and accents using arbitrary symbols.
bm Bold math package, provides a more general and more robust implementation of
\boldsymbol.
mathrsfs Ralph Smith’s Formal Script, font setup.
cases Apply a large brace to two or more equations without losing the individual
equation numbers.
delarray Delimiters spanning multiple rows of an array.
xypic Commutative diagrams and other diagrams.
TikZ Comprehensive graphical facilities, including features for drawing diagrams.
The TEX Catalogue,
http://mirror.ctan.org/help/Catalogue/alpha.html,
is a good place to look if you know a package’s name.
Questions and answers on specific TEX-related topics are the raison d’être of this forum:
https://tex.stackexchange.com/questions
Check the archives for existing answers; pointers to selected topics may expedite your search:
https://tex.meta.stackexchange.com/a/2425#2425
If nothing useful turns up, ask your own question.
Short Math Guide for LATEX, version 2.0 (2017/12/22) 21

11. Other documentation of interest


References
[AMUG] American Mathematical Society and the LATEX3 Project: User’s Guide for the
amsmath package, Version 2.+,
http://mirror.ctan.org/macros/latex/required/amsmath/amsldoc.tex
and
http://mirror.ctan.org/macros/latex/required/amsmath/amsldoc.pdf,
2017.
[AFUG] American Mathematical Society: User’s Guide, AMSFonts,
http://mirror.ctan.org/fonts/amsfonts/amsfndoc.pdf, 2002.

[CLSL] Scott Pakin: The Comprehensive LATEX Symbol List,


http://mirror.ctan.org/tex-archive/info/symbols/comprehensive/,
January 2017. Raw font tables, without symbol names, are shown alphabetically
by font name in the rawtables*.pdf files in the same area of CTAN and from
TEX Live with texdoc rawtables.

[Lam] Leslie Lamport: LATEX: A document preparation system, 2nd edition,


Addison-Wesley, 1994.
[LC] Frank Mittelbach and Michel Goossens, with Johannes Braams, David Carlisle,
and Chris Rowley: The LATEX Companion, 2nd edition, Addison-Wesley, 2004.

[LFG] LATEX3 Project Team: LATEX 2ε font selection,


http://mirror.ctan.org/macros/latex/doc/fntguide.pdf, 2005.
[LGC] Michel Goossens, Frank Mittelbach, Sebastian Rahtz, Denis Roegel, and
Herbert Voß: The LATEX Graphics Companion, 2nd edition, Addison-Wesley,
2008.

[LGG] D. P. Carlisle, LATEX3 Project: Packages in the ‘graphics’ bundle,


http://mirror.ctan.org/macros/latex/required/graphics/grfguide.pdf,
2017.
[LUG] LATEX3 Project Team: LATEX 2ε for authors,
http://mirror.ctan.org/macros/latex/doc/usrguide.pdf, 2015.

[MML] George Grätzer: More Math into LATEX, 5th edition, Springer, New York, 2016.
[UCM] Will Robertson: Every symbol (most symbols) defined by unicode-math,
http://mirror.ctan.org/macros/latex/contrib/unicode-math/
unimath-symbols.pdf, 2017; and
Will Robertson, Philipp Stephani, Joseph Wright, and Khaled Hosny:
Experimental Unicode mathematical typesetting: The unicode-math package,
http://mirror.ctan.org/macros/latex/contrib/unicode-math/
unicode-math.pdf, 2017.
Unit-3 :: Letter Document Class
3.3. Letters
Synopsis:

\documentclass{letter}
\address{senders address} % return address
\signature{sender name}
\begin{document}
\begin{letter}{recipient address}
\opening{salutation}
letter body
\closing{closing text}
\end{letter}
...
\end{document}

Produce one or more letters.

Each letter is in a separate letter environment, whose argument recipient address often
contains multiple lines separated with a double backslash, (\\). For example, you might have:

\begin{letter}{Ninon de l'Enclos \\
l'h\^otel Sagonne}
...
\end{letter}

The start of the letter environment resets the page number to 1, and the footnote number to 1
also.

The sender address and sender name are common to all of the letters, whether there is one or
more, so these are best put in the preamble. As with the recipient address, often sender address
contains multiple lines separated by a double backslash (\\). LaTeX will put the sender name
under the closing, after a vertical space for the traditional hand-written signature.

Each letter environment body begins with a required \opening command such as
\opening{Dear Madam or Sir:}. The letter body text is ordinary LaTeX so it can contain
everything from enumerated lists to displayed math, except that commands such as \chapter
that make no sense in a letter are turned off. Each letter environment body typically ends with
a \closing command such as \closing{Yours,}.

Additional material may come after the \closing. You can say who is receiving a copy of the
letter with a command like \cc{the Boss \\ the Boss's Boss}. There’s a similar \encl
command for a list of enclosures. And, you can add a postscript with \ps.
LaTeX’s default is to indent the sender name and the closing above it by a length of
\longindentation. By default this is 0.5\textwidth. To make them flush left, put
\setlength{\longindentation}{0em} in your preamble.

To set a fixed date use something like \renewcommand{\today}{1958-Oct-12}. If put in your


preamble then it will apply to all the letters.

This example shows only one letter environment. The three lines marked as optional are
typically omitted.

\documentclass{letter}
\address{Sender's street \\ Sender's town}
\signature{Sender's name \\ Sender's title}
% optional: \location{Mailbox 13}
% optional: \telephone{(102) 555-0101}
\begin{document}
\begin{letter}{Recipient's name \\ Recipient's address}
\opening{Sir:}
% optional: \thispagestyle{firstpage}
I am not interested in entering a business arrangement with you.
\closing{Your most humble, etc.,}
\end{letter}
\end{document}

These commands are used with the letter class.

 \address: Sender’s return address.


 \cc: Carbon copy list.
 \closing: Saying goodbye.
 \encl: List of enclosed material.
 \location: Sender’s organizational location.
 \makelabels: Make address labels.
 \name: Sender’s name, for the return address.
 \opening: Saying hello.
 \ps: Adding a postscript.
 \signature: Sender’s signature.
 \telephone: Sender’s phone number

3.3.1. \address
Synopsis:

\address{senders address}

Specify the return address, as it appears on the letter and on the envelope. Separate multiple lines
in senders address with a double backslash, \\.
Because it can apply to multiple letters this declaration is often put in the preamble. However, it
can go anywhere, including inside an individual letter environment.

This command is optional: if you do not use it then the letter is formatted with some blank space
on top, for copying onto pre-printed letterhead paper. If you do use the \address declaration
then it is formatted as a personal letter.

Here is an example.

\address{Stephen Maturin \\
The Grapes of the Savoy}

3.3.2 \cc
Synopsis:

\cc{name0 \\
... }

Produce a list of names to which copies of the letter were sent. This command is optional. If it
appears then typically it comes after \closing. Put the names on different lines by separating
them with a double backslash, \\, as in:

\cc{President \\
Vice President}

3.3.3 \closing
Synopsis:

\closing{text}

Produce the letter’s closing. This is optional, but usual. It appears at the end of a letter, above a
handwritten signature. For example:

\closing{Regards,}

3.3.4 \encl
Synopsis:

\encl{first enclosed object \\


... }
Produce a list of things included with the letter. This command is optional; when it is used, it
typically is put after \closing. Separate multiple lines with a double backslash, \\.

\encl{License \\
Passport}

3.3.5 \location
Synopsis:

\location{text}

The text appears centered at the bottom of the page. It only appears if the page style is
firstpage.

3.3.6 \makelabels
Synopsis:

\makelabels % in preamble

Optional, for a document that contains letter environments. If you just put \makelabels in the
preamble then at the end of the document you will get a sheet with labels for all the recipients,
one for each letter environment, that you can copy to a sheet of peel-off address labels.

Customize the labels by redefining the commands \startlabels, \mlabel, and


\returnaddress (and perhaps \name) in the preamble. The command \startlabels sets the
width, height, number of columns, etc., of the page onto which the labels are printed. The
command \mlabel{return address}{recipient address} produces the two labels (or one, if you
choose to ignore the return address) for each letter environment. The first argument, return
address, is the value returned by the macro \returnaddress. The second argument, recipient
address, is the value passed in the argument to the letter environment. By default \mlabel
ignores the first argument, the return address, causing the default behavior described in the prior
paragraph.

This illustrates customization. Its output includes a page with two columns having two labels
each.

\documentclass{letter}
\renewcommand*{\returnaddress}{Fred McGuilicuddy \\
Oshkosh, Mineola 12305}
\newcommand*\originalMlabel{}
\let\originalMlabel\mlabel
\def\mlabel#1#2{\originalMlabel{}{#1}\originalMlabel{}{#2}}
\makelabels
...
\begin{document}
\begin{letter}{A Einstein \\
112 Mercer Street \\
Princeton, New Jersey, USA 08540}
...
\end{letter}
\begin{letter}{K G\"odel \\
145 Linden Lane \\
Princeton, New Jersey, USA 08540}
...
\end{letter}
\end{document}

The first column contains the return address twice. The second column contains the address for
each recipient.

The package envlab makes formatting the labels easier, with standard sizes already provided.
The preamble lines \usepackage[personalenvelope]{envlab} and \makelabels are all that
you need to print envelopes.

3.3.7 \name
Synopsis:

\name{name}

Optional. Sender’s name, used for printing on the envelope together with the return address.

3.3.8 \opening
Synopsis:

\opening{salutation}

Required. Follows the \begin{letter}{...}. The argument salutation is mandatory. For


instance:

\opening{Dear John:}

3.3.9 \ps
Synopsis:

\ps{text}

Add a postscript. This command is optional and usually is used after \closing.
\ps{P.S. After you have read this letter, burn it. Or eat it.}

3.3.10 \signature
Synopsis:

\signature{first line \\
... }

The sender’s name. This command is optional, although its inclusion is usual.

The argument text appears at the end of the letter, after the closing. LaTeX leaves some vertical
space for a handwritten signature. Separate multiple lines with a double backslash, \\. For
example:

\signature{J Fred Muggs \\


White House}

LaTeX’s default for the vertical space from the \closing text down to the \signature text is
6\medskipamount, which is six times \medskipamount (where \medskipamount is equal to a
\parskip, which in turn is defined by default here to 0.7em).

This command is usually in the preamble, to apply to all the letters in the document. To have it
apply to one letter only, put it inside a letter environment and before the \closing.

You can include a graphic in the signature as here.

\signature{\vspace{-6\medskipamount}\includegraphics{sig.png}\\
My name}

For this you must put \usepackage{graphicx} in the preamble (see Graphics).

3.3.11 \telephone
Synopsis:

\telephone{number}

The sender’s telephone number. This is typically in the preamble, where it applies to all letters.
This only appears if the firstpage pagestyle is selected. If so, it appears on the lower right of
the page.
3.4. Exercise
1. What is the synopsis for Letter?
2. What are the basic commands to create letter?
3. Write a Latex code to create letter for asking leave on vacation?

https://www.kindoblue.nl/articles/cover-letter-part1

You might also like