Repo for student reusable content projects, writing with DITA
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
examples
practice
.gitignore
README.md
reuse-activity-collective-1.md
reuse-activity-group-2.md
reuse-activity-group-3.md
reuse-activity-template-team4.md
reuse-activity-template.md

README.md

DITA

Repo for student reusable content projects, writing with DITA.

Required Tools

  1. Text editor (with syntax highlighting)
  2. Java JDK 7+
  3. DITA 1.2 Specifications
  4. DITA Open Toolkit 2.1.1

DITA-OT Installation

Installation tasks

  1. Read up on terminal / shell use, if you are not familiar with using the command-line interface.
  2. Verify if Java JRE/JDK (version 7+) is installed by running java -version in your terminal / shell. If installed, go to task #3. If not installed, go to task #2.
  3. Download and install the DITA Open Toolkit (2.1.1)

Before using the DITA-OT, be sure to properly set it up on your computer: http://www.dita-ot.org/2.1/getting-started/index.html. You will need JAVA JDK (version 7+) on your computer prior to setting up the ToolKit.

###1. Terminal / Shell Use

Linux and Mac OS use the Terminal command-line interface, while Windows uses the shell command-line interface. As noted on the DITA-OT site, the toolkit is a command-line tool with no GUI. If you are unfamiliar with how to use the terminal (Linux / Mac OS) or shell (Windows), here is how to locate and open it on your computer.

Mac OS: On Mac, look under Utilities and open the "Terminal." Read this introduction to the terminal blog post to learn some basic terminal commands.

Windows: On Windows, search for the cmd.exe file or "Command Prompt" and create a shortcut to it within a directory of your choice (e.g., Desktop). Read this introduction to the Windows shell to learn some basic commands.

Also, refer to the Command-Line Help page within the class website: http://4662wf15.clindgrencv.com/cmdline.html.

Screen shot of the Command-Line Help web page.

###2. Java Installation

Check to see if Java has been installed on your computer by opening up the terminal / shell, and completing the following steps:

  1. Type java -version
  2. If the output indicates that you have Java JDK/JRE (7+), then continue to task #3: Downloading and installing the DITA OT. If not, go to the Java download page and follow the installation instructions for your particular operating system: Windows, Mac OS X, Linux
  3. After installing Java, set the PATH environment variable. See the class "Command-Line Help" page for instructions to complete this task.

###3. Downloading and installing the DITA OT

####OT Installation on Windows

The following steps guide you to set up the DITA Open Toolkit processing environment.

  1. Download the DITA Open Toolkit package: https://github.com/dita-ot/dita-ot/releases/tag/2.1.1.

  2. Unzip the package file into the installation directory of your choice. For example C:\pkg\dita-ot-2.1.1

  3. To use the dita command anywhere, set up your environment variable by following this tutorial.

  4. Test the DITA-OT installation with the either samples included in the OT, or the basic topic models in this repo: DITA/examples.

####OT Installation on Linux or OS X

The following steps guide you to set up the DITA Open Toolkit processing environment in Linux or OS X.

  1. Download the DITA Open Toolkit package: https://github.com/dita-ot/dita-ot/releases/tag/2.1.1.

  2. Extract the package file into a installation directory of your choice. For example, your in your home folder: home/dita-ot-2.1.1, or if you are on a Mac, perhaps your Apps folder.

  3. To use the dita command anywhere, set up your environment variable by following this tutorial.

  4. Test the DITA-OT installation with the either samples included in the OT, or the basic topic models in this repo: DITA/examples.

Building DITA Transformations

See the DITA-OT user guide about how to generate output: http://www.dita-ot.org/2.1/getting-started/using-dita-command.html

Sample DITA Commands

See the dita command help:

## Prints out build command options and arguments
## in the Terminal window
dita --help
## DITA options and arguments

-f == dita output format
-i == dita input map file
-o == dita output directory
-D<property>=<value> == add custom args 
    with particular values to dita transformation
-filter <file> == filter and flagging file (e.g., .ditaval)

Create a PDF:

dita -f pdf -i 'path/to/your.ditamap' \
  -o 'path/to/your/out/pdf/topic-model-name'

Create an HTML5 site:

dita -f html5 -i 'path/to/your.ditamap' \
  -o 'path/to/your/out/html5/topic-model-name'

Create an HTML5 site with a custom CSS file:

dita -f html5 -i 'path/to/your.ditamap' \
  -o 'path/to/your/out/html5/topic-model-name'' \
  -Dargs.cssroot='path/to/the/css/assets/directory' \
  -Dargs.css='${cssroot}/your-stylesheet.css' \
  -Dargs.csspath='css' \
  -Dargs.copycss='yes'