Mercurial > hgrepos > hgweb.cgi > yatex
annotate docs/yahtmle @ 279:784b25b062cc yatex-1.76
RCS-Checked in as 1.76
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Mon, 14 May 2012 20:03:27 +0900 |
parents | 78d0fdc0459c |
children | d0c09133ced7 |
rev | line source |
---|---|
271 | 1 Info file: yahtmle, -*-Text-*- |
2 produced by `texinfo-format-buffer' | |
3 from file `yahtmle.tex' | |
279 | 4 using `texinfmt.el' version 2.42 of 7 Jul 2006. |
271 | 5 |
272
78d0fdc0459c
Add `@directory' entries to info sources.
HIROSE Yuuji <yuuji@gentei.org>
parents:
271
diff
changeset
|
6 START-INFO-DIR-ENTRY |
78d0fdc0459c
Add `@directory' entries to info sources.
HIROSE Yuuji <yuuji@gentei.org>
parents:
271
diff
changeset
|
7 * yahtml-e: (yahtmle). Yet Another html-mode for Emacs (English). |
78d0fdc0459c
Add `@directory' entries to info sources.
HIROSE Yuuji <yuuji@gentei.org>
parents:
271
diff
changeset
|
8 END-INFO-DIR-ENTRY |
78d0fdc0459c
Add `@directory' entries to info sources.
HIROSE Yuuji <yuuji@gentei.org>
parents:
271
diff
changeset
|
9 |
271 | 10 |
11 | |
12 | |
13 | |
14 | |
15 File: yahtmle, Node: Top, Next: Intro, Prev: (dir), Up: (dir) | |
16 | |
17 * Menu: | |
18 | |
19 * Intro:: Introduction | |
20 * Installation:: Installing yahtml | |
21 * Command Invocation:: Using External Commands | |
22 * Completion:: Input with Completion | |
23 * Jump:: Moving the Cursor | |
24 * Changing and Deleting:: Changing and Deleting | |
25 * CSS Support:: Style Sheet Support | |
26 * Customizations:: List of Customize Variables | |
27 * Copying:: Copyright | |
28 * Concept Index:: Index | |
29 | |
30 | |
31 | |
32 File: yahtmle, Node: Intro, Next: Installation, Prev: Top, Up: Top | |
33 | |
34 Introduction | |
35 ************ | |
36 | |
37 yahtml is a package to support creating HTML documents on Emacsens. Easy | |
38 input of elements (tags) by completion, syntax checking with programs like | |
39 weblint, and invoking the appropriate browser or image viewer depending on | |
40 the cursor position is its main features. | |
41 | |
42 (This Info is still incomplete) | |
43 | |
44 | |
45 | |
46 File: yahtmle, Node: Installation, Next: Command Invocation, Prev: Intro, Up: Top | |
47 | |
48 Installing yahtml | |
49 ***************** | |
50 * Menu: | |
51 | |
279 | 52 * Setting up yahtml:: |
53 * Setting environments for weblint browsers and image viewers:: | |
54 * Setting environment variables for WWW pages:: | |
271 | 55 |
56 | |
57 | |
58 File: yahtmle, Node: Setting up yahtml, Next: Setting environments for weblint browsers and image viewers, Prev: Installation, Up: Installation | |
59 | |
60 Setting up yahtml | |
61 ================= | |
62 | |
63 | |
64 Add the following to `~/.emacs' | |
65 | |
66 (setq auto-mode-alist | |
67 (cons (cons "\\.html$" 'yahtml-mode) auto-mode-alist)) | |
68 (autoload 'yahtml-mode "yahtml" "Yet Another HTML mode" t) | |
69 | |
70 Next, add to load-path the directory with the yahtml files (`yahtml.el', | |
71 `yatexlib.el', `yatexprc.el'). For example, if you put them in | |
72 `~/src/emacs/yahtml', | |
73 | |
74 (setq load-path (cons (expand-file-name "~/src/emacs/yahtml") load-path)) | |
75 | |
76 is what you add. | |
77 | |
78 By this, yahtml will be automatically loaded when editing files with .html | |
79 extensions. "yahtml" will be displayed on the mode line if no errors | |
80 occurred. | |
81 | |
82 | |
83 | |
84 File: yahtmle, Node: Setting environments for weblint browsers and image viewers, Next: Setting environment variables for WWW pages, Prev: Setting up yahtml, Up: Installation | |
85 | |
86 Setting environments for weblint, browsers, and image viewers | |
87 ============================================================= | |
88 | |
89 Check the variables for invoking external commands and modify as needed. | |
90 Defaults are in parenthesis. | |
91 | |
92 `yahtml-www-browser' | |
93 ... browser command name (netscape) | |
94 `yahtml-image-viewer' | |
95 ... image viewer command name (xv) | |
96 `yahtml-lint-program' | |
97 ... syntax check programs command name (jweblint) | |
98 `yahtml-kanji-code' | |
99 ... kanji code for HTML files | |
100 | |
101 | |
102 | |
103 File: yahtmle, Node: Setting environment variables for WWW pages, Prev: Setting environments for weblint browsers and image viewers, Up: Installation | |
104 | |
105 Setting environment variables for WWW pages | |
106 =========================================== | |
107 | |
108 Variables regarding path names for files that will be your home page. | |
109 `yahtml-path-url-alist' | |
110 ... list of matching path name on file system and URLs | |
111 `yahtml-directory-index' | |
112 ... index file displayed when none is given in URL. Usually | |
113 `index.html' on NCSA type httpd and `Welcome.html' on CERN types. | |
114 | |
115 Examples for `yahtml-path-url-alist'. If `/home/yuuji/http/' is | |
116 `http://localhost/~yuuji' at home and `/usr/home/yuuji/www/' is | |
117 `http://www.keio.ac.jp/~yuuji/' at work, then | |
118 | |
119 (setq yahtml-path-url-alist | |
120 '(("/home/yuuji/http" . "http://localhost/~yuuji") | |
121 ("/usr/home/yuuji/www" . "http://www.keio.ac.jp/~yuuji"))) | |
122 | |
123 Any number of additions can be made to this list. | |
124 | |
125 | |
126 | |
127 File: yahtmle, Node: Command Invocation, Next: Completion, Prev: Installation, Up: Top | |
128 | |
129 Invoking external commands | |
130 ************************** | |
131 | |
132 For easy use of commands that are handy when editing HTML files. | |
133 `[prefix] t j' | |
134 ... Invoke HTML syntax checker (jweblint) | |
135 `[prefix] t p' | |
136 ... Display current page in browser | |
137 `[prefix] t r' | |
138 ... Reload current page if browser is already running | |
139 | |
140 | |
141 | |
142 File: yahtmle, Node: Completion, Next: Jump, Prev: Command Invocation, Up: Top | |
143 | |
144 Completion Input | |
145 **************** | |
146 | |
147 Completion input of HTML elements is done through the same key strokes as | |
148 YaTeX's begin-type completion, section-type completion, large-type | |
149 completion, maketitle-type completion, and accent completion. | |
150 Corresponding elements in this order is; elements that span multiple | |
151 lines, empty elements such as img, tags that start and end in a single | |
152 line, elements with no attributes or contents, and special or symbol | |
153 entities. | |
154 | |
155 `[prefix] b (YaTeX begin-type completion)' | |
156 ... | |
157 <ul> | |
158 </ul> | |
159 | |
160 Completion for elements that the start tag and the end tag span | |
161 multiple lines. Mostly block-level elements. | |
162 | |
163 `[prefix] s (YateX section-type completion)' | |
164 ... | |
165 <img src="foo.gif" alt="photo"> | |
166 | |
167 Completion for elements that do not have end tags and require only | |
168 attributes. Possible completions are, <img>, <input>. | |
169 | |
170 `[prefix] l (YaTeX large-type completion)' | |
171 ... | |
172 | |
173 <big> ` </big> | |
174 | |
175 Similar to begin-type completion but used for elements that start and | |
176 end on a single line. | |
177 | |
178 | |
179 `[prefix] m (YaTeX maketitle-type completion)' | |
180 ... Completion for elements without attributes or contents. Possible | |
181 completion is <br> | |
182 | |
183 `[prefix] a (YaTeX accent completion)' | |
184 ... Used to enter special or symbol entities. By default completion | |
185 for < (<), > (>), & (&), " ("), ' ('), blank | |
186 ( ) is possible. | |
187 | |
188 | |
189 | |
190 File: yahtmle, Node: Jump, Next: Changing and Deleting, Prev: Completion, Up: Top | |
191 | |
192 Cursor Movement | |
193 *************** | |
194 By using | |
195 | |
196 `[prefix] g' | |
197 ... move to corresponding object | |
198 | |
199 the cursor will go to the corresponding object according to the context. | |
200 Recognized contexts are | |
201 | |
202 * `<TAG>' <--> `</TAG>' | |
203 * `<img src="image.file">' -> invoke viewer | |
204 * `<a href="link.to.somewhere">' -> move cursor to linked target | |
205 * `<applet code="program">' -> open Java source | |
206 | |
207 | |
208 | |
209 File: yahtmle, Node: Changing and Deleting, Next: CSS Support, Prev: Jump, Up: Top | |
210 | |
211 Changing and Deleting | |
212 ********************* | |
213 | |
214 * Menu: | |
215 | |
279 | 216 * Changing tags in pairs:: |
217 * Changing entities:: | |
218 * URLencoding of strings within region:: | |
219 * td-enclosure/tr-enclosure:: | |
271 | 220 |
221 | |
222 | |
223 File: yahtmle, Node: Changing tags in pairs, Next: Changing entities, Prev: Changing and Deleting, Up: Changing and Deleting | |
224 | |
225 Changing tags in pairs | |
226 ====================== | |
227 By using | |
228 | |
229 `[prefix] c' | |
230 ... change tags in matching pairs | |
231 | |
232 the content can be changed according to the context of the HTML document | |
233 where the cursor is located. | |
234 | |
235 * `<TAG>'``</TAG>' | |
236 ... change `TAG' element name | |
237 * attributes such as `<img src="image.file" alt="photo">' | |
238 ... change attributes | |
239 | |
240 | |
241 | |
242 File: yahtmle, Node: Changing entities, Next: URLencoding of strings within region, Prev: Changing tags in pairs, Up: Changing and Deleting | |
243 | |
244 Changing entities | |
245 ================= | |
246 Special characters such as < or > must be written as < and >. Easy | |
247 conversion of these characters can be done when importing text from non | |
248 HTML files. | |
249 | |
250 | |
251 `[prefix] ;' | |
252 ... convert char to special entity in marked region | |
253 `[prefix] :' | |
254 ... convert special entity to original char in marked region | |
255 (reverse of [prefix] ;) | |
256 | |
257 | |
258 | |
259 | |
260 File: yahtmle, Node: URLencoding of strings within region, Next: td-enclosure/tr-enclosure, Prev: Changing entities, Up: Changing and Deleting | |
261 | |
262 URLencoding of strings within region | |
263 ==================================== | |
264 | |
265 `[prefix] #' | |
279 | 266 ... encode chars that needs to be URLencoded within region |
271 | 267 |
268 | |
269 | |
270 File: yahtmle, Node: td-enclosure/tr-enclosure, Prev: URLencoding of strings within region, Up: Changing and Deleting | |
271 | |
272 td-enclosure/tr-enclosure | |
273 ========================= | |
274 If you wan to convert series of field into <td>...</td> repetitions for | |
275 table element, td-enclosure or tr-enclosure is convenient. | |
276 | |
277 `[prefix] }' | |
279 | 278 |
279 ... Enclose each field in a region into <td>...</td>'s. | |
271 | 280 `[prefix] ]' |
279 | 281 |
282 ... Enclose each line in a region into <tr>...</tr>'s, with every | |
271 | 283 line converted to <td>...</td> repetition. They presume white space as |
284 field separator by default. To change this, enter other delimiting | |
285 character for a query. You can convert CSV, for example, into table by | |
286 specifying comma(,) as a delimiter. | |
287 | |
288 If you want to enclose fields with th, call with universal-argument | |
289 (`C-u'). Enter `th' to enclose fields with <th>...</th>. The special | |
290 answer `thd' means that enclose the only first column with th, and the | |
291 rest with td. | |
292 | |
293 | |
294 | |
295 File: yahtmle, Node: CSS Support, Next: Customizations, Prev: Changing and Deleting, Up: Top | |
296 | |
297 CSS(Style Sheets) Support | |
298 ************************* | |
299 | |
300 * Menu: | |
301 | |
279 | 302 * CSS-class completion:: |
303 * Reread CSS definition:: | |
271 | 304 |
305 | |
306 | |
307 File: yahtmle, Node: CSS-class completion, Next: Reread CSS definition, Prev: CSS Support, Up: CSS Support | |
308 | |
309 CSS class-name completion | |
310 ========================= | |
311 You can input a class name in your CSS definition with completion. If you | |
312 have CSS defined as below; | |
313 | |
314 h1.foo, h2.foo { background-color: 0xffffff; } | |
315 h1.bar, h2.bar { font-size: 120%; } | |
316 | |
317 when you input h1(or h2) tag with completing-read by [prefix] b or | |
318 [prefix] l, yahtml prompts you to input class name with completion from | |
319 the words which are effective to h1 or h2. And if you defined global | |
320 class like this; | |
321 | |
322 .caution { font-size: 120%; background-color: 0xc00000;} | |
323 | |
324 when you input any tags via completing-read, yahtml prompts you to input | |
279 | 325 class name. If this is bothering, typing `C-j' instead of |
326 `RET' (or `C-m') cancels the next prompt to class name completion. | |
271 | 327 |
328 | |
329 | |
330 File: yahtmle, Node: Reread CSS definition, Prev: CSS-class completion, Up: CSS Support | |
331 | |
332 Re-reading CSS definition | |
333 ========================= | |
334 If you add some class to your CSS file and you want yahtml to load new | |
335 definitions, type `M-x yahtml-mode RET' to make yahtml do. | |
336 | |
337 | |
338 | |
339 File: yahtmle, Node: Customizations, Next: Copying, Prev: CSS Support, Up: Top | |
340 | |
341 Customizations | |
342 ************** | |
343 | |
344 Variables that modify yahtml's behavior. | |
345 | |
346 * Menu: | |
347 | |
348 * All customizable variables:: List of customizable variables | |
349 * Hook variables:: hook variables | |
350 | |
351 | |
352 | |
353 File: yahtmle, Node: All customizable variables, Next: Hook variables, Prev: Customizations, Up: Customizations | |
354 | |
355 List of customizable variables. Defaults in parenthesis | |
356 ======================================================== | |
357 | |
358 -- Variable: yahtml-prefix | |
359 Prefix key for yahtml-mode. (`\C-c') | |
360 | |
361 -- Variable: yahtml-image-viewer | |
362 Command to view image files refered by img. (xv) | |
363 | |
364 -- Variable: yahtml-www-browser | |
365 Browser to view external pages with `[prefix]g'. (netscape) | |
366 | |
367 -- Variable: yahtml-kanji-code | |
368 Default kanji code. 1=sjis, 2=jis, 3=euc, 4=utf-8 (2) If AddType | |
279 | 369 text/html; charset=xxx" .html is written in .htaccess, this will |
271 | 370 override yahtml-kanji-code. |
371 | |
372 -- Variable: yahtml-fill-column | |
373 Columns to auto-fill (72) | |
374 | |
375 -- Variable: yahtml-fill-prefix | |
376 fill-prefix specific to yahtml-mode. (`nil') | |
377 | |
378 -- Variable: yahtml-path-url-alist | |
379 Matching list of URL and full path name on OS's file system. | |
380 | |
381 -- Variable: yahtml-directory-index | |
382 Default index filed opened when accessing a server without a | |
383 filename, usually index.html. (`"index.html"') | |
384 | |
385 -- Variable: yahtml-lint-program | |
386 HTML syntax check program. (`"jweblint"') | |
387 | |
388 -- Variable: yahtml-hate-too-deep-indentation | |
389 setq to t when indentations for nested enumerate elements are too | |
390 deep. (`nil') | |
391 | |
392 -- Variable: yahtml-always-/p | |
393 setq to t if you always want `</p>' after `</p>'. `nil' | |
394 | |
395 -- Variable: yahtml-p-prefered-env-regexp | |
396 Elements that `<p>' will be automatically inserted. | |
397 (`"^\\(body\\|dl\\|blockquote\\)"') | |
398 | |
399 -- Variable: yahtml-template-file | |
400 File to automatically insert when editing a new HTML file. | |
401 `"~/http/template.html"' | |
402 | |
403 -- Variable: yahtml-prefer-upcases | |
404 Use uppercase for tags. `nil' | |
405 | |
406 -- Variable: yahtml-prefer-upcase-attributes | |
407 Use uppercase for attributes. `nil' | |
408 | |
409 -- Variable: yahtml-server-type | |
410 setq to 'apache if using a Apache server, and will refer ./.htaccess. | |
411 `'apache' | |
412 | |
413 -- Variable: yahtml-apache-access-file | |
414 When `yahtml-server-type' is `'apache', define name of access | |
415 restriction file. `".htaccess"' | |
416 | |
417 -- Variable: yahtml-shell-command-option | |
418 Options needed to invoke shell commands. | |
419 | |
420 -- Variable: yahtml-translate-hyphens-when-comment-region | |
421 Whether to change hyphens to `-' when commenting out region. | |
422 (`t') | |
423 | |
424 -- Variable: yahtml-entity-reference-chars-alist | |
425 alist of characters that needs to be written by Entity Reference. | |
426 Enter as `'(?char . "EntityReference")'. By default, `<', `>', `&', | |
427 `'', is set. Add as needed. Do not include `&' at beginning and `;' | |
428 at end of cdr portion of `"EntityReference"'. | |
429 | |
430 -- Variable: yahtml-faithful-to-htmllint | |
431 When using htmllint to check syntax, it will complain about excess | |
432 spaces. setq to `t' to avoid this. | |
433 | |
434 -- Variable: yahtml-use-css | |
435 Use style-sheet support or not (`t') | |
436 | |
437 -- Variable: yahtml-image-inspection-bytes | |
438 Number of bytes to inspect the image for geometry information | |
439 (`10000') | |
440 | |
441 -- Variable: yahtml:img-default-alt-format | |
442 format of img entity's ALT attributes. %x: width, %y: height, %s: | |
443 size in bytes, %c: first comment string, %f: filename | |
444 (`"%xx%y(%sbytes)"') | |
445 | |
446 -- Variable: yahtml-escape-chars | |
447 When, completing href-s, Escape reserved characters to URL-encoding | |
448 or not. Nil for never, t for everytime, and 'ask for inquiring at | |
449 each reserved chars. (`'ask') | |
450 | |
451 -- Variable: yahtml-use-font-lock | |
452 Use font-lock to fontify buffer or not (`(featurep 'font-lock)') | |
453 | |
454 -- Variable: yahtml-use-hilit19 | |
455 Use hilit19 to highlight buffer or not (`(featurep 'hilit19)') | |
456 | |
457 -- Variable: yahtml-indentation-boundary | |
458 Boundary regexp for indentation calculation. (`"^\\s *<h[1-3]>"') | |
459 | |
460 | |
461 | |
462 File: yahtmle, Node: Hook variables, Prev: All customizable variables, Up: Customizations | |
463 | |
464 hook variables | |
465 ============== | |
466 | |
467 | |
468 | |
469 | |
470 File: yahtmle, Node: Copying, Next: Concept Index, Prev: Customizations, Up: Top | |
471 | |
472 Copying | |
473 ******* | |
474 | |
475 This program is distributed as freesoftware. The author will take no | |
476 responsibility to any damages due to the usage of this software | |
477 whatsoever. There are no restrictions to its redistribution, just use | |
478 common sense. Mail me your thoughts on this program and I will be more | |
479 than willing to help. | |
480 | |
481 Complaints, requests, bug reports and comments are welcome. Make contacts | |
482 to yuuji@yatex.org@(as of December 2000) | |
483 | |
484 If you like this program and use it on a regular basis, please join the | |
485 mailing list "fj Wild Bird Society". Procedures can be found in the "etc" | |
486 section of `docs/htmlqa.eng' in this package. | |
487 | |
488 | |
489 HIROSE, Yuuji | |
490 | |
491 | |
492 | |
493 | |
494 File: yahtmle, Node: Concept Index, Prev: Copying, Up: Top | |
495 | |
496 Index | |
497 ***** | |
498 | |
499 * Menu: | |
500 | |
279 | 501 * Customize: Customizations. (line 5) |
502 * Demacs: Intro. (line 5) | |
503 * Key Assign: Customizations. (line 5) | |
504 * LaTeX: Intro. (line 5) | |
505 * Mule: Intro. (line 5) | |
506 * yahtml: Intro. (line 5) | |
271 | 507 |
508 Tag table: | |
272
78d0fdc0459c
Add `@directory' entries to info sources.
HIROSE Yuuji <yuuji@gentei.org>
parents:
271
diff
changeset
|
509 Node: Top259 |
78d0fdc0459c
Add `@directory' entries to info sources.
HIROSE Yuuji <yuuji@gentei.org>
parents:
271
diff
changeset
|
510 Node: Intro836 |
78d0fdc0459c
Add `@directory' entries to info sources.
HIROSE Yuuji <yuuji@gentei.org>
parents:
271
diff
changeset
|
511 Node: Installation1234 |
279 | 512 Node: Setting up yahtml1500 |
513 Node: Setting environments for weblint browsers and image viewers2291 | |
514 Node: Setting environment variables for WWW pages2987 | |
515 Node: Command Invocation3958 | |
516 Node: Completion4386 | |
517 Node: Jump5902 | |
518 Node: Changing and Deleting6382 | |
519 Node: Changing tags in pairs6644 | |
520 Node: Changing entities7139 | |
521 Node: URLencoding of strings within region7675 | |
522 Node: td-enclosure/tr-enclosure7978 | |
523 Node: CSS Support8938 | |
524 Node: CSS-class completion9149 | |
525 Node: Reread CSS definition10002 | |
526 Node: Customizations10277 | |
527 Node: All customizable variables10553 | |
528 Node: Hook variables14320 | |
529 Node: Copying14446 | |
530 Node: Concept Index15237 | |
271 | 531 |
532 End tag table |