yatex

annotate docs/yahtmle @ 84:73cba5ddd111

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