Mercurial > hg > xemacs-beta
comparison man/psgml.texi @ 2:ac2d302a0011 r19-15b2
Import from CVS: tag r19-15b2
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:46:35 +0200 |
parents | 376386a54a3c |
children | bcdc7deadc19 |
comparison
equal
deleted
inserted
replaced
1:c0c6a60d29db | 2:ac2d302a0011 |
---|---|
5 @c @setchapternewpage odd | 5 @c @setchapternewpage odd |
6 @syncodeindex fn cp | 6 @syncodeindex fn cp |
7 @syncodeindex vr cp | 7 @syncodeindex vr cp |
8 @synindex ky cp | 8 @synindex ky cp |
9 @c %**end of header | 9 @c %**end of header |
10 @c $Id: psgml.texi,v 1.1.1.1 1996/12/18 03:36:10 steve Exp $ | 10 @c $Id: psgml.texi,v 1.1.1.2 1996/12/18 03:47:31 steve Exp $ |
11 | |
12 @ifinfo | |
13 @format | |
14 START-INFO-DIR-ENTRY | |
15 * PSGML: (psgml). PSGML, a major mode for SGML documents. | |
16 END-INFO-DIR-ENTRY | |
17 @end format | |
18 @end ifinfo | |
11 | 19 |
12 @ifinfo | 20 @ifinfo |
13 Documentation for PSGML, a major mode for SGML. | 21 Documentation for PSGML, a major mode for SGML. |
14 | 22 |
15 Copyright 1994 Lennart Staflin | 23 Copyright 1994, 1996 Lennart Staflin |
16 | 24 |
17 Permission is granted to make and distribute verbatim | 25 Permission is granted to make and distribute verbatim |
18 copies of this manual provided the copyright notice and | 26 copies of this manual provided the copyright notice and |
19 this permission notice are preserved on all copies. | 27 this permission notice are preserved on all copies. |
20 | 28 |
47 | 55 |
48 @c The following two commands | 56 @c The following two commands |
49 @c start the copyright page. | 57 @c start the copyright page. |
50 @page | 58 @page |
51 @vskip 0pt plus 1filll | 59 @vskip 0pt plus 1filll |
52 Copyright @copyright{} 1994 Lennart Staflin | 60 Copyright @copyright{} 1994, 1996 Lennart Staflin |
53 | 61 |
54 @c Published by ... | 62 @c Published by ... |
55 | 63 |
56 Permission is granted to make and distribute verbatim | 64 Permission is granted to make and distribute verbatim |
57 copies of this manual provided the copyright notice and | 65 copies of this manual provided the copyright notice and |
81 @node Top, Introduction, (dir), (dir) | 89 @node Top, Introduction, (dir), (dir) |
82 @comment node-name, next, previous, up | 90 @comment node-name, next, previous, up |
83 @ifinfo | 91 @ifinfo |
84 @top PSGML | 92 @top PSGML |
85 | 93 |
86 PSGML is a major mode for editing SGML documents, with special | 94 PSGML is a major mode for editing SGML documents. This is the DRAFT |
87 additions for HTML. This is the DRAFT documentation for PSGML | 95 documentation for PSGML version 1.0. |
88 version 1.0. | |
89 @end ifinfo | 96 @end ifinfo |
90 | 97 |
91 @menu | 98 @menu |
92 * Introduction:: Introduction | 99 * Introduction:: Introduction |
93 * Install:: How to install PSGML | 100 * Install:: How to install PSGML |
96 * Validate:: Running an external SGML parser | 103 * Validate:: Running an external SGML parser |
97 * SGML declaration:: Using an SGML declaration | 104 * SGML declaration:: Using an SGML declaration |
98 * Managing the DTD:: Specifying what DTD to use | 105 * Managing the DTD:: Specifying what DTD to use |
99 * Edit:: Commands for editing | 106 * Edit:: Commands for editing |
100 * Display:: Appearance of text in the buffer | 107 * Display:: Appearance of text in the buffer |
108 * Miscellaneous options:: | |
101 * Bugs:: Reporting bugs | 109 * Bugs:: Reporting bugs |
102 * Index:: | 110 * Index:: |
103 @end menu | 111 @end menu |
112 | |
113 | |
114 @c *** section about error recovery ?? | |
115 | |
104 | 116 |
105 @c ------------------------------------------------------------------ | 117 @c ------------------------------------------------------------------ |
106 | 118 |
107 @node Introduction, Install, Top, Top | 119 @node Introduction, Install, Top, Top |
108 @comment node-name, next, previous, up | 120 @comment node-name, next, previous, up |
111 @cindex DATATAG | 123 @cindex DATATAG |
112 @cindex LINK | 124 @cindex LINK |
113 @cindex RANK | 125 @cindex RANK |
114 @cindex SGML Declaration | 126 @cindex SGML Declaration |
115 | 127 |
116 PSGML is a major mode for editing SGML documents, and includes a number | 128 PSGML is a major mode for editing SGML documents. It works with GNU |
117 of features for working specifically with HTML. It works with GNU Emacs | 129 Emacs 19.19 and later or with Lucid Emacs 19.9 and later. PSGML |
118 19.19 and later or with Lucid Emacs 19.9 and later. PSGML contains a | 130 contains a simple SGML parser and can work with any DTD. Functions |
119 simple SGML parser and can work with any DTD. Functions provided | 131 provided includes menus and commands for inserting tags with only the |
120 includes menus and commands for inserting tags with only the | |
121 contextually valid tags, identification of structural errors, editing of | 132 contextually valid tags, identification of structural errors, editing of |
122 attribute values in a separate window with information about types and | 133 attribute values in a separate window with information about types and |
123 defaults, and structure based editing. | 134 defaults, and structure based editing. |
124 | 135 |
125 SGML, a language for encoding the structure of a document, is an ISO | 136 SGML, a language for encoding the structure of a document, is an ISO |
126 standard: ISO 8879:1986 ``Information processing -- Text and office | 137 standard: ISO 8879:1986 ``Information processing -- Text and office |
127 systems -- Standard Generalized Markup Language (SGML)''. | 138 systems -- Standard Generalized Markup Language (SGML)''. |
128 | 139 |
129 A good introduction to SGML is @cite{A Gentle Introduction to SGML} | 140 A good introduction to SGML is @cite{A Gentle Introduction to SGML} |
130 produced by Text Encoding Initiative (this is really chapter 2 of TEI | 141 produced by Text Encoding Initiative (this is really chapter 2 of TEI |
131 P3). This can be found on | 142 P3). This can be found on |
143 | |
144 @display | |
132 @file{ftp://ftp.ifi.uio.no/pub/SGML/TEI/P3SG.DOC}. | 145 @file{ftp://ftp.ifi.uio.no/pub/SGML/TEI/P3SG.DOC}. |
146 @end display | |
133 | 147 |
134 A SGML document has three major parts, in order: | 148 A SGML document has three major parts, in order: |
135 | 149 |
136 @enumerate | 150 @enumerate |
137 @item | 151 @item |
141 @item | 155 @item |
142 Document Element (@samp{<@var{name}> @dots{} </@var{name}>}) | 156 Document Element (@samp{<@var{name}> @dots{} </@var{name}>}) |
143 @end enumerate | 157 @end enumerate |
144 | 158 |
145 The SGML declaration contains general information about character sets, | 159 The SGML declaration contains general information about character sets, |
146 concrete syntax, and SGML features used. PSGML does not use the SGML | 160 concrete syntax, and SGML features used. PSGML does not use the SGML |
147 Declaration, it can be left out, and if included is ignored. Many SGML | 161 Declaration, it can be left out, and if included is ignored. Many SGML |
148 systems allow the SGML declaration to be defaulted. PSGML always use | 162 systems allow the SGML declaration to be defaulted. PSGML always use |
149 the Concrete Reference Syntax but without limitations on | 163 the Concrete Reference Syntax but without limitations on |
150 lengths. Features used has to be indicated with variables (@pxref{SGML | 164 lengths. Features used has to be indicated with variables (@pxref{SGML |
151 declaration}). | 165 declaration}). |
152 | 166 |
153 The document type declaration specifies the valid elements and entities | 167 The document type declaration specifies the valid elements and entities |
154 and how they can be nested. A document type is usually needed, but can | 168 and how they can be nested. A document type is usually needed, but can |
155 reside in another file (@pxref{Managing the DTD}). | 169 reside in another file (@pxref{Managing the DTD}). |
156 | 170 |
157 The system declaration for PSGML: | 171 The system declaration for PSGML: |
158 @format | 172 @example |
159 SYSTEM "ISO 8879:1986" | 173 SYSTEM "ISO 8879:1986" |
160 CHARSET | 174 CHARSET |
161 BASESET "ISO 646-1983//CHARSET | 175 BASESET "ISO 646-1983//CHARSET |
162 International Reference Version (IRV)//ESC 2/5 4/0" | 176 International Reference Version (IRV)//ESC 2/5 4/0" |
163 DESCSET 0 128 0 | 177 DESCSET 0 128 0 |
171 @c SYNTAX PUBLIC "ISO 8879:1986//SYNTAX Core//EN" | 185 @c SYNTAX PUBLIC "ISO 8879:1986//SYNTAX Core//EN" |
172 VALIDATE | 186 VALIDATE |
173 GENERAL NO MODEL NO EXCLUDE NO CAPACITY NO | 187 GENERAL NO MODEL NO EXCLUDE NO CAPACITY NO |
174 NONSGML NO SGML NO FORMAL NO | 188 NONSGML NO SGML NO FORMAL NO |
175 SDIF PACK NO UNPACK NO | 189 SDIF PACK NO UNPACK NO |
176 @end format | 190 @end example |
177 | 191 |
178 | 192 |
179 @c ------------------------------------------------------------------------- | 193 @c ------------------------------------------------------------------------- |
180 @node Install, Invoke, Introduction, Top | 194 @node Install, Invoke, Introduction, Top |
181 @comment node-name, next, previous, up | 195 @comment node-name, next, previous, up |
182 @chapter Installing PSGML | 196 @chapter Installing PSGML |
197 | |
198 To install PSGML you first need to uncompress and unpack the source | |
199 archive. This is done with the @code{gunzip} and @code{tar} commands. | |
200 | |
201 @example | |
202 gunzip psgml-1.0a12.tar.gz; tar xf psgml-1.0a12.tar | |
203 @end example | |
204 | |
205 This should create a subdirectory to the current directory with the | |
206 source code. This directory contains a @code{configure} command (see the | |
207 file INSTALL for more information about configure). You can use the | |
208 @code{configure} command to configure the package or you can load the | |
209 file @file{psgml-maint} and execute the @code{psgml-compile-files} | |
210 command. | |
183 | 211 |
184 Place the @file{*.el} and the @file{*.elc} files in a directory where | 212 Place the @file{*.el} and the @file{*.elc} files in a directory where |
185 Emacs can find it (i.e. one of the directories in the @code{load-path} | 213 Emacs can find it (i.e. one of the directories in the @code{load-path} |
186 variable, you can add a directory to this variable in your | 214 variable, you can add a directory to this variable in your |
187 @file{.emacs}.) If you obtained PSGML without @file{*.elc} files, you | 215 @file{.emacs}.) |
188 can create them by letting Emacs byte compile the @file{*.el} files (use | 216 |
189 @kbd{M-x byte-compile-file}). Parsing SGML in Emacs Lisp is slow and | 217 If you use the @code{configure} approach, compile psgml with @code{make} |
190 needs all the speed it can get. | 218 and the you can run @code{make install} to install it in the system |
219 library @file{site-lisp}. The files are installed in a subdirectory | |
220 named @file{psgml}. The location of @file{site-lisp} is figured out by | |
221 @code{configure}, but you can change it in the @file{Makefile}. You | |
222 need to make sure that this subdirectory is in Emacs @code{load-path}. | |
223 | |
191 | 224 |
192 Put the following line in your .emacs: | 225 Put the following line in your .emacs: |
193 | 226 |
194 @lisp | 227 @lisp |
195 (autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t ) | 228 (autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t ) |
256 @comment node-name, next, previous, up | 289 @comment node-name, next, previous, up |
257 @chapter The Entity Manager | 290 @chapter The Entity Manager |
258 @cindex public identifier | 291 @cindex public identifier |
259 @cindex system identifier | 292 @cindex system identifier |
260 @cindex external identifier | 293 @cindex external identifier |
294 @cindex entity catalog | |
295 | |
296 @c *** sgml-sysid-resolve-functions | |
261 | 297 |
262 SGML can refer to an external file (really entity) with an | 298 SGML can refer to an external file (really entity) with an |
263 @emph{external identifier}, this is a @emph{public identifier} or a | 299 @emph{external identifier}, this is a @emph{public identifier} or a |
264 @emph{system identifier}. | 300 @emph{system identifier}, or both. |
265 | 301 |
266 A typical public identifier looks like | 302 A typical public identifier looks like |
267 | 303 |
268 @example | 304 @example |
269 PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN" | 305 PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN" |
283 | 319 |
284 To map external identifiers to file names, PSGML first searches entity | 320 To map external identifiers to file names, PSGML first searches entity |
285 catalog files and then search the list of file name templates in the | 321 catalog files and then search the list of file name templates in the |
286 variable @code{sgml-public-map}. | 322 variable @code{sgml-public-map}. |
287 | 323 |
288 *** Describe the catalog format | 324 The catalog format is according to SGML/Opens resolution on entity |
289 | 325 management. The catalog consists of a series of entries and comments. A |
290 The catalog format is according to SGML/Opens resoution on entity | |
291 management. The catalog consists of a series of entries and comment. A | |
292 comment is delimited by @samp{--} like in a markup declaration. | 326 comment is delimited by @samp{--} like in a markup declaration. |
293 The entry types recognized are described in the following table. | 327 The entry types recognized are described in the following table. |
294 | 328 |
295 @table @samp | 329 @table @samp |
296 | 330 |
297 @item PUBLIC @var{pubid} @var{file} | 331 @item public @var{pubid} @var{file} |
298 The @var{file} will be used for the entity text of an entity | 332 The @var{file} will be used for the entity text of an entity |
299 with the public identifier @var{pubid}. | 333 with the public identifier @var{pubid}. |
300 | 334 |
301 @item ENTITY @var{name} @var{file} | 335 @item entity @var{name} @var{file} |
302 The @var{file} will be used for the entity text of an entity | 336 The @var{file} will be used for the entity text of an entity |
303 with the name @var{name}. If the @var{name} starts with a @samp{%} the | 337 with the name @var{name}. If the @var{name} starts with a @samp{%} the |
304 rest of the name will be matched against parameter entities. | 338 rest of the name will be matched against parameter entities. |
305 | 339 |
306 @item DOCTYPE @var{name} @var{file} | 340 @item doctype @var{name} @var{file} |
307 The DOCTYPE keyword indicates that an entity manager should use the | 341 The @var{file} will be used for the entity text of an entity |
308 associated |storage object identifier| to locate the entity text | 342 used as external subset of a document declaration with @var{name} as |
309 (to be used as the external subset) for a doctype declaration whose | 343 document type name. |
310 document type name is specified by the |entity name spec|. | 344 |
311 | 345 @item sgmldecl @var{file} |
312 @item SGMLDECL @var{file} | 346 Used to specify a default SGML declaration. Recognized but not used by |
313 The SGMLDECL keyword indicates that an entity manager should use | 347 PSGML other than to pass to an external validation command |
314 the associated |storage object identifier| to locate the entity | 348 (@code{sgml-validate-command}). |
315 text to be used as the SGML declaration. | |
316 | 349 |
317 @end table | 350 @end table |
351 | |
352 When PSGML is looking for the file containing an external entity, the | |
353 following things will be tried in order: | |
354 | |
355 @enumerate | |
356 | |
357 @vindex sgml-system-identifiers-are-preferred | |
358 @item | |
359 Try the system identifier, as a file name, if there is a system | |
360 identifier and the variable @code{sgml-system-identifiers-are-preferred} | |
361 is non-@code{nil} and there is no elements containing @samp{%s} in | |
362 @code{sgml-public-map}. If the system identifier is a relative file name | |
363 it will be relative to the directory containing the defining entity. | |
364 | |
365 @item | |
366 Look thru each catalog in @code{sgml-local-catalogs} and | |
367 @code{sgml-catalog-files} in order. For each catalog look first for | |
368 entries matching the public identifier, if any. Then look for other | |
369 matching entries in the order they appear in the catalog. | |
370 | |
371 Currently an entry will be ignored if it is matching but its file is | |
372 non-existent or unreadable. (This is under reconsideration, perhaps it | |
373 should signal error instead). | |
374 | |
375 @item | |
376 Try the system identifier, if any, as a file name. | |
377 If @code{sgml-system-identifiers-are-preferred} is @code{nil} | |
378 and there is no elements containing @samp{%s} in @code{sgml-public-map}. | |
379 | |
380 @item | |
381 Try the entries in @code{sgml-public-map}. Using the catalogs are | |
382 preferred. The @code{sgml-public-map} may disappear in a future version | |
383 of PSGML (not soon though). | |
384 | |
385 @end enumerate | |
318 | 386 |
319 The @code{sgml-public-map} variable can contain a list of file name | 387 The @code{sgml-public-map} variable can contain a list of file name |
320 templates where @samp{%P} will be substituted with the whole public | 388 templates where @samp{%P} will be substituted with the whole public |
321 identifier, owner is substituted for @samp{%O}, public text class for | 389 identifier, owner is substituted for @samp{%O}, public text class for |
322 @samp{%C}, and public text description for @samp{%D}. The text class | 390 @samp{%C}, and public text description for @samp{%D}. The text class |
323 will be converted to lower case and the owner and description will be | 391 will be converted to lower case and the owner and description will be |
324 transliterated according to the variable | 392 transliterated according to the variable |
325 @code{sgml-public-transliterations}. The templates in the list is tried | 393 @code{sgml-public-transliterations}. The templates in the list is tried |
326 in order until an existing file is found. | 394 in order until an existing file is found. The @code{sgml-public-map} is |
395 modeled after @file{sgmls} environment variable @code{SGML_PATH} and | |
396 psgml understand the following substitution characters: %%, %N, %P, %S, | |
397 %Y, %C, %L, %O, %T, and %V. The the default value of | |
398 @code{sgml-public-map} is taken from the environment variable | |
399 @code{SGML_PATH}. | |
327 | 400 |
328 Given the public identifier above and the file name template | 401 Given the public identifier above and the file name template |
329 @samp{/usr/local/lib/sgml/%o/%c/%d}, the resulting file name is | 402 @samp{/usr/local/lib/sgml/%o/%c/%d}, the resulting file name is |
330 | 403 |
331 @example | 404 @example |
354 buffer. This is used in addition to @code{sgml-catalog-files}, and | 427 buffer. This is used in addition to @code{sgml-catalog-files}, and |
355 @code{sgml-public-map}. This variable is automatically local to the | 428 @code{sgml-public-map}. This variable is automatically local to the |
356 buffer. | 429 buffer. |
357 @end defopt | 430 @end defopt |
358 | 431 |
432 @defopt sgml-system-identifiers-are-preferred | |
433 If @code{nil}, PSGML will look up external entities by searching the | |
434 catalogs in @code{sgml-local-catalogs} and @code{sgml-catalog-files} and | |
435 only if the entity is not found in the catalogs will a given system | |
436 identifier be used. If the variable is non-nil and a system identifier is | |
437 given, the system identifier will be used for the entity. If no system | |
438 identifier is given the catalogs will searched. | |
439 @end defopt | |
440 | |
441 | |
359 @defopt sgml-public-map | 442 @defopt sgml-public-map |
360 This should be a list of file name templates. This variable is | 443 This should be a list of file name templates. This variable is |
361 initialized from the environment variable @code{SGML_PATH}. This is | 444 initialized from the environment variable @code{SGML_PATH}. This is |
362 the same environment variable that @file{sgmls} uses. If the | 445 the same environment variable that @file{sgmls} uses. If the |
363 environment variable is undefined the default is | 446 environment variable is undefined the default is |
364 | 447 |
365 @lisp | 448 @lisp |
366 ("%S" "/usr/local/lib/sgml/%o/%c/%d") | 449 ("%S" "/usr/local/lib/sgml/%o/%c/%d") |
375 @comment node-name, next, previous, up | 458 @comment node-name, next, previous, up |
376 @chapter Running an external SGML parser | 459 @chapter Running an external SGML parser |
377 | 460 |
378 @kindex C-c C-v | 461 @kindex C-c C-v |
379 @findex sgml-validate | 462 @findex sgml-validate |
380 PSGML can not validate an SGML document (see below what it can and can't | 463 PSGML can not validate an SGML document (see below what it can |
381 do). If you have a validating SGML parser, like @file{sgmls}, you can | 464 and can't do). If you have a validating SGML parser, like |
382 run the parser on your file with the command @kbd{C-c C-v} | 465 @file{sgmls}, you can run the parser on your file with the |
383 (@code{sgml-validate}). | 466 command @kbd{C-c C-v} (@code{sgml-validate}). |
384 | 467 |
385 Some variables control this function: | 468 Some variables control this function: |
386 | 469 |
387 @defopt sgml-validate-command | 470 @defopt sgml-validate-command |
388 The shell command to validate an SGML document. | 471 The shell command to validate an SGML document. |
389 | 472 |
390 This is a @code{format} control string that by default should contain | 473 This is a @code{format} control string that by default should contain two |
391 two `%s' conversion specifications: the first will be replaced by the | 474 @code{%s} conversion specifications: the first will be replaced by the |
392 value of @code{sgml-declaration} (or the empty string, if nil); the | 475 value of @code{sgml-declaration} (or the empty string, if nil); the |
393 second will be replaced by the current buffer's file name (or the empty | 476 second will be replaced by the current buffer's file name (or the |
394 string, if nil). | 477 empty string, if nil). |
395 | 478 |
396 If @code{sgml-validate-files} is non-nil, the format string should | 479 If @code{sgml-validate-files} is non-nil, the format string should contain |
397 contain one `%s' conversion specification for each element of its | 480 one @code{%s} conversion specification for each element of its result. |
398 result. | 481 |
399 | 482 If sgml-validate-command is a list, then every element should be a |
400 The default value is @code{sgml -s %s %s}. | 483 string. The strings will be tried in order and @samp{%}-sequences in the |
484 string will be replaced according to the list below, if the string contains | |
485 @samp{%}-sequences with no replacement value the next string will be tried. | |
486 | |
487 @table @code | |
488 @item %b | |
489 means the visited file of the current buffer | |
490 | |
491 @item %s | |
492 means the SGML declaration specified in the sgml-declaration variable | |
493 | |
494 @item %d | |
495 means the file containing the DOCTYPE declaration, if not in the buffer | |
496 @end table | |
497 | |
498 The default value is @code{nsgmls -s %s %s}. | |
401 @end defopt | 499 @end defopt |
402 | 500 |
403 @defopt sgml-validate-files | 501 @defopt sgml-validate-files |
404 If non-nil, a function of no arguments that returns a list of file | 502 If non-nil, a function of no arguments that returns a list of |
405 names. These file names will serve as the arguments to the | 503 file names. These file names will serve as the arguments to the |
406 @code{sgml-validate-command} format control string instead of the | 504 @code{sgml-validate-command} format control string instead of |
407 defaults. | 505 the defaults. |
408 @end defopt | 506 @end defopt |
409 | 507 |
410 @defopt sgml-declaration | 508 @defopt sgml-declaration |
411 The name of the SGML declaration file. | 509 The name of the SGML declaration file. |
412 @end defopt | 510 @end defopt |
413 | 511 |
414 @defopt sgml-offer-save | 512 @defopt sgml-offer-save |
415 If non-nil, @kbd{C-c C-v} (@code{sgml-validate}) will ask about saving | 513 If non-nil, @kbd{C-c C-v} (@code{sgml-validate}) will ask about |
416 modified buffers before running the validate command. The default value | 514 saving modified buffers before running the validate command. |
417 is @code{t}. | 515 The default value is @code{t}. |
418 @end defopt | 516 @end defopt |
419 | 517 |
420 | 518 |
421 @kindex C-c C-o | 519 @kindex C-c C-o |
422 @findex sgml-next-trouble-spot | 520 @findex sgml-next-trouble-spot |
431 @item | 529 @item |
432 Errors in the SGML declaration. | 530 Errors in the SGML declaration. |
433 @item | 531 @item |
434 Errors in attribute specifications. | 532 Errors in attribute specifications. |
435 @item | 533 @item |
436 Markup errors in entity replacement text. | |
437 @item | |
438 Omitted start-tags for empty elements. | 534 Omitted start-tags for empty elements. |
439 @end itemize | 535 @end itemize |
440 | 536 |
441 | 537 |
538 @c -------------------------------------------------------------------------- | |
442 @node SGML declaration, Managing the DTD, Validate, Top | 539 @node SGML declaration, Managing the DTD, Validate, Top |
443 @comment node-name, next, previous, up | 540 @comment node-name, next, previous, up |
444 @chapter SGML Declaration | 541 @chapter SGML Declaration |
445 @cindex SHORTTAG | 542 @cindex SHORTTAG |
446 @cindex OMITTAG | 543 @cindex OMITTAG |
483 @c -------------------------------------------------------------------------- | 580 @c -------------------------------------------------------------------------- |
484 @node Managing the DTD, Edit, SGML declaration, Top | 581 @node Managing the DTD, Edit, SGML declaration, Top |
485 @comment node-name, next, previous, up | 582 @comment node-name, next, previous, up |
486 @chapter Document Type Declaration | 583 @chapter Document Type Declaration |
487 @cindex DOCTYPE | 584 @cindex DOCTYPE |
585 @cindex DTD | |
586 | |
587 @vindex sgml-default-doctype-name | |
588 PSGML needs to know about the DTD you are using for many of its commands. | |
589 If you do not have a @samp{DOCTYPE} declaration in your file, | |
590 PSGML will try assume that there is one of the form | |
591 | |
592 @example | |
593 <!DOCTYPE @var{name} SYSTEM> | |
594 @end example | |
595 | |
596 where @var{name} is the value of @code{sgml-default-doctype-name}, if | |
597 the value is non-@code{nil}, else the GI of the first tag will be used. | |
488 | 598 |
489 @findex sgml-parse-prolog | 599 @findex sgml-parse-prolog |
490 PSGML needs to know about the DTD you are using for many of its commands. | 600 @vindex sgml-auto-activate-dtd |
491 You can use PSGML without specifying a DTD, it will then accept any tags | 601 PSGML will try to parse the document type declaration the first time |
492 and assume a content model of @code{ANY} with no omissible tags. | 602 you do something that needs to parse the document or immediately if the |
493 | 603 variable @code{sgml-auto-activate-dtd} is @code{t}. You can also |
494 If you have a @samp{DOCTYPE} declaration in your file, PSGML will try to | 604 initiate the parsing of the document type declaration with the command |
495 parse this. Either the first time you do something that needs to parse | 605 @code{sgml-parse-prolog}. Big DTDs take some time to parse. |
496 the document or with the command @code{sgml-parse-prolog}. Big DTDs | |
497 take some time to parse. | |
498 | |
499 @vindex sgml-system-path | |
500 @vindex sgml-default-dtd-file | |
501 @vindex sgml-parent-document | |
502 You can have the @samp{DOCTYPE} declaration in another file either by | |
503 setting @code{sgml-parent-document} to the other file or by creating a | |
504 saved DTD and setting @code{sgml-default-dtd-file} to that file. If | |
505 @code{sgml-default-dtd-file} contains a relative file name, the | |
506 directories in @code{sgml-system-path} will be searched for the file. | |
507 | |
508 | |
509 @findex sgml-save-dtd | |
510 @findex sgml-load-dtd | |
511 If parsing the DTD takes too long time you can save the parsed DTD in a | |
512 file using the command @kbd{M-x sgml-save-dtd}. Next time PSGML can | |
513 load that file instead of parsing the DTD. For PSGML to find the saved | |
514 DTD you must either save the DTD using the default name or do a @kbd{M-x | |
515 sgml-save-options} after saving the DTD. To directly use an already | |
516 parsed and saved DTD, load the file containing the saved DTD with the | |
517 command @kbd{M-x sgml-load-dtd}. | |
518 | 606 |
519 When the DTD has been parsed or loaded the name of the document element | 607 When the DTD has been parsed or loaded the name of the document element |
520 will be displayed in the mode line inside brackets. If there was an | 608 will be displayed in the mode line inside brackets. If there was an |
521 error parsing the DTD or there is no DTD, the mode line will display | 609 error parsing the DTD or there is no DTD, the mode line will display |
522 @samp{[ANY]}. | 610 @samp{[ANY]} (*** this is not really correct! a DTD will be established |
611 even if there are missing entities, it may even be empty). | |
612 | |
613 @menu | |
614 * Precompiled DTD Subsets:: | |
615 * Using a Split Document:: | |
616 * Inserting a DOCTYPE:: | |
617 * Information from the DTD:: | |
618 @end menu | |
619 | |
620 | |
621 @c ------------------------------------------------------------ | |
622 @node Precompiled DTD Subsets, Using a Split Document, Managing the DTD, Managing the DTD | |
623 @comment node-name, next, previous, up | |
624 @section Precompiled DTD Subsets | |
625 | |
626 If parsing the DTD takes too long time you can arrange to have PSGML | |
627 cache an internal complied version of the DTD. Caching can be done of | |
628 DTD fragments in favourable situations. It is possible to have an | |
629 external DTD subset cached but still have an internal DTD subset as long | |
630 as the internal subset does not define parameter entities that affect | |
631 the parsing of the external subset (*** what is the exact conditions?, | |
632 probably you can't use the cached external subset if the internal subset | |
633 defines parameter entities that are also defined in the external subset | |
634 with another value). | |
635 | |
636 @vindex sgml-ecat-files | |
637 @vindex sgml-local-ecat-files | |
638 To enable caching you have to create special catalog files, hear after | |
639 called ECAT files due to (temporary) lack of imagination. These catalogs | |
640 have similar syntax to the entity catalogs and there are two variables | |
641 containing lists of catalogs to search: @code{sgml-ecat-files} and | |
642 @code{sgml-local-ecat-files}. The ECAT files can contain the following | |
643 types of entries: | |
644 | |
645 @table @samp | |
646 @item file @var{dtdfile} @var{entitydef} @var{cfile} | |
647 The @var{dtdfile} is the name of a file containing a DTD subset that | |
648 should be cached in @var{cfile}. The @var{entitydef} is optional and if | |
649 given have the following syntax: | |
650 @example | |
651 [ @var{name1} @var{literal1} @var{name2} @var{literal2} @dots{} ] | |
652 @end example | |
653 Using @var{entitydef} will modify the DTD subset by defining the | |
654 parameter entity with name @var{name1} to be @var{literal1}, @dots{}. The | |
655 cached version of the subset will be created with those entity | |
656 definitions, and when PSGML search for a matching cached subset will check | |
657 that the parameter entities in @var{entitydef} has been defined with | |
658 those values before trying to use @file{cfile}. | |
659 | |
660 @item public @var{pubid} @var{entitydef} @var{cfile} | |
661 Cache the DTD subset with public identifier @var{pubid} in file | |
662 @var{cfile}. | |
663 @end table | |
664 | |
665 | |
666 @defopt sgml-recompile-out-of-date-cdtd | |
667 If non-@code{nil}, out of date compiled DTDs will be automatically | |
668 recompiled. If the value is @code{ask}, PSGML will ask before | |
669 recompiling. A @code{nil} value will cause PSGML to silently load an out | |
670 of date compiled DTD. A DTD that refers to undefined external entities | |
671 is always out of date, thus in such case it can be useful to set this | |
672 variable to @code{nil}. | |
673 @end defopt | |
674 | |
675 | |
676 Previous versions of PSGML have had another way of speeding up DTD | |
677 parsing. This code remains in this version of PSGML, but is not actively | |
678 maintained and may disappear in the future. | |
679 | |
680 @findex sgml-save-dtd | |
681 @findex sgml-load-dtd | |
682 @vindex sgml-default-dtd-file | |
683 You can save the parsed DTD in a file using the command @kbd{M-x | |
684 sgml-save-dtd}. Next time PSGML can load that file instead of parsing | |
685 the DTD. For PSGML to find the saved DTD you must either save the DTD | |
686 using the default name or do a @kbd{M-x sgml-save-options} after saving | |
687 the DTD. To directly use an already parsed and saved DTD, load the file | |
688 containing the saved DTD with the command @kbd{M-x sgml-load-dtd}. | |
523 | 689 |
524 @defopt sgml-default-dtd-file | 690 @defopt sgml-default-dtd-file |
525 This is the default file name for saved DTD. This is set by | 691 This is the default file name for saved DTD. This is set by |
526 @code{sgml-mode} to the buffer file name less extension plus the | 692 @code{sgml-mode} to the buffer file name less extension plus the |
527 extension @code{.ced}, if that file exists. Can be changed in the Local | 693 extension @code{.ced}, if that file exists. Can be changed in the Local |
528 variables section of the file. | 694 variables section of the file. |
529 @end defopt | 695 @end defopt |
530 | 696 |
697 @c true with system-path | |
698 @c either or by creating a saved DTD and setting | |
699 @c @code{sgml-default-dtd-file} to that file. If | |
700 @c @code{sgml-default-dtd-file} contains a relative file name, the | |
701 @c directories in @code{sgml-system-path} will be searched for the file. | |
702 | |
703 | |
704 @c ------------------------------------------------------------ | |
705 @node Using a Split Document, Inserting a DOCTYPE, Precompiled DTD Subsets, Managing the DTD | |
706 @comment node-name, next, previous, up | |
707 @section Using a Split Document | |
708 | |
709 @c *** why not defopt?? | |
710 @vindex sgml-doctype | |
711 You can have the @samp{DOCTYPE} declaration in another file by setting | |
712 @code{sgml-doctype} to the other file. | |
713 | |
531 @defopt sgml-parent-document | 714 @defopt sgml-parent-document |
532 This can be set to the name (a string) of a file containing the | 715 Used when the current file is part of a bigger document. |
533 @samp{DOCTYPE} declaration to use, or a list @code{(@var{filename} | 716 |
534 @var{doctypename})}, where @var{filename} is the name of a file | 717 The variable describes how the current file's content fit into the element |
535 containing the @samp{DOCTYPE} declaration to use, with the modification | 718 hierarchy. The variable should have the form |
536 that the document type name is @var{doctypename}. | 719 |
537 @end defopt | 720 @lisp |
721 (@var{parent-file} @var{context-element}* @var{top-element} (@var{has-seen-element}*)?) | |
722 @end lisp | |
723 | |
724 @table @var | |
725 @item parent-file | |
726 is a string, the name of the file containing the | |
727 document entity. | |
728 | |
729 @item context-element | |
730 is a string, that is the name of an element type. | |
731 It can occur 0 or more times and is used to set up | |
732 exceptions and short reference map. Good candidates | |
733 for these elements are the elements open when the | |
734 entity pointing to the current file is used. | |
735 | |
736 @item top-element | |
737 is a string that is the name of the element type | |
738 of the top level element in the current file. The file | |
739 should contain one instance of this element, unless | |
740 the last (lisp) element of sgml-parent-document is a | |
741 list. If it is a list, the top level of the file | |
742 should follow the content model of top-element. | |
743 | |
744 @item has-seen-element | |
745 is a string that is the name of an element type. This | |
746 element is satisfied in the content model of top-element. | |
747 @end table | |
748 @end defopt | |
749 | |
750 | |
751 @c ------------------------------------------------------------ | |
752 @node Inserting a DOCTYPE, Information from the DTD, Using a Split Document, Managing the DTD | |
753 @comment node-name, next, previous, up | |
754 @section Inserting a DOCTYPE | |
755 | |
756 @kindex C-c C-u C-d | |
757 @findex sgml-custom-dtd | |
758 *** Describe the DTD menu in general. Describe customized entries for | |
759 special DTDs. Mention @kbd{C-c C-u C-d} for inserting a DOCTYPE from | |
760 keyboard. | |
538 | 761 |
539 If you change the doctype you must execute @code{sgml-parse-prolog}, | 762 If you change the doctype you must execute @code{sgml-parse-prolog}, |
540 changes in the doctype are not automatically recognized. | 763 changes in the doctype are not automatically recognized. |
541 | 764 |
542 @defopt sgml-custom-dtd | 765 @defopt sgml-custom-dtd |
543 Menu entries to be added to the DTD menu. The value should be a list of | 766 Menu entries to be added to the DTD menu. The value should be a list of |
544 entries to be added to the DTD menu. | 767 entries to be added to the DTD menu. |
545 | 768 |
546 Every entry should be a list. The first element of the entry is a string | 769 Every entry should be a list. The first element of the entry is a string |
547 used as the menu entry. The second element is a string containing a | 770 used as the menu entry. The second element is a string containing a |
548 doctype declaration (this can be nil if no doctype). The rest of the | 771 doctype declaration (this can be nil if no doctype). The rest of the |
549 list should be a list of variables and values. For backward | 772 list should be a list of variables and values. For backward |
550 compatibility a single string instead of a variable is assigned to | 773 compatibility a single string instead of a variable is assigned to |
551 @code{sgml-default-dtd-file}. All variables are made buffer local and | 774 @code{sgml-default-dtd-file}. All variables are made buffer local and |
568 "~/sgml/docbook.ced" | 791 "~/sgml/docbook.ced" |
569 sgml-omittag nil sgml-shorttag t))) | 792 sgml-omittag nil sgml-shorttag t))) |
570 @end example | 793 @end example |
571 @end defopt | 794 @end defopt |
572 | 795 |
796 | |
797 @c ------------------------------------------------------------ | |
798 @node Information from the DTD, , Inserting a DOCTYPE, Managing the DTD | |
799 @comment node-name, next, previous, up | |
800 @section Information from the DTD | |
801 @cindex DTD | |
802 @cindex Element | |
803 | |
804 PSGML can list various information about the current DTD. | |
805 The following commands can be used via @kbd{M-x} and | |
806 can also be found in the DTD menu. | |
807 | |
808 @table @code | |
809 @findex sgml-general-dtd-info | |
810 @item sgml-general-dtd-info | |
811 Display information about the current DTD. | |
812 | |
813 @findex sgml-describe-element-type | |
814 @item sgml-describe-element-type | |
815 Describe the properties of an element type as declared in the current DTD. | |
816 | |
817 @cindex entity | |
818 @findex sgml-describe-entity | |
819 @item sgml-describe-entity | |
820 Describe the properties of an entity as declared in the current DTD. | |
821 | |
822 @findex sgml-list-elements | |
823 @item sgml-list-elements | |
824 Will list all elements and the attributes declared for the element. | |
825 | |
826 @findex sgml-list-attributes | |
827 @item sgml-list-attributes | |
828 Will list all attributes declared and the elements that use them. | |
829 | |
830 @findex sgml-list-terminals | |
831 @item sgml-list-terminals | |
832 Will list all elements that can contain data. | |
833 | |
834 @findex sgml-list-occur-in-elements | |
835 @item sgml-list-occur-in-elements | |
836 Will list all element types and where it can occur. | |
837 | |
838 @findex sgml-list-content-elements | |
839 @item sgml-list-content-elements | |
840 Will list all element types and the element types that can occur | |
841 in its content. | |
842 @end table | |
843 | |
844 | |
573 @c --------------------------------------------------------------------------- | 845 @c --------------------------------------------------------------------------- |
574 @node Edit, Display, Managing the DTD, Top | 846 @node Edit, Display, Managing the DTD, Top |
575 @comment node-name, next, previous, up | 847 @comment node-name, next, previous, up |
576 @chapter Commands for editing | 848 @chapter Commands for editing |
577 | 849 |
581 * Information:: Showing information | 853 * Information:: Showing information |
582 * Indent:: Indentation according to structure | 854 * Indent:: Indentation according to structure |
583 * Move:: Move in the element structure | 855 * Move:: Move in the element structure |
584 * Attributes:: Editing attributes | 856 * Attributes:: Editing attributes |
585 * Change and delete:: Changing and deleting markup | 857 * Change and delete:: Changing and deleting markup |
858 * Translating characters and entities:: | |
586 @end menu | 859 @end menu |
587 | 860 |
588 @c ------------------------------------------------------------------ | 861 @c ------------------------------------------------------------------ |
589 @node Insert, Complete, Edit, Edit | 862 @node Insert, Complete, Edit, Edit |
590 @comment node-name, next, previous, up | 863 @comment node-name, next, previous, up |
625 @end enumerate | 898 @end enumerate |
626 | 899 |
627 | 900 |
628 @kindex C-c C-e | 901 @kindex C-c C-e |
629 @findex sgml-insert-element | 902 @findex sgml-insert-element |
903 @vindex sgml-insert-end-tag-on-new-line | |
630 @item C-c C-e | 904 @item C-c C-e |
631 Insert start and end-tags for an element (@code{sgml-insert-element}). | 905 Insert start and end-tags for an element |
632 The name of the element is read from the mini-buffer with completion on | 906 (@code{sgml-insert-element}). The name of the element is read |
633 valid elements. | 907 from the mini-buffer with completion on valid elements. If |
634 | 908 @code{sgml-insert-end-tag-on-new-line} is non-nil or the |
909 element has element content, the end-tag will be inserted on a | |
910 new line after the start-tag. | |
911 | |
912 @vindex sgml-omittag-transparent | |
635 If @code{sgml-omittag-transparent} is nil, the list of valid elements | 913 If @code{sgml-omittag-transparent} is nil, the list of valid elements |
636 will only contain the elements that can be in the content of the current | 914 will only contain the elements that can be in the content of the current |
637 element. | 915 element. |
638 | 916 |
917 @vindex sgml-auto-insert-required-elements | |
918 @vindex sgml-insert-missing-element-comment | |
639 Required elements in the content will be automatically inserted if the | 919 Required elements in the content will be automatically inserted if the |
640 option @code{sgml-auto-insert-required-elements} is non-nil. | 920 option @code{sgml-auto-insert-required-elements} is non-nil. |
921 When the content model demands an element but there is more | |
922 than one to choose from, a comment can be inserted with the | |
923 available choices if the option | |
924 @code{sgml-insert-missing-element-comment} is non-nil. | |
641 | 925 |
642 @kindex C-c C-r | 926 @kindex C-c C-r |
643 @findex sgml-tag-region | 927 @findex sgml-tag-region |
644 @item C-c C-r | 928 @item C-c C-r |
645 Makes the region into a new element (@code{sgml-tag-region}). Reads | 929 Makes the region into a new element (@code{sgml-tag-region}). Reads |
672 | 956 |
673 @example | 957 @example |
674 Value for @var{attribute} (@var{type} Default: @var{current value}): | 958 Value for @var{attribute} (@var{type} Default: @var{current value}): |
675 @end example | 959 @end example |
676 | 960 |
961 @kindex C-c C-u C-m | |
962 @findex sgml-custom-markup | |
963 @item C-c C-u C-m | |
964 Give keyboard access to the customized part of the Markup menu. | |
965 Emacs will prompt for the markup to insert using the menu line as | |
966 selector. (See @var{sgml-custom-markup} below.) | |
967 | |
677 @end table | 968 @end table |
678 | 969 |
679 Menu bar: | 970 Menu bar: |
680 | 971 |
681 @table @samp | 972 @table @samp |
721 @end table | 1012 @end table |
722 | 1013 |
723 @kindex S-@key{mouse-1} | 1014 @kindex S-@key{mouse-1} |
724 A menu is also available directly with a mouse button click in the | 1015 A menu is also available directly with a mouse button click in the |
725 buffer. In GNU Emacs it is the first mouse button combined with shift | 1016 buffer. In GNU Emacs it is the first mouse button combined with shift |
726 (@kbd{S-@key{mouse-1}}). In Lucid Emacs it is bound to the third mouse | 1017 (@kbd{S-@key{mouse-1}}). In XEmacs it is bound to the third mouse |
727 button. The mouse button click will pop-up a menu of valid tags or a | 1018 button. The mouse button click will pop-up a menu of valid tags or a |
728 menu of attributes if the point is in a start-tag. The attributes menu | 1019 menu of attributes if the point is in a start-tag. The attributes menu |
729 works as the ``Insert attribute'' menu from the menu-bar. The tags list | 1020 works as the ``Insert attribute'' menu from the menu-bar. The tags list |
730 is the list of valid tags described above for command @kbd{C-c <}. | 1021 is the list of valid tags described above for command @kbd{C-c <}. |
731 Selection from the tags menu works like the @kbd{C-c <} command, with | 1022 Selection from the tags menu works like the @kbd{C-c <} command, with |
788 ("New page" "<?NewPage>")) | 1079 ("New page" "<?NewPage>")) |
789 @end example | 1080 @end example |
790 @end defopt | 1081 @end defopt |
791 | 1082 |
792 | 1083 |
1084 @defopt sgml-insert-missing-element-comment | |
1085 If non-nil, and sgml-auto-insert-required-elements also true, | |
1086 @code{sgml-insert-element} will insert a comment if there is an | |
1087 element required but there is more than one to choose from. | |
1088 @end defopt | |
1089 | |
1090 @defopt sgml-insert-end-tag-on-new-line | |
1091 If non-nil, @code{sgml-insert-element} will put the end-tag on | |
1092 a new line after the start-tag. Useful on slow terminals if you | |
1093 find the end-tag after the cursor irritating. | |
1094 @end defopt | |
1095 | |
1096 | |
793 @c ------------------------------------------------------------------------- | 1097 @c ------------------------------------------------------------------------- |
794 @node Complete, Information, Insert, Edit | 1098 @node Complete, Information, Insert, Edit |
795 @comment node-name, next, previous, up | 1099 @comment node-name, next, previous, up |
796 @section Markup completion | 1100 @section Markup completion |
797 | 1101 |
1010 make the attribute be implied. | 1314 make the attribute be implied. |
1011 @end table | 1315 @end table |
1012 | 1316 |
1013 | 1317 |
1014 @c -------------------------------------------------------------------------- | 1318 @c -------------------------------------------------------------------------- |
1015 @node Change and delete, , Attributes, Edit | 1319 @node Change and delete, Translating characters and entities, Attributes, Edit |
1016 @comment node-name, next, previous, up | 1320 @comment node-name, next, previous, up |
1017 @section Changing and deleting markup | 1321 @section Changing and deleting markup |
1018 | 1322 |
1019 @table @kbd | 1323 @table @kbd |
1020 @kindex C-c = | 1324 @kindex C-c = |
1069 If the above element is mixed but contains elements with pure element | 1373 If the above element is mixed but contains elements with pure element |
1070 content then fill what is between the pure elements as paragraphs and | 1374 content then fill what is between the pure elements as paragraphs and |
1071 fill the pure elements recursively. | 1375 fill the pure elements recursively. |
1072 @end enumerate | 1376 @end enumerate |
1073 | 1377 |
1378 @findex sgml-expand-all-shortrefs | |
1379 @item M-x sgml-expand-all-shortrefs | |
1380 Short references to text entities are expanded to the replacement text | |
1381 of the entity other short references are expanded into general entity | |
1382 references. If argument, @var{to-entity}, is non-@code{nil}, or if | |
1383 called interactive with numeric prefix argument, all short references | |
1384 are replaced by generally entity references. | |
1074 | 1385 |
1075 @findex sgml-normalize | 1386 @findex sgml-normalize |
1076 @item M-x sgml-normalize | 1387 @item M-x sgml-normalize |
1077 Normalize the document in the buffer. This will | 1388 Normalize the document in the buffer. This will |
1078 | 1389 |
1079 @enumerate | 1390 @enumerate |
1080 @item | 1391 @item |
1392 expand short references, | |
1393 @item | |
1081 insert missing tags, | 1394 insert missing tags, |
1082 @item | 1395 @item |
1083 replace minimized tags with full tags, | 1396 replace minimized tags with full tags, |
1084 @item | 1397 @item |
1085 fix attribute specification lists according to options set. | 1398 fix attribute specification lists according to options set. |
1086 @end enumerate | 1399 @end enumerate |
1400 | |
1401 There is one argument, @var{to-entity}, with the same meaning as for | |
1402 @code{sgml-expand-all-shortrefs}. | |
1087 | 1403 |
1088 There is one option for the normalize command. With its default value, | 1404 There is one option for the normalize command. With its default value, |
1089 normalize may actually change the data content of some elements. But | 1405 normalize may actually change the data content of some elements. But |
1090 only by removing some white-space from the end of elements with omitted | 1406 only by removing some white-space from the end of elements with omitted |
1091 end-tags. | 1407 end-tags. |
1097 | 1413 |
1098 Default: @code{t}. | 1414 Default: @code{t}. |
1099 @end defopt | 1415 @end defopt |
1100 | 1416 |
1101 | 1417 |
1418 @c -------------------------------------------------------------------------- | |
1419 @node Translating characters and entities, , Change and delete, Edit | |
1420 @comment node-name, next, previous, up | |
1421 @section Translating between characters and entity references | |
1422 | |
1423 @c *** Need work.. | |
1424 | |
1425 Set the variable @code{sgml-display-char-list-filename} to a file file that | |
1426 contains mappings between all characters present in the presentation | |
1427 character set, and their "standard replacement text" names, e.g. "å" | |
1428 -> "[aring ]", e.t.c. | |
1429 | |
1430 The default value for this variable is `iso88591.map'. | |
1431 | |
1432 The use the functions (also in the Modify menu) | |
1433 | |
1434 @table @code | |
1435 @findex sgml-charent-to-display-char | |
1436 @item sgml-charent-to-display-char | |
1437 @findex sgml-display-char-to-charent | |
1438 @item sgml-display-char-to-charent | |
1439 @end table | |
1440 | |
1441 to translate between entities and characters. | |
1442 | |
1102 @c --------------------------------------------------------------------------- | 1443 @c --------------------------------------------------------------------------- |
1103 @node Display, Bugs, Edit, Top | 1444 @node Display, Miscellaneous options, Edit, Top |
1104 @comment node-name, next, previous, up | 1445 @comment node-name, next, previous, up |
1105 @chapter Appearance of text in the buffer | 1446 @chapter Appearance of text in the buffer |
1106 | 1447 |
1107 @menu | 1448 @menu |
1108 * Fold:: Folding editing | 1449 * Fold:: Folding editing |
1450 * Hiding markup:: | |
1109 * Highlight:: Highlighting markup | 1451 * Highlight:: Highlighting markup |
1110 @end menu | 1452 @end menu |
1111 | 1453 |
1112 @c --------------------------------------------------------------------------- | 1454 @c --------------------------------------------------------------------------- |
1113 @node Fold, Highlight, Display, Display | 1455 @node Fold, Hiding markup, Display, Display |
1114 @comment node-name, next, previous, up | 1456 @comment node-name, next, previous, up |
1115 @section Folding editing | 1457 @section Folding editing |
1116 | 1458 |
1117 With these commands you can make parts of the text temporarily invisible | 1459 With these commands you can make parts of the text temporarily invisible |
1118 to make it easier to see the overall structure of your text. | 1460 to make it easier to see the overall structure of your text. |
1169 (@code{sgml-expand-element}). If the current element is folded this | 1511 (@code{sgml-expand-element}). If the current element is folded this |
1170 expands what is visible. | 1512 expands what is visible. |
1171 @end table | 1513 @end table |
1172 | 1514 |
1173 | 1515 |
1174 | |
1175 | |
1176 @c --------------------------------------------------------------------------- | 1516 @c --------------------------------------------------------------------------- |
1177 @node Highlight, , Fold, Display | 1517 @node Hiding markup, Highlight, Fold, Display |
1518 @comment node-name, next, previous, up | |
1519 @section Hiding markup | |
1520 | |
1521 *** Describe hide-tags | |
1522 | |
1523 | |
1524 @c --------------------------------------------------------------------------- | |
1525 @node Highlight, , Hiding markup, Display | |
1178 @comment node-name, next, previous, up | 1526 @comment node-name, next, previous, up |
1179 @section Highlighting markup | 1527 @section Highlighting markup |
1180 | 1528 |
1181 | 1529 |
1182 PSGML can highlight the markup as it parses it by giving the markup a | 1530 PSGML can highlight the markup giving the markup a different @dfn{face} |
1183 different @dfn{face} (@pxref{Faces, , Using Multiple Typefaces, emacs, | 1531 (@pxref{Faces, , Using Multiple Typefaces, emacs, The Emacs Editor}). |
1184 The Emacs Editor}). The highlighting will only be done if the variable | 1532 The highlighting will only be done if the variable @code{sgml-set-face} |
1185 @code{sgml-set-face} is non-nil. The default settings make tags bold | 1533 is non-@code{nil}. The default settings make tags bold and comments |
1186 and comments italic, but this can be modified with the variable | 1534 italic, but this can be modified with the variable |
1187 @code{sgml-markup-faces}. | 1535 @code{sgml-markup-faces}. When highlighting is on PSGML will parse after |
1536 every command until the whole buffer has been parsed or user event | |
1537 occurs. | |
1188 | 1538 |
1189 @findex sgml-clear-faces | 1539 @findex sgml-clear-faces |
1190 To remove the highlighting type @kbd{M-x sgml-clear-faces}. | 1540 To remove the highlighting type @kbd{M-x sgml-clear-faces}. |
1191 | 1541 |
1192 @defopt sgml-set-face | 1542 @defopt sgml-set-face |
1222 @item shortref | 1572 @item shortref |
1223 short reference | 1573 short reference |
1224 @end table | 1574 @end table |
1225 @end defopt | 1575 @end defopt |
1226 | 1576 |
1577 | |
1578 | |
1227 @c ------------------------------------------------------------------ | 1579 @c ------------------------------------------------------------------ |
1228 @node Bugs, Index, Display, Top | 1580 @node Miscellaneous options, Bugs, Display, Top |
1581 @comment node-name, next, previous, up | |
1582 @chapter Miscellaneous options | |
1583 | |
1584 *** describe sgml-save-options | |
1585 | |
1586 @defopt sgml-ignore-undefined-elements | |
1587 Start-tags for undefined elements will either be ignored, if | |
1588 @code{sgml-ignore-undefined-elements} is @code{t}, or assumed to be | |
1589 acceptable in the current element and defined with @code{O O ANY} | |
1590 @end defopt | |
1591 | |
1592 @defopt sgml-range-indicator-max-length | |
1593 Maximum number of characters used from the first and last entry | |
1594 of a sub-menu to indicate the range of that menu. | |
1595 | |
1596 @vindex sgml-max-menu-size | |
1597 This is used for long menus of elements, tags or entities that are split | |
1598 into @code{sgml-max-menu-size} big sub-menus. | |
1599 @end defopt | |
1600 | |
1601 | |
1602 | |
1603 | |
1604 @c ------------------------------------------------------------------ | |
1605 @node Bugs, Index, Miscellaneous options, Top | |
1229 @comment node-name, next, previous, up | 1606 @comment node-name, next, previous, up |
1230 @chapter Bugs | 1607 @chapter Bugs |
1231 | 1608 |
1232 | 1609 |
1233 If you encounter something that you think is a bug, please report | 1610 If you encounter something that you think is a bug, please report |
1235 A test case that exhibits the bug, would also be useful. | 1612 A test case that exhibits the bug, would also be useful. |
1236 | 1613 |
1237 You can report a bug with the command @kbd{M-x sgml-submit-bug-report}. | 1614 You can report a bug with the command @kbd{M-x sgml-submit-bug-report}. |
1238 | 1615 |
1239 When PSGML needs contextual information it parses the document up to | 1616 When PSGML needs contextual information it parses the document up to |
1240 the point. During the parsing, it builds a parse tree. The parse | 1617 the point. During the parsing, it builds a parse tree. The parse |
1241 tree is used to initialize the next parse, to avoid having to parse | 1618 tree is used to initialize the next parse, to avoid having to parse |
1242 things already parsed. Changes to the buffer is supposed to prune | 1619 things already parsed. Changes to the buffer is supposed to prune |
1243 the tree of all outdated information. But if you get strange | 1620 the tree of all outdated information. But if you get strange |
1244 complaints from the parser, try and back up a bit and use @kbd{C-c | 1621 complaints from the parser, try and back up a bit and use @kbd{C-c |
1245 C-o} (@code{sgml-next-trouble-spot}). | 1622 C-o} (@code{sgml-next-trouble-spot}). |
1251 @comment node-name, next, previous, up | 1628 @comment node-name, next, previous, up |
1252 @chapter Index | 1629 @chapter Index |
1253 | 1630 |
1254 @printindex cp | 1631 @printindex cp |
1255 | 1632 |
1633 @contents | |
1256 @bye | 1634 @bye |