yatex

view docs/yahtmle @ 83:680d92784c1a

Initial revision
author yuuji
date Sun, 27 Sep 2009 13:04:14 +0000
parents
children 590fc51462c7
line source
1 Info file: yahtmle, -*-Text-*-
2 produced by `texinfo-format-buffer'
3 from file `yahtmle.tex'
4 using `texinfmt.el' version 2.32 of 19 November 1993.
9 
10 File: yahtmle, Node: Top, Next: Intro, Prev: (dir), Up: (dir)
12 * Menu:
14 * Intro:: Introduction
15 * Installation:: Installing yahtml
16 * Command Invocation:: Using External Commands
17 * Completion:: Input with Completion
18 * Jump:: Moving the Cursor
19 * Changing and Deleting:: Changing and Deleting
20 * CSS Support:: Style Sheet Support
21 * Customizations:: List of Customize Variables
22 * Copying:: Copyright
23 * Concept Index:: Index
25 
26 File: yahtmle, Node: Intro, Next: Installation, Prev: Top, Up: Top
28 Introduction
29 ************
31 yahtml is a package to support creating HTML documents on Emacsens. Easy
32 input of elements (tags) by completion, syntax checking with programs like
33 weblint, and invoking the appropriate browser or image viewer depending on
34 the cursor position is its main features.
36 (This Info is still incomplete)
38 
39 File: yahtmle, Node: Installation, Next: Command Invocation, Prev: Intro, Up: Top
41 Installing yahtml
42 *****************
43 * Menu:
45 * Setting up yahtml::
46 * Setting environments for weblint browsers and image viewers::
47 * 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.
74 
75 File: yahtmle, Node: Setting environments for weblint browsers and image viewers, Next: Setting environment variables for WWW pages, Prev: Setting up yahtml, Up: Installation
77 Setting environments for weblint, browsers, and image viewers
78 =============================================================
80 Check the variables for invoking external commands and modify as needed.
81 Defaults are in parenthesis.
83 `yahtml-www-browser'
84 ... browser command name (netscape)
85 `yahtml-image-viewer'
86 ... image viewer command name (xv)
87 `yahtml-lint-program'
88 ... syntax check programs command name (jweblint)
89 `yahtml-kanji-code'
90 ... kanji code for HTML files
92 
93 File: yahtmle, Node: Setting environment variables for WWW pages, Prev: Setting environments for weblint browsers and image viewers, Up: Installation
95 Setting environment variables for WWW pages
96 ===========================================
98 Variables regarding path names for files that will be your home page.
99 `yahtml-path-url-alist'
100 ... list of matching path name on file system and URLs
101 `yahtml-directory-index'
102 ... index file displayed when none is given in URL. Usually
103 `index.html' on NCSA type httpd and `Welcome.html' on
104 CERN types.
106 Examples for `yahtml-path-url-alist'. If `/home/yuuji/http/' is
107 `http://localhost/~yuuji' at home and `/usr/home/yuuji/www/' is
108 `http://www.keio.ac.jp/~yuuji/' at work, then
110 (setq yahtml-path-url-alist
111 '(("/home/yuuji/http" . "http://localhost/~yuuji")
112 ("/usr/home/yuuji/www" . "http://www.keio.ac.jp/~yuuji")))
114 Any number of additions can be made to this list.
116 
117 File: yahtmle, Node: Command Invocation, Next: Completion, Prev: Installation, Up: Top
119 Invoking external commands
120 **************************
122 For easy use of commands that are handy when editing HTML files.
123 `[prefix] t j'
124 ... Invoke HTML syntax checker (jweblint)
125 `[prefix] t p'
126 ... Display current page in browser
127 `[prefix] t r'
128 ... Reload current page if browser is already running
130 
131 File: yahtmle, Node: Completion, Next: Jump, Prev: Command Invocation, Up: Top
133 Completion Input
134 ****************
136 Completion input of HTML elements is done through the same key strokes as
137 YaTeX's begin-type completion, section-type completion, large-type
138 completion, maketitle-type completion, and accent completion.
139 Corresponding elements in this order is; elements that span multiple
140 lines, empty elements such as img, tags that start and end in a single
141 line, elements with no attributes or contents, and special or symbol
142 entities.
144 `[prefix] b (YaTeX begin-type completion)'
145 ...
146 <ul>
147 </ul>
149 Completion for elements that the start tag and the end tag span
150 multiple lines. Mostly block-level elements.
152 `[prefix] s (YateX section-type completion)'
153 ...
154 <img src="foo.gif" alt="photo">
156 Completion for elements that do not have end tags and require only
157 attributes. Possible completions are, <img>, <input>.
159 `[prefix] l (YaTeX large-type completion)'
160 ...
162 <big> 〜 </big>
164 Similar to begin-type completion but used for elements that start and
165 end on a single line.
168 `[prefix] m (YaTeX maketitle-type completion)'
169 ... Completion for elements without attributes or contents. Possible
170 completion is <br>
172 `[prefix] a (YaTeX accent completion)'
173 ... Used to enter special or symbol entities. By default completion
174 for < (&lt;), > (&gt;), & (&amp;), " (&quot;), ' (&apos;), blank
175 (&nbsp;) is possible.
177 
178 File: yahtmle, Node: Jump, Next: Changing and Deleting, Prev: Completion, Up: Top
180 Cursor Movement
181 ***************
182 By using
184 `[prefix] g'
185 ... move to corresponding object
187 the cursor will go to the corresponding object according to the context.
188 Recognized contexts are
190 * `<TAG>' <--> `</TAG>'
191 * `<img src="image.file">' -> invoke viewer
192 * `<a href="link.to.somewhere">' -> move cursor to linked target
193 * `<applet code="program">' -> open Java source
195 
196 File: yahtmle, Node: Changing and Deleting, Next: CSS Support, Prev: Jump, Up: Top
198 Changing and Deleting
199 *********************
201 * Menu:
203 * Changing tags in pairs::
204 * Changing entities::
205 * URLencoding of strings within region::
207 
208 File: yahtmle, Node: Changing tags in pairs, Next: Changing entities, Prev: Changing and Deleting, Up: Changing and Deleting
210 Changing tags in pairs
211 ======================
212 By using
214 `[prefix] c'
215 ... change tags in matching pairs
217 the content can be changed according to the context of the HTML document
218 where the cursor is located.
220 * `<TAG>'〜`</TAG>'
221 ... change `TAG' element name
222 * attributes such as `<img src="image.file" alt="photo">'
223 ... change attributes
225 
226 File: yahtmle, Node: Changing entities, Next: URLencoding of strings within region, Prev: Changing tags in pairs, Up: Changing and Deleting
228 Changing entities
229 =================
230 Special characters such as < or > must be written as &lt; and &gt;. Easy
231 conversion of these characters can be done when importing text from non
232 HTML files.
235 `[prefix] ;'
236 ... convert char to special entity in marked region
237 `[prefix] :'
238 ... convert special entity to original char in marked region
239 (reverse of [prefix] ;)
242 
243 File: yahtmle, Node: URLencoding of strings within region, Prev: Changing entities, Up: Changing and Deleting
245 URLencoding of strings within region
246 ====================================
248 `[prefix] #'
249 ... encode chars that needs to be URLencoded within region
251 
252 File: yahtmle, Node: CSS Support, Next: Customizations, Prev: Changing and Deleting, Up: Top
254 CSS(Style Sheets) Support
255 *************************
257 * Menu:
259 * CSS-class completion::
260 * Reread CSS definition::
262 
263 File: yahtmle, Node: CSS-class completion, Next: Reread CSS definition, Prev: CSS Support, Up: CSS Support
265 CSS class-name completion
266 =========================
267 You can input a class name in your CSS definition with completion. If you
268 have CSS defined as below;
270 h1.foo, h2.foo { background-color: 0xffffff; }
271 h1.bar, h2.bar { font-size: 120%; }
273 when you input h1(or h2) tag with completing-read by [prefix] b or
274 [prefix] l, yahtml prompts you to input class name with completion from
275 the words which are effective to h1 or h2. And if you defined global
276 class like this;
278 .caution { font-size: 120%; background-color: 0xc00000;}
280 when you input any tags via completing-read, yahtml prompts you to input
281 class name. If this is bothering, typing `C-j' instead of `RET' (or
282 `C-m') cancels the next prompt to class name completion.
284 
285 File: yahtmle, Node: Reread CSS definition, Prev: CSS-class completion, Up: CSS Support
287 Re-reading CSS definition
288 =========================
289 If you add some class to your CSS file and you want yahtml to load new
290 definitions, type `M-x yahtml-mode RET' to make yahtml do.
292 
293 File: yahtmle, Node: Customizations, Next: Copying, Prev: CSS Support, Up: Top
295 Customizations
296 **************
298 Variables that modify yahtml's behavior.
300 * Menu:
302 * All customizable variables:: List of customizable variables
303 * Hook variables:: hook variables
305 
306 File: yahtmle, Node: All customizable variables, Next: Hook variables, Prev: Customizations, Up: Customizations
308 List of customizable variables. Defaults in parenthesis
309 ========================================================
311 -- Variable: yahtml-prefix
312 Prefix key for yahtml-mode. (`\C-c')
314 -- Variable: yahtml-image-viewer
315 Command to view image files refered by img. (xv)
317 -- Variable: yahtml-www-browser
318 Browser to view external pages with `[prefix]g'. (netscape)
320 -- Variable: yahtml-kanji-code
321 Default kanji code. 1=sjis, 2=jis, 3=euc (2) If
322 AddType "text/html; charset=xxx" .html is written in .htaccess,
323 this will override yahtml-kanji-code.
325 -- Variable: yahtml-fill-column
326 Columns to auto-fill (72)
328 -- Variable: yahtml-fill-prefix
329 fill-prefix specific to yahtml-mode. (`nil')
331 -- Variable: yahtml-path-url-alist
332 Matching list of URL and full path name on OS's file system.
334 -- Variable: yahtml-directory-index
335 Default index filed opened when accessing a server without a
336 filename, usually index.html. (`"index.html"')
338 -- Variable: yahtml-lint-program
339 HTML syntax check program. (`"jweblint"')
341 -- Variable: yahtml-hate-too-deep-indentation
342 setq to t when indentations for nested enumerate elements are too
343 deep. (`nil')
345 -- Variable: yahtml-always-/p
346 setq to t if you always want `</p>' after `</p>'. `nil'
348 -- Variable: yahtml-p-prefered-env-regexp
349 Elements that `<p>' will be automatically inserted.
350 (`"^\\(body\\|dl\\|blockquote\\)"')
352 -- Variable: yahtml-template-file
353 File to automatically insert when editing a new HTML file.
354 `"~/http/template.html"'
356 -- Variable: yahtml-prefer-upcases
357 Use uppercase for tags. `nil'
359 -- Variable: yahtml-prefer-upcase-attributes
360 Use uppercase for attributes. `nil'
362 -- Variable: yahtml-server-type
363 setq to 'apache if using a Apache server, and will refer ./.htaccess.
364 `'apache'
366 -- Variable: yahtml-apache-access-file
367 When `yahtml-server-type' is `'apache', define name of access
368 restriction file. `".htaccess"'
370 -- Variable: yahtml-shell-command-option
371 Options needed to invoke shell commands.
373 -- Variable: yahtml-translate-hyphens-when-comment-region
374 Whether to change hyphens to `&#45;' when commenting out region.
375 (`t')
377 -- Variable: yahtml-entity-reference-chars-alist
378 alist of characters that needs to be written by Entity Reference.
379 Enter as `'(?char . "EntityReference")'. By default, `<', `>', `&',
380 `'', is set. Add as needed. Do not include `&' at beginning and `;'
381 at end of cdr portion of `"EntityReference"'.
383 -- Variable: yahtml-faithful-to-htmllint
384 When using htmllint to check syntax, it will complain about excess
385 spaces. setq to `t' to avoid this.
387 -- Variable: yahtml-use-css
388 Use style-sheet support or not (`t')
390 -- Variable: yahtml-image-inspection-bytes
391 Number of bytes to inspect the image for geometry information
392 (`10000')
394 -- Variable: yahtml:img-default-alt-format
395 format of img entity's ALT attributes. %x: width, %y: height, %s:
396 size in bytes, %c: first comment string, %f: filename
397 (`"%xx%y(%sbytes)"')
399 -- Variable: yahtml-escape-chars
400 When, completing href-s, Escape reserved characters to URL-encoding
401 or not. Nil for never, t for everytime, and 'ask for inquiring at
402 each reserved chars. (`'ask')
404 -- Variable: yahtml-use-font-lock
405 Use font-lock to fontify buffer or not (`(featurep 'font-lock)')
407 -- Variable: yahtml-use-hilit19
408 Use hilit19 to highlight buffer or not (`(featurep 'hilit19)')
410 -- Variable: yahtml-indentation-boundary
411 Boundary regexp for indentation calculation. (`"^\\s *<h[1-3]>"')
413 
414 File: yahtmle, Node: Hook variables, Prev: All customizable variables, Up: Customizations
416 hook variables
417 ==============
420 
421 File: yahtmle, Node: Copying, Next: Concept Index, Prev: Customizations, Up: Top
423 Copying
424 *******
426 This program is distributed as freesoftware. The author will take no
427 responsibility to any damages due to the usage of this software
428 whatsoever. There are no restrictions to its redistribution, just use
429 common sense. Mail me your thoughts on this program and I will be more
430 than willing to help.
432 Complaints, requests, bug reports and comments are welcome. Make contacts
433 to yuuji@yatex.org (as of December 2000)
435 If you like this program and use it on a regular basis, please join the
436 mailing list "fj Wild Bird Society". Procedures can be found in the "etc"
437 section of `docs/htmlqa.eng' in this package.
440 HIROSE, Yuuji
443 
444 File: yahtmle, Node: Concept Index, Prev: Copying, Up: Top
446 Index
447 *****
449 * Menu:
451 * Customize: Customizations. 4.
452 * Demacs: Intro. 4.
453 * Key Assign: Customizations. 4.
454 * LaTeX: Intro. 4.
455 * Mule: Intro. 4.
456 * yahtml: Intro. 4.