yatex

annotate docs/yahtmle.tex @ 70:44e3a5e1e883

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