You are previewing DITA for Print.
O'Reilly logo
DITA for Print

Book Description

DITA for Print takes you step-by-step through the process of building a print customization plugin for the DITA Open Toolkit that will give you control over your PDF output.

Table of Contents

  1. Table of Contents
  2. List of Figures
  3. Preface
    1. Why this book?
    2. Who is this book for?
    3. What’s not covered in this book
    4. Keepin’ it real
    5. About me
    6. Contact me
    7. Acknowledgements
  4. Chapter 1. Introduction
    1. What you’ll need
    2. Useful resources
    3. Some conventions
    4. Comment, comment, comment…test, test, test
  5. Chapter 2. Custom PDF plugin creation
    1. What is a PDF plugin and why do you need one?
    2. Organization of the org.dita.pdf2 plugin
    3. DITA Open Toolkit 1.5 and earlier
    4. Download and install the DITA Open Toolkit
    5. Create your own PDF plugin
    6. Integrate your plugin into the DITA-OT
    7. Add an attribute set file to your plugin
    8. Add an XSLT stylesheet to your plugin
    9. Why not use a single custom file for my changes?
    10. Add a localization variable file to your plugin
    11. Wrap-up
  6. Chapter 3. DITA Open Toolkit builds
    1. What is an ANT build file?
    2. Create an ANT build file
    3. Run an ANT build file (Windows)
    4. Run an ANT build file (Mac, Linux)
    5. Create a batch file to launch an ANT build (Windows)
    6. Create a shell file to launch an ANT build (Mac, Linux)
    7. Test your plugin
    8. Use a specific PDF renderer
    9. Other things you can do
      1. The topic.fo file
      2. Retain the topic.fo file for troubleshooting
  7. Chapter 4. Fonts
    1. About fonts in the PDF plugin
    2. Font specifications
    3. Files you need
    4. Select basic fonts for your plugin
    5. Other things you can do
      1. Use a custom font family
  8. Chapter 5. Attribute sets
    1. What are attribute set files?
    2. How attribute set defaults work
    3. Special attributes for XEP, Antenna House, and FOP
    4. Which attribute set do you customize?
    5. The closest attribute set wins
    6. Attribute sets that call other attribute sets
    7. Basic-settings variables in attribute sets
    8. Create a new attribute set
    9. Call a new attribute set
    10. Conditionalize an attribute set
  9. Chapter 6. Localization variables
    1. What are localization variables?
    2. Literal characters and numeric character references
    3. Exercises
    4. Other things you can do
      1. Create a localization variables file
  10. Chapter 7. Page masters
    1. Page masters and regions in the PDF plugin
    2. Default page masters, regions and attribute sets
    3. Page specifications
    4. Files you need
    5. Completing these exercises
    6. Set up double-sided pagination
    7. Set page dimensions
    8. Set page margins
    9. Set up body regions
    10. Set up header and footer regions
    11. Set margins for the front cover page
    12. Other things you can do
      1. Eliminate blank last pages
      2. Design a separate layout for first pages
      3. Use the bookmap page sequence for maps
      4. Add a background image to a page
      5. Change the number of columns on a master page
      6. Specifying landscape pages for a topic
      7. Set up a landscape page
      8. Assign a landscape page to a topic
  11. Chapter 8. Page headers and footers
    1. About headers and footers
    2. PDF plugin defaults for headers and footers
    3. Where does header and footer information come from?
    4. Metadata variables for headers and footers
    5. Models to use for map metadata
    6. DITA element classes
    7. Header and footer specifications
    8. Files you need
    9. Completing these exercises
    10. Header setup
      1. Set up headers that include external files
      2. Set up headers that include boilerplate text
      3. Set up headers that include generated text
      4. Adding information from the map to headers
        1. Create metadata variables for headers and footers
        2. Add fallback header and footer variables to the localization variables file
        3. Set up headers that include map metadata
    11. Footer setup
      1. Set up footers
      2. Create new header and footer definitions
      3. Add chapter, appendix, or part numbers to page numbers
      4. Restart page numbering in each chapter, appendix or part
    12. Header and footer formatting
      1. Set top and bottom margins for headers and footers
      2. Set left and right margins for headers and footers
      3. Format the appearance of headers and footers
      4. Justify elements of a header or footer
      5. Add space around a header or footer image
    13. Other things you can do
      1. Put header or footer content on multiple lines
      2. Add the current date to headers and footers
      3. Add a prefix to non-body page numbers
      4. Use a specific title level in the running header
  12. Chapter 9. Cover pages
    1. Front cover customization
      1. Cover specifications
      2. Files you need
      3. Add bookmap information to the front cover
      4. Format information on the cover page
      5. Place cover page information in a specific location
    2. Back cover creation and customization
      1. Back cover workflow steps
      2. Create and call a back cover template
      3. Create back cover page sequence
      4. Add back cover page master attribute sets
      5. Add content to the back cover
      6. Format content on the back cover
    3. Other things you can do
      1. Insert text based on language
      2. Eliminate the front cover page
      3. Eliminate index page masters when including a back cover page
  13. Chapter 10. Titles, body text, and notes
    1. General text formatting specifications
    2. Files you need
    3. Title formatting
      1. How topic title attribute sets work
      2. Format topic titles
      3. Format section titles
      4. Format chapter, appendix, or part titles
      5. Format the chapter, appendix, or part autonumber
      6. Change the chapter number label and format
      7. Put the chapter, appendix or part label, number, and title on the same line
    4. Text formatting
      1. Formatting body text
      2. Set body font sizes
      3. Format code samples and messages
      4. Set the default line height
      5. Format trademark, registered trademark, service mark, and copyright symbols
    5. Notes formatting
      1. Format note labels
      2. Change the label for a note type
      3. Delete the label for a note type
      4. Change or delete note icons
      5. Format note text
      6. Add left and right borders to notes
      7. Use a custom label for other-type notes
    6. Other things you can do
      1. Mark non-standard items for resolution
      2. Eliminate the chapter, appendix, or part label and number
      3. Format note labels as sideheads
      4. Rotate text
      5. Include a topic’s ID in the PDF
      6. Add a prefix to a topic title
  14. Chapter 11. Lists
    1. Hints on working with list-related attribute sets
    2. List specifications
    3. Files you need
    4. Create multiple bullet formats for unordered lists
    5. Create multiple numbering formats for ordered lists
    6. Create a checklist
    7. Other things you can do
      1. Change the amount of space between a number/bullet and text
      2. Use an image as a bullet
      3. Format definition lists as a list instead of a table
  15. Chapter 12. Task topics
    1. Task topic specifications
    2. Files you need
    3. Task step formatting tips
    4. Change the label for optional steps
    5. Change labels for task sections
    6. Format task section labels and text
    7. Format step and substep numbers
    8. Other things you can do
      1. Count the number of steps in a task
      2. Create links to steps within the same task
  16. Chapter 13. Tables
    1. Table specifications
    2. Files you need
    3. Fun with table rules
    4. Table border overrides
    5. Force table column widths to be respected
    6. Change or delete the label for a table title
    7. Format the table heading row
    8. Format table cell text
    9. Format table rules
    10. Format the table title
    11. Place titles below tables
    12. Add chapter, appendix or part numbers to table titles
    13. Other things you can do
      1. Add a bottom table rule when a table breaks across a page
      2. Number table cells
      3. Omit the table heading on subsequent pages
      4. Fix table row ruling
  17. Chapter 14. Images
    1. Files you need
    2. Change or delete the label for a figure title
    3. Format figure titles
    4. Add chapter, appendix or part numbers to figure titles
    5. Place titles above images
    6. Dynamically scale images to the page width
    7. Change the default alignment for all images
  18. Chapter 15. Related links, cross-references, and footnotes
    1. General link formatting specifications
    2. Files you need
    3. General links and cross-references
      1. Change the format of cross-references
      2. Change the on-page text for related links
    4. Related links
      1. Include related links in a PDF
      2. Change or delete the "Related Links" label
      3. Add a divider above the "Related Links" section
      4. Change the format of related links
    5. Footnotes
      1. Change the appearance of footnote text and callouts
      2. Change the footnote separator line
      3. Add brackets around footnote callouts
    6. Other things you can do
      1. Hide short descriptions in related links
  19. Chapter 16. Table of Contents
    1. How TOC attribute sets interact
    2. Title levels in bookmaps and ditamaps
    3. TOC specifications
    4. Files you need
    5. Add a TOC to a PDF
    6. Change the title of the TOC
    7. Format the TOC title
    8. Add or remove entry levels from the TOC
    9. Apply different formatting to different TOC entry levels
    10. Format page numbers in the TOC
    11. Add chapter, appendix or part number to TOC page numbers
    12. Change the leader in TOC entries
    13. Remove leaders from TOC entries
    14. Adjust indents for TOC entries
    15. Mini-TOC
      1. Change or delete the title for the mini-TOC
      2. Format mini-TOC links
      3. Add page numbers to mini-TOC entries
      4. Remove the mini-TOC from a table
      5. Insert a page break after the mini-TOC
      6. Eliminate the mini-TOC
    16. Other things you can do
      1. Change or delete chapter/appendix/part prefixes in TOC entries
      2. Omit page numbers for TOC entry levels
      3. Change TOC numbering formats
      4. Allow line breaks in TOC entries
      5. Use Roman numerals for TOC page numbers
      6. Eliminate the TOC from a PDF
      7. Omit the TOC bookmark from a map-based PDF
  20. Chapter 17. Index
    1. This chapter is different…
    2. Index entry levels
    3. The curious case of page numbers on main index entries
    4. Index specifications
    5. Files you need
    6. Add an index to your PDF
    7. Change the title of the index
    8. Format the index title
    9. Format index letter headings
    10. Format index entries
    11. Format index page numbers
    12. Adjust indents for index entries
    13. Other things you can do
      1. Change the column count on index pages (XEP)
      2. Change the column count on index pages (Antenna House)
      3. Add chapter numbers to index entries
      4. Delete the index from a map-based PDF
      5. Delete the Index bookmark from a map-based PDF
  21. Chapter 18. List of Tables and List of Figures
    1. List of Tables and List of Figures specifications
    2. Files you need
    3. Add a List of Tables or List of Figures
    4. Format the List of Tables and List of Figures titles
    5. Change the title of the List of Tables and List of Figures
    6. Format page numbers in the List of Tables and Figures
    7. Format entries in the List of Tables and List of Figures
    8. Add chapter or appendix numbers to table or figure numbers in the List of Tables or List of Figures
  22. Chapter 19. Bookmarks
    1. Files you need
    2. Add the chapter, appendix or part number to bookmarks
    3. Delete the Table of Contents bookmark
    4. Delete the Index bookmark
  23. Specifications used in these exercises
  24. Attribute set lists and descriptions
    1. Attribute set file list
    2. Common attribute sets
    3. Domain attribute sets
    4. Frontmatter attribute sets
    5. Glossary attribute sets
    6. Index attribute sets
    7. Layout masters attribute sets
    8. Link attribute sets
    9. List attribute sets
    10. Lot-Lof attribute sets
    11. Map attribute sets
    12. Reference attribute sets
    13. Static content attribute sets
    14. Task element attribute sets
    15. Table attribute sets
    16. Table of Contents attribute sets
    17. Basic settings variables
  25. Localization variables list
  26. GetChapterPrefix template
  27. GetChapterPrefixForIndex template
  28. Back cover template
  29. Specialized element template creation
  30. Paragraph and character formatting: word processing applications to XSL-FO match-up