ditainprint.comTranslate this...

82
DITA InPrint TM User Guide First Published: July 1, 2013 Last Modified: April 7, 2014 Author: Tengwar Systems Inc. Copyright © 2014 Tengwar Systems Inc. Tengwar Systems, Inc. 27 Queen Street Paris, ON N3L 1C3 Canada http://www.ditainprint.com Tel: 519-865-1237

Transcript of ditainprint.comTranslate this...

DITA InPrint TM User Guide

First Published: July 1, 2013Last Modified: April 7, 2014

Author: Tengwar Systems Inc.

Copyright © 2014 Tengwar Systems Inc.

Tengwar Systems, Inc.27 Queen StreetParis, ON N3L 1C3Canadahttp://www.ditainprint.comTel: 519-865-1237

Legal Notices THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS, INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS.

THE SOFTWARE LICENSE FOR THE ACCOMPANYING PRODUCT IS SET FORTH IN THE INFORMATION PACKET SHIPPED WITH THE PRODUCT AND IS INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE, CONTACT YOUR TENGWAR SYSTEMS INC REPRESENTATIVE FOR A COPY.

NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED “AS IS" WITH ALL FAULTS. DITA INPRINT DISCLAIMs ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE.

IN NO EVENT SHALL TENGWAR SYSTEMS INC OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF TENGWAR SYSTEMS INC OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

Any Internet Protocol (IP) addresses used in this document are not intended to be actual addresses. Any examples, command display output, and figures included in the document are shown forillustrative purposes only. Any use of actual IP addresses in illustrative content is unintentional and coincidental.

Contents

Installing DITA InPrint .................................................................................7

Requirements ...........................................................................................8

Installing DITA InPrint ............................................................................9

Using the DITA InPrint Desktop Application .............................................13

Running DITA InPrint from a Command Line ..........................................17

About DITA InPrint ......................................................................................19

What does DITA InPrint Do? ...................................................................20

How do I use DITA InPrint? ....................................................................21

Extensions to DITA Provided by DITA InPrint .......................................22

Graphics in DITA InPrint .........................................................................23

Known Limitations ..................................................................................24

Working with DITA InPrint .........................................................................27

Defining DITA Bookmaps .......................................................................28

Setting the Language .........................................................................28

Defining Titles ..................................................................................28

Setting Metadata ...............................................................................28

Adding List Elements .......................................................................31

Adding Other Bookmap Elements ....................................................32

Customizing DITA InPrint Templates with OpenOffice Writer ...............34

Working with OpenOffice Writer .....................................................34

Create a new DITA InPrint template 34

Edit an existing DITA InPrint template 35

Page Styles ........................................................................................36

Paragraph Styles ................................................................................37

Character Styles ................................................................................41

Footnote/Endnote Styles ...................................................................44

List Styles ..........................................................................................45

Frame Styles ......................................................................................47

Table Styles .......................................................................................47

Index Styles .......................................................................................50

Appendix A: DITA InPrint Template Styles ...............................................53

Base Topic Styles .....................................................................................54

Concept Topic Styles ................................................................................65

Reference Topic Styles .............................................................................66

DITA InPrint User Guide iii

Task Topic Styles .....................................................................................67

Machinery Task Topic Styles ...................................................................69

Programming Domain Styles ...................................................................71

Software Domain Styles ...........................................................................75

Hazard Statement Domain Styles ............................................................76

Typographic Domain Styles .....................................................................77

User Interface Domain Styles ..................................................................78

iv DITA InPrint User Guide

Figures

Figure 1: Text FlowBreaks properties in paragraph styles select the page style to use for subsequent content paragraphs...................................................................................................................................39Figure 2: The OpenOffice Writer Styles and Formatting dialog enables you to see how paragraph stylesare linked to each other hierarchically.....................................................................................................40Figure 3: The OpenOffice Writer Styles and Formatting dialog enables you to see how character styles are linked to each other hierarchically.....................................................................................................43Figure 4: Level One <fig> <title> Element Style....................................................................................58Figure 5: Level One <fig> <title> Element Style....................................................................................59Figure 6: Level One <fig> <title> Element Style....................................................................................59Figure 7: Level One <fig> <title> Element Style....................................................................................59Figure 8: Level One <fig> <title> Element Style....................................................................................60

DITA InPrint User Guide v

Tables

Table 1: <table> <title> Element.............................................................................................................60Table 2: <table> <title> Element.............................................................................................................60Table 3: <table> <title> Element.............................................................................................................61Table 4: <table> <title> Element.............................................................................................................61Table 5: <table> <title> Element.............................................................................................................61

vi DITA InPrint User Guide

Installing DITA InPrint To install and use DITA InPrint, confirm that your computer meets the installation requirements. Then install the DITA InPrint software.

Related Topics Requirements on page 8 DITA InPrint requires a computer running Microsoft Windows 7 or 8, Apple OS X, or Ubuntu Linux, with Apache OpenOffice 4 or higher. If you want to view PDF documents published with DITA InPrint, you will need Adobe Acrobat Reader or some other PDF reader application installed as well.

Installing DITA InPrint on page 9 To install DITA InPrint, you extract the distribution archive, copy the OpenOffice styles file, and test the installation by publishing the DITA InPrint User Guide. You can also configure the oXygen XML Editor or Author to use DITA InPrint to publish DITA content from within oXygen.

DITA InPrint User Guide 7

Installing DITA InPrint / Requirements

Requirements DITA InPrint requires a computer running Microsoft Windows 7 or 8, Apple OS X, or Ubuntu Linux, with Apache OpenOffice 4 or higher. If you want to view PDF documents published with DITA InPrint, you will need Adobe Acrobat Reader or some other PDF reader application installed as well.

OpenOfficeYou can download OpenOffice for Windows from the Apache archive at http://www.openoffice.org/download/index.html.

Note: Install OpenOffice to the default folder. It's possible to install it to another folder, but you will then have to modify DITA InPrint so that it can find the OpenOffice installation.

PDF ReaderTo view the PDF files generated by DITA InPrint, you need a PDF reader application such as Adobe Acrobat Reader installed on the computer.

Related Topics Installing DITA InPrint on page 9 To install DITA InPrint, you extract the distribution archive, copy the OpenOffice styles file, and test the installation by publishing the DITA InPrint User Guide. You can also configure the oXygen XML Editor or Author to use DITA InPrint to publish DITA content from within oXygen.

8 DITA InPrint User Guide

Installing DITA InPrint / Installing DITA InPrint

Installing DITA InPrint To install DITA InPrint, you extract the distribution archive, copy the OpenOffice styles file, and test the installation by publishing the DITA InPrint User Guide. You can also configure the oXygen XML Editor or Author to use DITA InPrint to publish DITA content from within oXygen.

Procedure

1. Extract the DITA InPrint archive to a folder on your computer.

2. Create a backup copy of the autotbl.fmt table styles file that is currently in your OpenOffice user configuration folder:

Windows: {home-folder}\AppData\Roaming\OpenOffice\4\user\config

Tip: If you cannot see the AppData folder in Windows Explorer, change the folder options to show hidden files and folders.

Ubuntu Linux: {home-folder}/.openoffice/4/user/config

Apple OS/X: {home-folder}/Libraries/Application Support/OpenOffice/4/user/config

3. Copy the autotbl.fmt table styles file from the DITA InPrint/Templates/DITA InPrint User Guide folder to your OpenOffice user configuration folder.

4. Optional: Integrate DITA InPrint into oXygen XML Editor or oXygen XML Author:

a) In oXygen, choose Options > Import Transformation Scenarios.oXygen opens a file chooser.

b) Browse to the DITA InPrint folder and choose oXygenTransforms.scenarios.oXygen imports two transformation scenarios: “DITA InPrint Map” and “DITA InPrint Topic”

c) In oXygen's Transformation Scenarios window, edit the following properties of each of the DITA InPrint transformation scenarios by selecting it and choosing Edit in the context menu.

In this tab... For this property... Edit the value to...

Options Build file The path to the build.xml file in the DITA InPrint folder: e.g. C:\DITA InPrint\build.xml

Ant Home Custom: the path to the tools/ant folder in the DITA InPrint folder: e.g. C:\DITA InPrint\tools\ant

Java Home Custom: the path to the jre7 folder in the DITA InPrint folder: e.g. C:\DITA InPrint\jre7

Libraries Two libraries: the paths to the lib folder and the lib/saxon folder in the DITA InPrint folder: e.g. file:/C:/DITA%20InPrint/lib/ and file:/C:/DITA%20InPrint/lib/saxon.

Note: The paths must conform to the URI format shown in this example; if they don't, oXygen can't loadthem. Use oXygen's browse button in the path editor toselect the paths; oXygen automatically converts the paths to URI format. Do not use the Windows format for paths.

Parameters args.gen.task.lbl “YES” or “NO”: option to generate labels for elements in task topics

DITA InPrint User Guide 9

Installing DITA InPrint / Installing DITA InPrint

In this tab... For this property... Edit the value to...

args.odt.include.rellinks “all”, “none”, “nofamily”, or “Chapter TOC”: options for generating links to related topics

clean.temp “true” or “false”: option to delete temporary files generated during publishing

dita.dir The path to the DITA InPrint folder

args.filter The path to and file name of the DITAVAL file used to control conditional publishing

odt.figure.title “above” or “below”: position of figure title relative to the figure image

odt.table.title “above” or “below”: position of table title relative to the table tgroup

odt.template.file The path to and name of the OpenOffice Writer template used to style the published document

5. Test the installation:

• using the DITA InPrint desktop application.See Using the DITA InPrint Desktop Application on page 13 for details.

• from within oXygen:

i. In the DITA InPrint/User Guide folder, open the DITA map DITA_InPrint_user_guide.ditamap.

ii. Choose Document > Transformation > Configure Transformation Scenarios.

iii. In the Choose Transformation Scenarios dialog, choose DITA InPrint Map.

Tip: You might have to select the gear icon in the upper right corner of the dialog and choose Show all scenarios to display the DITA InPrint Map and DITA InPrint Topic scenarios.

iv. Choose Apply Associated.

oXygen opens a log window to display the progress of the transform. When the transform completes, oXygen opens the PDF version of the published document.

• from a command line:

i. Open a command line:

Windows: In Windows Explorer, open the DITA InPrint folder and run startcmd.bat.

Ubuntu Linux: In Nautilus, open the DITA InPrint folder and run startcmd.sh in a terminal window.

Apple OS X: In Finder, open the Applications/Utilities folder and run Terminal. In the terminal window, set the current directory to the DITA InPrint folder and then run the command bash startcmd.sh to start a new terminal window.

ii. Enter the command: ant -f build.xml "-Dargs.input=User Guide/DITA_InPrint_user_guide.ditamap" "-Doutput.dir=User Guide/DITA InPrint" -Dtranstype=ditastyle "-Dodt.template.file=Templates/DITA

InPrint User Guide/DITA_InPrint_user_guide.ott"

The command line displays the progress of the transform as it runs.

10 DITA InPrint User Guide

Installing DITA InPrint / Installing DITA InPrint

The output folder (by default DITA InPrint/User Guide/DITA InPrint) contains the OpenOffice Writer (DITA_InPrint_user_guide.odt), Microsoft Word (DITA_InPrint_user_guide.doc), and Portable Document Format (DITA_InPrint_user_guide.pdf) versions of the user guide.

Related Topics Requirements on page 8 DITA InPrint requires a computer running Microsoft Windows 7 or 8, Apple OS X, or Ubuntu Linux, with Apache OpenOffice 4 or higher. If you want to view PDF documents published with DITA InPrint, you will need Adobe Acrobat Reader or some other PDF reader application installed as well.

DITA InPrint User Guide 11

Using the DITA InPrint Desktop Application The DITA InPrint desktop application provides a graphical user interface that enables you to publish and view DITA content without having to using a command line interface, a DITA XML editor, or a content management system.

Before You Begin

Note: DITA InPrint 1.0 enables you to publish individual topics as well as maps, but you cannot publish topics fromthe desktop application.

Procedure

1. In the DITA InPrint folder, run the DITA InPrint desktop application:

• Windows: Run DITA InPrint.exe.

• Apple OS X: Run DITAInPrint.jar.

• Ubuntu Linux: Run startGUI.sh.

The DITA InPrint desktop application opens:

DITA InPrint User Guide 13

Using the DITA InPrint Desktop Application / Using the DITA InPrint Desktop Application

2. Confirm that the PDF Reader text box contains the path and file name of the PDF reader application you wish to use to view output PDF documents:Most Windows users use the free Acrobat Reader application, downloadable from www.adobe.com. Apple OS X users can use the default Preview application. Ubuntu Linux users can use the Evince document viewer application.

3. Configure the publishing setup:

• Open an existing setup:

i. Choose File > Open Setup.

DITA InPrint opens a file chooser.ii. Browse to a setup file (*.ditapub) and select the file.

DITA InPrint populates the publishing settings from the setup file.

• Enter the publishing setup settings manually.

Tip: Move the cursor over a field to view a pop-up description of the field's value.

• Save the setup:

i. Choose File > Save Setup.

DITA InPrint opens a file chooser.ii. Browse to the folder where you want to save the setup file.

iii. Enter a name for the setup file.

Important: The file must end with the .ditapub extension.

14 DITA InPrint User Guide

Using the DITA InPrint Desktop Application / Using the DITA InPrint Desktop Application

iv. Choose Save.

4. Choose Publish.

DITA InPrint starts publishing the bookmap. The log window flickers as the publishing operation runs and the status bar at the bottom of the window displays the progress of the publishing operation.

5. When publishing is finished, choose Open PDF to view the PDF generated in the output folder.

DITA InPrint User Guide 15

Running DITA InPrint from a Command Line You (or a software agent such as content management system) can run DITA InPrint from a command line. DITA InPrint accepts the same DITA to ODF parameters as the DITA Open Toolkit 1.7.5, plus some parameters of its own, including one for the OpenOffice Writer template to apply, and two for positioning titles for figures and tables.

Procedure

1. Open a command line:

• Windows: In Windows Explorer, navigate to the DITA InPrint folder and run startcmd.bat.

• Ubuntu Linux: In Nautilus, navigate to the DITA InPrint folder, open startcmd.sh, and choose Run in Terminal.

• Apple OS/X:

i. Run Applications > Utilities > Terminal.app to open a terminal window.

ii. Set the current directory to the DITA InPrint folder.

iii. Start a new command line: enter bash startcmd.sh.

2. Enter the publishing command:

ant -f build.xml -Dargs.input= <path to and file name of input ditamap or topic> -Doutput.dir= <path to output folder> -Dtranstype=ditastyle -Dodt.template.file= <path to and file name of OpenOffice Writer template>

Optional parameters include:

Parameter Possible Values

-Dargs.gen.task.lbl “YES” or “NO”: option to generate labels for elements in task topics

-Dargs.odt.include.rellinks “all”, “none”, “nofamily”, or “Chapter TOC”: options for generating linksto related topics

-Dclean.temp “yes” or “no”: option to delete temporary files generated during publishing

-Dargs.filter The path to and file name of the DITAVAL file used to control conditionalpublishing

-Dodt.figure.title “above” or “below”: position of figure title relative to the figure image

-Dodt.table.title “above” or “below”: position of table title relative to the table tgroup

DITA InPrint User Guide 17

Running DITA InPrint from a Command Line / Running DITA InPrint from a Command Line

Note: If a path or file name contains spaces, you must enclose the parameter is quote characters: for example, "-Dargs.input=User Guide/DITA_InPrint_user_guide.ditamap".

18 DITA InPrint User Guide

About DITA InPrint DITA InPrint enables you to publish DITA maps and topics to PDF, Microsoft R Word R, and Apache OpenOffice TM Writer documents, using style templates you create and customize in Writer.

Related Topics What does DITA InPrint Do? on page 20 DITA InPrint solves a key challenge for organizations considering migrating their technical and business documentation to DITA: publishing documents that conform to corporate standards

How do I use DITA InPrint? on page 21 All you need to use DITA InPrint is DITA content and an OpenOffice Writer template.

Extensions to DITA Provided by DITA InPrint on page 22 DITA InPrint extends some DITA elements to provide additional styling capabilities.

Graphics in DITA InPrint on page 23 DITA InPrint enables you to use any type of graphic file supported by OpenOffice Writer. For some common bitmap graphic file types, such as JPEG and PNG, and for SVG graphic files, DITA InPrint determines the height and width of the image and sets their size in Writer accordingly, However, for other graphic file types, such as DXL or BMP, authors must set the desired size in the DITA source using the attributes for this purpose on the <image> element.

Known Limitations on page 24 DITA InPrint 1.0 does not directly support all the elements and attributes defined in the DITA 1.2 standard. In addition, Apache OpenOffice Writer does not support a small number of DITA capabilities.

DITA InPrint User Guide 19

About DITA InPrint / What does DITA InPrint Do?

What does DITA InPrint Do? DITA InPrint solves a key challenge for organizations considering migrating their technical and business documentation to DITA: publishing documents that conform to corporate standards

When it comes to policies and procedures, product user guides, manufacturing work instructions, and other mainstream business publications, senior management are not willing to compromise on appearances. They demand conformance with corporate templates and file formats, usually Microsoft R Word R and PDF.

This is a problem for corporate and technical communication teams that want to take advantage of the incredible productivity benefits delivered by authoring, managing, and publishing content in DITA XML.

Until now, there was no easy or inexpensive way to design publishing templates for DITA content that conformed to corporate standards. The DITA Open Toolkit requires extensive customization by expert programmers to produce a single type of brand-compliant PDF output, a process that typically requires several weeks of effort.

Nor was there any easy way to publish DITA documents to styled Microsoft Word documents, the most common format for distributing, reviewing, and printing corporate documentation. The DITA Open Toolkit can publish to rich text format (RTF), which Word can open, but these documents do not use paragraph or characters styles, which make it very difficult to customize for brand compliance, difficult to import into other desktop publishing tools, and difficult for readers to navigate and use.

The result: a tough sell to senior management on the benefits of moving to DITA. And even if management approves a move to DITA, documentation teams face delays and/or thousands of dollars in fees charged by consultants and programmers to customizeauthoring and publishing tools to make them output documents that conform to corporate standards.

But now, DITA InPrint makes it easy and affordable for non-technical users to design publishing templates that conform to corporate standards. You can publish your DITA content as a user guide, or a quick start guide, or a marketing brochure, or any other type of document just by selecting the corresponding template.

20 DITA InPrint User Guide

About DITA InPrint / How do I use DITA InPrint?

How do I use DITA InPrint? All you need to use DITA InPrint is DITA content and an OpenOffice Writer template.

The steps required to style and publish your DITA content with DITA InPrint are very straightforward:

1. Create a DITA bookmap.

DITA bookmaps define the top-level structure of your published document: title, Table of Contents, preface, chapters, appendixes, and so on. Bookmaps also define the organization of topics in the document, the order and level at which topics appear.

DITA bookmaps do not contain any settings that define the appearance, or styling, of the published document: fonts, page layouts, table borders and colours, and so on. Those are defined in DITA InPrint templates, which you customize in the next step.

2. Customize a DITA InPrint template.

DITA InPrint includes templates that you can easily customize to apply the styling and page layout your organization requires. You customize the templates in Apache OpenOffice Writer, a desktop application similar to Word, but more powerful, more reliable, easier to use, more secure, and available on more operating systems. It is also open source and free.

3. Publish the DITA bookmap.

From your authoring tool or content management system, or from DITA InPrint's own standalone desktop application, you simply select the bookmap and template to use, and launch the publishing process. DITA InPrint runs the bookmap through the DITA Open Tookit's preprocessing stage, and then transforms the result into PDF, Word, and Writer documents with the styling and page layout defined in the template.

DITA InPrint User Guide 21

About DITA InPrint / Extensions to DITA Provided by DITA InPrint

Extensions to DITA Provided by DITA InPrint DITA InPrint extends some DITA elements to provide additional styling capabilities.

DITA InPrint enables you to use the @outputclass attribute on the following elements to provide additional styling capabilities:

Element Supported @outputclass Values

<fig>, <table> “landscape” Selects the landscape page style for the element. The first element after the <fig> or <table> element will revert to the portrait page style.

Restriction: DITA InPrint 1.0 only supports the use of landscape orientation in topics that are children of <chapter> elements.

<table> Autoformat Selects the OpenOffice Writer autoformat style for the table.

<fn> “endnote” Sets the footnote type in OpenOffice Writer to endnote, which appear at the end of the document. You can define a page style in Writer for endnotes, and set many other styling aspects of endnotes.

22 DITA InPrint User Guide

About DITA InPrint / Graphics in DITA InPrint

Graphics in DITA InPrint DITA InPrint enables you to use any type of graphic file supported by OpenOffice Writer. For some common bitmap graphic file types, such as JPEG and PNG, and for SVG graphic files, DITA InPrint determines the height and width of the image and sets their size in Writer accordingly, However, for other graphic file types, such as DXL or BMP, authors must set the desired size in the DITA source using the attributes for this purpose on the <image> element.

Graphic Formats for Which DITA InPrint Can Determine Image SizeDITA InPrint can determine the size of images in the following formats:

JPEG (.jpeg, .jpg)

PNG (.png)

GIF (.gif)

SVG (.svg)

Note: Authors can still control the size of images as they appear in Writer, by setting values on the @height, @width, and/or @scale attributes of the <image> element. If authors set only the @height attribute or only the @width attribute, DITA InPrint will scale the undefined @height or @width value to maintain the original aspect ratio of the image. If authors set a value for the @scale attribute, DITA InPrint will scale the image accordingly after it has determined the height and width values.

Graphic Formats for Which Authors Must Specify Image SizesAuthors must set both @height and @width <image> attribute values for all types of graphic formats except JPEG, PNG, GIF, and SVG. Authors may optionally also set @scale attribute values.

Note: DITA InPrint supports MathML 2.0 files referenced from an <image> element. However, authors must set @height and @width <image> attribute values for them.

Note: If the author fails to set @height and @width <image> attribute values for an image, the image will still appear in the output, but will display as a very small thumbnail.

DITA InPrint User Guide 23

About DITA InPrint / Known Limitations

Known Limitations DITA InPrint 1.0 does not directly support all the elements and attributes defined in the DITA 1.2 standard. In addition, Apache OpenOffice Writer does not support a small number of DITA capabilities.

Note: If you need support for any unsupported element or attribute, contact [email protected].

Suppressed ElementsDITA InPrint 1.0 suppresses from output the following elements (and any elements specialized from them):

<required-cleanup>

<prolog>

<longdescref>

<longquoteref>

<object>

<param>

<data>

<data-about>

<foreign>

<unknown>

<titlealts>

<navtitle>

<searchtitle>

<index-base>

<index-see>

<index-see-also>

<index-sort-as>

Unsupported ElementsDITA InPrint 1.0 does not directly support the following DITA 1.2 standard elements (though it does not suppress them from output):

Glossary elements

xNAL domain elements

Learning and training elements

Utilities domain elements

Unsupported AttributesDITA InPrint 1.0 does not provide direct support for the following element attributes:

rowsep

colsep

24 DITA InPrint User Guide

About DITA InPrint / Known Limitations

align

valign

scale

frame

pgwide

rowheader

char

charoff

base

rowheader

keycol

rev

status

compact

expanse

translate

scale (in <table> elements)

outputclass (except on <fig>, <table>, <simpletable>, <dl>, <properties>, <parml>, and <choicetable> elements)

DITA 1.2 Features Not Supported by Apache OpenOffice WriterThere are a small number of DITA 1.2 features that are not supported by Apache OpenOffice Writer:

Hyperlinked entries in lists of figures, lists of tables, and alphabetical indexes.

Note: The Open Document Format 1.2 standard does not prohibit hyperlinked list and index entries in Writer documents, so a future version of DITA InPrint might add support for them, even if Writer does not.

Index entries more than three levels deep

DITA InPrint User Guide 25

Working with DITA InPrint Working with DITA InPrint consists of several steps: defining a DITA bookmap for each document you want to publish, customizing a DITA InPrint template to get the appearance and layout you need for your documents; and publishing your documents. For most users, this is an iterative process: each time you publish, you will most likely want to make changes to the publishing template and perhaps to the bookmap to get the output the way you need it.

Tip: This document, DITA InPrint User Guide, was published from DITA XML sources, using the Technical Publications template. As you read, follow the instructions to change the style of this document. You can see immediately how the new styles look. At any time, you can save this document to a new name and use it to publish your own DITA content.

Related Topics Defining DITA Bookmaps on page 28 DITA InPrint takes a DITA 1.2 bookmap as one of its two required inputs. DITA InPrint works with any valid DITA bookmap, butyou might not get the results you expect unless you construct your bookmap to follow the structure the DITA Open Toolkit is designed to use.

Customizing DITA InPrint Templates with OpenOffice Writer on page 34 DITA InPrint templates consist of OpenOffice Writer templates using the same set of hierarchical paragraph and character styles, page styles, list styles, frame styles, and named tables. By modifying the properties of these styles and tables, and by creating and modifying table autoformats, you can control every aspect of the appearance and layout of your published documents.

DITA InPrint User Guide 27

Working with DITA InPrint / Defining DITA Bookmaps

Defining DITA Bookmaps DITA InPrint takes a DITA 1.2 bookmap as one of its two required inputs. DITA InPrint works with any valid DITA bookmap, butyou might not get the results you expect unless you construct your bookmap to follow the structure the DITA Open Toolkit is designed to use.

The DITA 1.2 standard places some constraints on how you construct a bookmap: rightly so, or it would not be a standard. Even with these constraints, however, there are a very large number of ways you can construct a valid DITA bookmap, and neither the DITA Open Toolkit, nor DITA InPrint can produce satisfactory output for every possible combination of elements and attributes.

DITA InPrint supports best practices in bookmap design; the bookmap used to publish this document is an example of those practices. Review the following bookmap notes and XML excerpts to understand how to design your bookmaps.

Related Topics Customizing DITA InPrint Templates with OpenOffice Writer on page 34 DITA InPrint templates consist of OpenOffice Writer templates using the same set of hierarchical paragraph and character styles, page styles, list styles, frame styles, and named tables. By modifying the properties of these styles and tables, and by creating and modifying table autoformats, you can control every aspect of the appearance and layout of your published documents.

Setting the Language You set the language and language variant for the document on the @xml:lang attribute of the bookmap.

For example:

<bookmap xml:lang="en-ca">

The value “en-ca” sets the language to English and the language variant to Canadian.

DITA InPrint uses the value of the @xml:lang attribute to select the language for the autogenerated text in the published document, including the task and caption labels. For more information about localization, see [xref to localization] topic.

Note: DITA InPrint ignores @xml:lang attribute values set on any other element, including the topic elements referenced by the bookmap.

Defining Titles You have two choices for titles in a bookmap: a <title> element or a <booktitle> element. If you need subtitles, use <booktitle>, which enables you to set your main title with <maintitle>, and each of your subtitles with <booktitlealt>.

Here is an example of a <booktitle> element that uses a <booktitlealt> element for a subtitle:

<booktitle> <mainbooktitle>DITA InPrint<tm tmtype="tm"/></mainbooktitle> <booktitlealt>User Guide</booktitlealt></booktitle>

DITA InPrint styles <title> and <maintitle> with OpenOffice Writer's Title paragraph style, and each <booktitlealt> with Writer's Subtitle paragraph style. The Title style has been defined to select Writer's Cover page style. DITA InPrint also adds the <title> or <mainbooktitle> text content to the Writer document's Title document property.

Setting Metadata You set bookmap metadata in the <bookmeta> element, enabling you to include in your published documents such information as title, author, copyright information, and document revision.

DITA InPrint converts most <bookmeta> elements and attributes to Writer document properties: some to the standard Writer document properties, and the rest to custom document properties.

28 DITA InPrint User Guide

Working with DITA InPrint / Defining DITA Bookmaps

Setting the Title, Subject, Keywords, and Comments Document PropertiesDITA InPrint converts the bookmap's <title> or <mainbooktitle> text content to the Writer Title document property, the text content of <keywords> to the Keywords property, the text content of <shortdesc> to the Comments property, and the text content of the <prodname> element in the <prodinfo> element to the Subject document property.

For example, if the bookmap contains the following elements:

<bookmap xml:lang="en-ca"> <booktitle> <mainbooktitle>DITA InPrint<tm tmtype="tm"/></mainbooktitle> <booktitlealt>User Guide</booktitlealt> </booktitle> <bookmeta> <shortdesc>Describes what DITA InPrint consists of, what it does, and how to use it.</shortdesc> [...] <keywords> <keyword>DITA InPrint</keyword> <keyword>Apache OpenOffice Writer</keyword> <keyword>User Guide</keyword> </keywords> <prodinfo> <prodname>DITA InPrint</prodname> </prodinfo> [...] </bookmeta>..[...]</bookmap>

After publishing, the content of these elements will appear in the Writer document properties as:

The PDF generated from this document will contain the following document properties:

DITA InPrint User Guide 29

Working with DITA InPrint / Defining DITA Bookmaps

Setting Other Document PropertiesThe content of most <bookmeta> elements besides <keywords>, <shortdesc>, and <prodname> are converted to custom Writer document properties.

If an element contains text content, it is converted to custom document property with the same name as the element and a value of the text content of the element.

If an element contains an attribute with text content, the attribute is converted to a customer document property with the samename as the attribute, plus the name of its parent element in square brackets, and a value of the text content of the attribute.

For example, if <bookmeta> contains the following elements:

<bookmeta> <author>Tim Grantham</author> <publisherinformation> <organization>Grantham SoftWorks</organization> </publisherinformation> <critdates> <created date="July 1, 2013"/> <revised modified="October 30, 2013"/> </critdates> <prodinfo> <vrmlist> <vrm version="1.0"/> </vrmlist> </prodinfo> <bookrights> <copyrfirst> <year>2013</year> </copyrfirst> <bookowner> <organization>Grantham SoftWorks</organization> </bookowner> </bookrights></bookmeta>

The content of these elements will appear in the Writer document properties as:

30 DITA InPrint User Guide

Working with DITA InPrint / Defining DITA Bookmaps

Note that Writer eliminates duplicate document properties.

Tip: Your templates can use Writer document properties in headers and footers. For details, see [xref to task for using doc properties].

Adding List Elements Bookmap list elements include <toc>, <figurelist>, and <abbrevlist>. DITA InPrint can automatically generate document content for <toc>, <figurelist>, <tablelist>, and <indexlist>. For others, it outputs the content referenced by the list element.

DITA InPrint can automatically generate contents in the published documents for each of the following elements: <toc>, <figurelist>, <tablelist>, and <indexlist>. All you have to do is add them to the bookmap where you want them to appear in the published document (and, of course, where it is valid within the bookmap), without providing any contents or attributes.

Here is an example of <toc>, <figurelist>, and <tablelist> elements added at the start of the published document:

<frontmatter> <notices href="software_license.xml"/> <booklists> <toc/> <figurelist/> <tablelist/> </booklists></frontmatter>

Here is an example of the <indexlist> added at the end of the published document:

<backmatter> <booklists> <indexlist/> </booklists></backmatter>

The published document will contain an automatically generated list for each of these elements, styled according to the publishingtemplate. Here are examples of each list as it appears in the published document:

DITA InPrint User Guide 31

Working with DITA InPrint / Defining DITA Bookmaps

<toc> <figurelist> <tablelist> <indexlist>

Note: You define the titles for these lists in the template. Do not define them in the list element.

If you do provide an @href value for a list element (and you must for any list element other <toc>, <figurelist>, <tablelist>, and <indexlist>), DITA InPrint outputs the contents of the referenced topic; it does not output an automatically generated list.

Adding Other Bookmap Elements DITA InPrint 1.0 provides direct support for many bookmap elements, including <preface>, <chapter>, and <toc>, enabling you to customize unique page layouts for each. Other bookmap elements, such as <colophon>, <bookabstract>, and <abbrevlist>, are indirectly supported: the content they reference is always output to either a <frontmatter> page or a <backmatter> page, depending on where they appear in the bookmap.

Restriction: DITA InPrint 1.0 requires the following bookmap elements to have an @href attribute that references a topic (not a map): <chapter>, <notices>, <part>, <appendices>, <appendix>, <glossarylist>, <abbrevlist>, <bookabstract>, <trademarklist>, <dedication>, <draftinfo>, <colophon>, <bibliolist>, and <amendments>. A <chapter> element, for example, that contains only a @navtitle attribute and value is valid DITA, but it will not generate a chapter in the published document.

Restriction: In DITA InPrint 1.0, <topichead> elements that have as parent elements <frontmatter> or <backmatter>will not appear in the output. This is also true of any other element that is both a child of <frontmatter> or <backmatter> and that does not contain an @href value referencing a topic or map. <topichead>, <topicref>, and other base ditamap elements at any other valid location in the bookmap that do not have @href values will appear inthe output, as long as they have a @navtitle attribute value.

Here are some examples of bookmap elements that will publish successfully:

<chapter href="installing_ditainprint.dita"> <topicref href="requirements.dita"/> <topichead navtitle="This title will appear in the output."/> <topicref href="installing_ditapublisher_desktop.dita"/> <topicref href="installing_ditapublisher_plugin.dita"/></chapter>

<chapter href="installing_ditainprint.dita"> <mapref href="installing.ditamap"/></chapter>

<frontmatter> <notices href="software_license.xml"/> <booklists> <toc/> <figurelist/>

32 DITA InPrint User Guide

Working with DITA InPrint / Defining DITA Bookmaps

<tablelist/> </booklists></frontmatter>

Here are some examples of bookmap elements that may not publish successfully:

<preface href="installing.ditamap" format="ditamap"/>

The <preface> element above may not publish successfully because it references a map, rather than a topic.

<frontmatter> <topichead navtitle="This heading will not appear in the output."/></frontmatter>

The <topichead> element in the <frontmatter> element above will not appear in the output.

DITA InPrint User Guide 33

Working with DITA InPrint / Customizing DITA InPrint Templates with OpenOffice Writer

Customizing DITA InPrint Templates with OpenOffice Writer DITA InPrint templates consist of OpenOffice Writer templates using the same set of hierarchical paragraph and character styles, page styles, list styles, frame styles, and named tables. By modifying the properties of these styles and tables, and by creating and modifying table autoformats, you can control every aspect of the appearance and layout of your published documents.

Related Topics Defining DITA Bookmaps on page 28 DITA InPrint takes a DITA 1.2 bookmap as one of its two required inputs. DITA InPrint works with any valid DITA bookmap, butyou might not get the results you expect unless you construct your bookmap to follow the structure the DITA Open Toolkit is designed to use.

Working with OpenOffice Writer You use Apache OpenOffice TM Writer to customize DITA InPrint templates.

Related Topics Page Styles on page 36 DITA InPrint template page styles define the sequence, dimensions, headers and footers, and many other aspects of the page typesused to publish DITA documents. You use OpenOffice Writer to modify the page styles.

Create a new DITA InPrint template

You always create a new DITA InPrint from an existing DITA InPrint template.

Before You BeginStart OpenOffice Writer.

Procedure

1. Open the Open file browser:

• Choose File > Open.

• Press Ctrl-O .

• Choose in the Standard Toolbar.

Writer opens the Open file browser.

2. Show only template files in the browser:

a) Choose All files (*.*)

b) Select ODF Text Document Template (*.ott).

The file browser hides all non-template files.

3. Open the existing template:

a) Browse to the template folder

b) Select the template.

c) Choose Open.

Writer creates a new text document from the template.

4. Open the Save As file browser::

• Choose File > Save.

34 DITA InPrint User Guide

Working with DITA InPrint / Customizing DITA InPrint Templates with OpenOffice Writer

• Press Ctrl-S .

• Choose in the Standard Toolbar.

Writer opens the Save As file browser.

5. Browse to the folder where you want to save the new template.

6. Set save file type:

a) Choose Save as type.

b) Select ODF Text Texmplate (.ott) (*.ott).

7. Enter a name for the new template in the File name text box.

8. Choose Save.

ResultsWriter saves the new template.

Edit an existing DITA InPrint template

To edit a DITA InPrint template, you must open it in OpenOffice Writer as a template, not as a text document.

About this TaskAll DITA InPrint templates are stored as ODF Text Document Template (*.ott) files.

Tip: If a template appears in Writer's list of recent documents (choose File > Recent Documents to see the list), you can open the template from the list.

Procedure

1. Open a file system browser:

• In Microsoft Windows, open Windows Explorer.

• In Apple OS/X, open Finder.

• In Linux, open ??

2. Browse to the folder containing the template.

3. Select the template and open its context menu:

4. Choose Open.

Important: Do not choose New in the context menu! The New command does not open the template; instead, it creates a new text document based on the template.

Writer opens the template.

5. Edit the template, using the instructions and information in this user guide.

6. Save the template:

• Choose File > Save.

• Press Ctrl-S .

DITA InPrint User Guide 35

Working with DITA InPrint / Customizing DITA InPrint Templates with OpenOffice Writer

• Choose in the Standard Toolbar.

Page Styles DITA InPrint template page styles define the sequence, dimensions, headers and footers, and many other aspects of the page typesused to publish DITA documents. You use OpenOffice Writer to modify the page styles.

DITA InPrint templates use the following page styles:

Bookmap Element Default Supporting Page Styles

<abbrevlist> <backmatter> Body, <frontmatter> Body

<amendments> <backmatter> Body

<appendices> <appendices> First, <appendices> Body

<appendix> <appendix> First, <appendix> Body

<bibliolist> <backmatter> Body, <frontmatter> Body

<bookabstract> <frontmatter> Body

<booklist> <backmatter> Body, <frontmatter> Body

<chapter> <chapter> First, <chapter> Body, <chapter> Landscape Body

<colophon> <backmatter> Body, <frontmatter> Body

<dedication> <backmatter> Body, <frontmatter> Body

<draftintro> <frontmatter> Body

<figurelist> <backmatter> Body, <frontmatter> Body

<glossarylist> <backmatter> Body, <frontmatter> Body

<indexlist> <indexlist> First, <indexlist> Body

<notices> <notices> First, <notices> Body

<part> <part> First, <part> Body

<preface> <preface> First, <preface> Body

<title>, <maintitle>, <booktitlealt>

Cover

<tablelist> <backmatter> Body, <frontmatter> Body

<toc> <toc> First, <toc> Body

<trademarklist> <backmatter> Body, <frontmatter> Body

Note: Body page styles include styles for both left and right pages, using OpenOffice Writer's “Mirrored” layout property.

You customize page styles by placing the text cursor in the page to customize and choosing Format > Page (or choosing Page in the context menu) to open the Page Style dialog:

36 DITA InPrint User Guide

Working with DITA InPrint / Customizing DITA InPrint Templates with OpenOffice Writer

Related Topics Working with OpenOffice Writer on page 34 You use Apache OpenOffice Writer to customize DITA InPrint templates.

Paragraph Styles on page 37 DITA InPrint template paragraph styles define paragraph indents and spacing, font, tabs, pagination, and many other styling properties for DITA block elements such as <title>, <p>, and <codeblock>.

Paragraph Styles DITA InPrint template paragraph styles define paragraph indents and spacing, font, tabs, pagination, and many other styling properties for DITA block elements such as <title>, <p>, and <codeblock>.

Customizing Paragraph StylesYou customize template paragraph styles with the Paragraph Style dialog:

DITA InPrint User Guide 37

Working with DITA InPrint / Customizing DITA InPrint Templates with OpenOffice Writer

The Paragraph Style dialog gives you control of every aspect of paragraph styling, including fonts, indents, background, borders, and many other features.

Paragraph Style NamingMost DITA InPrint template paragraph styles follow a naming convention: they each have the same name as the DITA element they style, followed by a number that corresponds to the level in the DITA source topic content at which the element appears. For example, a <p> element that is a child of a <body> element will be styled with the paragraph style <p> 1, while a <p> element that is a child of an <li> element that is in turn a child of a top-level <ul> element will be styled with the paragraph style <p> 2. Having separate paragraph styles for each level at which a DITA block element can appear enables you to define a different indentation for each level.

Paragraph style names may also include a suffix that indicates in which context the source DITA element appears. For example a <title> element contained in a topic that is the child of a <preface> element will be styled with the paragraph style <topic> 2 in <preface>. This enables you to style elements differently depending on the context in which they appear. For example, many documents use different styles for titles that appear in the preface versus titles that appear in the chapters.

Some paragraph style names do not contain a level number, because the DITA element they style can only appear at one level in the source XML. Examples include <shortdesc>, <step> first in <steps> and <title> in <example>.

Controlling Pagination with Paragraph StylesIn OpenOffice Writer, the selection of which page style is used for a particular part of a document (a chapter, for example, or the cover or index) is defined in the paragraph styles for the paragraphs that start each of those parts. For example, the Text Flow > Breaks properties of the <title> 1 in <chapter> paragraph style select the <chapter> First page style to use as the first page of <chapter> topics:

38 DITA InPrint User Guide

Working with DITA InPrint / Customizing DITA InPrint Templates with OpenOffice Writer

Figure 1: Text FlowBreaks properties in paragraph styles select the page style to use for subsequent content paragraphs.

Simplifying Changes to Paragraph Styles using Linking and AutoUpdatingDITA InPrint template paragraph styles are linked to each hierarchically and set to “AutoUpdate”, enabling you to make global changes to paragraph fonts and other properties very quickly.

For example, all heading paragraph styles, such as <title> 1 in <chapter>, <title> in <section>, and so on, link to the OpenOffice Writer Heading paragraph style, enabling you to change the font family used for all heading paragraph styles by changing only the font family property of the Heading paragraph style.

DITA InPrint template paragraph styles are linked to the following top-level OpenOffice Writer paragraph styles:

Heading for all heading paragraph styles

Text for all body text paragraph styles

Preformatted Text for all paragraph styles that must use a monospaced font (for such elements as <pre> and <codeblock>)

Caption for figure title and table title paragraph styles

Table Heading for table header paragraph styles (for such elements as <chhead> and <thead>)

Table Contents for table cell paragraph styles (for such elements as <entry> and <stentry>)

Index for table of contents, list of figures, list of tables, and index paragraph styles

You can use the Hierarchical filter in the OpenOffice Writer Styles and Formatting dialog (choose Format > Styles and Formatting or press F11 ) to see how paragraph styles are linked:

DITA InPrint User Guide 39

Working with DITA InPrint / Customizing DITA InPrint Templates with OpenOffice Writer

Figure 2: The OpenOffice Writer Styles and Formatting dialog enables you to see how paragraph styles are linked to each other hierarchically.

Non-DITA Paragraph StylesDITA InPrint uses some custom template paragraph styles for paragraphs in the document that are not directly related to DITA XML elements:

Paragraph Style Paragraph Styled

Index Page Break The paragraph inserted by DITA InPrint just before the Index heading paragraph. The former is used to insert the <indexfirst> First page style rather than the latter, as a workround for a bug in OpenOffice Writer 3.4 that prevents Index page numbering from re-starting correctly.

Landscape in <chapter> The paragraph inserted by DITA InPrint just before a <fig>, <table>, or <simpletable> element ina chapter topic that has its @outputclass attribute set to “landscape”. The Landscape in <chapter> paragraph style's Text Flow > Breaks properties switch the current page style to <chapter> Landscape Body.

Portrait in <chapter> The paragraph inserted by DITA InPrint just after a <fig>, <table>, or <simpletable> element in achapter topic that has its @outputclass attribute set to “landscape”. The Portrait in <chapter> paragraph style's Text Flow > Breaks properties switch the current page style back to <chapter>Body.

Task Label The paragraphs inserted by DITA InPrint for autogenerated task labels: “About this Task”, “Before You Begin”, and so on.

<steps> Start Label The paragraph inserted by DITA InPrint for the autogenerated label before the steps in a task topic

<steps> End Label The paragraph inserted by DITA InPrint to mark the end of the steps in a task topic

40 DITA InPrint User Guide

Working with DITA InPrint / Customizing DITA InPrint Templates with OpenOffice Writer

Related Topics Page Styles on page 36 DITA InPrint template page styles define the sequence, dimensions, headers and footers, and many other aspects of the page typesused to publish DITA documents. You use OpenOffice Writer to modify the page styles.

Character Styles on page 41 DITA InPrint template character styles define font, colour, and several other styling properties for DITA inline elements such as <cite>, <synph>, and <tm>.

Character Styles DITA InPrint template character styles define font, colour, and several other styling properties for DITA inline elements such as <cite>, <synph>, and <tm>.

Customizing Character StylesYou customize template paragraph styles with the Character Style dialog:

The Character Style dialog gives you control of every aspect of paragraph styling, including fonts, indents, background, borders,and many other features.

Character Style NamingMost DITA InPrint template character styles each have the same name as the DITA element it styles: for example, the <wintitle> character style styles <wintitle> elements.

DITA InPrint User Guide 41

Working with DITA InPrint / Customizing DITA InPrint Templates with OpenOffice Writer

Simplifying Changes to Multiple Character Styles using LinkingDITA InPrint template character styles are linked to each hierarchically, enabling you to make global changes to character fonts and other properties very quickly.

For example, all template character styles that use a monospaced font, such as <tt>, <codeph>, and so on, link to the OpenOffice Writer Source Text character style, enabling you to change the font family and other style properties used for all linked character styles by changing the properties only of the Source Text character style.

DITA InPrint template character styles are linked to the following upper-level character styles:

Source Text for all character styles that use a monospaced font and which can appear outside of the <syntaxdiagram> elementin your DITA source

Internet Link for all characters in hyperlinks

<b> for all bold character styles

<i> for all italic character styles

<sup> for all superscript character styles

You can use the Hierarchical filter in the OpenOffice Writer Styles and Formatting dialog (choose Format > Styles and Formatting or press F11 ) to see how paragraph styles are linked:

42 DITA InPrint User Guide

Working with DITA InPrint / Customizing DITA InPrint Templates with OpenOffice Writer

Figure 3: The OpenOffice Writer Styles and Formatting dialog enables you to see how character styles are linked to each other hierarchically.

Note: You can change the linking of template character styles in your template in OpenOffice Writer, either with theStyles and Formatting dialog or in the character styles' Organization properties.

Non-DITA Character StylesDITA InPrint uses some custom character styles for styling parts of the document that are not directly related to DITA XML elements:

Character Style Text Styled

Note Label Autogenerated <note> label text: “Note:”, “Tip:”, “CAUTION:”, and so on.

TOC1 Level one entry text in the Table of Contents (TOC)

TOC2 Level two entry text in the TOC

TOC3 Level three entry text in the TOC

TOC4 Level four entry text in the TOC

TOC5 Level five entry text in the TOC

DITA InPrint User Guide 43

Working with DITA InPrint / Customizing DITA InPrint Templates with OpenOffice Writer

Related Topics Paragraph Styles on page 37 DITA InPrint template paragraph styles define paragraph indents and spacing, font, tabs, pagination, and many other styling properties for DITA block elements such as <title>, <p>, and <codeblock>.

Footnote/Endnote Styles on page 44 DITA InPrint takes advantage of OpenOffice Writer's support for footnotes and endnotes to enable DITA authors to control where the content of an <fn> element appears: at the bottom of a published page or the end of the published document. OpenOffice Writer also enables template designers to control the numbering and styling every part of a footnote or endnote, plus the page style in which they appear.

Footnote/Endnote Styles DITA InPrint takes advantage of OpenOffice Writer's support for footnotes and endnotes to enable DITA authors to control where the content of an <fn> element appears: at the bottom of a published page or the end of the published document. OpenOffice Writer also enables template designers to control the numbering and styling every part of a footnote or endnote, plus the page style in which they appear.

Customizing Footnote/Endnote StylesYou customize footnote/endnote styles with the Footnotes/Endnotes Settings dialog:

Authoring EndnotesDITA InPrint enables DITA authors to publish an <fn> element as an endnote by adding the value “endnote” to the element's @outputclass attribute.

Related Topics Character Styles on page 41 DITA InPrint template character styles define font, colour, and several other styling properties for DITA inline elements such as <cite>, <synph>, and <tm>.

44 DITA InPrint User Guide

Working with DITA InPrint / Customizing DITA InPrint Templates with OpenOffice Writer

List Styles on page 45 DITA InPrint template list styles define indents and item labels for DITA list elements: <ol>, <ul>, <sl>, and the elements specialized from them.

List Styles DITA InPrint template list styles define indents and item labels for DITA list elements: <ol>, <ul>, <sl>, and the elements specialized from them.

Customizing List StylesYou customize list styles with the Numbering Style dialog:

Important: DITA InPrint uses only two of the property sets OpenOffice Writer provides in list styles: Position and Options.

You use the Position properties of a list style to set the indentation and tabbing for items in the list.

You use the Options properties of a list style to set the labelling, such as number or bullets, for items in the list.

For example, if you set the Options properties as follows:

and the Position properties as follows:

DITA InPrint User Guide 45

Working with DITA InPrint / Customizing DITA InPrint Templates with OpenOffice Writer

OpenOffice Writer will style the list with the indents, tabbing, and labels shown below:

Important: List styles control only the indentation and labelling of items in a list. They do not control the fonts, spacing above and below, text flow, and other style properties of list items. These properties are instead defined in the paragraph styles for list items, such as in the <li> first in <ul>, <step> last in <steps>, and <substep> middle in <substeps> paragraph styles.

List Style NamingMost DITA InPrint template list styles each have the same name as the DITA list element they style, followed in some cases by a number that corresponds to the level in the DITA source topic content at which the list element appears. For example, a <ul> element that is a child of a <body> element will be styled with the list style <ul> 1, while a <ul> element that is a child of an <li>element will be styled with the list style <ul> 2. Having separate list styles for each level at which a DITA list element can appearenables you to define a different indentation for each level.

Some list style names do not contain a level number, because the DITA list element they style can only appear at one level in the source XML. Examples include <substeps>, <choices> and <spares>.

Related Topics Footnote/Endnote Styles on page 44 DITA InPrint takes advantage of OpenOffice Writer's support for footnotes and endnotes to enable DITA authors to control where the content of an <fn> element appears: at the bottom of a published page or the end of the published document. OpenOffice Writer also enables template designers to control the numbering and styling every part of a footnote or endnote, plus the page style in which they appear.

46 DITA InPrint User Guide

Working with DITA InPrint / Customizing DITA InPrint Templates with OpenOffice Writer

Frame Styles on page 47 DITA InPrint template frame styles are used for only a single purpose: to define the icon used in <note> elements.

Frame Styles DITA InPrint template frame styles are used for only a single purpose: to define the icon used in <note> elements.

Customizing the Frame Style IconYou customize the graphic for the <note> icon in the Frame Style dialog Background tab:

Frame Style NamingDITA InPrint template frame styles are named after the possible values of the @type attribute of the <note> element: Attention Icon, Caution Icon, Tip Icon, and so on.

Related Topics List Styles on page 45 DITA InPrint template list styles define indents and item labels for DITA list elements: <ol>, <ul>, <sl>, and the elements specialized from them.

Table Styles on page 47 DITA InPrint uses OpenOffice Writer AutoFormats and the properties of named tables to style DITA tables and definition lists, including <table>, <simpletable>, <choicetable>, <dl>, <parml>, and <properties>.

Table Styles DITA InPrint uses OpenOffice Writer AutoFormats and the properties of named tables to style DITA tables and definition lists, including <table>, <simpletable>, <choicetable>, <dl>, <parml>, and <properties>.

Customizing Table Borders, Colours, and FontsDITA InPrint uses OpenOffice Writer's AutoFormats to define and apply styles for table borders, colours, and fonts.

DITA InPrint User Guide 47

Working with DITA InPrint / Customizing DITA InPrint Templates with OpenOffice Writer

Important: OpenOffice does not store AutoFormats in templates or documents. Instead, it stores them in your OpenOffice user configuration. This becomes an issue if you wish to publish with a different user's configuration of OpenOffice: for example, perhaps you need to design and test templates offline under one user name, and then put the template into production under a different user name. In this case, you would have to either manually duplicate the changes you made to the AutoFormats in the production user name's configuration, or copy the AutoFormats configuration file (autofmt) from the offline user's configuration to the production user's configuration. In the latter course of action, you would, of course, overwrite whatever AutoFormats had been defined in the production user's configuration.

DITA InPrint applies the following AutoFormats to the following DITA table elements:

AutoFormat DITA Element Styled

table_header <table> that contains a <thead> element

table_noheader <table> that does not contain a <thead> element

simpletable_header <simpletable> that contains an <sthead> element

simpletable_noheader <simpletable> that does not contain an <sthead> element

dl_header <dl> that contains a <dlhead> element

dl_noheader <dl> that does not contain a <dlhead> element

parml <parml>

choicetable_noheader <choicetable> that does not contain a <chhead> element

choicetable_header <choicetable> that contains a <chhead> element

Tip: If you want DITA InPrint to apply different AutoFormats to these DITA elements, you can specify the names inthe template's document properties.

Note: DITA InPrint enables an author to select an AutoFormat by entering its name in the @outputclass attribute of any of the table elements listed above.

Note: If DITA InPrint does not find the specified AutoFormat, it applies either the Black 1 or Black 2 built-in AutoFormats.

You create an AutoFormat in OpenOffice Writer by first styling a table to the desired format, and then using the AutoFormat dialog to Add an AutoFormat using the styled table as the source:

48 DITA InPrint User Guide

Working with DITA InPrint / Customizing DITA InPrint Templates with OpenOffice Writer

Customizing Table Spacing, Alignment, Pagination, and Other PropertiesFor table styling properties other than those defined in AutoFormats, DITA InPrint applies the properties of the following named tables in the template:

Table Name DITA Element Styled

table_1 Level one <table> element

table_2 Level two <table> element

table_3 Level three <table> element

table_4 Level four <table> element

table_5 Level five <table> element

simpletable_1 Level one <simpletable> element

simpletable_2 Level two <simpletable> element

simpletable_3 Level three <simpletable> element

simpletable_4 Level four <simpletable> element

simpletable_5 Level five <simpletable> element

dl_1 Level one <dl> element

dl_2 Level two <dl> element

dl_3 Level three <dl> element

dl_4 Level four <dl> element

dl_5 Level five <dl> element

choicetable <choicetable> element

properties Level two <parml> element

parml_1 Level one <parml> element

parml_2 Level two <parml> element

parml_3 Level three <parml> element

parml_4 Level four <parml> element

parml_5 Level five <parml> element

CAUTION: Do not change the names of these tables! DITA InPrint cannot copy the properties of a table it cannot find.

You customize the properties of a table with the Table Format dialog:

DITA InPrint User Guide 49

Working with DITA InPrint / Customizing DITA InPrint Templates with OpenOffice Writer

Related Topics Frame Styles on page 47 DITA InPrint template frame styles are used for only a single purpose: to define the icon used in <note> elements.

Index Styles on page 50 Template indexes include the table of contents, the list of figures, the list of tables, and the alphabetical index. DITA InPrint styleseach of these indexes from the template, using the dedicated OpenOffice Writer paragraph styles for indexes, and the properties ofeach type of index.

Index Styles Template indexes include the table of contents, the list of figures, the list of tables, and the alphabetical index. DITA InPrint styleseach of these indexes from the template, using the dedicated OpenOffice Writer paragraph styles for indexes, and the properties ofeach type of index.

Customizing Index Paragraph StylesThe styles of titles and entries in an OpenOffice Writer index is determined in part by a set of dedicated paragraph styles:

Index Type Dedicated Paragraph Styles

table of contents Contents Heading: styles the table of contents title Contents 1: styles a level one entry Contents 2: styles a level two entry Contents 3: styles a level three entry Contents 4: styles a level four entry Contents 5: styles a level five entry Contents 6: styles a level six entry Contents 7: styles a level seven entry Contents 8: styles a level eight entry Contents 9: styles a level nine entry Contents 10: styles a level ten entry

50 DITA InPrint User Guide

Working with DITA InPrint / Customizing DITA InPrint Templates with OpenOffice Writer

Index Type Dedicated Paragraph Styles

list of figures, list of tables User Index Heading: styles the list title User Index 1: styles a level one entry User Index 2: styles a level two entry User Index 3: styles a level three entry User Index 4: styles a level four entry User Index 5: styles a level five entry User Index 6: styles a level six entry User Index 7: styles a level seven entry User Index 8: styles a level eight entry User Index 9: styles a level nine entry User Index 10: styles a level ten entry

alphabetical index Index Heading: styles the index title Index Separator: styles the letter titles (A, B, C, etc.) Index 1: styles a level one entry Index 2: styles a level two entry Index 3: styles a level three entry

You customize the styling of titles and entries in each index by modifying the associated paragraph styles with the Paragraph Styles dialog.

Customizing Index PropertiesYou customize the properties of an OpenOffice Writer index with the Insert Index/Table dialog:

This dialog gives you tremendous control over every aspect of the index. The Entries tab shown above, for example, enables you to define the structure and style of each part of an entry in the index (a table of contents, in this case), including chapter prefix andnumbering, tabs, leader characters, and others. The panel on the left displays a preview of index.

Related Topics Table Styles on page 47 DITA InPrint uses OpenOffice Writer AutoFormats and the properties of named tables to style DITA tables and definition lists, including <table>, <simpletable>, <choicetable>, <dl>, <parml>, and <properties>.

DITA InPrint User Guide 51

Appendix A: DITA InPrint Template Styles DITA InPrint templates provide you with OpenOffice styles you can customize to change the appearance and layout of your published documents.

Related Topics Base Topic Styles on page 54 This example base topic contains content tagged with all base topic elements supported by DITA InPrint. Modify the corresponding paragraph and character styles in the OpenOffice Writer template to change the appearance of the elements in the published document.

Concept Topic Styles on page 65 Concept topic elements styleable in OpenOffice Writer are identical to those of the base topic styles.

Reference Topic Styles on page 66 This example reference topic contains content tagged with all reference topic elements supported by DITA InPrint. Modify the corresponding paragraph and character styles in the OpenOffice Writer template to change the appearance of the elements in the published document.

Task Topic Styles on page 67 This example task topic contains content tagged with all task topic elements supported by DITA InPrint. Modify the corresponding paragraph and character styles in the OpenOffice Writer template to change the appearance of the elements in the published document.

Machinery Task Topic Styles on page 69 This example machinery task topic contains content tagged with all machinery task topic elements supported by DITA InPrint. Modify the corresponding paragraph and character styles in the OpenOffice Writer template to change the appearance of the elements in the published document.

Programming Domain Styles on page 71 “The programming domain elements are used to define the syntax and to give examples of programming languages.” - (from the DITA 1.2 specification). Programming domain elements that are styleable in OpenOffice Writer are styled using paragraph and character styles that have the same name as the element.

Software Domain Styles on page 75 “The software domain elements are used to describe the operation of a software program.” - DITA 1.2 Specification.

Hazard Statement Domain Styles on page 76 “The hazard statement domain elements are used to provide information about product safety hazards.” - DITA 1.2 Specification

Typographic Domain Styles on page 77 “The typographic elements are used to highlight text with styles (such as bold, italic, and monospace).” - DITA 1.2 Specification.

User Interface Domain Styles on page 78 “The user interface domain elements are used to describe the user interface of a software program.” - DITA 1.2 Specification

DITA InPrint User Guide 53

Appendix A: DITA InPrint Template Styles / Base Topic Styles

Base Topic Styles This is an example of an <abstract> element. It contains an example of <shortdesc> element.This example base topic contains content tagged with all base topic elements supported by DITA InPrint. Modify the corresponding paragraph and character styles in the OpenOffice Writer template to change the appearance of the elements in the published document.

Note: Except where noted, base topic paragraph and character styles have the same name as the element they style.

Inline Element Styles

Element Default Styling

<alt> The content of the <alt> element only appears when its parent <image> cannot be loaded. It appears astext of a link to the missing graphic. Hyperlink styles in OpenOffice Writer are all based on the Internet Link character style.

<cite> DITA InPrint Quick Start Guide

<fn> You can customize the positioning, numbering, styling, and many other properties of <fn> elements in OpenOffice Writer, using the powerful Tools > Footnotes/Endnotes dialog. If you use the default footnote paragraph and character styles, then you use the Footnote anchor paragraph style for the callout characters, the Footnote characters character style for the callout characters as they appear in the footnote/endnote, and the Footnote paragraph style for the footnote/endnote text.

Tip: DITA InPrint adds an extra capability to <fn> element: if you include "endnote" in the @outputclass attribute of the <fn> element, Writer will publish it as an endnote i. Otherwise, it will publish the <fn> element as a footnote.1

<keyword> keyword

<ph> <ph> elements are always styled with Default character style

<draft-comment>

<q> “<q> elements are styled with the <q> character style. DITA InPrint adds the open and close quote characters specified for the language selected in the bookmap's @xml:lang attribute. For details, see [xref to Localizing Content].”

<term> <term>

<text> <text> elements are always styled with Default character style

1 This will appear as a footnote.

54 DITA InPrint User Guide

Appendix A: DITA InPrint Template Styles / Base Topic Styles

Element Default Styling

<tm> You customize with the <tm> character style the automatically generated intellectual property symbol that appears when you insert a <tm> element:

<tm> R (@tmtype = "reg")

<tm> SM (@tmtype = "service")

<tm> TM(@tmtype = "tm")

Any text content of the <tm> element is styled using the Default character style.

<xref> <xref> elements are all styled with the Internet Link character style. Examples of <xref> include:

http://www.ditainprint.com (@scope="external", @format="html")

Programming Domain Styles on page 71 (@scope="local", @format="dita");

<section> <title> Element StyleUse the Styles and Formatting tool in OpenOffice Writer to modify the paragraph and character styles applied to the elements in this example of a base DITA topic.

<example> <title> Element StyleUse the Styles and Formatting tool in OpenOffice Writer to modify the paragraph and character styles applied to the elements in this example of a base DITA topic.

<p> Element StylesThis is a first level <p> element, styled with the <p> 1 paragraph tag.

Second level <p> element:

Content of a second level <p> element.

Third level <p> element:

Content of a third level <p> element.

• Fourth level <p> element:

Content of a fourth level <p> element.

Fifth level <p> element:

Content of a fifth level <p> element.

<sl> Element Styles

Important: Do not modify the indentation of <sli> elements in their corresponding paragraph styles. Instead, modifythe indentations using the template's <sl> list styles. For example, to modify the indentation of this first level <sl> element, modify the Level 1 position properties of the <sl> 1 list style.

A first-level <sl> element:

This is the first <sli> element, styled with the <li> first in <ul> paragraph style.

This is a middle-position <sli> element, styled with the <li> middle in <ul> paragraph style..

DITA InPrint User Guide 55

Appendix A: DITA InPrint Template Styles / Base Topic Styles

This is the last <sli> element, styled with the <li> last in <ul> paragraph style..

A second level <sl> element:

This is the first <sli> element.

This is a middle-position <sli> element.

This is the last <sli> element.

A third level <sl> element:

This is the first <sli> element.

This is a middle-position <sli> element.

This is the last <sli> element.

• A fourth level <sl> element:

This is the first <sli> element.

This is a middle-position <sli> element.

This is the last <sli> element.

A fifth level <sl> element:

This is the first <sli> element.

This is a middle-position <sli> element.

This is the last <sli> element.

<lq> Element StylesThis is a first level <lq> element:

Contents of a first level <lq> element.

A second level <lq> element:

Contents of a second level <lq> element.

A third level <lq> element:

Contents of a third level <lq> element.

• A fourth level <lq> element:

Contents of a fourth level <lq> element.

A fifth level <lq> element:

Contents of a fifth level <lq> element.

<dl> Element Styles

Note: <dl> elements are published as two-column tables.

<dthd> <ddhd>

Example <dt> Element This is an example of a <dd> element.

Example <dt> Element This is an example of a <dd> element.

Second level <dl> element:

56 DITA InPrint User Guide

Appendix A: DITA InPrint Template Styles / Base Topic Styles

Example <dt> Element This is an example of a <dd> element.

Example <dt> Element This is an example of a <dd> element.

Third level <dt> element:

Example <dt> Element This is an example of a <dd> element.

Example <dt> Element This is an example of a <dd> element.

• Fourth level <dt> element:

Example <dt> Element This is an example of a <dd> element.

Example <dt> Element This is an example of a <dd> element.

Fifth level <dt> element:

Example <dt> Element This is an example of a <dd> element.

Example <dt> Element This is an example of a <dd> element.

First Level <ol> Element with Nested <ul> Element and Nested <ol> Element

1. This the first <li> element in a first level <ol> element, which is styled with the <li> first in <ol> paragraph style.

Important: Do not modify the indentation and numbering styles of <li> elements in their corresponding paragraph styles. Instead, modify list indentations using the template's list styles. For example, to modify the indentation and numbering styles of this first level <ol> element, modify the Level 1 position and options properties of the <ol> 1 list style. (This second level <note> element is styled with the <note> 2 paragraph style.)

2. This is a middle-position <li> element in a first level <ol> element, which is styled with the <li> middle in <ol> paragraph style.

This is a second level <p> element, which is styled with the <p> 2 paragraph style.

This is the first <li> element in a second-level <ul> element. This <li> element is styled with the <li> first in <ul> paragraph style.

Important: Do not modify the indentation and numbering styles of <li> elements in their corresponding paragraph styles. Instead, modify list indentations using the template's list styles. For example, to modify the indentation and numbering styles of this second level <ul> element, modify the Level 1 position and options properties of the <ul> 1 list style. (This third level <note> element is styled with the <note> 3 paragraph style.)

This is a middle-position <li> element in a second-level <ul> element, which is styled with the <li> middle in <ul> paragraph style.

This is a third level <p> element, which is styled with the <p> 3 paragraph style.

3. This is a middle-position <li> element in a first level <ol> element, which is styled with the <li> middle in <ol> paragraph style.

Sub-step A: This is the first <li> element in a second-level <ol> element. This <li> element is styled with the <li> first in <ol> paragraph style.

DITA InPrint User Guide 57

Appendix A: DITA InPrint Template Styles / Base Topic Styles

Sub-step B: This is a middle-position <li> element in a second-level <ol> element. This <li> element is styled with the <li> middle in <ol> paragraph style.

i. This is the first <li> element in a third-level <ol> element. This <li> element is styled with the <li> first in <ol> paragraph style.

ii. This is a middle-position <li> element in a third-level <ol> element. This <li> element is styled with the <li> middle in <ol> paragraph style.

A) This is the first <li> element in a fourth-level <ol> element. This <li> element is styled with the <li> first in <ol> paragraph style.

B) This is a middle-position <li> element in a fourth-level <ol> element. This <li> element is styled with the <li> middle in <ol> paragraph style.

I. This is the first <li> element in a fifth-level <ol> element. This <li> element is styled with the <li> first in <ol> paragraph style.

II. This is a middle-position <li> element in a fifth-level <ol> element. This <li> element is styled with the <li> middle in <ol> paragraph style.

III. This is the last <li> element in a fifth-level <ol> element. This <li> element is styled with the <li> last in <ol> paragraph style.

C) This is the last <li> element in a fourth-level <ol> element. This <li> element is styled with the <li> last in <ol> paragraph style.

iii. This is the last <li> element in a third-level <ol> element. This <li> element is styled with the <li> last in <ol> paragraph style.

Sub-step C: This is the last <li> element in a second-level <ol> element. This <li> element is styled with the <li> last in <ol> paragraph style.

4. This the last <li> element in a first level <ol> element, which is styled with the <li> last in <ol> paragraph style.

<fig> Element StylesThis is an example of a figure <desc> element.

Figure 4: Level One <fig> <title> Element Style

Second level <fig> element:

This is an example of a figure <desc> element.

58 DITA InPrint User Guide

Appendix A: DITA InPrint Template Styles / Base Topic Styles

Figure 5: Level One <fig> <title> Element Style

Third level <fig> element:

This is an example of a figure <desc> element.

Figure 6: Level One <fig> <title> Element Style

• Fourth level <fig> element:

This is an example of a figure <desc> element.

Figure 7: Level One <fig> <title> Element Style

Fifth level <fig> element:

This is an example of a figure <desc> element.

DITA InPrint User Guide 59

Appendix A: DITA InPrint Template Styles / Base Topic Styles

Figure 8: Level One <fig> <title> Element Style

<table> and <simpletable> Element Styles

Note: Use table autoformats to modify <table> and <simpletable> borders, colours, and backgrounds. Use OpenOffice table properties to modify indentation, width, spacing and other characteristics of your table styles. Modify the table paragraph styles only when you need to change content styling within individual cells. For details, see [xref].

First level <table> and <simpletable> elements:

Table 1: <table> <title> Element

<thead> <entry> Element <thead> <entry> Element

<entry> element <entry> element

<entry> element <entry> element

<entry> element <entry> element

<sthead> <stentry> Element <sthead> <stentry> Element

<stentry> element <stentry> element

<stentry> element <stentry> element

<stentry> element <stentry> element

Second level:

Table 2: <table> <title> Element

<thead> <entry> Element <thead> <entry> Element

<entry> element <entry> element

<entry> element <entry> element

<entry> element <entry> element

60 DITA InPrint User Guide

Appendix A: DITA InPrint Template Styles / Base Topic Styles

<sthead> <stentry> Element <sthead> <stentry> Element

<stentry> element <stentry> element

<stentry> element <stentry> element

<stentry> element <stentry> element

Third level:

Table 3: <table> <title> Element

<thead> <entry> Element <thead> <entry> Element

<entry> element <entry> element

<entry> element <entry> element

<entry> element <entry> element

<sthead> <stentry> Element <sthead> <stentry> Element

<stentry> element <stentry> element

<stentry> element <stentry> element

<stentry> element <stentry> element

• Fourth level:

Table 4: <table> <title> Element

<thead> <entry> Element <thead> <entry> Element

<entry> element <entry> element

<entry> element <entry> element

<entry> element <entry> element

<sthead> <stentry> Element <sthead> <stentry> Element

<stentry> element <stentry> element

<stentry> element <stentry> element

<stentry> element <stentry> element

Fifth level:

Table 5: <table> <title> Element

<thead> <entry> Element <thead> <entry> Element

<entry> element <entry> element

DITA InPrint User Guide 61

Appendix A: DITA InPrint Template Styles / Base Topic Styles

<thead> <entry> Element <thead> <entry> Element

<entry> element <entry> element

<entry> element <entry> element

<sthead> <stentry> Element <sthead> <stentry> Element

<stentry> element <stentry> element

<stentry> element <stentry> element

<stentry> element <stentry> element

<note> Element StylesA first level <note> element:

Note:@type attribute set to “note” or not set at all

A second level <note> element:

Note:Second level <note> element

A third level <note> element:

Note:Third level <note> element

A fourth level <note> element:

Note:Third level <note> element

A fifth level <note> element:

Note: Third level <note> element

Tip: @type attribute set to “tip”

Attention: @type attribute set to “attention”

CAUTION: @type attribute set to “caution”

DANGER: @type attribute set to “danger”

62 DITA InPrint User Guide

Appendix A: DITA InPrint Template Styles / Base Topic Styles

Fastpath: @type attribute set to “fastpath”

Important: @type attribute set to “important”

Notice: @type attribute set to “notice”

Information: @type attribute set to “other” and @othertype attribute set to “Information”

Remember: @type attribute set to “remember”

Restriction: @type attribute set to “restriction”

WARNING: @type attribute set to “warning”

<lines> Element StylesFirst level <lines> element:

When in disgrace with fortune and men's eyes,I all alone beweep my outcast stateAnd trouble deaf heaven with my bootless criesAnd look upon myself and curse my fate.

Second level <lines> element:

Wishing me like to one more rich in hope,Featured like him, like him with friends possessed,Desiring this man's art and that mans' scope,With what I most enjoy contented least.

Third level <lines> element:

Yet in these thoughts myself almost despising,Haply I think on thee, and then my state,

• Fourth level <lines> element:

Like to the lark at break of day arisingFrom sullen earth, sings hymns at heaven's gate.

Fifth level <lines> element:

For thy sweet love remembered such wealth brings,That then I scorn to change my state with kings.

<pre> Element StylesFirst level <pre> element:

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE bookmap PUBLIC "-//OASIS//DTD DITA BookMap//EN" "bookmap.dtd"><bookmap xml:lang="en-ca">

DITA InPrint User Guide 63

Appendix A: DITA InPrint Template Styles / Base Topic Styles

<title>DITA InPrint<tm tmtype="tm"/> Quick Start Guide</title> <bookmeta> <bookrights> <copyrfirst> <year>2013</year> </copyrfirst> <bookowner> <organization>Grantham SoftWorks</organization> </bookowner> </bookrights> </bookmeta>

Second level <pre> element:

<chapter href="installing_ditapublisher.dita" collection-type="sequence"> <topicref href="requirements.dita"/> <topicref href="installing_ditapublisher_desktop.dita"/> <topicref href="installing_ditapublisher_plugin.dita"/> </chapter> <chapter href="customizing_templates.dita"> <topicref href="customizing_fonts.dita"/> <topicref href="customizing_pages.dita"/> </chapter>

Third level <pre> element:

<backmatter> <booklists> <indexlist/> </booklists> </backmatter></bookmap>

• Fourth level <pre> element:

<frontmatter> <booklists> <toc/> </booklists> <preface href="about_this_guide.dita"/> <keydef keys="prodname" processing-role="resource-only"> <topicmeta> <keywords> <keyword>DITA InPrint</keyword> </keywords> </topicmeta> </keydef> </frontmatter>

Fifth level <pre> element:

<chapter href="ditapublisher_template_styles.dita"> <topicref href="example_topic.dita"/> <topicref href="example_concept.dita"/> <topicref href="example_reference.dita"/> <topicref href="example_task_steps.dita"/> <topicref href="example_machine_task.dita"/> <topicref href="example_programming_domain.dita"/> <topicref href="example_software_domain.dita"/> <topicref href="example_hazardsymbol_domain.dita"/> </chapter>

64 DITA InPrint User Guide

Appendix A: DITA InPrint Template Styles / Concept Topic Styles

Concept Topic Styles Concept topic elements styleable in OpenOffice Writer are identical to those of the base topic styles.

For details, see Base Topic Styles on page 54.

DITA InPrint User Guide 65

Appendix A: DITA InPrint Template Styles / Reference Topic Styles

Reference Topic Styles This example reference topic contains content tagged with all reference topic elements supported by DITA InPrint. Modify the corresponding paragraph and character styles in the OpenOffice Writer template to change the appearance of the elements in the published document.

<refsyn> Element StylesThis example of the <refsyn> element contains some elements from the programming domain. For information about styling programming domain elements, see [xref].

object . property = trueorfalse

<properties> Element Styles

<proptypehd> Element <propvaluehd> Element <propdeschd> Element

<proptype> element <propvalue> element <propdesc> element

The <proptypehd>, <propvaluehd>, and <propdeschd> elements are all styled with the same paragraph style.

The <proptype>, <propvalue>, and <propdesc> elements each have their own paragraph style.

Other <refbody> Element StylesOther <refbody> elements are identical to those of the base topic type.

66 DITA InPrint User Guide

Appendix A: DITA InPrint Template Styles / Task Topic Styles

Task Topic Styles This example task topic contains content tagged with all task topic elements supported by DITA InPrint. Modify the corresponding paragraph and character styles in the OpenOffice Writer template to change the appearance of the elements in the published document.

Before You Begin<prereq>: prerequisites for the current task.

About this Task<context>: context for the current task.

Procedure

1. <cmd>: the action to perform in this step, which is the first <step> in this list of <steps>

• <choice> f

• ITEMGROUP!

A ParagraphCodeblock

irst.

• <choice> middle position.

• <choice> middle position.

• <choice> last.

<choptionhd> <chdeschd>

<choption> <chdesc>

<choption> <chdesc>

Note: Note in an <info> element.

<tutorialinfo>: useful educational material about the current step if it is part of a tutorial

<stepxmp>: an example illustrating how the step is performed

<stepresult>: the expected result of executing the current step

2. A middle-position step in this list of steps.

a) <cmd>: the action to perform in this substep, which is the first <substep> in this list of <substeps>

b) A middle-position substep in this list of substeps.

DITA InPrint User Guide 67

Appendix A: DITA InPrint Template Styles / Task Topic Styles

<tutorialinfo>: useful educational material about the current substep if it is part of a tutorial<stepxmp>: an example illustrating how the substep is performed<stepresult>: the expected result of executing the current substep

c) Another middle-position substep in this list of substeps.

d) The last substep in this list of substeps.

3. Another middle-position step in this list of steps.

4. The last step in this list of steps.

Results<result>: describes the result of performing the task.

What to do Next<postreq>: describes the actions the user must take after performing the task.

68 DITA InPrint User Guide

Appendix A: DITA InPrint Template Styles / Machinery Task Topic Styles

Machinery Task Topic Styles This example machinery task topic contains content tagged with all machinery task topic elements supported by DITA InPrint. Modify the corresponding paragraph and character styles in the OpenOffice Writer template to change the appearance of the elements in the published document.

Preliminary Requirements

Conditions

This is a required condition.

This is a required publication.

Personnel

Required personnel.

Required skill.

Estimated time.

EquipmentNo equipment required to perform this procedure.

Supplies

Required supplies 1

Spares

Spares 1.

Spares 2.

SafetyNo safety conditions must be met or considered before performing this procedure.

About this TaskContext for the current task

Procedure

1. Task step.

DITA InPrint User Guide 69

Appendix A: DITA InPrint Template Styles / Machinery Task Topic Styles

Closing Requirements

Conditions

Required condition.

Publication to read.

70 DITA InPrint User Guide

Appendix A: DITA InPrint Template Styles / Programming Domain Styles

Programming Domain Styles “The programming domain elements are used to define the syntax and to give examples of programming languages.” - (from the DITA 1.2 specification). Programming domain elements that are styleable in OpenOffice Writer are styled using paragraph and character styles that have the same name as the element.

Programming Domain Inline Element Styles

Element Example of Default Styling

<apiname> com.sun.star.text.TextTable

<codeph> TextTable.getName();

<option> option

<parmname> parameter

<synph> syntax phrase

<kwd> find

<var> string

<oper> +

<delim> {

<sep> ]

<repsep> |

<parml> Element StylesFirst level <parml> element:

<pt> 1 <pd> 1

<pt> 2 <pd> 2

<pt> 3 <pd> 3

Second level <parml> element:

<pt> 1 <pd> 1

<pt> 2 <pd> 2

<pt> 3 <pd> 3

Third level <parml> element:

<pt> 1 <pd> 1

DITA InPrint User Guide 71

Appendix A: DITA InPrint Template Styles / Programming Domain Styles

<pt> 2 <pd> 2

<pt> 3 <pd> 3

• Fourth level <parml> element:

<pt> 1 <pd> 1

<pt> 2 <pd> 2

<pt> 3 <pd> 3

Fifth level <parm> element:

<pt> 1 <pd> 1

<pt> 2 <pd> 2

<pt> 3 <pd> 3

<codeblock> Element StylesFirst level <codeblock> element:

<xsl:template name="create_spec_title"> <xsl:if test="@spectitle and not(@spectitle='')"> <xsl:element name="text:line-break"/> <xsl:element name="text:span"> <xsl:attribute name="text:style-name">bold</xsl:attribute> <xsl:call-template name="get-ascii"> <xsl:with-param name="txt"> <xsl:value-of select="@spectitle"/> </xsl:with-param> </xsl:call-template> </xsl:element> </xsl:if></xsl:template>

Second level <codeblock> element:

<xsl:template name="create_spec_title"> <xsl:if test="@spectitle and not(@spectitle='')"> <xsl:element name="text:line-break"/> <xsl:element name="text:span"> <xsl:attribute name="text:style-name">bold</xsl:attribute> <xsl:call-template name="get-ascii"> <xsl:with-param name="txt"> <xsl:value-of select="@spectitle"/> </xsl:with-param> </xsl:call-template> </xsl:element> </xsl:if></xsl:template>

Third level <codeblock> element:

<xsl:template name="create_spec_title"> <xsl:if test="@spectitle and not(@spectitle='')"> <xsl:element name="text:line-break"/> <xsl:element name="text:span"> <xsl:attribute name="text:style-name">bold</xsl:attribute> <xsl:call-template name="get-ascii"> <xsl:with-param name="txt"> <xsl:value-of select="@spectitle"/> </xsl:with-param> </xsl:call-template> </xsl:element> </xsl:if></xsl:template>

• Fourth level <codeblock> element:

<xsl:template name="create_spec_title">

72 DITA InPrint User Guide

Appendix A: DITA InPrint Template Styles / Programming Domain Styles

<xsl:if test="@spectitle and not(@spectitle='')"> <xsl:element name="text:line-break"/> <xsl:element name="text:span"> <xsl:attribute name="text:style-name">bold</xsl:attribute> <xsl:call-template name="get-ascii"> <xsl:with-param name="txt"> <xsl:value-of select="@spectitle"/> </xsl:with-param> </xsl:call-template> </xsl:element> </xsl:if></xsl:template>

Fifth level <codeblock> element:

<xsl:template name="create_spec_title"> <xsl:if test="@spectitle and not(@spectitle='')"> <xsl:element name="text:line-break"/> <xsl:element name="text:span"> <xsl:attribute name="text:style-name">bold</xsl:attribute> <xsl:call-template name="get-ascii"> <xsl:with-param name="txt"> <xsl:value-of select="@spectitle"/> </xsl:with-param> </xsl:call-template> </xsl:element> </xsl:if></xsl:template>

<syntaxdiagram> Element StylesFirst level <syntaxdiagram> element:

syntaxdiagram title

command { option 1 | { var 1 var 2 } | option 2 var 1 | option 3 var 1 } fragment title synblk title fragment title fragment title more commands + This is a synnote This is another.

Second level <syntaxdiagram> element:

syntaxdiagram title

command { option 1 | { var 1 var 2 } | option 2 var 1 | option 3 var 1 } fragment title synblk title fragment title fragment title more commands + This is a synnote This is another.

Third level <syntaxdiagram> element:

syntaxdiagram title

command { option 1 | { var 1 var 2 } | option 2 var 1 | option 3 var 1 } fragment title synblk title fragment title fragment title more commands + This is a synnote This is another.

• Fourth level <syntaxdiagram> element:

syntaxdiagram title

command { option 1 | { var 1 var 2 } | option 2 var 1 | option 3 var 1 } fragment title synblk title

DITA InPrint User Guide 73

Appendix A: DITA InPrint Template Styles / Programming Domain Styles

fragment title fragment title more commands + This is a synnote This is another.

Fifth level <syntaxdiagram> element:

syntaxdiagram title

command { option 1 | { var 1 var 2 } | option 2 var 1 | option 3 var 1 } fragment title synblk title fragment title fragment title more commands + This is a synnote This is another.

74 DITA InPrint User Guide

Appendix A: DITA InPrint Template Styles / Software Domain Styles

Software Domain Styles “The software domain elements are used to describe the operation of a software program.” - DITA 1.2 Specification.

Software Domain Inline Element Styles

Element Example of Styling

<msgph> ERROR: End of file reached.

<msgnum> ERR: 345

<cmdname> find

<varname> search_string

<filepath> C:\Program Files

<userinput> (Y/N)

<systemoutput> Continue batch file?

<msgblock> StyleI:0S:3I:1S:3I:1S:4 S:99 (lockup)

DITA InPrint User Guide 75

Appendix A: DITA InPrint Template Styles / Hazard Statement Domain Styles

Hazard Statement Domain Styles “The hazard statement domain elements are used to provide information about product safety hazards.” - DITA 1.2 Specification

<hazardstatement> Element StylesThe <hazardstatement> element contains one or more <messagepanel> elements, followed by any number of <hazardsymbol> elements:

Note:

<typeof hazard>: in the <messagepanel> element, defines the type of hazard

<consequence>: in the <messagepanel> element, describes the results of not avoiding a hazard

<howtoavoid>: in the <messagepanel> element, describes the actions required to avoid a hazard

76 DITA InPrint User Guide

Appendix A: DITA InPrint Template Styles / Typographic Domain Styles

Typographic Domain Styles “The typographic elements are used to highlight text with styles (such as bold, italic, and monospace).” - DITA 1.2 Specification.

Typographic Inline Element Styles

Element Styling

<b> bold text

<i> italic text

<sup> superscript text

<sub> subscript text

<tt> monospace text

<u> underlined text

DITA InPrint User Guide 77

Appendix A: DITA InPrint Template Styles / User Interface Domain Styles

User Interface Domain Styles “The user interface domain elements are used to describe the user interface of a software program.” - DITA 1.2 Specification

User Interface Domain Inline Styles

Element Example of Styling

<uicontrol> Cancel

<wintitle> Insert Index Entry

<menucascade> File > Properties

<shortcut> Ctrl-S

<screen> StyleExample of <screen> style: Spaces, tabs, and line breaks are preserved.

78 DITA InPrint User Guide

Index

A adding bookmap list elements 31autotbl.fmt 9

B base topic styles 54bookmap 28

language 28bookmaps 28, 31, 32

adding other elements 32defining 28list elements 31metadata 28titles 28

C Caption paragraph style 39character styles 41-43

changing 42linking 42non-DITA 43

Note Label 43TOC1 43TOC2 43TOC3 43TOC4 43TOC5 43

style naming 41upper-level linked styles 42

Internet Link 42Source Text 42<b> 42<i> 42

viewing links 42concept topic styles 65creating templates 34customizing templates 34

D defining bookmap titles 28defining bookmaps 28desktop application 13DITA 22

extensions provided by DITA InPrint 22DITA InPrint 7-9, 13, 20-24

desktop application 13extensions to DITA 22graphics 23installing 7, 9known limitations 24publishing process 21

purpose 20requirements 8

DITA InPrint template 54, 65-67, 69, 71, 75-78base topic styles 54concept topic styles 65hazard domain styles 76machinery task topic styles 69programming domain styles 71reference topic styles 66software domain styles 75task topic styles 67typographic domain styles 77user interface domain styles 78

E editing templates 35endnote styles 44extensions to DITA 22

F footnote styles 44frame styles 47

G GIF 23graphics 23

H hazard domain styles 76Headings paragraph style 39

I Index Page Break paragraph style 40Index paragraph style 39index styles 50installing DITA InPrint 7, 9Internet Link character style 42

J JPEG, JPG 23

K known limitations 24

L Landscape in <chapter> paragraph style 40language 28list styles 45, 46

style naming 46

DITA InPrint User Guide Index-1

Index / L

localization 28

M machinery task topic styles 69MathML 23MathML 2.0 23

N Note Label character style 43

O OpenOffice 8, 9

autotbl.fmt table styles file 9downloading 8installing 8user configuration folder 9

oXygen 9integrating DITA InPrint into 9oXygenTransforms.scenarios 9

P page styles 36pagination 38

controlling with paragraph styles 38paragraph styles 37-40

AutoUpdate 39changing 39linking 39non-DITA 40

Index Page Break 40Landscape in <chapter> 40Portrait in <chapter> 40Task Label 40<steps> End Label 40<steps> Start Label 40

pagination 38style naming 38top-level 39

Caption 39Headings 39Index 39Preformatted Text 39Table Contents 39Table Heading 39Text 39

viewing links 39

PDF reader application 8PNG 23Portrait in <chapter> paragraph style 40Preformatted Text paragraph style 39programming domain styles 71publishing process 21purpose of DITA InPrint 20

R reference topic styles 66requirements 8

S setting bookmap metadata 28setting the document language 28software domain styles 75Source Text character style 42Styles and Formatting dialog 39, 42SVG 23

T Table Contents paragraph style 39Table Heading paragraph style 39table styles 47Task Label character style 40task topic styles 67templates 34-37, 41, 44, 45, 47, 50

character styles 41creating 34editing 35endnote styles 44footnote styles 44frame styles 47index styles 50list styles 45page styles 36paragraph styles 37table styles 47

Index-2 DITA InPrint User Guide

Index / T

Text paragraph style 39TOC1 character style 43TOC2 character style 43TOC3 character style 43TOC4 character style 43TOC5 character style 43typographic domain styles 77

U user interface domain styles 78

W working with DITA InPrint 27

< <b> character style 42<i> character style 42<steps> End Label 40<steps> Start Label 40<sup> character style 42

DITA InPrint User Guide Index-3

Endnotes

i This will appear as an endnote.

DITA InPrint User Guide 4