Difference between revisions of "Documentation/FAQ/Writer/FormattingText"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Where do I get a dictionary for my language?)
(Where do I get a dictionary for my language?)
Line 324: Line 324:
  
 
=== Where do I get a dictionary for my language? ===
 
=== Where do I get a dictionary for my language? ===
Some dictionaries are installed with OpenOffice.org. Look in '''Tools>Options>Language Settings>Writing Aids'''.Click ''Edit'' button, then the drop-down list gives you all the languages available.
+
Some dictionaries are installed with OpenOffice.org. Look in '''Tools>Options>Language Settings>Writing Aids'''.Click '''Edit''' button, then the drop-down list gives you all the languages available.
  
 
If you do not find the one you need, look here: [http://wiki.services.openoffice.org/wiki/Dictionaries/ Dictionaries].
 
If you do not find the one you need, look here: [http://wiki.services.openoffice.org/wiki/Dictionaries/ Dictionaries].

Revision as of 01:05, 11 September 2008

doc OOo



Template:Documentation/NeedsRework



This page has FAQs about formatting text in Writer.

Note: Many of these FAQs were originally written for OpenOffice.org 1.x and may not have been updated to reflect changes in OOo 2.x. We are working on checking updating all of them, but this takes a lot of time and more volunteers are needed. If you find an answer that is out of date, please either correct it or leave a comment on the "Discussion" tab of the relevant page.

Up to date information can be found in the Writer Guide, available from the OOo Documentation Project.

Contents

Fonts and characters

How do I change the default font?

You can set the default font in Tools > Options > Text Document > Basic Fonts, but that doesn't change the size of the font.

To change the size of the default font as well as the font itself, make the change in the default paragraph style. Then make the document into a template and set it as the default template.

Here's how to do all this:

  1. Open a blank document.
  2. (Optional) Use Tools > Options > Text Document > Basic Fonts. Select the font from the drop-down lists. Click OK to save.
  3. Press F11 to open the Stylist. Go to the Paragraph Styles tab. Right-click on Default and choose Modify. On the Font tab, set the required typeface and size. Click OK to save.
  4. To save this document as a template, use File > Templates > Save. Give the template a name and save it in the Default folder. (You can put it anywhere you like, but that makes it easy to find again.) Click OK.
  5. To make this template the default template, use File > Templates > Organize. Select the template you just created, then click Commands > Set As Default Template.

Now any text documents you create with File > New (or the New icon) will have the typeface and size you want.

You can also set margins, spacing, paragraph spacing, printer setup in the default template.

If you want different default fonts or sizes for different types of documents, you can set up several templates and use File > New > Templates and Documents (instead of File > New) to choose one when starting a new document.

How to easily come back to the default character format while typing when I just wanted to format one word?

Example: you write default, then underlined for a while and you want to come back to the normal styles.

In this example, you have pressed [Ctrl]+U after "then" to format your text italic.
To return to the normal attribute press [Right] immediatly after the first "to" as following:

You write default, then [Ctrl]+U underlined for a while and you want to [Right] come back to the normal styles.


How do I insert a special character?

The simplest method for inserting special characters is to select them from the special character dialog.

To insert a special character:

  1. On the Insert menu select Special Character .In the dialog that appears, all the available characters in the current fonts will be displayed.
  2. Select a character by clicking on it. If you do not see the desired character, it may not be available in the current font. If it is not there, try changing fonts.
  3. After selecting one or more characters, click OK to insert the characters at the location of the text cursor.

On certain platforms, OpenOffice.org does not have certain characters available in any font, including emdash and curly double quote characters.

To insert characters used in mathematical formulas:

  1. On the Insert menu select Object>Formula.
  2. In the Command window, hold down the right mouse button to access the context menu. The available formula operators can be found in this menu.
  3. Click outside the formula box (anywhere else in the document) to close it.

Formulas , graphical objects and characters inserted using this method may not convert well to other applications. OpenOffice.org also supports entry of certain characters (accented characters, ligatures, monetary symbols, etc.) via compose (keyboard) sequences.

How do I insert a trademark symbol?

This symbol is only available in certain fonts. On Solaris platforms, the symbol is available in the 'Symbols', 'Serif' and San-Serif' font. To insert:

  1. Place the cursor in the location where you want the symbol to appear.
  2. On the Insert menu select Special Character.
  3. In the dialog that appears, choose Symbol from the Font list.The trademark symbol is available in a Serif font (character 212) or in a San-Serif font (character 228). Click on the desired symbol .
  4. Click OK.

How do I insert an unbreakable space?

To insert an unbreakable space:

Hold down the control key while you type a space.Ctrl+Space

You can find this and other keyboard shortcuts in Help > Contents > Index tab > keyboard shortcuts.

How do I insert a 'Euro' character?

The Euro currency symbol is only available in some fonts. (Times and Helvetica, which are commonly used, do not include the Euro symbol.)

To insert a Euro character:

  1. On the Insert menu select Special Character.
  2. In the dialog that appears, change the font selection to a font where you can see the Euro character appear in the '128' character position. The '128' position is in the first column, fourth row.
  3. Highlight the Euro character by clicking on it.
  4. Click OK to insert.

Note: If you output your file to HTML, the Euro symbol will be converted to '¤' (curren).

I want to insert special characters with keyboard shortcuts. How do I do this?

From OpenOffice.org Version 1.1 on you can use the built in macro recorder. To assign a character to a key:

  • Select Tools > Macro > Record to start the recording process.
  • Click Insert > Special Character and choose the character you want,

then insert it and close the special character dialog.

  • Click on "Stop recording" in the small macro recorder dialog. A dialog appears asking you to save the macro with a name.

Be sure to save it under Standard, not in the tree for the document currently open. That way you'll be able to use the macro use it any time a OOo Writer window is open.

Now that you have recorded the macro, you'll need to assign it to a keystroke.

  • Select > Tools > Macro > Macros > Assign.
  • Now follow > Keyboard > Functions and find your macro using the Category tree.

Your macro will appear in the Function window when you've found the right module.

  • Select a keystroke in the Shortcut Keys list, and click Modify.

The key you have selected will appear in the Keys window.

Does OpenOffice.org have a Reveal Codes functionality similar to WordPerfect?

No, OOo does not have this function.

Selecting, moving, and formatting text

How to format a piece of text (not a whole page) in columns?

You have to use a section:

  • Select the text you want to format
  • Menu Insert-Section-[Columns]


How to correct the text of a hyperlink? (if I click on the text the target document loads)

Quick method: [Alt]+click

Permanant state: in the status bar at the bottom of the screen, click the field "HYP" (HYPerlink) to change it to "SEL" (SELection). You can now select the text/graphic of the hyperlink. (Change back to HYP at any time by clicking SEL.)

How to move paragraphs with the keyboard?

  • Set the cursor in the paragraph you want to to move
  • [Ctrl]+[Up] or [Down]


How to select multiple parts of the text?

Copy, cut, format, delete parts of the text in different areas of the document:

  • [Ctrl]+<selection> with one click, double-click or sliding.

Another method exists - the "lazy" one (don't feel about holding [Ctrl] over 150 pages!):

  • Click once on the field "STD" (STanDard) in the status bar
  • The field shows now "EXT" (EXTended selection)
  • Another click and it goes to "ADD" (ADD to selection).

-> the ADD mode has the same function than [Ctrl] + click
and EXT the same function than [Shift]+click.


I have some text that I want to appear with the first character of each word in uppercase and the rest of the word in lowercase (initial uppercase or 'title case'). How do I do this automatically?

Follow these steps:

  1. Select the desired text (for example, by drag selecting).
  2. On the main menu , select Format -> Character (or right-click on the selected text and choose Character).
  3. On the Character dialog, choose the Font Effects tab.
  4. In the Effects drop-down list, choose Title Case.
  5. Click OK.

This method also works for anything that can be drag-selected, such as a table row or column.

Note: You can also set up a paragraph or character style with this characteristic and apply the style. For example, if you want all Level 1 headings to be in title case, change the Heading 1 paragraph style and apply that paragraph style to all Level 1 headings.

How do I create a hanging indent in my document?

You have two basic options, depending on how you want your hanging indent to look.

To Use a pre-defined style:

    • Open the Format Stylist (select: Format -> Stylist from the pulldown menu). Have the text cursor in the text that you want to format as hanging indent (or have the cursor in an empty text style and enter the text later)
    • Double-click on the "Hanging indent" choice in the Stylist window. This default style has a hanging indent - but it also has a left margin offset of .19 inches.

To create your own style:

    • Open the Stylist (as described above)
    • Select one of the "generic" styles such as "Standard"
    • Right click (in the Stylist window) to get the context menu and select "New ..."
    • In the dialog that appears, enter a new name for the style
    • Click on the "Indents & Spacing" tab. For a .25 inch hanging style, you would enter ".25" in the "Indent From left" field. Then enter "-.25" in the "Indent First line" field * Click on OK. The new style will be available in the Stylist list.

Is there something like a Format Painter feature that copies the formats of one part of the text to other parts?

There are two possibilities within OOo Writer.

For the first, follow these steps:

  • Make the changes that you want, then, with the cursor still in the paragraph, open the Stylist and then you can either
    • Highlight a portion of the text, hold down the left mouse button and drag the text over the style name then release the mouse button, or
    • Left click on the very far right icon in the Stylist header. This icon is called Update Style.
  • Now, if the changes you have made haven't been transferred already to the other relevant parts of your text, click on the Fill Format icon in the Stylist, which is the third from the right. The button is a toggle - so click once to turn the feature on, and click again to turn it off.
  • Once it is on, select the style from the list to which you've just made the changes, then click into the text area that you want to change.

Another solution would be to actually add a button that acts like a format painter: It's an unofficial, but excellent addon written by the Francophone project. It adds two paintbrush icons to the tool bar, which copy and paint styles. Get it from here: [1]

How do I use styles?

These chapters in the Writer Guide show how to use styles in Writer:


How do I create a simple outline-style numbered list?

It should look like this:

1. List Title
   1.1 First Item
   1.2 Second Item
   1.3 Third Item

There are two tools in OpenOffice.org that give you the ability to create numbered lists. One is the Styles and Formatting window, accessed by pressing F11. It will open in a separate window and will default to opening the Paragraph Styles view. If you click on the fifth icon from the left Numbering Styles, you will see a list of pre-defined number styles. The other tool that you need is the numbering toolbar. This will appear when you are in a text area that has a numbering style assigned. It turns out that the numbering you want for the simple list above is already defined in the pre-defined numbering styles. If the style you need does not exist, you may also create your own styles.

To create the list above:

  1. Type in your text. The paragraph style that you use should not matter. This procedure was tested using the "Text body" paragraph style.
  2. Select all the text by drag selecting.
  3. Double-click on the numbering style Numbering 5. List numbers (but not the sub-numbers) should appear.
  4. Place the text cursor into the list item that says First item.
  5. Click on Move Level Down i.e. the right pointing arrow (the single one) in the numbering toolbar. This item should now have the number "1.1" in front of it.
  6. Repeat the above step for the other sub-list items.

If you need to make your own list numbering style, it is suggested to select one of the existing styles that is similar (in the Styles and Formatting window), then right-click to get a context menu. Select "New..." to make a new style based on the style that was selected. You will get a dialog with many tabs that allow you to configure your own numbering style. See <a href="http://documentation.openoffice.org/manuals/oooauthors2/0207WG-WorkingWithStyles.pdf">Chapter 7, "Working with Styles"</a> in the Writer Guide for more information.

Note: OpenOffice.org will often make numbering difficult when you do the following actions:

  • Press the backspace key when you are in the style following a numbering style.
  • Insert unnumbered styles between numbered styles.
  • Output to HTML format with noncontiguous numbered and unnumbered styles.

How do I remove a large number of hard returns from text that were pasted into my document (for example, from an email message)?

Follow these steps:

  1. Select Edit -> Find & Replace.
  2. Near the bottom left of the dialog that appears, click on the box next to Regular Expressions.
  3. In the "Search For" field, type: ^$ This regular expression says to search for a paragraph marker '$' at the beginning of a paragraph - programmer terms for an empty paragraph.
  4. Click on the "Find" button.
  5. To replace the hard return with a space character, type a space in the "Replace With" field, then click the "Replace" button.
  6. To replace the hard return with nothing (remove the character), click the "Replace" button (without entering anything in the "Replace With" field).
  7. If you have many hard returns to replace, you can also use the "Replace All" button. It is wise to save your document prior to using this option, in case it behaves unexpectedly.

Note: Regular expressions do not appear to work in the "Replace" field.

The space between the letters in a word seems just a bit too wide. It would look better if that space is being reduced. How can I achieve this?

What you need to enable is "Kerning". Kerning is part of the typesetting process, where the space between letters is adjusted to the appearance of the letter and its neighbour. For example, when a V is followed by an A, the shape of the letters would result in a little too much space between them, and this just doesn't look nice. The A should be moved a little towards the V.

This text is not kerned:
Lvat1.jpg
As you can see, the space between the letters is just too wide. This text is kerned:
Lvat2.jpg

So how do you enable kerning?

If you need kerning only for selected parts of your text, follow these steps:

  • Highlight the passages of your text for which kerning needs to be enabled.
  • Now > Format > Character > Position > Spacing, here check box pair kerning.

If you need the whole text to be "kerned", follow here

  • Press F11 to open the stylist.
  • Click on paragraph styles icon to open the list of paragraph styles.
  • Right-click on each paragraph styles that's being used > Modify.
  • Now > Position > Spacing, here check box pair kerning.

Note that kerning is controlled by information in the font data (in particular the font metrics). Fonts that do not need such precise corrections, like fixed width fonts, will not be subject to kerning.

How do I protect (lock) a section of text so that the content cannot be changed?

Follow these steps to protect a section of text:

  • Write or otherwise insert the desired text
  • Select the text to be protected
  • From the pull down menus, select Insert -> Section
  • Click on the box next to Protected
  • Give the section a name (or take the default name assigned)
  • Click on Insert
  • You may also want to create a password on the section. This will keep anyone without the password from removing the protection set on the section.

To insert a password on a protected section:

  • From the pull down menus, select Format -> Sections
  • Select the name of the desired section (if, applicable)
  • Click on the box next to Password protected
  • In the dialog that appears, enter a password and confirm the password
  • Click OK (in the password dialog)
  • Click OK (in the format section dialog)

Follow these steps to modify a section that you have previously protected:

  • From the pull down menus, select Format -> Sections
  • Enter your password in the dialog that appears (only appears if password protected); Click OK
  • Select the name of the desired section (if, applicable)
  • Click on the Remove button
  • Click on OK
  • Make the desired changes
  • Follow steps in the "protect a section of text" instructions, above, to re-apply the section protection

Note:Once you put a password on a section, you will be prompted for that password before receiving any dialog that might have a chance to access that section of text.

How do I assign a keyboard shortcut to a style?

You can assign keyboard shortcuts to frequently used paragraph and character styles. To assign keyboard shortcuts to frequently used paragraphs and character styles:

  1. Go to Tools > Customize.
  2. Click on the Keyboard tab.
  3. In the Category list, select Styles > CharacterStyles. In the Function list, click on the name of the style.
  4. Select a key combination and click Modify.
  5. Click OK to save the change.

Note: You can do the same on the Toolbars tab to assign a style to a toolbar button.

Checking spelling and grammar

Is there a grammar checker?

No, OpenOffice.org doesn't have an internal grammar checker implemented. But for some languages you can use special extensions such as LanguageTool or CoGrOO.


Where do I get a dictionary for my language?

Some dictionaries are installed with OpenOffice.org. Look in Tools>Options>Language Settings>Writing Aids.Click Edit button, then the drop-down list gives you all the languages available.

If you do not find the one you need, look here: Dictionaries.

My spell-checker does not seem to work?

Choose Format->Character. On the Font tab and make sure there is the little ABC✓ check mark in front of the language (meaning the dictionary is installed). If not, you've to download it (run the wizard). If the paragraph style is not Default, check the latter also to cascade the language to the whole document.


How do I setup the spell-checker to be the correct default for my language?

Go to Tools->Options->Language Settings->Languages to set the default language.

If you use a custom template, the setting above is overridden by the Default paragraph style setting (in the Fonts tab).


In fact, spell check management is mostly done by the paragraph style. This is the first place to look at. NB: beware of the direct formatting (done through Format>Characters). It may lead to problems because if later you apply the Default formatting (from context menu for example), it will reset the language to the paragraph style setting. Therefore, if it has not been changed in the paragraph style, you will lose your language setting.

  • Language is set up in the menu Tools>Options>Language Settings>Languages. But this setting is overridden by
  • Language set up in the Font tab of a Paragraph style. Which is also overridden by
  • Language set up in the Font tab of Character style. Which is also overridden by
  • Language set up by direct formatting (Font tab in Format>Characters or context menu>Characters)


How do I perform a spell-check in a multilingual text?

When OOo checks the spelling of a word (note: word, not paragraph or text) it chooses the spelling dictionary appropriate to the language this single word comes from. This is defined in Format->Character->Font. This individual language setting normally is set to the default language but can be changed to any other supported language.

So, to perform a spell-check on a multilingual text you need to select each word that isn't part of the default language and assign the appropriate language in Format->Character->Font.

However, if you want to set the whole text to a new language, highlight the whole text and change the setting in Format->Character->Font.

Note: If you use character or paragraph styles, you can specify the language in the style, then apply a different style to selected words or paragraphs.

Starting in OpenOffice.org 2.4.0, there are three new ways set to the language.

How do I remove the dictionaries I don't need?

By default, OOo is delivered with a bunch of dictionaries activated by default (Swahili, Thai, Russian, English, ...). But for license issue, some languages cannot be included in this package. This is why you have to download them separately.

You may want to disable the exotic languages that you probably don't need, especially if you've activated the option Check in all languages in menu Tools>Options>Language Settings>Writing Aids and in the bottom area (Options).

Edit the file dictionary.lst in <OOo install folder>/share/dict/ooo and only keep the bunches of 3 lines (DICT, HYPH and THES) with the locales you want. More details can be found inside this file. It should look like that :

DICT en US en_US
HYPH en US hyph_en_US
THES en US th_en_US_v2
DICT fr FR fr_FR
HYPH fr FR hyph_fr_FR
THES fr FR th_fr_FR_v2
DICT fr FR fr_FR-1990

Note that here, there are 2 dictionaries for a same language (French): one for the 'old' rules, one for the 'new' rules.


I want to upgrade OOo, what about my settings for languages?

Beware, at each minor upgrade (2.#.# branches), the <OOo install folder>/share/dict/ooo folder is overwritten by the new one. So you loose any customization (installed dics and removed ones), both on Windows and Linux; except that installed dics in the user profile are kept of course. You'll also get the whole bunch of dics delivered out of the box again. For major upgrades (2.# branches), the former /dict folder should remain.

As a workaround, you can put the content of the <OOo install folder>/share/dict/ooo folder in <OOo user profile>/user/wordbook (dictionary.lst + dictionaries), same as Linux. So, keep a dictionary.lst file with the added dics here and it will be taken into account in parallel with the dictionary.lst and the standard dics in the main program folder. But you still have to edit the standard dictionary.lst to remove all the unwanted dictionaries at each upgrade (see above).

Personal tools