yatex

view docs/yahtmle @ 183:1c41dc8a28eb

doc fix
author yuuji@gentei.org
date Thu, 13 Oct 2011 10:16:58 +0900
parents 6d682b9d4bc8
children 5a16b237416f
line source
1 Info file: yahtmle, -*-Text-*-
2 produced by `texinfo-format-buffer'
3 from file `yahtmle.tex'
4 using `texinfmt.el' version 2.42 of 7 Jul 2006.
6 
7 File: yahtmle, Node: Top, Next: Intro, Prev: (dir), Up: (dir)
9 * Menu:
11 * Intro:: Introduction
12 * Installation:: Installing yahtml
13 * Command Invocation:: Using External Commands
14 * Completion:: Input with Completion
15 * Jump:: Moving the Cursor
16 * Changing and Deleting:: Changing and Deleting
17 * CSS Support:: Style Sheet Support
18 * Customizations:: List of Customize Variables
19 * Copying:: Copyright
20 * Concept Index:: Index
23 
24 File: yahtmle, Node: Intro, Next: Installation, Prev: Top, Up: Top
26 Introduction
27 ************
29 yahtml is a package to support creating HTML documents on Emacsens. Easy
30 input of elements (tags) by completion, syntax checking with programs like
31 weblint, and invoking the appropriate browser or image viewer depending on
32 the cursor position is its main features.
34 (This Info is still incomplete)
37 
38 File: yahtmle, Node: Installation, Next: Command Invocation, Prev: Intro, Up: Top
40 Installing yahtml
41 *****************
42 * Menu:
44 * Setting up yahtml::
45 * Setting environments for weblint browsers and image viewers::
46 * Setting environment variables for WWW pages::
49 
50 File: yahtmle, Node: Setting up yahtml, Next: Setting environments for weblint browsers and image viewers, Prev: Installation, Up: Installation
52 Setting up yahtml
53 =================
56 Add the following to `~/.emacs'
58 (setq auto-mode-alist
59 (cons (cons "\\.html$" 'yahtml-mode) auto-mode-alist))
60 (autoload 'yahtml-mode "yahtml" "Yet Another HTML mode" t)
62 Next, add to load-path the directory with the yahtml files (`yahtml.el',
63 `yatexlib.el', `yatexprc.el'). For example, if you put them in
64 `~/src/emacs/yahtml',
66 (setq load-path (cons (expand-file-name "~/src/emacs/yahtml") load-path))
68 is what you add.
70 By this, yahtml will be automatically loaded when editing files with .html
71 extensions. "yahtml" will be displayed on the mode line if no errors
72 occurred.
75 
76 File: yahtmle, Node: Setting environments for weblint browsers and image viewers, Next: Setting environment variables for WWW pages, Prev: Setting up yahtml, Up: Installation
78 Setting environments for weblint, browsers, and image viewers
79 =============================================================
81 Check the variables for invoking external commands and modify as needed.
82 Defaults are in parenthesis.
84 `yahtml-www-browser'
85 ... browser command name (netscape)
86 `yahtml-image-viewer'
87 ... image viewer command name (xv)
88 `yahtml-lint-program'
89 ... syntax check programs command name (jweblint)
90 `yahtml-kanji-code'
91 ... kanji code for HTML files
94 
95 File: yahtmle, Node: Setting environment variables for WWW pages, Prev: Setting environments for weblint browsers and image viewers, Up: Installation
97 Setting environment variables for WWW pages
98 ===========================================
100 Variables regarding path names for files that will be your home page.
101 `yahtml-path-url-alist'
102 ... list of matching path name on file system and URLs
103 `yahtml-directory-index'
104 ... index file displayed when none is given in URL. Usually
105 `index.html' on NCSA type httpd and `Welcome.html' on CERN types.
107 Examples for `yahtml-path-url-alist'. If `/home/yuuji/http/' is
108 `http://localhost/~yuuji' at home and `/usr/home/yuuji/www/' is
109 `http://www.keio.ac.jp/~yuuji/' at work, then
111 (setq yahtml-path-url-alist
112 '(("/home/yuuji/http" . "http://localhost/~yuuji")
113 ("/usr/home/yuuji/www" . "http://www.keio.ac.jp/~yuuji")))
115 Any number of additions can be made to this list.
118 
119 File: yahtmle, Node: Command Invocation, Next: Completion, Prev: Installation, Up: Top
121 Invoking external commands
122 **************************
124 For easy use of commands that are handy when editing HTML files.
125 `[prefix] t j'
126 ... Invoke HTML syntax checker (jweblint)
127 `[prefix] t p'
128 ... Display current page in browser
129 `[prefix] t r'
130 ... Reload current page if browser is already running
133 
134 File: yahtmle, Node: Completion, Next: Jump, Prev: Command Invocation, Up: Top
136 Completion Input
137 ****************
139 Completion input of HTML elements is done through the same key strokes as
140 YaTeX's begin-type completion, section-type completion, large-type
141 completion, maketitle-type completion, and accent completion.
142 Corresponding elements in this order is; elements that span multiple
143 lines, empty elements such as img, tags that start and end in a single
144 line, elements with no attributes or contents, and special or symbol
145 entities.
147 `[prefix] b (YaTeX begin-type completion)'
148 ...
149 <ul>
150 </ul>
152 Completion for elements that the start tag and the end tag span
153 multiple lines. Mostly block-level elements.
155 `[prefix] s (YateX section-type completion)'
156 ...
157 <img src="foo.gif" alt="photo">
159 Completion for elements that do not have end tags and require only
160 attributes. Possible completions are, <img>, <input>.
162 `[prefix] l (YaTeX large-type completion)'
163 ...
165 <big> 〜 </big>
167 Similar to begin-type completion but used for elements that start and
168 end on a single line.
171 `[prefix] m (YaTeX maketitle-type completion)'
172 ... Completion for elements without attributes or contents. Possible
173 completion is <br>
175 `[prefix] a (YaTeX accent completion)'
176 ... Used to enter special or symbol entities. By default completion
177 for < (&lt;), > (&gt;), & (&amp;), " (&quot;), ' (&apos;), blank
178 (&nbsp;) is possible.
181 
182 File: yahtmle, Node: Jump, Next: Changing and Deleting, Prev: Completion, Up: Top
184 Cursor Movement
185 ***************
186 By using
188 `[prefix] g'
189 ... move to corresponding object
191 the cursor will go to the corresponding object according to the context.
192 Recognized contexts are
194 * `<TAG>' <--> `</TAG>'
195 * `<img src="image.file">' -> invoke viewer
196 * `<a href="link.to.somewhere">' -> move cursor to linked target
197 * `<applet code="program">' -> open Java source
200 
201 File: yahtmle, Node: Changing and Deleting, Next: CSS Support, Prev: Jump, Up: Top
203 Changing and Deleting
204 *********************
206 * Menu:
208 * Changing tags in pairs::
209 * Changing entities::
210 * URLencoding of strings within region::
213 
214 File: yahtmle, Node: Changing tags in pairs, Next: Changing entities, Prev: Changing and Deleting, Up: Changing and Deleting
216 Changing tags in pairs
217 ======================
218 By using
220 `[prefix] c'
221 ... change tags in matching pairs
223 the content can be changed according to the context of the HTML document
224 where the cursor is located.
226 * `<TAG>'〜`</TAG>'
227 ... change `TAG' element name
228 * attributes such as `<img src="image.file" alt="photo">'
229 ... change attributes
232 
233 File: yahtmle, Node: Changing entities, Next: URLencoding of strings within region, Prev: Changing tags in pairs, Up: Changing and Deleting
235 Changing entities
236 =================
237 Special characters such as < or > must be written as &lt; and &gt;. Easy
238 conversion of these characters can be done when importing text from non
239 HTML files.
242 `[prefix] ;'
243 ... convert char to special entity in marked region
244 `[prefix] :'
245 ... convert special entity to original char in marked region
246 (reverse of [prefix] ;)
250 
251 File: yahtmle, Node: URLencoding of strings within region, Next: td-enclosure/tr-enclosure, Prev: Changing entities, Up: Changing and Deleting
253 URLencoding of strings within region
254 ====================================
256 `[prefix] #'
257 ... encode chars that needs to be URLencoded within region
260 
261 File: yahtmle, Node: td-enclosure/tr-enclosure, Prev: URLencoding of strings within region, Up: Changing and Deleting
263 td-enclosure/tr-enclosure
264 =========================
265 If you wan to convert series of field into <td>...</td> repetitions for
266 table element, td-enclosure or tr-enclosure is convenient.
268 `[prefix] '} ... Enclose each field in a region into
269 <td>...</td>'s. `[prefix] ]' ... Enclose each line in a region into
270 <tr>...</tr>'s, with every line converted to <td>...</td> repetition.
271 They presume white space as field separator by default. To change this,
272 enter other delimiting character for a query. You can convert CSV, for
273 example, into table by specifying comma(,) as a delimiter.
275 If you want to enclose fields with th, call with universal-argument
276 (`C-u'). Enter `th' to enclose fields with <th>...</th>. The special
277 answer `thd' means that enclose the only first column with th, and the
278 rest with td.
281 
282 File: yahtmle, Node: CSS Support, Next: Customizations, Prev: Changing and Deleting, Up: Top
284 CSS(Style Sheets) Support
285 *************************
287 * Menu:
289 * CSS-class completion::
290 * Reread CSS definition::
293 
294 File: yahtmle, Node: CSS-class completion, Next: Reread CSS definition, Prev: CSS Support, Up: CSS Support
296 CSS class-name completion
297 =========================
298 You can input a class name in your CSS definition with completion. If you
299 have CSS defined as below;
301 h1.foo, h2.foo { background-color: 0xffffff; }
302 h1.bar, h2.bar { font-size: 120%; }
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 global
307 class like this;
309 .caution { font-size: 120%; background-color: 0xc00000;}
311 when you input any tags via completing-read, yahtml prompts you to input
312 class name. If this is bothering, typing `C-j' instead of
313 `RET' (or `C-m') cancels the next prompt to class name completion.
316 
317 File: yahtmle, Node: Reread CSS definition, Prev: CSS-class completion, Up: CSS Support
319 Re-reading CSS definition
320 =========================
321 If you add some class to your CSS file and you want yahtml to load new
322 definitions, type `M-x yahtml-mode RET' to make yahtml do.
325 
326 File: yahtmle, Node: Customizations, Next: Copying, Prev: CSS Support, Up: Top
328 Customizations
329 **************
331 Variables that modify yahtml's behavior.
333 * Menu:
335 * All customizable variables:: List of customizable variables
336 * Hook variables:: hook variables
339 
340 File: yahtmle, Node: All customizable variables, Next: Hook variables, Prev: Customizations, Up: Customizations
342 List of customizable variables. Defaults in parenthesis
343 ========================================================
345 -- Variable: yahtml-prefix
346 Prefix key for yahtml-mode. (`\C-c')
348 -- Variable: yahtml-image-viewer
349 Command to view image files refered by img. (xv)
351 -- Variable: yahtml-www-browser
352 Browser to view external pages with `[prefix]g'. (netscape)
354 -- Variable: yahtml-kanji-code
355 Default kanji code. 1=sjis, 2=jis, 3=euc, 4=utf-8 (2) If AddType
356 text/html; charset=xxx" .html is written in .htaccess, this will
357 override yahtml-kanji-code.
359 -- Variable: yahtml-fill-column
360 Columns to auto-fill (72)
362 -- Variable: yahtml-fill-prefix
363 fill-prefix specific to yahtml-mode. (`nil')
365 -- Variable: yahtml-path-url-alist
366 Matching list of URL and full path name on OS's file system.
368 -- Variable: yahtml-directory-index
369 Default index filed opened when accessing a server without a
370 filename, usually index.html. (`"index.html"')
372 -- Variable: yahtml-lint-program
373 HTML syntax check program. (`"jweblint"')
375 -- Variable: yahtml-hate-too-deep-indentation
376 setq to t when indentations for nested enumerate elements are too
377 deep. (`nil')
379 -- Variable: yahtml-always-/p
380 setq to t if you always want `</p>' after `</p>'. `nil'
382 -- Variable: yahtml-p-prefered-env-regexp
383 Elements that `<p>' will be automatically inserted.
384 (`"^\\(body\\|dl\\|blockquote\\)"')
386 -- Variable: yahtml-template-file
387 File to automatically insert when editing a new HTML file.
388 `"~/http/template.html"'
390 -- Variable: yahtml-prefer-upcases
391 Use uppercase for tags. `nil'
393 -- Variable: yahtml-prefer-upcase-attributes
394 Use uppercase for attributes. `nil'
396 -- Variable: yahtml-server-type
397 setq to 'apache if using a Apache server, and will refer ./.htaccess.
398 `'apache'
400 -- Variable: yahtml-apache-access-file
401 When `yahtml-server-type' is `'apache', define name of access
402 restriction file. `".htaccess"'
404 -- Variable: yahtml-shell-command-option
405 Options needed to invoke shell commands.
407 -- Variable: yahtml-translate-hyphens-when-comment-region
408 Whether to change hyphens to `&#45;' when commenting out region.
409 (`t')
411 -- Variable: yahtml-entity-reference-chars-alist
412 alist of characters that needs to be written by Entity Reference.
413 Enter as `'(?char . "EntityReference")'. By default, `<', `>', `&',
414 `'', is set. Add as needed. Do not include `&' at beginning and `;'
415 at end of cdr portion of `"EntityReference"'.
417 -- Variable: yahtml-faithful-to-htmllint
418 When using htmllint to check syntax, it will complain about excess
419 spaces. setq to `t' to avoid this.
421 -- Variable: yahtml-use-css
422 Use style-sheet support or not (`t')
424 -- Variable: yahtml-image-inspection-bytes
425 Number of bytes to inspect the image for geometry information
426 (`10000')
428 -- Variable: yahtml:img-default-alt-format
429 format of img entity's ALT attributes. %x: width, %y: height, %s:
430 size in bytes, %c: first comment string, %f: filename
431 (`"%xx%y(%sbytes)"')
433 -- Variable: yahtml-escape-chars
434 When, completing href-s, Escape reserved characters to URL-encoding
435 or not. Nil for never, t for everytime, and 'ask for inquiring at
436 each reserved chars. (`'ask')
438 -- Variable: yahtml-use-font-lock
439 Use font-lock to fontify buffer or not (`(featurep 'font-lock)')
441 -- Variable: yahtml-use-hilit19
442 Use hilit19 to highlight buffer or not (`(featurep 'hilit19)')
444 -- Variable: yahtml-indentation-boundary
445 Boundary regexp for indentation calculation. (`"^\\s *<h[1-3]>"')
448 
449 File: yahtmle, Node: Hook variables, Prev: All customizable variables, Up: Customizations
451 hook variables
452 ==============
456 
457 File: yahtmle, Node: Copying, Next: Concept Index, Prev: Customizations, Up: Top
459 Copying
460 *******
462 This program is distributed as freesoftware. The author will take no
463 responsibility to any damages due to the usage of this software
464 whatsoever. There are no restrictions to its redistribution, just use
465 common sense. Mail me your thoughts on this program and I will be more
466 than willing to help.
468 Complaints, requests, bug reports and comments are welcome. Make contacts
469 to yuuji@yatex.org (as of December 2000)
471 If you like this program and use it on a regular basis, please join the
472 mailing list "fj Wild Bird Society". Procedures can be found in the "etc"
473 section of `docs/htmlqa.eng' in this package.
476 HIROSE, Yuuji
480 
481 File: yahtmle, Node: Concept Index, Prev: Copying, Up: Top
483 Index
484 *****
486 * Menu:
488 * Customize: Customizations. (line 5)
489 * Demacs: Intro. (line 5)
490 * Key Assign: Customizations. (line 5)
491 * LaTeX: Intro. (line 5)
492 * Mule: Intro. (line 5)
493 * yahtml: Intro. (line 5)
494 
495 Tag table:
496 Node: Top147
497 Node: Intro724
498 Node: Installation1122
499 Node: Setting up yahtml1388
500 Node: Setting environments for weblint browsers and image viewers2179
501 Node: Setting environment variables for WWW pages2875
502 Node: Command Invocation3846
503 Node: Completion4274
504 Node: Jump5790
505 Node: Changing and Deleting6270
506 Node: Changing tags in pairs6502
507 Node: Changing entities6997
508 Node: URLencoding of strings within region7533
509 Node: td-enclosure/tr-enclosure7836
510 Node: CSS Support8772
511 Node: CSS-class completion8983
512 Node: Reread CSS definition9836
513 Node: Customizations10111
514 Node: All customizable variables10387
515 Node: Hook variables14154
516 Node: Copying14280
517 Node: Concept Index15071
518 
519 End tag table