-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
232 lines (174 loc) · 11 KB
/
Copy pathindex.html
File metadata and controls
232 lines (174 loc) · 11 KB
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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>TeXDoclet by doclet</title>
<link rel="stylesheet" href="stylesheets/styles.css">
<link href="css/my_stylesheet.css" rel="stylesheet" />
<link rel="stylesheet" href="stylesheets/pygment_trac.css">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div class="wrapper">
<header>
<h1>TeXDoclet</h1>
</p>
<p class="view"><a href="https://github.com/doclet">View My GitHub Profile</a></p>
</header>
<section>
<p>TeXDoclet is a Java doclet implementation that generates a LaTeX file from you Java code documentation.</p>
<h2>Example outputs</h2>
<p>Take a look at some example PDF documents which are generated by <em>pdflatex</em> from <em>TeXDoclet</em> LaTeX output:</p>
<ul>
<li>report document class example: <a href="resources/examples/TeXDoclet_report.pdf">TeXDoclet_report.pdf</a>
</li>
<li>article document class example: <a href="resources/examples/TeXDoclet_article.pdf">TeXDoclet_article.pdf</a>
</li>
</ul><p></p>
<p>Here are some excerpts from the report document class example:</p>
<div>
<a href="images/examples/texdoclet_content_structuring.png" rel="lightbox[roadtrip]" title="content structuring">
<img src="images/examples/texdoclet_content_structuring.png"></a>
[...]
<a href="images/examples/texdoclet_class_hierarchy.png" rel="lightbox[roadtrip]" title="class hierarchy">
<img src="images/examples/texdoclet_class_hierarchy.png"></a>
[...]
<a href="images/examples/texdoclet_package_overview.png" rel="lightbox[roadtrip]" title="package overview">
<img src="images/examples/texdoclet_package_overview.png"></a>
[...]
<a href="images/examples/texdoclet_class_description_1_with_summaries.png" rel="lightbox[roadtrip]" title="class description part 1 with summaries">
<img src="images/examples/texdoclet_class_description_1_with_summaries.png"></a>
[...]
<a href="images/examples/texdoclet_class_description_2.png" rel="lightbox[roadtrip]" title="class description part 2">
<img src="images/examples/texdoclet_class_description_2.png"></a>
</div>
<h2>Download</h2>
<div class="flowleft">
<a href="resources/bin/TeXDoclet.jar"><img src="images/download.png"></a>
</div>
<h3>TeXDoclet.jar</h3>
<p><a href="resources/bin/TeXDoclet.jar"><em>TeXDoclet.jar</em></a> (supported Java version: <= 11) is all you need to create LaTeX file from your Java sources.</p>
<h3>Latest version & Source Code</h3>
<p><em>Github</em> project site: <a href="https://github.com/doclet/texdoclet">https://github.com/doclet/texdoclet</a>.</p>
<p>Instead of downloading the Java jar file you can also check out the latest <em>TeXDoclet</em> version by cloning the <em>Git</em> repository <code>https://github.com/doclet/texdoclet.git</code> :</p>
<pre><code>git clone https://github.com/doclet/texdoclet.git
</code></pre>
<p>And compile the <em>TeXDoclet.jar</em> with maven2 from the project root directory:</p>
<pre><code>mvn clean install
</code></pre>
<p>This generates the <em>TeXDoclet.jar</em> file in the <code>target/</code> subdirectory.</p>
<h2>Markdown Support</h2>
<p><em>TeXDoclet</em> integrates now <a href="https://github.com/rjeschke/txtmark">Txtmark - Java markdown processor</a>. </p>
<p>Simply write <a href="http://daringfireball.net/projects/markdown/syntax">Markdown syntax</a> like this (and put it in a <code><PRE format="md"></code> HTML tag):</p>
<pre><code><PRE format="md">
some text some text some text some text some text some text some text
##### Lists
- item1
1. item11
2. item12
- item1
##### Text formatting
_emphasis_ and __strong__ and some `code`:
code line 1
code line 2
some text some text some text some text some text some text some text
</PRE>
</code></pre>
<p>You will get the following <em>pdflatex</em> output:</p>
<p><img src="images/examples/texdoclet_markdown.png"></p>
<h2>Usage</h2>
<p>Generally a Java documentation is created with the <em>javadoc</em> tool (and its default doclet) that comes along with the Java JRE/JDK installation. To create a Java documentation with a doclet other than the default doclet you have to specify the doclet with the <code>-docletpath</code> and <code>-doclet</code> parameters of the <em>javadoc</em> tool:</p>
<pre><code>javadoc -docletpath <path to doclet .jar file> -doclet <doclet class name>
</code></pre>
<p>According to this you have to set the path to the <em>TeXDoclet.jar</em> file and the class name <code>org.stfm.texdoclet.TeXDoclet</code> for the <em>javadoc</em> use with <em>TeXDoclet</em> doclet.</p>
<p>Assuming you have the following project structure:</p>
<pre><code><project root dir>
src
main
java
com
<subpackages and java code>
org
<subpackages and java code>
</code></pre>
<p>Then the following example <em>javadoc</em> execution builds Javadoc documentation (in <code>out.tex</code>) from Java sources located in <code>src/main/java</code> subdirectory for all packages starting with <code>org</code> and <code>com</code>:</p>
<pre><code>javadoc -docletpath path/to/TeXDoclet.jar \
-doclet org.stfm.texdoclet.TeXDoclet \
-noindex \
-tree \
-hyperref \
-output out.tex \
-title "My Title" \
-author "My Name" \
-sourcepath src/main/java \
-subpackages org:com
</code></pre>
<h3>Example javadoc calls</h3>
<p>See <code>createDocs.sh</code> scripts in <code>/examples</code> <a href="https://github.com/doclet/texdoclet/tree/master/examples">subdirectory</a> of the github project for more examples.</p>
<h3>TeXDoclet output configuration</h3>
<p><em>TeXDoclet</em> doclet is configured by arguments passed to the doclet by the <em>javadoc</em> execution. There are a lot of defined parameters to affect the Latex document output. Print help to get a complete list of parameters you can pass to the <em>TeXDoclet</em> doclet:</p>
<p>Print help (TeXDoclet + javadoc help):</p>
<pre><code>javadoc -docletpath target/TeXDoclet.jar -doclet org.stfm.texdoclet.TeXDoclet
</code></pre>
<p>or (TeXDoclet help only):</p>
<pre><code>java -jar target/TeXDoclet.jar -h
-title <title> A title to use for the generated output document.
-subtitle <title> A subtitle for the output document. No -title will result in no title page.
-output <outfile> Specifies the output file to write to. If none specified, the default is docs.tex in the current directory.
-docclass <class> LaTeX2e document class, `report' is the default.
-doctype <type> LaTeX2e document style, `headings' is the default.
-classfilter <name> The name of a class implementing the ClassFilter interface.
-date <date string> The value to use for the document date.
-author <author> Specifies string to use for document Author.
-texinit <file> LaTeX2e statements included before \begin{document}.
-texsetup <file> LaTeX2e statements included after \begin{document} \maketitle (if title was specified).
-texintro <file> LaTeX2e statements included after table of contents
-texfinish <file> LaTeX2e statements included before \end{document}.
-texpackage <file> LaTeX2e statements included before packages' \chapter.
-setup <file> A setup file included before \begin{document}.
-twosided Print twosided.
-serial Do print Serializable information.
-nosummaries Do print summaries of fiels, constructors and methods.
-nofieldsummary Do not print field summaries
-noconstructorsummary Do not print constructor summaries
-noinherited Do not include inherited API information in output.
-shortinherited Prints a short inheritance, only the member name (not the whole signature)
-noindex Do not create index.
-tree Create a class tree.
-treeindent <float> Indent <float>cm i the class tree. Default is 1cm.
-hyperref Use the hyperref package.
-pdfhyperref Use the hyperref package with pdf. Overrides -hypertex.
-version Includes version-tags .
-hr Prints horizontal rows in the output (to get a better? view).
-include Creates output in two seperated latex documents: one for the preamble part and another for the actual java documentation content.
-sectionlevel <level> Specifies the highest level of sections (either "subsection", "section" or "chapter").
-imagespath Path to the texdoclet_images dir (absolute or relative to the output document .tex file).
-tablescale <factor> Scale factor to specify width of tables. Default value is 0.9.
-createpdf Creates .pdf file from the .tex output file by using pdflatex tool.
-packageorder pkg1>,<fpkg2>,... Use a specific package order.
-classdeclrframe <fval> Frame type parameter for class declaration code listing. Default is 'none'. See Latex Listings package documentation (lstlisting).
-methoddeclrframe <fval> Frame type parameter for class declaration code listing. Default is 'none'. See Latex Listings package documentation (lstlisting).
</code></pre>
<h3>How to use generated LaTeX documentation in your own document</h3>
<p>If you want to use TeXDoclet output in your own LaTeX document, simply use option <code>-include</code>. Option <code>-include</code> produces two .tex files that you have to insert in your LaTeX document (for instance by using the <code>\input{}</code> LaTeX command): </p>
<ul>
<li>TeXDoclet_preamble.tex: to include in the preamble part of your LaTeX document.</li>
<li>TeXDoclet.tex: this is the actual java documentation content that you can place wherever you want between <code>\begin{document}</code> and <code>\end{document}</code> in your LaTeX document. </li>
</ul><p>See example 4 in the <code>/examples/example4_include</code> <a href="https://github.com/doclet/texdoclet/tree/master/examples/example4_include">subdirectory</a> of the github project for more info.</p>
<h2>Previous versions</h2>
<ul>
<li>The intitial project of Greg Wonderly is available here: <a href="http://java.net/projects/texdoclet">http://java.net/projects/texdoclet</a>.</li>
<li>Its <a href="http://egee-jra1-integration.web.cern.ch/egee-jra1-integration/repository/texdoclet/1.3/share/README.txt">revision</a> by Soeren Caspersen you find here:<a href="http://egee-jra1-integration.web.cern.ch/egee-jra1-integration/repository/texdoclet">http://egee-jra1-integration.web.cern.ch/egee-jra1-integration/repository/texdoclet</a>.</li>
</ul>
</section>
<footer>
<p><small>Hosted on GitHub Pages — Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
</footer>
</div>
<script src="javascripts/scale.fix.js"></script>
</body>
</html>