Debian Codegraph @

texmf-dist/doc/otherformats/jadetex/base/index.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="utf-8"?>
2 <?xml-stylesheet type="text/xsl" href="index.xsl" ?>
3 <!DOCTYPE TEI.2 SYSTEM "http://www.oucs.ox.ac.uk/dtds/tei-oucs.dtd"[]>
4 <TEI.2>
5 <teiHeader>
6 <fileDesc>
7 <titleStmt>
8 <title>JadeTeX</title>
9 <author>Sebastian Rahtz</author>
10 <author>Simon Pepping</author>
11 <author>Frank Christoph</author>
12 </titleStmt>
13 <publicationStmt>
14 <authority>OUCS</authority>
15 <address>
16 <email>[email protected]</email>
17 </address>
18 </publicationStmt>
19 <sourceDesc>
20 <p>This is the master version of an original document.</p>
21 </sourceDesc>
22 </fileDesc>
23 <revisionDesc>
24 <list>
25 <head>Most recent revision.
26 For a full list, see the change management records </head>
27 <item>
28 <date>July 2001</date>
29 </item>
30 </list>
31 </revisionDesc>
32 </teiHeader>
33 <text>
34 <body>
35 <div>
36 <head>JadeTeX</head>
37 <p>This is a TeX macro package for processing the output from
38 Jade/OpenJade in TeX (-t) mode. You can download it
39 from Sourceforge; <xptr url="http://sourceforge.net/projects/jadetex/"/>.
40 </p>
41 </div>
42 <div><head>Installation</head>
43 <div>
44
45 <head>Introduction</head>
46
47 <p>This documents is based on a note by FC describing his
48 experience installing JadeTeX with OpenJade 1.3 and teTeX 1.06
49 (on Unix). It has since been expanded and checked by SR and
50 SP. It is aimed to people who have perhaps some experience
51 using TeX and LaTeX, enough to write up technical reports
52 using simple macros, but know little or nothing about format
53 files or the particulars of the TeX distribution structure,
54 and consequently have a rough time with JadeTeX&#8230;</p>
55 <p>This document relates to JadeTeX version 2.11 or later.</p>
56
57 <p>To use JadeTeX, you first of all should compile and install
58 OpenJade. The resulting <name>openjade</name> executable, used
59 with the <Value>-t tex</Value> flag, will format an
60 SGML/XML file and yield a TeX output file. Using
61 <name>jadetex</name> or <name>pdfjadetex</name>, you can
62 transform this into DVI or PDF;
63 from DVI, you can use a program like
64 <name>dvips</name> to get PostScript output. This note describes
65 how to build and install the former two programs,
66 <name>jadetex</name> and <name>pdfjadetex</name>.</p>
67 </div>
68
69 <div>
70 <head>Increasing TeX capacities</head>
71
72 <p>The TeX output file uses a macro package, JadeTeX, built on
73 top of LaTeX, just as LaTeX is a macro package sitting on top of
74 plain TeX. It is probably possible to just stick an
75 <Input>\input</Input> at the top of your
76 <Filespec>.tex</Filespec> file and use the JadeTeX macros this
77 way, but that would be slow since TeX would need to parse and
78 compile the macro definitions every time you format your
79 <Filespec>.tex</Filespec> file. So what we do instead is to use
80 TeX (actually, <name>initex</name>) to read in the LaTeX
81 format, followed by the JadeTeX package, once, and dump the
82 compiled image to what is called a <q>format file.</q>
83 This is the same way that LaTeX is usually employed. Once the
84 format file is built and installed, it is easy to arrange for
85 TeX to read it in quickly and automatically when you process a
86 <Filespec>.tex</Filespec> file.</p>
87
88 <p>But, as ever, there are complications, relating to TeX's
89 capacity restrictions. TeX is designed to use a fixed amount
90 of resources to process documents; for example, there is a
91 maximum number of strings that can be allocated, and a maximum
92 stack size. If a processing run exceeds the default limits,
93 TeX will complain and refuse to continue. Unfortunately,
94 OpenJade's TeX backend tends to exceed these default
95 limits.</p>
96
97 <p>Fortunately, though, there is no need to recompile your TeX
98 binary. If you are using teTeX (or any other Web2c-based
99 distribution) there will be a file called
100 <Filespec>texmf.cnf</Filespec> in your installation which sets
101 the capacity parameters and is consulted every time TeX is
102 run. By adding the right parameter settings here, you can
103 ensure that JadeTeX will be unlikely to run out of memory.</p>
104
105 <p>Where is <Filespec>texmf.cnf</Filespec>? You can find it in the
106 <Filespec>web2c</Filespec> directory under
107 your <Filespec>texmf</Filespec> tree... which begs the question, where
108 is <Filespec>texmf</Filespec>? The most
109 straightforward way to find it is to make sure all the TeX executables
110 are in your <Filespec>PATH</Filespec>; then do:
111 <Input>kpsewhich -expand-var '$TEXMFMAIN'</Input>
112 <Output>/usr/share/texmf/web2c/texmf.cnf</Output>
113 and it will
114 respond with the location of your texmf tree. As you can see, it is also
115 known as <Filespec>$TEXMFMAIN</Filespec>, which is how I shall
116 refer to it in the sequel.</p>
117
118 <p> If for some reason <name>kpsewhich</name> is not in your
119 <Filespec>PATH</Filespec>,
120 and you don't know where it is, here are some likely locations:
121 <list>
122 <item><Filespec>/usr/share/texmf</Filespec></item>
123 <item><Filespec>/usr/local/share/texmf</Filespec></item>
124 <item><Filespec>/usr/local/teTeX/texmf</Filespec></item>
125 <item><Filespec>/usr/local/lib/teTeX/texmf</Filespec></item>
126 <item><Filespec>/usr/local/lib/texmf</Filespec></item>
127 <item><Filespec>/usr/lib/texmf</Filespec></item>
128 <item><Filespec>/usr/lib/teTeX/texmf</Filespec></item>
129 </list></p>
130
131 <p>In a minute we are going to modify <Filespec>texmf.cnf</Filespec> to
132 increase the capacities, then build the JadeTeX format file and install
133 the JadeTeX executable(s). You may have a command
134 <name>hugelatex</name>, a version of latex with greater
135 capacity settings than the usual one, which is named simply
136 <name>latex</name>. If so, build your format file
137 using <name>hugelatex</name> rather than
138 <name>latex</name>, so that JadeTeX inherits the `huge'
139 settings. Otherwise, make sure your latex is big.
140 In addition, if you make any changes to the literate source of the
141 JadeTeX macro package (see below), a normal <name>latex</name>
142 may not do.</p>
143
144 <p>First we need to update texmf.cnf to ensure that
145 <name>latex</name> really is
146 <emph>huge</emph>. Take a look at the top of the file.
147 It will probably say:
148 <Program
149 >%original texmf.cnf -- runtime path configuration file for kpathsea.
150 % (If you change or delete `original' on the previous line, the
151 % distribution won't install its version over yours.)
152 </Program>
153 If it says
154 <Program
155 >% TeX Live texmf.cnf
156 </Program>
157 then you can skip all this and proceed to the next section, as TeX
158 Live is already set up for JadeTeX</p>
159
160 <p>
161 If you have an `original', follow those directions and delete the string
162 <Input>original</Input> to ensure that
163 future upgrades won't obliterate your changes.</p>
164
165 <p>In the latter half of the file, you will find the capacity settings,
166 which look something like this:
167
168 <Program
169 >pool_size = 125000
170 pool_size.context = 750000</Program>
171
172 Here, <Input>pool_size</Input> is the name of the parameter in
173 both cases, but the second one is qualified with
174 <Input>.context</Input>, which indicates that this setting will be
175 preferred when using the ConTeXt macro package. We need to make similar
176 accomodations not only for <name>latex</name> but also
177 <name>jadetex</name> and <name>pdfjadetex</name>.
178 Unfortunately, we don't know the minimal required values for every
179 parameter and some of these values are probably
180 ridiculously high, but no matter ...
181
182 <Program
183 >% latex settings
184 main_memory.latex = 1100000
185 param_size.latex = 1500
186 stack_size.latex = 1500
187 hash_extra.latex = 15000
188 string_vacancies.latex = 45000
189 pool_free.latex = 47500
190 nest_size.latex = 500
191 save_size.latex = 5000
192 pool_size.latex = 500000
193 max_strings.latex = 55000
194 font_mem_size.latex= 400000
195
196 % jadetex &amp; pdfjadetex
197 main_memory.jadetex = 1500000
198 param_size.jadetex = 1500
199 stack_size.jadetex = 1500
200 hash_extra.jadetex = 50000
201 string_vacancies.jadetex = 45000
202 pool_free.jadetex = 47500
203 nest_size.jadetex = 500
204 save_size.jadetex = 5000
205 pool_size.jadetex = 500000
206 max_strings.jadetex = 55000
207
208 main_memory.pdfjadetex = 2500000
209 param_size.pdfjadetex = 1500
210 stack_size.pdfjadetex = 1500
211 hash_extra.pdfjadetex = 50000
212 string_vacancies.pdfjadetex = 45000
213 pool_free.pdfjadetex = 47500
214 nest_size.pdfjadetex = 500
215 save_size.pdfjadetex = 5000
216 pool_size.pdfjadetex = 500000
217 max_strings.pdfjadetex = 55000
218 </Program>
219
220 Add these to the end of the file, or wherever makes you happy.</p>
221
222 <p>Now let's build some format files. Under
223 <Filespec>$TEXMFMAIN/tex/latex/config</Filespec>,
224 you will find the files necessary to rebuild <name>latex</name>.
225 Copy them somewhere temporary and go there:
226 <Screen>
227 cp -R /usr/share/texmf/tex/latex/config /tmp
228 cd /tmp/config</Screen>
229
230 Now do this:
231
232 <Screen>tex -ini -progname=latex latex.ini</Screen>
233
234 This will produce a file <Filespec>latex.fmt</Filespec>
235 in the same directory.
236 Become root and put it in
237 <Filespec>$TEXMFMAIN/web2c</Filespec>. This
238 is where all the format files are kept. (You can delete the other copied
239 files from <Filespec>config</Filespec> afterwards.)
240
241 <Screen>mv latex.fmt /usr/share/texmf/web2c</Screen>
242 </p>
243
244 <p>Now just create a symbolic link from <name>tex</name> to
245 <name>latex</name>:
246
247 <Screen>ln -s /usr/bin/tex /usr/local/bin/latex</Screen>
248
249 When <name>tex</name> is invoked, it looks at the name
250 <Filespec>X</Filespec> it was invoked with, then loads the format
251 file <Filespec>X.fmt</Filespec> from
252 <Filespec>$TEXMFMAIN/web2c</Filespec> before
253 it starts processing the document. So creating this symbolic link is all
254 that is needed to create the <name>latex</name>
255 executable.</p>
256 </div>
257
258 <div>
259 <head>Creating the format files</head>
260 <p>Next, take a look at your OpenJade distribution. Under the directory
261 <Filespec>dsssl</Filespec> you will find the files necessary to build
262 jadetex and pdfjadetex, including a Makefile. Now become root and just do:
263
264 <Screen>make install</Screen>
265
266 This creates <Filespec>jadetex.fmt</Filespec> and
267 <Filespec>pdfjadetex.fmt</Filespec>, puts them in
268 <Filespec>$TEXMFMAIN/web2c</Filespec> for you
269 (using <name>kpsewhich</name> to find
270 <Filespec>$TEXMFMAIN</Filespec>), and installs a few other
271 auxiliary files under
272 <Filespec>$TEXMFMAIN/tex/jadetex</Filespec>.</p>
273 <p>All that's left to do is to create the links:
274
275 <Screen>ln -s /usr/bin/tex /usr/bin/jadetex
276 ln -s /usr/bin/pdftex /usr/bin/pdfjadetex</Screen>
277 (changing the location of the binary directory to wherever your TeX is)
278 and run <name>mktexlsr</name> so that your TeX distribution becomes
279 aware of the newly installed files in
280 <Filespec>$TEXMFMAIN/tex/jadetex</Filespec>.
281
282 <Screen>mktexlsr</Screen></p>
283
284 </div>
285
286 <div>
287 <head>Testing the installation</head>
288 <p>Finally, test your installation using the demonstration files in
289 that directory:
290
291 <Screen>openjade -t tex -d demo.dsl demo.sgm
292 jadetex demo.tex
293 pdfjadetex demo.tex</Screen>
294
295 You're done!</p>
296 </div>
297
298 <div>
299 <head>Frequently Asked Questions</head>
300 <list type="gloss">
301 <label>
302 I installed JadeTeX, but when I run it, it complains that a
303 file named <Filespec>unicode.sty</Filespec> (or
304 <Filespec>dsssl.def</Filespec>, etc) can't be found. What did I do
305 wrong?
306 </label>
307 <item>
308 You didn't run the <name>mktexlsr</name>, so
309 <name>kpathsea</name> doesn't know about the newly installed
310 files.
311 </item>
312
313 <label>
314 I don't like JadeTeX's default behavior in some situations.
315 How do I modify it?
316 </label>
317 <item>
318 If for some reason you want to modify the JadeTeX macro
319 package, modify the file <Filespec>jadetex.dtx</Filespec>. This is
320 the literate source for the format file and other files installed
321 under
322 <Filespec>$TEXMFMAIN/tex/jadetex</Filespec>.
323 To format it, use <name>latex</name>:
324
325 <Screen>latex jadetex.dtx</Screen>
326
327 You will get tons of overfull hboxes but if you are using a nice
328 big latex, it will work.
329
330 Formatting the batch file <Filespec>jadetex.ins</Filespec>
331 will produce stripped sources
332 (<Filespec>dsssl.def</Filespec> and
333 <Filespec>jadetex.ltx</Filespec>),
334 which can be compiled into format files as before:
335
336 <Screen>latex jadetex.ins
337 make -f Makefile.jadetex</Screen>
338
339 </item>
340
341 <label>
342 What fonts can I use?
343 </label>
344 <item>
345 Following is the names of the font families supported at the
346 time of writing. Of course you must actually have these fonts
347 installed to format the document (but not to produce the TeX
348 output).
349 <list>
350 <item>Arial</item>
351 <item>Helvetica</item>
352 <item>Palatino</item>
353 <item>Bookman</item>
354 <item>Courier</item>
355 <item>Symbol</item>
356 <item>Wingdings</item>
357 <item>WingDings</item>
358 <item>LucidaSans</item>
359 <item>LucidaBright</item>
360 <item>Savoy</item>
361 <item>ACaslon</item>
362 <item>Caslon</item>
363 <item>Formata</item>
364 <item>FranklinGothic</item>
365 <item>OCRAbyBT</item>
366 <item>AGaramond</item>
367 <item>Avant-Garde</item>
368 <item>Courier-New</item>
369 <item>New-Century-Schoolbook</item>
370 <item>Times-Roman</item>
371 <item>Trade-Gothic</item>
372 <item>Times-New-Roman</item>
373 <item>Times-NR-MT</item>
374 <item>Courier-New</item>
375 <item>Zapf-Dingbats</item>
376 <item>Gill-Sans</item>
377 <item>iso-serif</item>
378 <item>iso-sanserif</item>
379 <item>iso-monocase</item>
380 <item>LetterGothic12PitchBT</item>
381 <item>Monospace821</item>
382 <item>OCRB10PitchBT</item>
383 <item>OCR-A</item>
384 <item>OCR-B-10PitchBT</item>
385 <item>Computer-Modern-Typewriter</item>
386 <item>Computer-Modern-Sans</item>
387 <item>Computer-Modern</item>
388 <item>Computer-Modern-Caps-And-Small-Caps</item>
389 </list>
390 </item>
391
392 <label>
393 Why doesn't hyphenation work?
394 </label>
395 <item>
396 Remember that your text must be fully justified
397 (<Input>quadding: #t</Input>), hyphenation must be on,
398 <Input>hyphenation?: #t</Input>, and a current language must
399 be selected (e.g., <Input>language: 'EN</Input>) for JadeTeX
400 to perform hyphenation.
401 </item>
402
403 <label>
404 I'm using Norman Walsh's DocBook stylesheets and my
405 footnotes are coming up at the end of the document rather than
406 at the foot of each page. Why?
407 </label>
408 <item>
409 The DocBook stylesheets need to be made aware that you are
410 using the TeX backend. Add <Value>-V tex-backend</Value> to
411 your <name>openjade</name> command-line.
412 </item>
413 </list>
414 </div>
415 </div>
416 </body>
417 </text>
418 </TEI.2>
419 <!--
420 .A link to the projects group page on SourceForge.
421 2.Mailing list links (we'll create them in a second)
422 3.A SourceForge icon and web counter - see the site documentation for this.
423 4.A link to the CVS web interface at
424
425 5.Some info about using CVS specific to your project.
426 6.Setup mailing lists for your project.
427 -->