-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
625 lines (361 loc) · 36.8 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href='https://fonts.googleapis.com/css?family=Architects+Daughter' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/github-light.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<title>Eclipse-cheatsheets-to-dita-to-pdf by jbampton</title>
</head>
<body>
<header>
<div class="inner">
<h1>Eclipse-cheatsheets-to-dita-to-pdf</h1>
<h2>Transforms Eclipse cheat sheets to PDF via the DITA Open Toolkit, Eclipse, Apache FOP, Saxon, Apache Ant, XSL, XML</h2>
<a href="https://github.com/jbampton/eclipse-cheatsheets-to-dita-to-pdf" class="button"><small>View project on</small> GitHub</a>
</div>
</header>
<div id="content-wrapper">
<div class="inner clearfix">
<section id="main-content">
<h1>
<a id="eclipse-cheat-sheets-to-dita-to-pdf" class="anchor" href="#eclipse-cheat-sheets-to-dita-to-pdf" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Eclipse cheat sheets to DITA to PDF</h1>
<p>I worked on the <a href="https://en.wikipedia.org/wiki/Open_source">open source</a> <a href="https://www.oracle.com/java/index.html">Java</a> based project <a href="http://debrief.info/">Debrief</a> the leading maritime analysis tool. This project is based on some parts of the document publishing that I did in the Debrief project. The list of resources at the bottom of this README describe the technologies being used.</p>
<p>The original project created a set of DITA XML files and one highly customized <a href="https://acrobat.adobe.com/au/en/products/about-adobe-pdf.html">PDF</a> and there are a couple of example PDFs that can be seen in the root of this repository. Recently I added support for other output formats that are not customized including HTMLHelp, TocJS and XHTML.</p>
<p>This program runs inside <a href="https://www.eclipse.org/">Eclipse</a>, an <a href="https://en.wikipedia.org/wiki/Integrated_development_environment">integrated development environment</a> (IDE) and is mainly a Java based project in that all the code libraries use Java (<a href="https://xmlgraphics.apache.org/fop/">Apache FOP</a>, <a href="https://sourceforge.net/projects/saxon/files/Saxon-HE/">Saxon</a>, <a href="http://www.dita-ot.org/">DITA Open Toolkit</a>, <a href="http://ant.apache.org/">Apache ANT</a>, Eclipse) and it also uses <a href="https://www.w3.org/Style/XSL/">XSL</a> and <a href="https://www.w3.org/XML/">XML</a> heavily. Using Eclipse allows us to create a publishing pipeline creating all the working output formats one after the other, in one click by building the project. Development was originally done in <a href="https://www.oxygenxml.com">oXygen XML Editor</a> then ported to Eclipse. </p>
<p>Since Java is now ranked number one on the <a href="http://www.tiobe.com/tiobe_index">TIOBE Index</a>, this project aims to be a easy to follow tutorial on all the technologies listed.</p>
<p>Wait until this webpage fully loads and then jump ahead to the various sections in this README.md by using the links below:</p>
<ul>
<li><a href="#build-instructions">Build instructions</a></li>
<li><a href="#build-instructions-mac-os-x">Build instructions - OS X</a></li>
<li><a href="#homebrew-usage">Homebrew usage</a></li>
<li><a href="#list-of-resources-and-technologies-used-on-this-github-project">List of resources</a></li>
<li><a href="#license">Licenses</a></li>
</ul>
<p>The roadmap for this project is to keep the "info.debrief" custom DITA-OT plugin up to date with the latest current version of DITA-OT, in depth instructions on how to get up and running inside Eclipse and lots more.</p>
<p>When built and run this project takes a set of <a href="http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Freference%2Fref-cheatsheets.htm">Eclipse cheat sheets</a> and transforms them to PDF. Eclipse cheat sheets are obviously best viewed inside Eclipse. Using PDF allows us to print nicely formatted cheat sheets on paper which allows the user to work through the cheat sheets with a pen and check off each item as they go. Using cheat sheets physically on paper was seen as a new way to learn and was the original concept of the Debrief cheat sheets publishing project I worked on.</p>
<p><a href="https://en.wikipedia.org/wiki/Darwin_Information_Typing_Architecture">Darwin Information Typing Architecture</a> (DITA) is an XML data model for authoring and using DITA-OT you can publish those ideas. The DITA standard is maintained by the <a href="https://www.oasis-open.org/">OASIS</a> <a href="https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=dita">DITA Technical Committee</a>. Some of the largest and most successful companies in the world use DITA. The next link is an informal list of <a href="http://www.ditawriter.com/companies-using-dita/">companies using DITA</a>.</p>
<p>It's a two-step process first the DITA XML is created from the Eclipse cheat sheets (XML files) and then you use the DITA-Open Toolkit to create the PDF from the auto created DITA files.</p>
<p>The two parts of the transformation and rendering comprise of:</p>
<ol>
<li>
<ul>
<li>This is the transformation step and it uses cheatsheet-to-dita.xsl which requires an XSLT 2.0 compliant processor.</li>
</ul>
<ul>
<li>I used the open source product Saxon from <a href="http://www.saxonica.com/welcome/welcome.xml">Saxonica</a> which came included with the DITA-OT 2.2.1 library.</li>
<li>This file takes as input a collection on XML files (Eclipse cheat sheets) and creates multiple output files - a parent DITA Map and some associated tasks.</li>
<li>The "output/debrief" and sub "dita" folder contains the dynamically created (transformed) DITA files from this step. </li>
</ul>
</li>
<li>
<ul>
<li>This is the rendering (printing) step and the 'info.debrief' custom DITA-OT plugin produces the PDF via the DITA-OT base libraries and a XSL - Formatting Objects Processor (FO Processor)</li>
</ul>
<ul>
<li>The "output/debrief/pdf" folder contains the resulting PDF output from this step</li>
<li>I used Apache FOP 2.1 for the FO Processor</li>
</ul>
</li>
</ol>
<p>If you are not already Gung-Ho on Java and all things tech, then try a few short online courses:</p>
<ul>
<li><a href="https://www.codecademy.com/learn/learn-java">https://www.codecademy.com/learn/learn-java</a></li>
<li><a href="https://www.codecademy.com/learn/learn-the-command-line">https://www.codecademy.com/learn/learn-the-command-line</a></li>
<li><a href="https://www.codeschool.com/courses/try-git">https://www.codeschool.com/courses/try-git</a></li>
<li><a href="https://www.codecademy.com/learn/learn-git">https://www.codecademy.com/learn/learn-git</a></li>
</ul>
<p>And then come train in the <a href="http://www.codewars.com">REAL DOJO</a> and reach your highest potential, become <strong>faster</strong>, <strong>stronger</strong> and <strong>more powerful</strong>......<strong>JEDI MASTER LEVEL</strong>.....<strong>!??!?!!</strong> </p>
<h2>
<a id="yo-lets-buildwatch-the-star-wars-build-run-on-youtubebrisvegas-jedi-master-style" class="anchor" href="#yo-lets-buildwatch-the-star-wars-build-run-on-youtubebrisvegas-jedi-master-style" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Yo let's build...watch the Star Wars build run on Youtube....BrisVegas Jedi Master Style...</h2>
<p><a href="https://youtu.be/LJ5DsFP_THo">See the build run full screen in 1080p</a></p>
<p><a href="#eclipse-cheat-sheets-to-dita-to-pdf">↑</a> <a href="#license">↓</a></p>
<h2>
<a id="build-instructions" class="anchor" href="#build-instructions" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Build Instructions</h2>
<p>The project was originally developed on OS X and the documentation below lists the instructions on how to set up and build the project for OS X.</p>
<p>The <a href="https://github.com/jbampton/eclipse-cheatsheets-to-dita-to-pdf/wiki/Windows-Build-Instructions">Windows build instructions</a> for this project will be soon on this repositories wiki. </p>
<p><a href="#eclipse-cheat-sheets-to-dita-to-pdf">↑</a> <a href="#license">↓</a></p>
<h2>
<a id="build-instructions-mac-os-x" class="anchor" href="#build-instructions-mac-os-x" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Build Instructions Mac OS X</h2>
<h3>
<a id="install-git" class="anchor" href="#install-git" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Install Git</h3>
<p>On OS X, open your Applications folder, then open the Utilities folder. Open the Terminal application.</p>
<p><img src="documentation/images/osx/terminal.png" alt="OS X terminal"></p>
<p>In the terminal type:</p>
<h4>
<a id="git---help" class="anchor" href="#git---help" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>git --help</h4>
<p>This will either print the usage of the git command if git is already installed, or trigger the Command Line Tools (OS X) for Xcode to install.</p>
<p>After the Command Line Tools are installed go back to the terminal and type:</p>
<h4>
<a id="man-git" class="anchor" href="#man-git" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>man git</h4>
<p><img src="documentation/images/man/man-git.png" alt="man git"></p>
<p>Use the up and down arrows to navigate through the man page and press 'q' to quit.</p>
<p>You can then type:</p>
<h4>
<a id="which-git" class="anchor" href="#which-git" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>which git</h4>
<p><img src="documentation/images/git/which-git.png" alt="which git"></p>
<p>You can run the next command after you have cloned this project:</p>
<h4>
<a id="git-status" class="anchor" href="#git-status" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>git status</h4>
<p><img src="documentation/images/git/git-status.png" alt="git status"></p>
<p><a href="#eclipse-cheat-sheets-to-dita-to-pdf">↑</a> <a href="#license">↓</a></p>
<h3>
<a id="install-java" class="anchor" href="#install-java" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Install Java</h3>
<p>First you should check if Java is already installed on your system. </p>
<p>In a terminal type the following commands:</p>
<h4>
<a id="java" class="anchor" href="#java" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>java</h4>
<p>If Java is installed you will see the Java help message like the image below. </p>
<p><img src="documentation/images/java/java.png" alt="java"></p>
<p>If Java is not installed you need to install the Java Development Kit (JDK) as Eclipse needs Java to run so you should first read the <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html">Java Platform, Standard Edition Installation Guide</a></p>
<p>So then go to: <a href="http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html">http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html</a></p>
<p>Choose the JDK version for your <a href="https://en.wikipedia.org/wiki/Operating_system">Operating System</a>.</p>
<p>If it's installed you can read up about Java more by typing:</p>
<h4>
<a id="java--version" class="anchor" href="#java--version" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>java -version</h4>
<p><img src="documentation/images/java/java-version.png" alt="java -version"></p>
<h4>
<a id="man-java" class="anchor" href="#man-java" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>man java</h4>
<p><img src="documentation/images/man/man-java.png" alt="man java"></p>
<p><a href="#eclipse-cheat-sheets-to-dita-to-pdf">↑</a> <a href="#license">↓</a></p>
<h3>
<a id="install-eclipse" class="anchor" href="#install-eclipse" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Install Eclipse</h3>
<p>Go to: <a href="https://www.eclipse.org/downloads/?osType=macosx">Eclipse Downloads</a></p>
<p><img src="documentation/images/eclipse/download_eclipse.png" alt="Eclipse Downloads"></p>
<p>In the box near top labelled "Try the Eclipse Installer", click on "64 bit" under "Mac OS X".</p>
<p>Download Eclipse installer application.</p>
<p>You should check the checksum of the Eclipse file you download.</p>
<p>Depending on which type of checksum you choose: MD5, SHA1, SHA-512 the commands are slightly different:</p>
<p>First you should click on the checksum type in the image below:</p>
<p><img src="documentation/images/eclipse/eclipse_checksums.png" alt="Eclipse checksums"></p>
<p>I used SHA-512 so in a terminal in the directory or folder where you downloaded the Eclipse package to, the command to type would be:</p>
<h4>
<a id="shasum--a-512-eclipse-inst-mac64targz" class="anchor" href="#shasum--a-512-eclipse-inst-mac64targz" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>shasum -a 512 eclipse-inst-mac64.tar.gz</h4>
<p><img src="documentation/images/terminal/example_shasum.png" alt="eclipse shasum"></p>
<p>You should check the output of the shasum command matches what's displayed on the Eclipse website for the type of checksum you choose. You can select the text in the terminal, copy it and then find it on the Eclipse website.</p>
<p>For more information on the shasum or md5 command open a terminal and type:</p>
<h4>
<a id="man-shasum" class="anchor" href="#man-shasum" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>man shasum</h4>
<p><img src="documentation/images/man/man_shasum.png" alt="man shasum"></p>
<h4>
<a id="man-md5" class="anchor" href="#man-md5" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>man md5</h4>
<p><img src="documentation/images/man/man_md5.png" alt="man md5"></p>
<p>Use the up and down arrows on the keyboard to navigate through the man page documentation.</p>
<p>To exit from the man pages type: q</p>
<p>Unzip resulting download (eclipse-inst-mac64.tar.gz) by double-clicking on it if downloader did not already unzip it.</p>
<p>Run "Eclipse Installer" application.</p>
<p>Choose "Eclipse IDE for Java Developers" option. (Other options and Eclipse modules are not necessary for this build.)</p>
<p><img src="documentation/images/eclipse/eclipse-installer-1.png" alt="Eclipse installer"></p>
<p>This option allows you to specify an "Installation Folder." The default option may be a folder within your individual directory.</p>
<p><img src="documentation/images/eclipse/eclipse-installer-2.png" alt="Eclipse Installer install location"></p>
<p>It will be more useful to change this and install Eclipse within a directory titled "Eclipse" within the system's main Application directory.</p>
<p>Click on the folder icon to navigate to the Applications directory and create an "Eclipse" target sub-directory before installing.</p>
<p><img src="documentation/images/osx/applications-folder-eclipse.png" alt="Applications - Eclipse folder"></p>
<p><img src="documentation/images/eclipse/eclipse-installer-3.png" alt="Eclipse Installer install location"></p>
<p>Then click the "Install" button.</p>
<p>You will be presented with the Eclipse Foundation Software User Agreement, so click "Accept Now" after reading it. </p>
<p><img src="documentation/images/eclipse/eclipse-software-user-agreement.png" alt="Eclipse Foundation Software User Agreement"></p>
<p>The installation process may take a few minutes and you will be presented with a green "installing" loading bar style indicator.</p>
<p><img src="documentation/images/eclipse/eclipse-installer-4.png" alt="Installing Eclipse"></p>
<p>When Eclipse has finished installing you will be presented with the "Launch" green button.</p>
<p><img src="documentation/images/eclipse/eclipse-installer-5.png" alt="Eclipse is now installed"></p>
<p>Launch Eclipse for the first time. Doing so will ask you to Select a "workspace." The default option "/Users/[your username]/Documents/workspace" will work fine.</p>
<p><img src="documentation/images/eclipse/eclipse-select-workspace.png" alt="Eclipse select workspace"></p>
<p>Quit Eclipse for now.</p>
<p><a href="#eclipse-cheat-sheets-to-dita-to-pdf">↑</a> <a href="#license">↓</a></p>
<h3>
<a id="install-github-desktop" class="anchor" href="#install-github-desktop" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Install GitHub Desktop</h3>
<p>The build's repository is found within GitHub, and the "GitHub Desktop for Mac" application will allow you to clone and work on the build more easily, while retaining a link to the primary source, and thus obtaining updates and having the option to submit modifications which could be candidates for inclusion. GitHub Desktop is currently available for both OS X and Windows.</p>
<p>Go to: <a href="https://desktop.github.com/">GitHub Desktop</a></p>
<p><img src="documentation/images/github/github_desktop.png" alt="GitHub Desktop"></p>
<p>Click on the "Download GitHub Desktop" button.</p>
<p>Unzip the resulting file: GitHub Desktop 216.zip</p>
<p>This expands to: GitHub Desktop</p>
<p>Move this to your system's Applications directory.</p>
<p><img src="documentation/images/osx/applications_folder.png" alt="Applications directory"></p>
<p><a href="#eclipse-cheat-sheets-to-dita-to-pdf">↑</a> <a href="#license">↓</a></p>
<h3>
<a id="clone-the-project-to-your-desktop-computer" class="anchor" href="#clone-the-project-to-your-desktop-computer" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Clone the project to your desktop computer</h3>
<p>Go to the GitHub repository for this project:</p>
<p><a href="https://github.com/jbampton/eclipse-cheatsheets-to-dita-to-pdf">https://github.com/jbampton/eclipse-cheatsheets-to-dita-to-pdf</a></p>
<p>Click on the icon just to left of "Download ZIP" that when you hover your mouse over it, it will display "Save jbampton/eclipse-cheatsheets-to-dita-to-pdf to your computer and use in GitHub Desktop"</p>
<p><img src="documentation/images/github/clone_repo.png" alt="Clone my repository"></p>
<p>You will be presented with a dialog box that will ask if you want to open the link with GitHub Desktop. The dialog box will look different depending on which web browser you are using. Below is how the dialog boxes look like:</p>
<p>Google Chrome</p>
<p><img src="documentation/images/dialogs/chrome_dialog.png" alt="Chrome dialog"></p>
<p>You will need to click launch application.</p>
<p>Firefox</p>
<p><img src="documentation/images/dialogs/firefox_dialog.png" alt="Firefox dialog"></p>
<p>You will need to select "GitHub Desktop" then click "OK"</p>
<p>In the "Clone As:" dialog box, accept the default option, which is to create a clone with the same name as the original: eclipse-cheatsheets-to-dita-to-pdf</p>
<p>Click the "Clone" button.</p>
<p>You will see a progress bar indicating the progress of files being downloaded from GitHub onto your desktop computer, into a local repository directory.</p>
<p>Quit GitHub Desktop.</p>
<p><a href="#eclipse-cheat-sheets-to-dita-to-pdf">↑</a> <a href="#license">↓</a></p>
<h3>
<a id="install-homebrew-and-apache-ant" class="anchor" href="#install-homebrew-and-apache-ant" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Install Homebrew and Apache Ant</h3>
<p>The project uses <a href="http://brew.sh/">Homebrew</a> and I installed Apache Ant inside Homebrew with the <a href="http://brewformulas.org/Ant">Ant</a> Homebrew formula. Towards the bottom of this README.md there is some information on Homebrew usage.</p>
<p><a href="#eclipse-cheat-sheets-to-dita-to-pdf">↑</a> <a href="#license">↓</a></p>
<h3>
<a id="import-project-into-eclipse" class="anchor" href="#import-project-into-eclipse" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Import project into Eclipse</h3>
<p>Launch Eclipse.</p>
<p>In menu bar, choose: File > Import </p>
<p><img src="documentation/images/eclipse/eclipse_file_import.png" alt="File import"></p>
<p>Then > General > Existing Projects into Workspace -> click "Next"</p>
<p><img src="documentation/images/eclipse/eclipse_general_existing.png" alt="General -> Existing Projects"></p>
<p>You will be presented with the next dialog</p>
<p><img src="documentation/images/eclipse/import_projects.png" alt="Import projects"></p>
<p>Click "Browse" next to "Select root directory"</p>
<p>Navigate to the "eclipse-cheatsheets-to-dita-to-pdf" project, which (by default) should be within the "Users/[your user name]/GitHub" directory (or wherever you put it when you cloned it to your desktop).</p>
<p><img src="documentation/images/osx/github_folder.png" alt="GitHub folder"></p>
<p>This will bring the project into Eclipse.</p>
<p>If you have not already done so, click on the "Workspace" button so that you can view the project.</p>
<p>You must add the JAR files from DITA-OT to Ant inside Eclipse. </p>
<p>Go to Eclipse -> Preferences</p>
<p><img src="documentation/images/eclipse/eclipse_preferences.png" alt="Eclipse Preferences"></p>
<p>Then -> Ant -> Runtime -> Classpath tab -> click "Global Entries"</p>
<p><img src="documentation/images/eclipse/ant_runtime_global_entries.png" alt="Ant Runtime Classpath Global Entries"></p>
<p>Then -> click "Add JARs" - you will be presented with the next dialog</p>
<p><img src="documentation/images/eclipse/add_jars.png" alt="Add JARs"></p>
<p>Then-> expand 'eclipse-cheatsheets-to-dita-to-pdf' and navigate to "src/libs/dita-ot-2.2.1/lib" and add all the JAR files from that directory. Make sure to click "Apply" and then click "Ok".</p>
<p>Right click on build.xml and select -> Run As -> Ant Build -> (first one)</p>
<p><img src="documentation/images/ant/ant_build.png" alt="Run the build"></p>
<p>This should run and build all tasks, creating all working output formats in one go.</p>
<p>This process re-creates the DITA XML output in the "output" directory. There should be five DITA files, one parent Ditamap at and 4 task files with the Ditamap at the root of the "output/debrief" folder with task files together in the sub folder "dita"</p>
<p>The final resulting PDF should be called map.pdf and located in the "pdf" folder.</p>
<p>There are currently 4 other output formats (Docbook, HTMLHelp, TocJS, XHTML) as seen by the names of the folders in the "output/debrief" directory. The PDF output is vastly superior to the others which have no customization. The Docbook output is a work in progress. </p>
<p>If you want to choose which output formats to render, you can right click on "build.xml" and select -> Run As -> Ant Build -> (second one). </p>
<p><img src="documentation/images/ant/ant_build2.png" alt="Ant Build"></p>
<p>Then select which output format you would like on the "Targets" tab under "Check targets to execute".</p>
<p>The base target is "xslt2", this creates the DITA-XML files from the input Eclipse cheat sheets (XML). You must have the "xslt2" target checked if you are running any other targets other than "TransformALL"</p>
<p>Finally click "Run".</p>
<p><img src="documentation/images/ant/ant_edit_config.png" alt="Ant Edit Config"></p>
<p><a href="#eclipse-cheat-sheets-to-dita-to-pdf">↑</a> <a href="#license">↓</a></p>
<h2>
<a id="how-dita-ot-pdf-plugins-work" class="anchor" href="#how-dita-ot-pdf-plugins-work" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>How DITA-OT PDF Plugins work</h2>
<p>Plugins are placed in the DITA-OT plugins directory. You can see the plugin I built in this directory named "info.debrief".</p>
<p><img src="documentation/images/dita/info.debrief_plugin_location.png" alt="info.debrief plugin location"></p>
<p>When ready a plugin must be integrated into DITA-OT using <strong>Apache Ant</strong>. I built this project using OS X and I installed Ant through <strong>Homebrew</strong>. </p>
<p>On the command line from inside the root DITA-OT folder it would be -> ant -f integrator.xml</p>
<p>You can also run the integrator inside Eclipse as an Ant build by right clicking on "src/libs/DITA-OT1.8.5/integrator.xml" and selecting -> Run As -> Ant Build (first one) and this should integrate the plugin with the toolkit.</p>
<p><img src="documentation/images/eclipse/eclipse_run_dita_ot_integrator.png" alt="Run DITA-OT integrator inside eclipse with Ant"></p>
<p>Every DITA-OT PDF plugin has a file name plugin.xml at its root where you set the configuration values. The plugin id must match the folder name of the plugin. Every plugin has a "transtype" -> this plugins transtype is "debrief". You can see the plugin.xml file and where to set the plugin id and transtype in the next image:</p>
<p><img src="documentation/images/dita/transtype.png" alt="plugin.xml"></p>
<p>PDF Plugins are comprised of some XML config files, some artwork and some custom XSL (XSLT/XSL-FO/XPath) code
DITA-OT provides that base XSL code that you 'override' with your custom work.</p>
<p>The two main files that configure plugins are plugin.xml and integrator.xml which should be in the root of the plugin folder. The "cfg" folder contains the rest of the customization.</p>
<p>Custom XSL can be placed in two XSL files both named "custom.xsl". I placed all the custom code at "src/libs/DITA-OT1.8.5/plugins/info.debrief/cfg/fo/xsl/custom.xsl" for this project. The other file is seen in the adjacent "attrs" directory. </p>
<p><img src="documentation/images/dita/custom.xsl.png" alt="custom.xsl"> </p>
<p>Placing the custom code only in these two files follows best practice techniques on how to build a DITA-OT PDF plugin.</p>
<p><a href="#eclipse-cheat-sheets-to-dita-to-pdf">↑</a> <a href="#license">↓</a></p>
<h2>
<a id="homebrew-usage" class="anchor" href="#homebrew-usage" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Homebrew usage</h2>
<p><a href="http://brew.sh">Homebrew</a> is an amazing package management system for OS X that installs the stuff you need that Apple didn't.</p>
<p><a href="http://brewformulas.org">Homebrew Formula</a> are written in Ruby.</p>
<p>You install Homebrew via the command line as shown in my short <a href="https://www.youtube.com/watch?v=Ird_MGf3m0Q">Homebrew install video</a>.</p>
<p>If you install Homebrew you should try to run brew update daily.</p>
<p>I made another <a href="https://www.youtube.com/watch?v=IonWEFStPio">video on Homebrew</a> which runs for under minute that shows the typical brew update command.</p>
<p>Once you have installed Homebrew you can run through the basic commands below.</p>
<p>Open a terminal and type:</p>
<h3>
<a id="brew--v" class="anchor" href="#brew--v" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>brew -v</h3>
<p><img src="documentation/images/homebrew/brew-v.png" alt="brew -v"></p>
<h3>
<a id="man-brew" class="anchor" href="#man-brew" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>man brew</h3>
<p><img src="documentation/images/man/man_brew.png" alt="man brew"></p>
<p><strong>Before using Homebrew you should ensure it's up to date. Run the next command:</strong></p>
<h3>
<a id="brew-doctor" class="anchor" href="#brew-doctor" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>brew doctor</h3>
<p><img src="documentation/images/homebrew/brew_doctor.png" alt="brew doctor"></p>
<h3>
<a id="brew-update" class="anchor" href="#brew-update" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>brew update</h3>
<p><img src="documentation/images/homebrew/brew_update.png" alt="brew update"></p>
<h3>
<a id="example-output-of-running-a-brew-install-command--the-image-shows-pouring-brews-from-their-bottles" class="anchor" href="#example-output-of-running-a-brew-install-command--the-image-shows-pouring-brews-from-their-bottles" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Example output of running a brew install command. The image shows pouring brews from their bottles</h3>
<p><img src="documentation/images/homebrew/pouring_brews.png" alt="pouring brews"></p>
<h3>
<a id="brew-list" class="anchor" href="#brew-list" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>brew list</h3>
<p><img src="documentation/images/homebrew/brew_list.png" alt="brew list"></p>
<p><a href="#eclipse-cheat-sheets-to-dita-to-pdf">↑</a> <a href="#license">↓</a></p>
<h2>
<a id="list-of-resources-and-technologies-used-on-this-github-project" class="anchor" href="#list-of-resources-and-technologies-used-on-this-github-project" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>List of resources and technologies used on this GitHub project</h2>
<p>Eclipse - <a href="https://eclipse.org/">https://eclipse.org/</a> </p>
<p>Eclipse cheat sheets - <a href="http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Freference%2Fref-cheatsheets.htm">http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Freference%2Fref-cheatsheets.htm</a></p>
<p>The Apache Software Foundation - <a href="http://www.apache.org/">http://www.apache.org/</a></p>
<p>Apache FOP - <a href="https://xmlgraphics.apache.org/fop/">https://xmlgraphics.apache.org/fop/</a></p>
<p>Apache ANT - <a href="http://ant.apache.org">http://ant.apache.org</a></p>
<p>Saxon XSLT - <a href="https://en.wikipedia.org/wiki/Saxon_XSLT">https://en.wikipedia.org/wiki/Saxon_XSLT</a></p>
<p>Saxon - <a href="http://saxon.sourceforge.net/">http://saxon.sourceforge.net/</a></p>
<p>Saxonica - <a href="http://www.saxonica.com/welcome/welcome.xml">http://www.saxonica.com/welcome/welcome.xml</a></p>
<p>Online community for the Darwin Information Typing Architecture OASIS Standard - <a href="http://dita.xml.org/">http://dita.xml.org/</a></p>
<p>DITA - <a href="https://en.wikipedia.org/wiki/Darwin_Information_Typing_Architecture">https://en.wikipedia.org/wiki/Darwin_Information_Typing_Architecture</a></p>
<p>DITA-Open Toolkit - <a href="http://www.dita-ot.org/">http://www.dita-ot.org/</a></p>
<p>W3C - The Extensible Stylesheet Language Family (XSL) - <a href="http://www.w3.org/Style/XSL/">http://www.w3.org/Style/XSL/</a></p>
<p>W3C XSLT 2.0 - <a href="http://www.w3.org/TR/xslt20/">http://www.w3.org/TR/xslt20/</a> </p>
<p>XSL Formatting Objects - <a href="https://en.wikipedia.org/wiki/XSL_Formatting_Objects">https://en.wikipedia.org/wiki/XSL_Formatting_Objects</a></p>
<p>XSL-FO Processors - <a href="http://www.w3.org/community/ppl/wiki/XSL-FO_Processors">http://www.w3.org/community/ppl/wiki/XSL-FO_Processors</a></p>
<p>XML - <a href="https://en.wikipedia.org/wiki/XML">https://en.wikipedia.org/wiki/XML</a></p>
<p>Adobe PDF - <a href="https://en.wikipedia.org/wiki/Portable_Document_Format">https://en.wikipedia.org/wiki/Portable_Document_Format</a></p>
<p>Adobe Acrobat Reader DC - <a href="https://get.adobe.com/reader/">https://get.adobe.com/reader/</a></p>
<p>XHTML - <a href="https://en.wikipedia.org/wiki/XHTML">https://en.wikipedia.org/wiki/XHTML</a></p>
<p>Dublin Core Metadata Initiative - <a href="http://dublincore.org/">http://dublincore.org/</a></p>
<p>Microsoft HTML Help 1.4 - <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms670169(v=vs.85).aspx">https://msdn.microsoft.com/en-us/library/windows/desktop/ms670169(v=vs.85).aspx</a></p>
<p>The Organization for the Advancement of Structured Information Standards (OASIS) - <a href="https://en.wikipedia.org/wiki/OASIS_(organization)">https://en.wikipedia.org/wiki/OASIS_(organization)</a></p>
<p>oXygen XML Editor - <a href="http://www.oxygenxml.com">http://www.oxygenxml.com</a></p>
<p>DITA to TocJS - <a href="http://www.dita-ot.org/1.8/readme/dita2tocjs.html">http://www.dita-ot.org/1.8/readme/dita2tocjs.html</a></p>
<p>DITA-OT installing plugins - <a href="http://dita-ot.sourceforge.net/1.7/dev_ref/plugins-installing.html">http://dita-ot.sourceforge.net/1.7/dev_ref/plugins-installing.html</a></p>
<p>Generate sample DITA-OT plugin - <a href="https://dita-generator-hrd.appspot.com/pdf-plugin/">https://dita-generator-hrd.appspot.com/pdf-plugin/</a></p>
<p>Creating DITA-OT plugins - <a href="http://dita-ot.sourceforge.net/1.5.4/dev_ref/plugins-overview.html">http://dita-ot.sourceforge.net/1.5.4/dev_ref/plugins-overview.html</a></p>
<p>Customizing PDF output - <a href="http://www.dita-ot.org/1.8/readme/dita2pdf-customization.html">http://www.dita-ot.org/1.8/readme/dita2pdf-customization.html</a></p>
<p>XSLT FAQ. Docbook FAQ. Braille. - <a href="http://www.dpawson.co.uk/">http://www.dpawson.co.uk/</a></p>
<p>Homebrew — The missing package manager for OS X - <a href="http://brew.sh/">http://brew.sh/</a> </p>
<p>Install Ant with Homebrew - <a href="http://brewformulas.org/Ant">http://brewformulas.org/Ant</a></p>
<p>Installing Apache Ant - <a href="http://ant.apache.org/manual/install.html">http://ant.apache.org/manual/install.html</a></p>
<p>Codecademy - Learn the Command Line - <a href="https://www.codecademy.com/courses/learn-the-command-line">https://www.codecademy.com/courses/learn-the-command-line</a></p>
<p>Codecademy - Learn Java - <a href="https://www.codecademy.com/learn/learn-java">https://www.codecademy.com/learn/learn-java</a></p>
<p>Got 15 minutes and want to learn Git? <a href="https://try.github.io/levels/1/challenges/1">https://try.github.io/levels/1/challenges/1</a></p>
<p>Ruby regular expression editor - <a href="http://rubular.com/">http://rubular.com/</a></p>
<p>Essential programmer training - <a href="http://www.codewars.com/">http://www.codewars.com/</a></p>
<p>Mastering Markdown - <a href="https://guides.github.com/features/mastering-markdown/">https://guides.github.com/features/mastering-markdown/</a></p>
<p>GitHub Desktop - <a href="https://desktop.github.com/">https://desktop.github.com/</a></p>
<p>Microsoft File Checksum Integrity Verifier - <a href="https://www.microsoft.com/en-au/download/details.aspx?id=11533">https://www.microsoft.com/en-au/download/details.aspx?id=11533</a></p>
<p>TechSmith Camtasia - <a href="https://www.techsmith.com/camtasia.html">https://www.techsmith.com/camtasia.html</a></p>
<p>MD5 - <a href="https://en.wikipedia.org/wiki/MD5">https://en.wikipedia.org/wiki/MD5</a></p>
<p>sha1sum - <a href="https://en.wikipedia.org/wiki/Sha1sum">https://en.wikipedia.org/wiki/Sha1sum</a></p>
<p>IDE - Integrated Development Environment - <a href="https://en.wikipedia.org/wiki/Integrated_development_environment">https://en.wikipedia.org/wiki/Integrated_development_environment</a></p>
<p>Git (software) - <a href="https://en.wikipedia.org/wiki/Git_(software)">https://en.wikipedia.org/wiki/Git_(software)</a></p>
<p>man page - <a href="https://en.wikipedia.org/wiki/Man_page">https://en.wikipedia.org/wiki/Man_page</a></p>
<p>Terminal (OS X) - <a href="https://en.wikipedia.org/wiki/Terminal_(OS_X)">https://en.wikipedia.org/wiki/Terminal_(OS_X)</a></p>
<p><a href="#eclipse-cheat-sheets-to-dita-to-pdf">↑</a> <a href="#license">↓</a></p>
<h2>
<a id="license" class="anchor" href="#license" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>License</h2>
<p>The DITA Open Toolkit and Apache FOP are licensed for use under the the Apache Software Foundation License v2.0.</p>
<p>Saxon uses the Mozilla Public License Version 2.0.</p>
<p><a href="#eclipse-cheat-sheets-to-dita-to-pdf">↑</a> <a href="#license">↓</a></p>
<h2>
<a id="contributions" class="anchor" href="#contributions" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Contributions</h2>
<p>Fork and pull request. Simple.</p>
<p><a href="#eclipse-cheat-sheets-to-dita-to-pdf">↑</a></p>
</section>
<aside id="sidebar">
<a href="https://github.com/jbampton/eclipse-cheatsheets-to-dita-to-pdf/zipball/master" class="button">
<small>Download</small>
.zip file
</a>
<a href="https://github.com/jbampton/eclipse-cheatsheets-to-dita-to-pdf/tarball/master" class="button">
<small>Download</small>
.tar.gz file
</a>
<p class="repo-owner"><a href="https://github.com/jbampton/eclipse-cheatsheets-to-dita-to-pdf"></a> is maintained by <a href="https://github.com/jbampton">jbampton</a>.</p>
<p>This page was generated by <a href="https://pages.github.com">GitHub Pages</a> using the Architect theme by <a href="https://twitter.com/jasonlong">Jason Long</a>.</p>
</aside>
</div>
</div>
</body>
</html>