yatex

view docs/yahtmle.tex @ 72:0aaebd07dad0

Support font-lock on XEmacs-21, Emacs-20, Emacs-21. Support Emacs-21.
author yuuji
date Mon, 25 Dec 2000 10:19:28 +0000
parents 44e3a5e1e883
children 7e361fb5401d
line source
1 \def\lang{eng} % -*- texinfo -*- for Texinfo V.3.1
2 \input texinfo
3 @setfilename yahtmle
4 @settitle Yet Another html-mode for Emacs
6 @iftex
7 @c @syncodeindex fn cp
8 @c Do people really read this INFO?
9 @c Still not finished
10 @c Last modified Sat Dec 2 13:55:01 2000 on buell
11 @syncodeindex vr cp
12 @end iftex
14 @titlepage
15 @sp 10
16 @center
17 @subtitle Yet Another html-mode for emacs
18 @title // yahtml //
19 %@subtitle // yahtml //
20 @author @copyright{} 1994-1997 by HIROSE, Yuuji [yuuji@@yatex.org]
21 @end titlepage
23 @node Top, Intro, (dir), (dir)
24 @comment node-name, next, previous, up
26 @menu
27 * Intro:: Introduction
28 * Installation:: Installing yahtml
29 * Command Invocation:: Using External Commands
30 * Completion:: Input with Completion
31 * Jump:: Moving the Cursor
32 * Changing and Deleting:: Changing and Deleting
33 * CSS Support:: Style Sheet Support
34 * Customizations:: List of Customize Variables
35 * Copying:: Copyright
36 * Concept Index:: Index
37 @end menu
39 @node Intro, Installation, Top, Top
40 @comment node-name, next, previous, up
41 @chapter Introduction
42 @cindex Demacs
43 @cindex Mule
44 @cindex LaTeX
45 @cindex yahtml
47 yahtml is a package to support creating HTML documents on Emacsens. Easy
48 input of elements (tags) by completion, syntax checking with programs like
49 weblint, and invoking the appropriate browser or image viewer depending on
50 the cursor position is its main features.
52 (This Info is still incomplete)
54 @node Installation, Command Invocation, Intro, Top
55 @comment node-name, next, previous, up
56 @chapter Installing yahtml
57 @menu
58 * Setting up yahtml::
59 * Setting environments for weblint browsers and image viewers::
60 * Setting environment variables for WWW pages::
61 @end menu
63 @node Setting up yahtml, Setting environments for weblint browsers and image viewers, Installation, Installation
64 @comment node-name, next, previous, up
65 @section Setting up yahtml
68 Add the following to @file{~/.emacs}
70 @lisp
71 (setq auto-mode-alist
72 (cons (cons "\\.html$" 'yahtml-mode) auto-mode-alist))
73 (autoload 'yahtml-mode "yahtml" "Yet Another HTML mode" t)
74 @end lisp
76 Next, add to load-path the directory with the yahtml files
77 (@file{yahtml.el}, @file{yatexlib.el}, @file{yatexprc.el}). For example,
78 if you put them in @file{~/src/emacs/yahtml},
80 @lisp
81 (setq load-path (cons (expand-file-name "~/src/emacs/yahtml") load-path))
82 @end lisp
84 @noindent
85 is what you add.
87 By this, yahtml will be automatically loaded when editing files with .html
88 extensions. "yahtml" will be displayed on the mode line if no errors
89 occurred.
91 @node Setting environments for weblint browsers and image viewers, Setting environment variables for WWW pages, Setting up yahtml, Installation
92 @comment node-name, next, previous, up
93 @section Setting environments for weblint, browsers, and image viewers
95 Check the variables for invoking external commands and modify as needed.
96 Defaults are in parenthesis.
98 @table @code
99 @item yahtml-www-browser
100 @dots{} browser command name (netscape)
101 @item yahtml-image-viewer
102 @dots{} image viewer command name (xv)
103 @item yahtml-lint-program
104 @dots{} syntax check programs command name (jweblint)
105 @item yahtml-kanji-code
106 @dots{} kanji code for HTML files
107 @end table
109 @node Setting environment variables for WWW pages, , Setting environments for weblint browsers and image viewers, Installation
110 @comment node-name, next, previous, up
111 @section Setting environment variables for WWW pages
113 Variables regarding path names for files that will be your home page.
114 @table @code
115 @item yahtml-path-url-alist
116 @dots{} list of matching path name on file system and URLs
117 @item yahtml-directory-index
118 @dots{} index file displayed when none is given in URL. Usually
119 @file{index.html} on NCSA type httpd and @file{Welcome.html} on
120 CERN types.
121 @end table
123 Examples for @code{yahtml-path-url-alist}. If @file{/home/yuuji/http/}
124 is @code{http://localhost/~yuuji} at home and @file{/usr/home/yuuji/www/}
125 is @code{http://www.keio.ac.jp/~yuuji/} at work, then
127 @lisp
128 (setq yahtml-path-url-alist
129 '(("/home/yuuji/http" . "http://localhost/~yuuji")
130 ("/usr/home/yuuji/www" . "http://www.keio.ac.jp/~yuuji")))
131 @end lisp
133 Any number of additions can be made to this list.
135 @node Command Invocation, Completion, Installation, Top
136 @comment node-name, next, previous, up
137 @chapter Invoking external commands
139 For easy use of commands that are handy when editing HTML files.
140 @table @kbd
141 @item [prefix] t j
142 @dots{} Invoke HTML syntax checker (jweblint)
143 @item [prefix] t p
144 @dots{} Display current page in browser
145 @item [prefix] t r
146 @dots{} Reload current page if browser is already running
147 @end table
149 @node Completion, Jump, Command Invocation, Top
150 @comment node-name, next, previous, up
151 @chapter Completion Input
153 Completion input of HTML elements is done through the same key strokes as
154 YaTeX's begin-type completion, section-type completion, large-type
155 completion, maketitle-type completion, and accent completion.
156 Corresponding elements in this order is; elements that span multiple
157 lines, empty elements such as img, tags that start and end in a
158 single line, elements with no attributes or contents, and special or
159 symbol entities.
161 @table @kbd
162 @item [prefix] b (YaTeX begin-type completion)
163 @dots{}
164 @example
165 <ul>
166 </ul>
167 @end example
169 @noindent
170 Completion for elements that the start tag and the end tag span multiple
171 lines. Mostly block-level elements.
173 @item [prefix] s (YateX section-type completion)
174 @dots{}
175 @example
176 <img src="foo.gif" alt="photo">
177 @end example
179 @noindent
180 Completion for elements that do not have end tags and require only
181 attributes. Possible completions are, <img>, <input>.
183 @item [prefix] l (YaTeX large-type completion)
184 @dots{}
186 @example
187 <big> $B!A(B </big>
188 @end example
190 @noindent
191 Similar to begin-type completion but used for elements that start and end
192 on a single line.
195 @item [prefix] m (YaTeX maketitle-type completion)
196 @dots{} Completion for elements without attributes or contents. Possible
197 completion is <br>
199 @item [prefix] a (YaTeX accent completion)
200 @dots{} Used to enter special or symbol entities. By default completion
201 for < (&lt;), > (&gt;), & (&amp;), " (&quot;), ' (&apos;), blank (&nbsp;)
202 is possible.
203 @end table
205 @node Jump, Changing and Deleting, Completion, Top
206 @comment node-name, next, previous, up
207 @chapter Cursor Movement
208 By using
210 @table @kbd
211 @item [prefix] g
212 @dots{} move to corresponding object
213 @end table
215 @noindent
216 the cursor will go to the corresponding object according to the context.
217 Recognized contexts are
219 @itemize @bullet
220 @item @code{<TAG>} <--> @code{</TAG>}
221 @item @code{<img src="image.file">} -> invoke viewer
222 @item @code{<a href="link.to.somewhere">} -> move cursor to linked target
223 @item @code{<applet code="program">} -> open Java source
224 @c @item @code{\include(\input)} $B"*(B $BBP1~$9$k%U%!%$%k(B
225 @end itemize
227 @node Changing and Deleting, CSS Support, Jump, Top
228 @comment node-name, next, previous, up
229 @chapter Changing and Deleting
231 @menu
232 * Changing tags in pairs::
233 * Changing entities::
234 * URLencoding of strings within region::
235 @end menu
237 @node Changing tags in pairs, Changing entities, Changing and Deleting, Changing and Deleting
238 @comment node-name, next, previous, up
239 @section Changing tags in pairs
240 By using
242 @table @kbd
243 @item [prefix] c
244 @dots{} change tags in matching pairs
245 @end table
247 @noindent
248 the content can be changed according to the context of the HTML document
249 where the cursor is located.
251 @itemize @bullet
252 @item @code{<TAG>}$B!A(B@code{</TAG>}
253 @dots{} change @code{TAG} element name
254 @item attributes such as @code{<img src="image.file" alt="photo">}
255 @dots{} change attributes
256 @end itemize
258 @node Changing entities, URLencoding of strings within region, Changing tags in pairs, Changing and Deleting
259 @comment node-name, next, previous, up
260 @section Changing entities
261 Special characters such as < or > must be written as &lt; and &gt;. Easy
262 conversion of these characters can be done when importing text from non
263 HTML files.
266 @table @kbd
267 @item [prefix] ;
268 @dots{} convert char to special entity in marked region
269 @item [prefix] :
270 @dots{} convert special entity to original char in marked region
271 (reverse of [prefix] ;)
272 @end table
275 @node URLencoding of strings within region, , Changing entities, Changing and Deleting
276 @comment node-name, next, previous, up
277 @section URLencoding of strings within region
279 @table @kbd
280 @item [prefix] #
281 @dots{} encode chars that needs to be URLencoded within region
282 @end table
284 @node CSS Support, Customizations, Changing and Deleting, Top
285 @comment node-name, next, previous, up
286 @chapter CSS(Style Sheets) Support
288 @menu
289 * CSS-class completion::
290 * Reread CSS definition::
291 @end menu
293 @node CSS-class completion, Reread CSS definition, CSS Support, CSS Support
294 @comment node-name, next, previous, up
295 @section CSS class-name completion
296 You can input a class name in your CSS definition with completion.
297 If you have CSS defined as below;
299 @display
300 h1.foo, h2.foo @{ background-color: 0xffffff; @}
301 h1.bar, h2.bar @{ font-size: 120%; @}
302 @end display
304 when you input h1(or h2) tag with completing-read by [prefix] b or
305 [prefix] l, yahtml prompts you to input class name with completion from
306 the words which are effective to h1 or h2. And if you defined
307 global class like this;
309 @display
310 .caution @{ font-size: 120%; background-color: 0xc00000;@}
311 @end display
313 when you input any tags via completing-read, yahtml prompts you to input
314 class name. If this is bothering, typing @kbd{C-j} instead of
315 @kbd{RET} (or @kbd{C-m}) cancels the next prompt to class name completion.
317 @node Reread CSS definition, , CSS-class completion, CSS Support
318 @comment node-name, next, previous, up
319 @section Re-reading CSS definition
320 If you add some class to your CSS file and you want yahtml to load
321 new definitions, type @kbd{M-x yahtml-mode RET} to make yahtml do.
323 @node Customizations, Copying, CSS Support, Top
324 @comment node-name, next, previous, up
325 @chapter Customizations
326 @cindex Customize
327 @cindex Key Assign
329 Variables that modify yahtml's behavior.
331 @menu
332 * All customizable variables:: List of customizable variables
333 * Hook variables:: hook variables
334 @end menu
336 @node All customizable variables, Hook variables, Customizations, Customizations
337 @comment node-name, next, previous, up
338 @section List of customizable variables. Defaults in parenthesis
340 @defvar yahtml-prefix
341 Prefix key for yahtml-mode. (@kbd{\C-c})
342 @end defvar
344 @defvar yahtml-image-viewer
345 Command to view image files refered by img. (xv)
346 @end defvar
348 @defvar yahtml-www-browser
349 Browser to view external pages with @kbd{[prefix]g}. (netscape)
350 @end defvar
352 @defvar yahtml-kanji-code
353 Default kanji code. 1=sjis, 2=jis, 3=euc (2)
354 If
355 @quotation
356 AddType "text/html; charset=xxx" .html
357 @end quotation
358 is written in .htaccess, this will override yahtml-kanji-code.
359 @end defvar
361 @defvar yahtml-fill-column
362 Columns to auto-fill (72)
363 @end defvar
365 @defvar yahtml-fill-prefix
366 fill-prefix specific to yahtml-mode. (@code{nil})
367 @end defvar
369 @defvar yahtml-path-url-alist
370 Matching list of URL and full path name on OS's file system.
371 @end defvar
373 @defvar yahtml-directory-index
374 Default index filed opened when accessing a server without a filename,
375 usually index.html. (@code{"index.html"})
376 @end defvar
378 @defvar yahtml-lint-program
379 HTML syntax check program. (@code{"jweblint"})
380 @end defvar
382 @defvar yahtml-hate-too-deep-indentation
383 setq to t when indentations for nested enumerate elements are too deep.
384 (@code{nil})
385 @end defvar
387 @defvar yahtml-always-/p
388 setq to t if you always want @code{</p>} after @code{</p>}. @code{nil}
389 @end defvar
391 @defvar yahtml-p-prefered-env-regexp
392 Elements that @code{<p>} will be automatically inserted. @code{^\(body\|dl\)}
393 @end defvar
395 @defvar yahtml-template-file
396 File to automatically insert when editing a new HTML file.
397 @file{"~/http/template.html"}
398 @end defvar
400 @defvar yahtml-prefer-upcases
401 Use uppercase for tags. @code{nil}
402 @end defvar
404 @defvar yahtml-prefer-upcase-attributes
405 Use uppercase for attributes. @code{nil}
406 @end defvar
408 @defvar yahtml-server-type
409 setq to 'apache if using a Apache server, and will refer ./.htaccess.
410 @code{'apache}
411 @end defvar
413 @defvar yahtml-apache-access-file
414 When @code{yahtml-server-type} is @code{'apache}, define name of access
415 restriction file. @file{".htaccess"}
416 @end defvar
418 @defvar yahtml-shell-command-option
419 Options needed to invoke shell commands.
420 @end defvar
422 @defvar yahtml-translate-hyphens-when-comment-region
423 Whether to change hyphens to @code{&#45;} when commenting out region.
424 (@code{t})
425 @end defvar
427 @defvar yahtml-entity-reference-chars-alist
428 alist of characters that needs to be written by Entity Reference. Enter
429 as @code{'(?char . "EntityReference")}. By default, @code{<}, @code{>},
430 @code{&}, @code{'}, is set. Add as needed. Do not include @code{&} at
431 beginning and @code{;} at end of cdr portion of @code{"EntityReference"}.
432 @end defvar
434 @defvar yahtml-faithful-to-htmllint
435 When using htmllint to check syntax, it will complain about excess spaces.
436 setq to @code{t} to avoid this.
437 @end defvar
439 @defvar yahtml-use-css
440 Use style-sheet support or not (@code{t})
441 @end defvar
443 @defvar yahtml-image-inspection-bytes
444 Number of bytes to inspect the image for geometry information (@code{10000})
445 @end defvar
447 @defvar yahtml:img-default-alt-format
448 format of img entity's ALT attributes.
449 %x: width, %y: height, %s: size in bytes, %c: first comment string,
450 %f: filename (@code{"%xx%y(%sbytes)"})
451 @end defvar
453 @defvar yahtml-escape-chars
454 When, completing href-s, Escape reserved characters to URL-encoding or not.
455 Nil for never, t for everytime, and 'ask for inquiring
456 at each reserved chars. (@code{'ask})
457 @end defvar
459 @defvar yahtml-use-font-lock
460 Use font-lock to fontify buffer or not
461 (@code{(featurep 'font-lock)})
462 @end defvar
464 @defvar yahtml-hilit19
465 Use hilit19 to highlight buffer or not
466 (@code{(featurep 'hilit19)})
467 @end defvar
470 @node Hook variables, , All customizable variables, Customizations
471 @comment node-name, next, previous, up
472 @section hook variables
475 @node Copying, Concept Index, Customizations, Top
476 @comment node-name, next, previous, up
477 @chapter Copying
479 This program is distributed as freesoftware. The author will take no
480 responsibility to any damages due to the usage of this software
481 whatsoever. There are no restrictions to its redistribution, just use
482 common sense. Mail me your thoughts on this program and I will be more
483 than willing to help.
485 Complaints, requests, bug reports and comments are welcome. Make contacts
486 to yuuji@@yatex.org$B!!(B(as of December 2000)
488 If you like this program and use it on a regular basis, please join the
489 mailing list "fj Wild Bird Society". Procedures can be found in the "etc"
490 section of @file{docs/htmlqa.eng} in this package.
493 @flushright
494 HIROSE, Yuuji
495 @end flushright
498 @node Concept Index, , Copying, Top
499 @comment node-name, next, previous, up
500 @unnumbered Index
501 @printindex cp
504 @contents
506 @bye
508 @c Local Variables:
509 @c fill-column: 74
510 @c fill-prefix: nil
511 @c End:
512 
513 Tag table:
514 
515 End tag table