You are here: Home » Help » Authoring » Using Open Office Writer to Create Modules

Using Open Office Writer to Create Modules

How to use the OpenOffice Importer document template in Open Office Writer to create modules that can be easily imported and converted to the CNXML format.

Overview:

Recent Changes

With the rollout of CNXML 0.6, some features of the OpenOffice Writer importer have changed. If you have used the importer in the past, please note the following changes:

  • The importer can preserve boldface and italicized text. See the OpenOffice Template Styles section below for more information.
  • Table entries now support lists and multiple paragraphs

Getting Started

OpenOffice Writer offers one of the easiest paths for creating documents, especially if your documents contains mathematics. When used with our custom OpenOffice Writer template, OpenOffice Writer allows you to write a document which can be translated into the CNXML format required by modules. Here, we will show you how to use OpenOffice Writer to properly prepare your document for importing into the repository.

The first thing you need to do before you start creating Documents, is to obtain a copy of the OpenOffice Importer Document Template. Using this template you can create modules that preserve formatting from your OpenOffice Writer document.

Downloading the OpenOffice Importer Document Template

Click the link below to download a copy of the OpenOffice Importer Document Template.

OpenOffice Importer OpenOffice Writer Template

Applying the Template to Your Documents

Once you’ve obtained the template, you can use it to either create a new OpenOffice Writer document or modify an existing OpenOffice Writer document to conform to proper OpenOffice Importer style. In each case, you must incorporate the template into your document using the instructions below.

Creating a New Document with the Template

To create a new document using the OpenOffice Importer styles, double-click on the "Connexions-Document.ott" icon for the OpenOffice Importer document template file you downloaded in the previous step. This will open the template in OpenOffice Writer. Then go to the File menu in OpenOffice Writer and select Save As. In the "Save As" dialog box that appears make sure that "OpenDocument Text (.odt)" appears in the Save as Type drop-down box. Give your document a unique name in the File Name box, and click the Save button. You have now created a new OpenOffice Writer document with the template styles included in it. Delete the default text from the template (beginning with "[Section Name]") and begin editing your document according ot the instructions in "Authoring Documents using the OpenOffice Importer Template" below.

Applying the Template to an Existing Document

To apply the template to an existing document, first open that document in OpenOffice Writer. Then, create a new blank document with the OpenOffice Importer template styles as described in "Creating a New Document with the Template". Once you have done so, you can copy and paste the text from your original document into the new blank document as follows. Go to the Edit menu in the original OpenOffice Writer document and select the Select All option. Then go to the Edit menu in the original OpenOffice Writer document again and select the Copy option. This copies the text of the original document to your system clipboard. Next, go to the Edit menu in the new blank OpenOffice Writer document with the OpenOffice Importer template styles and select the Paste option. The text of the original document is now copied into your new document, and you can begin modifying it with OpenOffice Importer style information as described in the next section.

Authoring Documents using the OpenOffice Importer Template

Once you have created a new document using the OpenOffice Importer template (or applied the template to an existing document), you can begin preparing your document for importing into the repository. In addition to the standard Heading 1, Normal, and Hyperlink,... styles in OpenOffice Writer you now have application-specific styles such as Emphasis, Term, etc. Each style corresponds to a specific CNXML tag (see the next section for a comprehensive list). You can see the styles available to you with the template by going to the Format menu and selecting the Styles and Formatting option. This brings up the "Styles and Formatting" box. Paragraph styles (such as Heading 1, Heading 2, and CNXML Quote) are available by clicking on the leftmost icon at the top of the box (Figure 1). Character styles (such as CNXML Emphasis, CNXML Code, and the rest of the application-specific styles) are available by clicking on the second-leftmost icon at the top of the box (Figure 2).

Figure 1: OpenOffice Writer's paragraph styles in the "Styles and Formatting" box.


Figure 2: OpenOffice Writer's character styles in the "Styles and Formatting" box.


To apply a style to a specific piece of text, you follow the instructions below:

  1. Select the appropriate style from the "Styles and Formatting" box.
  2. Make sure the "Fill Format Mode" tool is selected in the "Styles and Formatting" box (appears as the paint bucket icon in Figure 1 and Figure 2).
  3. Highlight the text to which you wish to apply the style, and it will be applied.

You can download an example of a properly prepared OpenOffice Writer document using the styles supported by the OpenOffice Writer importer. We encourage you to have a look at the document and practice uploading it (see "Uploading Your OpenOffice Importer Document" below) to get a feel for how the OpenOffice Writer import process works.

OpenOffice Writer Template Styles and CNXML

OpenOffice Importer documents contain not only structural information about the document but also semantic information. This means that boldface text will be preserved as emphasized text with the effect attribute set to "bold", and italicized text will be preserved with the effect attribute set to "italics". If you have been using bold text to designate section headings, you should use the heading styles instead.

Using the OpenOffice Writer template with the OpenOffice Writer importer, you can produce the following effects in your CNXML document:

Headings

H1 applied to a section title produces a new section. The section lasts until the next H1-marked title. An H2-marked title in between produces a subsection (which lasts until the next H2- or H1-marked title).

Emphasized text

CNXML Emphasis produces emphasized text. OpenOffice Writer's bold and italics styles will be preserved as emphasized text with the appropriate effect attribute.

Foreign words and phrases

CNXML Foreign allows you to designate text written in a different language from the rest of the document.

Computer code printout

CNXML Code allows you to designate programming language code.

Non-electronic citations

CNXML Cite allows you to reference non-electronic materials.

Key terms

CNXML Term allows you to designate a key word.

Block quotations

CNXML Quote allows you to produce a block quote.

Hyperlinks

Hyperlink allows you to designate text as a link to a web page (make sure to set the URL of the link by right-clicking and selecting “Edit Hyperlink”).

You can also use certain features of the OpenOffice Writer editor to produce other CNXML tags:

Paragraphs

Pressing Enter gives a new line produces a new paragraph.

Lists

Creating a bulleted list gives a CNXML bulleted list. Creating a numbered list gives a CNXML numbered list.

Images

Inserting an image (Insert menu, Picture option) includes an image media object in your CNXML document.

Tables

Inserting a table (Table menu) produces a table.

Mathematics

Inserting an OpenOffice Writer formula (Insert menu, Object option, Formula option) produces a MathML expression. See “Notes on Including Mathematics” below for some guidelines on inserting mathematics into your OpenOffice Writer document.

OpenOffice Writer Importer Do’s

  1. Use only the formatting styles in the OpenOffice Writer template (described above), along with bold and italics if necessary.
  2. Use only images that are locally available on your machine. Make sure either that (1) the images are already available under a creative commons (CC) attribution license, or (2) you own the image copyrights and are willing to make them available under a CC attribution license.
  3. Use image types such as .eps, .jpg, .png, and .gif (or any format with a valid image type); avoid formats such as .wmf and .svg, and avoid Clip Art.
  4. Use the OpenOffice Writer table tool to create tables. Fill your table entries with single-paragraph text, images, and mathematics; avoid multi-paragraph text and lists.
  5. Use the default OpenOffice Writer formula editor for all math (especially subscripts and superscripts), so that MathML will be imported.
  6. Use OpenOffice Writer's footnote tool to include footnotes in your document.

OpenOffice Writer Importer Don’ts

  1. Do not add line breaks betwen paragraphs using cntl-Enter. This will not import as a new paragraph.
  2. Do not use tabs. This formatting will not import.
  3. Do not use lists or tables to invisibly format the document, as these constructs are literally imported as lists and tables into CNXML.
  4. Do not continue list numbering across separate lists.
  5. Do not insert images whose source files are remotely available via a hyperlink.
  6. Do not use OpenOffice Writer's image captioning option; the caption will import as a new paragraph.
  7. Do not use fonts such as “Wingdings" to produce symbols: They will be interpretted as text.

Uploading Your OpenOffice Importer Document

You are now ready to upload the document. Follow the steps below to upload your OpenOffice Importer Document:

  1. After creating your module (see Editing Modules) click the Edit tab (Figure 3).
  2. Select OpenOffice Writer from the Import drop-down list and click Import.
  3. Click Browse to locate the document you want (Figure 4).
  4. Click Import to upload your document. Your new document is uploaded and ready to edit or publish.

Figure 3: The import/export screen in the editing interface.


Figure 4: The import file selection box.


Post-Import Editing

The OpenOffice Writer importer can only produce some of the CNXML tags available for authors to use in their modules (see “OpenOffice Writer Template Styles and CNXML” above). The remainder of tags (for example, notes, exercises, link between modules, etc.) must be added after import, either using the Edit-in-Place interface (recommended) or full-source editing.

It is important when using the OpenOffice Writer importer that you finish preparing the document to your satisfaction in OpenOffice Writer before importing and editing the CNXML. Any re-import of the OpenOffice Writer document will erase the changes you make using Edit-in-Place or full-source editing. Once you have imported, we recommend not using OpenOffice Writer any more to work on your module.

Notes on Including Mathematics

OpenOffice Writer comes with a built in formula editor. It can be launched by opening the Insert menu in OpenOffice Writer, selecting the Object option, and then selecting Formula option.

The OpenOffice Writer importer properly generates Content MathML when the formlua editor is used to add math to your OpenOffice Writer document. It is very important that you only use the Open Office formula editor to enter all your mathematics. Do not mix textual mathematic representations (e.g., super- and sub-scripts) with mathematics generated by the formula tool. Textual mathematics will import as plain text and not be recognized as MathML objects in your module.

My Account