code:
texi tar.texi
tar tar.texi

repo_name: mthl/texinfo

license: mit


code:
@c This is part of GNU tar manual.
@c Copyright (C) 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2001,
@c 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@c See file tar.texi for copying conditions.

@macro GNUTAR
@acronym{GNU} @command{tar}
@end macro

@macro xopindex{option,text}
@opindex \option\@r{, \text\}
@end macro

@macro opsummary{option}
@ifclear ANCHOR--\option\
@set ANCHOR--\option\ 1
@anchor{--\option\}
@end ifclear
@xopindex{\option\, summary}
@end macro


code:
@set UPDATED 26 June 2006
@set UPDATED-MONTH June 2006
@set EDITION 1.15.92
@set VERSION 1.15.92


code:
#! /bin/sh
# Copyright (C) 2010 Free Software Foundation, Inc.
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.

if [ z"$srcdir" = 'z' ]; then
  srcdir=.
fi

command=run_test.sh

if [ z"$1" = 'zall' ]; then
  command=run_test_all.sh
  shift
fi

arg=
if [ z"$1" = 'z-clean' ]; then
  arg='-clean'
  shift
elif [ z"$1" = 'z-copy' ]; then
  arg='-copy'
  shift
fi

if [ z"$1" = 'zall' ]; then
  command=run_test_all.sh
  shift
fi

failed=0
while [ z"$1" != 'z' ]; do
  dir=$1
  shift
  [ -d "$dir" ] || mkdir $dir
  (export srcdir_test=$dir; cd "$dir" && ../"$srcdir"/"$command" $arg)
  result=$?
  echo "$dir: $result"
  [ $result != 0 ] && failed=1
done

exit $failed


code:
EXTRA_DIST = tests.txt res res_all res_info

DISTCLEANFILES = tests.log tests.out

distclean-local:
	rm -rf out out_all out_info diffs

dist-hook:
	rm -rf `find $(distdir)/res $(distdir)/res_info $(distdir)/res_all -name .svn`


code:
tex ../formatting/tex.texi --set-customization-variable 'L2H 1' --iftex
tex_httex ../formatting/tex.texi --init tex4ht.pm --iftex
#tex_mediawiki ../formatting/tex.texi --init mediawiki.pm --iftex
tex_httex_mediawiki ../formatting/tex.texi --html --init tex4ht.pm --init mediawiki.pm --iftex
tex_l2h_mediawiki ../formatting/tex.texi --html --set-customization-variable 'L2H 1' --iftex --init mediawiki.pm
block_EOL_tex ../formatting/block_EOL.texi --set-customization-variable 'L2H 1' --iftex
math_not_closed ../invalid/math_not_closed.texi --set-customization-variable 'L2H 1' --iftex
tex_not_closed ../invalid/tex_not_closed.texi --set-customization-variable 'L2H 1' --iftex
tex_in_copying ../invalid/tex_in_copying.texi --set-customization-variable 'L2H 1' --iftex


code:
tex ../formatting/tex.texi --set-init-var 'L2H 1' --iftex
tex_httex ../formatting/tex.texi --init tex4ht.pm --iftex
tex_mediawiki ../formatting/tex.texi --init mediawiki.pm --iftex
tex_httex_mediawiki ../formatting/tex.texi --html --init tex4ht.pm --init mediawiki.pm --iftex
tex_l2h_mediawiki ../formatting/tex.texi --html --set-init-var 'L2H 1' --iftex --init mediawiki.pm
block_EOL_tex ../formatting/block_EOL.texi --set-init-var 'L2H 1' --iftex
tex_not_closed ../invalid/tex_not_closed.texi --set-init-var 'L2H 1' --iftex
math_not_closed ../invalid/math_not_closed.texi --set-init-var 'L2H 1' --iftex
tex_in_copying ../invalid/tex_in_copying.texi --set-init-var 'L2H 1' --iftex


code:
set_from_init_file('shortcontents', 1);

$print_Top		      = \&mini_ker_print_Top;

sub mini_ker_print_Top
{
    my $fh = shift;
    my $has_top_heading = shift;

    # for redefining navigation buttons use:
    # my $buttons = [...];
    # as it is, 'Top', 'Contents', 'Index', 'About' are printed
    my $buttons = \@MISC_BUTTONS;
    &$print_head_navigation($fh, $buttons);
    my $nw;
        # top-level node is fully enclosed in @ifnothtml
        # print fulltitle, subtitle, author, Overview
        print $fh $Texi2HTML::TITLEPAGE;
        if (@{$Texi2HTML::OVERVIEW})
        {
             print $fh '
 ' . gdt('Overview:') . "
\n" . "
\n";
             my $nw = main::print_lines($fh, $Texi2HTML::OVERVIEW);
             print $fh "
\n";
        }
}


code:
#mini_ker_l2h ../manuals/mini_ker.texi --set-customization-variable 'L2H 1' --iftex
mini_ker_httex ../manuals/mini_ker.texi --init tex4ht.pm --iftex
mini_ker ../manuals/mini_ker.texi --init book.pm --split section --node-files --set-customization-variable 'USE_NODES 1' --iftex --init mini_ker_t2h.init --init tex4ht.pm


code:
mini_ker_l2h ../manuals/mini_ker.texi --set-init-var 'L2H 1' --iftex
mini_ker_httex ../manuals/mini_ker.texi --init tex4ht.pm --iftex
mini_ker ../manuals/mini_ker.texi --init book.pm --split section --node-files --set-init-var 'USE_NODES 1' --iftex --init mini_ker_t2h.init --init tex4ht.pm


code:
singular ../singular_manual/singular.texi --init-file t2h_singular.init --set-customization-variable 'L2H 1' --set-customization-variable 'SHORTEXTN 1' --set-customization-variable 'PREFIX sing' --set-customization-variable 'TOP_FILE index.htm' --no-verbose
singular_httex ../singular_manual/singular.texi --init-file t2h_singular.init --init tex4ht.pm --set-customization-variable 'SHORTEXTN 1' --set-customization-variable 'PREFIX sing' --set-customization-variable 'TOP_FILE index.htm' --no-verbose


code:
# Use the obsolete command-line switch to test that they function
singular ../singular_manual/singular.texi --init-file t2h_singular.init --l2h --short-ext --prefix=sing --top-file=index.htm --noVerbose
singular_httex ../singular_manual/singular.texi --init-file t2h_singular.init --init tex4ht.pm --set-init-var 'SHORTEXTN 1' --set-init-var 'PREFIX sing' --set-init-var 'TOP_FILE index.htm' --no-verbose


code:
#! /bin/sh
# Copyright (C) 2010 Free Software Foundation, Inc.
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.

if [ z"$srcdir" = 'z' ]; then
  srcdir=.
fi

"$srcdir"/tests.sh all \
  tex_html tex_html_manuals tex_html_singular


code:
EXTRA_DIST = custhtml.texi  ifo.texi       options.texi    texi2html.texi \
custpage.texi  initfile.texi  reference.texi  version.texi \
custhtml-header.htmltexi \
 tests.txt res

DISTCLEANFILES = tests.log tests.out

distclean-local:
	rm -rf out out_all out_info diffs

dist-hook:
	rm -rf `find $(distdir)/res $(distdir)/res_info $(distdir)/res_all -name .svn`


code:
<HTML>
$T2H_DOCTYPE
<!-- Created on $T2H_TODAY by $THISPROG -->
<!--
$T2H_AUTHORS
-->
<HEAD>
<TITLE>$longtitle</TITLE>

<META NAME="description" CONTENT="$longtitle">
<META NAME="keywords" CONTENT="$longtitle">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="$THISPROG">
$T2H_EXTRA_HEAD
</HEAD>

<BODY $T2H_BODYTEXT>
$T2H_AFTER_BODY_OPEN


code:
@c
@c This file is part of the ``Texinfo to HTML Converter'' manual
@c which is part of the ``texi2html'' distribution.
@c
@c License:
@c    Copyright (C) 1999, 2000  Free Software Foundation, Inc.
@c
@c    This program is free software; you can redistribute it
@c    and/or modify it under the terms of the GNU General Public
@c    License as published by the Free Software Foundation;
@c    either version 2 of the License, or (at your option) any
@c    later version.
@c
@c    This program is distributed in the hope that it will be
@c    useful, but WITHOUT ANY WARRANTY; without even the implied
@c    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
@c    PURPOSE.  See the GNU General Public License for more
@c    details.
@c
@c    You should have received a copy of the GNU General
@c    Public License along with this program; if not, write to
@c    the Free Software Foundation, Inc., 59 Temple Place, Suite
@c    330, Boston, MA  02111-1307  USA
@c
@c
@c Revisions:
@c
@c
@c Author:
@c   Karl Heinz Marbaise <khmarbaise@gmx.de>
@c
@c Description:
@c   Here are the informations about customizing HTML
@c   BODY, PRE- and AFTER Body.
@c
@c ========================================================
@chapter Customizing HTML
If you like to read the following section, it is assumed
you are famillar with @acronym{HTML}. If not, you shouldn't
read this, cause you don't know what we are talking about.

Here you can find information how to change the
@acronym{HTML} parts of a document. These are the
header, body etc.

These are the defaults which are
part of the distribution as @file{texi2html.init}.

How to do changes of the customization...
needed steps.
@c examples.

@menu
* CustHTMLBody::        Customizing BODY Text.
* CustHTMLHead::        Customizing Head.
* CustHTMLBodyText::    Customizing Head.
* CustHTMLPreBodyText:: Customizing Head.
* CustHTMLAfterBody::   Customizing Head.
@end menu
@c --------------------------------------------------------
@node CustHTMLBody,CustHTMLBodyText,,CustHTML
@section Body

@menu
* CustHTMLBodyText::    Body Text.
* CustHTMLPreBodyText:: PRE Body Text.
* CustHTMLAfterBody::   After Body Text.
@end menu
@c -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@node CustHTMLBodyText,CustHTMLPreBodyText,CustHTMLBody,CustHTML
@subsection Body Text

@vindex T2H_BODYTEXT

@example
$T2H_BODYTEXT =
    . 'LANG="' . $T2H_LANG . '" BGCOLOR="#FFFFFF" '
    . 'TEXT="#000000" LINK="#0000FF" '
    . 'VLINK="#800080" ALINK="#FF0000"';
@end example

If you like to change the basic color combination, you can
change the entry @var{T2H_BODYTEXT}.

@c -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@node CustHTMLPreBodyText,CustHTMLAfterBody,CustHTMLBodyText,CustHTML
@subsection Body Text
@c -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@node CustHTMLAfterBody,CustHTMLHead,CustHTMLPreBodyText,CustHTML
@subsection After Body Text

@vindex T2H_AFTER_BODY_OPEN
@vindex T2H_PRE_BODY_CLOSE

@vindex T2H_EXTRA_HEAD

@example
# text inserted after
$T2H_AFTER_BODY_OPEN = '';

#text inserted before
$T2H_PRE_BODY_CLOSE = '';

# this is used in footer
$T2H_ADDRESS = "by $T2H_USER " if $T2H_USER;
$T2H_ADDRESS .= "on $T2H_TODAY";

# this is added inside  after <TITLE> and some META NAME stuff
# can be used for


code:
@c
@c This file is part of the ``Texinfo to HTML Converter'' manual
@c which is part of the ``texi2html'' distribution.
@c
@c License:
@c    Copyright (C) 1999, 2000  Free Software Foundation, Inc.
@c
@c    This program is free software; you can redistribute it
@c    and/or modify it under the terms of the GNU General Public
@c    License as published by the Free Software Foundation;
@c    either version 2 of the License, or (at your option) any
@c    later version.
@c
@c    This program is distributed in the hope that it will be
@c    useful, but WITHOUT ANY WARRANTY; without even the implied
@c    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
@c    PURPOSE.  See the GNU General Public License for more
@c    details.
@c
@c    You should have received a copy of the GNU General
@c    Public License along with this program; if not, write to
@c    the Free Software Foundation, Inc., 59 Temple Place, Suite
@c    330, Boston, MA  02111-1307  USA
@c
@c
@c Revisions:
@c
@c
@c Author:
@c   Karl Heinz Marbaise <khmarbaise@gmx.de>
@c
@c Description:
@c   Here are the informations about customizing page
@c   layout.
@c
@c ========================================================
@chapter Customizing page layout
This chapter is designed to help you to change the
complete layout of the @acronym{HTML} output if you like to
do so.

a) General: Philosophy, and how it works@*
aa) Navigation panels@*
b) Top page@*
c) Section pages@*

@menu
* TipsNewDesign::           .
* CustPagePhil::            .
* CustPagePhilNav::         .
* CustPageTopPage::         .
* CustPageSectionPages::    .
* CustPageMiscPage::        .
@end menu
@c --------------------------------------------------------
@node TipsNewDesign,CustPagePhil,CustomizingPage,CustomizingPage
@section Tips how to create a new site design

Here you can find information how you should work to pick
up a new design with @command{texi2html}.

@c --------------------------------------------------------
@node CustPagePhil,CustPagePhilNav,TipsNewDesign,CustomizingPage
@section Page Layout and the philosophy

@menu
* CustPagePhilNav:: Navigation panels.
@end menu
@c -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@node CustPagePhilNav,CustPageTopPage,CustPagePhil,CustomizingPage
@subsection Navigation panels

Head and foot Navigation panels.

@c --------------------------------------------------------
@node CustPageTopPage,CustPageSectionPages,CustPagePhilNav,CustomizingPage
@section Top Page
@c --------------------------------------------------------
@node CustPageSectionPages,CustPageMiscPage,CustPageTopPage,CustomizingPage
@section Section Pages
@c --------------------------------------------------------
@node CustPageMiscPage,CustPagePageHeadToc,CustPageSectionPages,CustomizingPage
@section Misc pages
Here you can find information about the creation of the
@dfn{ToC} (@i{Table Of content}), About---Page
etc. and specialy how to change them to get your own
design.

@acronym{ToC} @code{T2H_DEFAULT_print_toc_frame} in
@file{texi2html.init}

@menu
* CustPagePageHeadToc:: .
* CustPagePageHead::    .
* CustPagePageFoot::    .
@end menu

@c -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@node CustPagePageHeadToc,CustPagePageHead,CustPageMiscPage,CustPageMiscPage
@subsection Table Of Contents

The following code is the original code out of the
initialization file (@pxref{InitFile,Initialization file}).

@example
sub T2H_DEFAULT_print_toc_frame
@{
  my $fh = shift;
  &$T2H_print_page_head($fh);
  print $fh <<EOT;

Content

EOT
  print $fh map @{s/HREF=/target=\"main\" HREF=/; $_;@} @@stoc_lines;
  print $fh "\n";
@}
@end example

As you can see it is very simple Perl Code, which can
be changed more or less simple to fit you requirements
(@pxref{CustPagePageHead,,T2H_DEFAULT_print_page_head}).

@c -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@node CustPagePageHead,CustPagePageFoot,CustPagePageHeadToc,CustPageMiscPage
@subsection Page header
Page Head @code{T2H_DEFAULT_print_page_head}

@c references on T2H_DOCTYPE
@c               T2H_AUTHORS
@example
sub T2H_DEFAULT_print_page_head
@{
  my $fh = shift;
  my $longtitle = "$T2H_THISDOC@{title@}: $T2H_NAME@{This@}";
  print $fh <<EOT;

$T2H_DOCTYPE

<TITLE>$longtitle</TITLE>

<META NAME="description" CONTENT="$longtitle">
<META NAME="keywords" CONTENT="$longtitle">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="$THISPROG">
$T2H_EXTRA_HEAD

$T2H_AFTER_BODY_OPEN
EOT
@}
@end example

@c -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@node CustPagePageFoot, ,CustPagePageHead,CustPageMiscPage
@subsection Page footer

Page Foot @code{T2H_DEFAULT_print_page_foot}


code:
@c
@c This file is part of the ``Texinfo to HTML Converter'' manual
@c which is part of the ``texi2html'' distribution.
@c
@c License:
@c    Copyright (C) 1999, 2000  Free Software Foundation, Inc.
@c
@c    This program is free software; you can redistribute it
@c    and/or modify it under the terms of the GNU General Public
@c    License as published by the Free Software Foundation;
@c    either version 2 of the License, or (at your option) any
@c    later version.
@c
@c    This program is distributed in the hope that it will be
@c    useful, but WITHOUT ANY WARRANTY; without even the implied
@c    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
@c    PURPOSE.  See the GNU General Public License for more
@c    details.
@c
@c    You should have received a copy of the GNU General
@c    Public License along with this program; if not, write to
@c    the Free Software Foundation, Inc., 59 Temple Place, Suite
@c    330, Boston, MA  02111-1307  USA
@c
@c
@c Revisions:
@c
@c
@c Author:
@c   Karl Heinz Marbaise <khmarbaise@gmx.de>
@c
@c Description:
@c   Here you can find the description on the
@c   initialization files options.
@c
@c --------------------------------------------------------
@section Initialization file options
This section describes in detail all options that can be used
only in the initialization file (@file{texi2html.init}),
and cannot be specified on the command line.
This means the only way to change those
options is first to copy the original @file{texi2html.init}
to e.g.@: @file{texi2html.init.myown} and make changes to fit
your needs.

@menu
* IFOnumber::             Number sectioning.
* IFOmenu::               Avoid menu redundancy.
* IFOCenterImage::        Center Image.
* IFOExampleIndentCell::  Example Indent Cell.
* IFOSampleIndentCell::   Sample Indent Cell.
* IFOSmallFontSize::      Small Font Size.
* IFOTopHeading::         Top Heading.
* IFOIndexChapter::       Index Chapter.
* IFOSplitIndex::         Split Index.
* IFOhrefDirInsteadFile:: HREF Dir Instead file.
@end menu

@c +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
@node IFOnumber, IFOmenu, IFOs, IFOs
@subsection Number sections.
@vindex T2H_NUMBER_SECTIONS
@vindex T2H_NODE_NAME_IN_MENU
if set, and @var{$T2H_NUMBER_SECTIONS} is set, then use node
names in menu entries, instead of section names

@var{$T2H_NODE_NAME_IN_MENU} = 0;

@c +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
@node IFOmenu, IFOCenterImage, IFOnumber, IFOs
@subsection Avoid menu redundancy
@c not sure if correct?
@cindex menu, redundancy
@vindex T2H_AVOID_MENU_REDUNDANCY
If set, and menu entry equals menu description, then do not print
menu description.  Likewise, if node name equals entry name, do
not print entry name.
@var{$T2H_AVOID_MENU_REDUNDANCY} = 1;

@c +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
@node IFOCenterImage, IFOExampleIndentCell, IFOmenu, IFOs
@subsection Center Image
@cindex images, center
@vindex T2H_CENTER_IMAGE
if set, center @@image by default
otherwise, do not center by default
@var{$T2H_CENTER_IMAGE} = 1;

@c +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
@node IFOExampleIndentCell, IFOSampleIndentCell, IFOCenterImage, IFOs
@subsection Example Indent Cell
@cindex example, indentation
@vindex T2H_EXAMPLE_INDENT_CELL
used as indentation for block enclosing command
@code{@@example}, etc If not empty, must be enclosed in
@code{	}
@var{$T2H_EXAMPLE_INDENT_CELL} = ' 	';

@c +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
@node IFOSampleIndentCell, IFOSmallFontSize, IFOExampleIndentCell, IFOs
@subsection Small Example Indent
@cindex example, small indent
@vindex T2H_SMALL_EXAMPLE_INDENT_CELL
same as above, only for @code{@@small}
$T2H_SMALL_EXAMPLE_INDENT_CELL = " 	";

@c +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
@node IFOSmallFontSize, IFOTopHeading, IFOSampleIndentCell, IFOs
@subsection Small Font Size
@cindex Font Size, small
@vindex T2H_SMALL_FONT_SIZE
# font size for @@small
$T2H_SMALL_FONT_SIZE = "-1";

@c +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
@node IFOTopHeading, IFOIndexChapter, IFOSmallFontSize, IFOs
@subsection Top Heading
@vindex T2H_TOP_HEADING
if non-empty, and no @code{@@..heading} appeared in Top
@c here should be a reference to Texinfo Manual
@c @@heading ??
node, then use this as header for top node/section,
otherwise use value of  @code{@@settitle} or
@code{@@shorttitle} (in that order)
$T2H_TOP_HEADING = "";

@c +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
@node IFOIndexChapter, IFOSplitIndex, IFOTopHeading, IFOs
@subsection Index Chapter
@cindex Chapter, Index
@vindex T2H_INDEX_CHAPTER
if set, use this chapter for @strong{Index} button, else
use first chapter whose name matches @strong{index} (case insensitive)
$T2H_INDEX_CHAPTER = "";

@c +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
@node IFOSplitIndex, IFOhrefDirInsteadFile, IFOIndexChapter, IFOs
@subsection Split Index
@cindex Index, split
@vindex T2H_SPLIT_INDEX
if set and @var{$T2H_SPLIT} is set, then split index pages
at the next letter after they have more than that many
entries

$T2H_SPLIT_INDEX = 100;

@c +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
@node IFOhrefDirInsteadFile, , IFOSplitIndex, IFOs
@subsection HREF Dir Instead File.
@c Not very good? :-/
@cindex HREF Dir instead file
@vindex T2H_HREF_DIR_INSTEAD_FILE
if set (e.g., to @file{index.html}) replace @strong{HREF}'s
to this file  (i.e., to @file{index.html}) by @file{./}

$T2H_HREF_DIR_INSTEAD_FILE = "";


code:
@c
@c This file is part of the ``Texinfo to HTML Converter'' manual
@c which is part of the ``texi2html'' distribution.
@c
@c License:
@c    Copyright (C) 1999, 2000  Free Software Foundation, Inc.
@c
@c    This program is free software; you can redistribute it
@c    and/or modify it under the terms of the GNU General Public
@c    License as published by the Free Software Foundation;
@c    either version 2 of the License, or (at your option) any
@c    later version.
@c
@c    This program is distributed in the hope that it will be
@c    useful, but WITHOUT ANY WARRANTY; without even the implied
@c    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
@c    PURPOSE.  See the GNU General Public License for more
@c    details.
@c
@c    You should have received a copy of the GNU General
@c    Public License along with this program; if not, write to
@c    the Free Software Foundation, Inc., 59 Temple Place, Suite
@c    330, Boston, MA  02111-1307  USA
@c
@c
@c Revisions:
@c
@c
@c Author:
@c   Karl Heinz Marbaise <khmarbaise@gmx.de>
@c
@c Description:
@c   Here you can find the description on the
@c   initialization files.
@c
@c ========================================================
@chapter Initialization file
@c
@cindex configure
@cindex texi2html.init
@cindex texi2htmlrc, global initialization
@cindex .texi2htmlrc, user initialization
@c
@opindex sysconfdir
@opindex init_file
@file{texi2html.init}

@menu
* InitFileBasics::     The basics about
                         initialization files.
* InitFileGlobal::     Global initialization file.
* InitFileUser::       User initialization file.
* InitFileLoad::       Loadable initialization file.
@end menu

@c --------------------------------------------------------
@node InitFileBasics,InitFileGlobal,InitFile,InitFile
@section The basics about init files

Initialization options are read first from
@file{/usr/local/etc/texi2htmlrc} (the exact location being
changeable with the @option{--sysconfdir=dir} option to the
@command{configure} script), then from
@file{$HOME/.texi2htmlrc}, then any command-line options
including @option{-init_file} option; with later settings
overriding earlier ones.

The default initialization options are defined in the
@file{texi2html.init} file contained in the @b{Texi2html}
distribution (which gets included near the beginning of the
@command{texi2html} script that gets installed).

To customize @file{texi2html} it is best if you copy the
appropriate sections from the @file{texi2html.init}
contents into an appropriate local initialization file,
make the necessary changes there, and then have
@command{texi2html} read this initialization file by one of
the means described above.

For an example on what you can produces with
@command{texi2html} have a look at the following sites:
@uref{http://www.singular.uni-kl.de/Manual/html/}

@c --------------------------------------------------------
@node InitFileGlobal,InitFileUser,InitFileBasics,InitFile
@section Global initialization file
@c --------------------------------------------------------
@node InitFileUser,InitFileLoad,InitFileGlobal,InitFile
@section User initialization file
@c --------------------------------------------------------
@node InitFileLoad,,InitFileUser,InitFile
@section Loadable initialization file
@opindex init_file
@option{-init_file}

@c @ref{InitFile}


code:
@c
@c This file is part of the ``Texinfo to HTML Converter'' manual
@c which is part of the ``texi2html'' distribution.
@c
@c License:
@c    Copyright (C) 1999, 2000  Free Software Foundation, Inc.
@c
@c    This program is free software; you can redistribute it
@c    and/or modify it under the terms of the GNU General Public
@c    License as published by the Free Software Foundation;
@c    either version 2 of the License, or (at your option) any
@c    later version.
@c
@c    This program is distributed in the hope that it will be
@c    useful, but WITHOUT ANY WARRANTY; without even the implied
@c    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
@c    PURPOSE.  See the GNU General Public License for more
@c    details.
@c
@c    You should have received a copy of the GNU General
@c    Public License along with this program; if not, write to
@c    the Free Software Foundation, Inc., 59 Temple Place, Suite
@c    330, Boston, MA  02111-1307  USA
@c
@c
@c Revisions:
@c
@c
@c Author:
@c   Karl Heinz Marbaise <khmarbaise@gmx.de>
@c
@c Description:
@c   Here you can find the description on the
@c   command line options.
@c
@c ========================================================
@chapter Command Line Options

@menu
* OptionDebug::               Debugging.
* OptionDocType::             DocType (HTML)
* OptionCheck::               Checking files.
* OptionExpand::              Expanding info, tex areas etc.
* OptionGlossary::            Glossary.
* OptionInvisible::           Invisible.
* OptionIso::                 Iso.
* OptionInclude::             Include directories.
* OptionTopFile::             Top File.
* OptionTocFile::             Table of content File.
* OptionFrames::              Frames.
* OptionMenu::                Menus.
* OptionNumber::              Number sections.
* OptionSplit::               Splitting.
* OptionSectionNavigation::   Navigation.
* OptionSubDir::              Subdirectory.
* OptionShortExt::            Short extension.
* OptionPrefix::              Prefix.
* OptionOutput::              Output.
* OptionShortRef::            Short Ref.
* OptionIndexSummary::        Index Summary.
* OptionVerbose::             Verbose.
* OptionLanguage::            Language.
* OptionL2H::                 La@TeX{}2HTML.
@end menu

@c --------------------------------------------------------
@node OptionDebug, OptionDocType, Options, Options
@section Debugging
@cindex Debugging
@vindex DEBUG_TOC
@vindex DEBUG_INDEX
@vindex DEBUG_BIB
@vindex DEBUG_GLOSS
@vindex DEBUG_DEF
@vindex DEBUG_HTML
@vindex DEBUG_USER
@vindex DEBUG_L2H
@opindex debug

@option{-debug}

debugging: 0 --- no debugging; other values; see beginning
of texi2html

@var{$DEBUG_TOC}   =  1;
@var{$DEBUG_INDEX} =  2;
@var{$DEBUG_BIB}   =  4;
@var{$DEBUG_GLOSS} =  8;
@var{$DEBUG_DEF}   = 16;
@var{$DEBUG_HTML}  = 32;
@var{$DEBUG_USER}  = 64;
@var{$DEBUG_L2H}   = 128;

@c --------------------------------------------------------
@node OptionDocType, OptionCheck, OptionDebug, Options
@section DocType
@cindex HTML, Doc Type
@opindex doctype
@vindex T2H_DOCTYPE
@option{-doctype}

@example
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
@end example

@c --------------------------------------------------------
@node OptionCheck, OptionExpand, OptionDocType, Options
@section Check
@cindex Texinfo, checking
@opindex check
@vindex T2H_CHECK
@option{-check}
if set, only check files and give the list of all things
that look like untranslated Texinfo commands

@c --------------------------------------------------------
@node OptionExpand, OptionGlossary, OptionCheck, Options
@section Expand
@opindex expand
@vindex T2H_EXPAND
@option{-expand}
if set to @strong{tex} (or, @strong{info}) expand
@code{@@iftex} and @code{@@tex} (or, @code{@@ifinfo})
sections else, neither expand @code{@@iftex}, @code{@@tex},
nor @code{@@ifinfo} sections

@c $T2H_EXPAND = "info";

@c --------------------------------------------------------
@node OptionGlossary, OptionInvisible, OptionExpand, Options
@section Glossary
@cindex HTML, Glossary
@cindex Texinfo, Glossary
@opindex glossary
@vindex T2H_USE_GLOSSARY
@option{-glossary}
if set, uses section named @strong{Footnotes} for glossary

@c --------------------------------------------------------
@node OptionInvisible, OptionIso, OptionGlossary, Options
@section Invisible
@cindex Mark, invisible
@cindex invisible, Mark
@opindex invisible
@vindex T2H_INVISIBLE_MARK
@option{-invisible}
@var{$T2H_INVISIBLE_MARK} is the text used to create
invisible destination anchors for index links (you can for
instance use the @file{invisible.xbm} file shipped with
this program). This is a workaround for a known bug of many
@acronym{WWW} browsers, including Netscape. For me, it
works fine without it --- on the contrary: if there, it
inserts space between headers and start of text (obachman
3/99)

@example
$T2H_INVISIBLE_MARK = "";
# $T2H_INVISIBLE_MARK = ' ';
@end example

@c --------------------------------------------------------
@node OptionIso, OptionInclude, OptionInvisible, Options
@section Iso
@cindex ISO8859
@cindex Copyright
@opindex iso
@vindex T2H_USE_ISO
@option{-iso}

if set, ISO8859 characters are used for special symbols
(like Copyright @code{@copyright{}}, etc)

$T2H_USE_ISO = 0;

@c --------------------------------------------------------
@node OptionInclude, OptionTopFile, OptionIso, Options
@section Include Directory
@vindex Include directories
@opindex I
@vindex T2H_INCLUDE_DIRS
@option{-I}

list directories where @code{@@include} files are searched for
(besides the directory of the doc file) additional
@option{-I} args are add to this list.

@@T2H_INCLUDE_DIRS = (".");

@c --------------------------------------------------------
@node OptionTopFile, OptionTocFile, OptionInclude, Options
@section Top File
@cindex Top Level file
@cindex HTML, index.html
@opindex top_file
@vindex T2H_TOP_FILE
@option{-top_file}
uses file of this name for top-level file
extension is manipulated appropriately, if necessary.
If empty, @file{<basename of document>.html} is used.
Typically, you would set this to @file{index.html}.

$T2H_TOP_FILE = "";

@c --------------------------------------------------------
@node OptionTocFile, OptionFrames, OptionTopFile, Options
@section Table Of content File
@cindex Table of content file
@opindex toc_file
@vindex T2H_TOC_FILE
@option{-toc_file}
uses file of this name for table of contents.  File extension
is manipulated appropriately, if necessary. If empty,
@file{<basename of document>_toc.html} is used.

$T2H_TOC_FILE = "";

@c --------------------------------------------------------
@node OptionFrames, OptionMenu, OptionTocFile, Options
@section Frames
@vindex HTML, frames
@vindex HTML 4.0, frames
@opindex frames
@vindex T2H_FRAMES
@option{-frames}
if set, output two additional files which use HTML 4.0
@b{frames}.

$T2H_FRAMES = 0;

@c --------------------------------------------------------
@node OptionMenu, OptionNumber, OptionFrames, Options
@section Menus
@cindex HTML, menu
@cindex Texinfo, menu
@opindex menu
@opindex nomenu
@vindex T2H_SHOW_MENU
@option{-menu} or @option{-nomenu} if set, show the Texinfo
menus

$T2H_SHOW_MENU = 1;

@c --------------------------------------------------------
@node OptionNumber, OptionSplit, OptionMenu, Options
@section Number sections
@cindex Section numbering
@opindex number
@opindex nonumber
@vindex T2H_NUMBER_SECTIONS
@option{-number} @option{-nonumber}
if set, number sections and show section names and numbers
in references and menus

@c Just think about it?
@c @defvar $T2H_NUMBER_SECTIONS
@c @c = 1;
@c @end defvar

@c --------------------------------------------------------
@node OptionSplit, OptionSectionNavigation, OptionNumber, Options
@section Split
@cindex HTML, split
@cindex File, split
@opindex split
@vindex T2H_SPLIT
@option{-split section|chapter|none}
if set to @strong{section} (resp. @strong{chapter}) create one
@acronym{HTML} file per (sub)section (resp. chapter) and
separate pages for Top, ToC, Overview, Index, Glossary,
About.  Otherwise, create a monolithic @acronym{HTML} file that
contains the whole document.

#$T2H_SPLIT = 'section';
$T2H_SPLIT = undef;

@c --------------------------------------------------------
@node OptionSectionNavigation, OptionSubDir, OptionSplit, Options
@section Section navigation
@cindex HTML, Navigation
@opindex section_navigation
@opindex no-section_navigation
@vindex T2H_SECTION_NAVIGATION
@option{-section_navigation}|
@option{-no-section_navigation}

if set, then navigation panels are printed at the beginning
of each section and, possibly at the end (depending on
whether or not there were more than
@var{$T2H_WORDS_IN_PAGE} words on page). This is most useful
if you do not want to have section navigation on
@option{-split chapter}

@c @vindex T2H_SECTION_NAVIGATION
@c @defvar $T2H_SECTION_NAVIGATION
@c = 1;
@c @end defvar

@c --------------------------------------------------------
@node OptionSubDir, OptionShortExt, OptionSectionNavigation, Options
@section Subdirectory
@cindex Subdirectory
@vindex T2H_SUBDIR
@option{-subdir}
If set, then put result files in the specified directory.
If not set, then result files are put into the current directory.

@c #$T2H_SUBDIR = 'html';
@var{$T2H_SUBDIR} = undef;

@c --------------------------------------------------------
@node OptionShortExt, OptionPrefix, OptionSubDir, Options
@section Short extension
@cindex HTML, .htm extension
@cindex HTML, .html extension
@cindex extension, .html
@cindex extension, .htm
@vindex T2H_SHORTEXTN
@opindex short_extn
@option{-short_extn}
If this is set, then all @acronym{HTML} files will have extension
@file{.htm} instead of @file{.html}. This is helpful when
shipping the document to DOS-based systems.
@var{$T2H_SHORTEXTN} = 0;

@c --------------------------------------------------------
@node OptionPrefix, OptionOutput, OptionShortExt, Options
@section Prefix
@cindex Prefix
@vindex T2H_PREFIX
@opindex prefix
@option{-prefix}
Set the output file prefix, prepended to all @file{.html},
@file{.gif} and @file{.pl} files.
By default, this is the basename of the document

@var{$T2H_PREFIX} = "";

@c --------------------------------------------------------
@node OptionOutput, OptionShortRef, OptionPrefix, Options
@section Output filename
@cindex Output filename
@cindex Filename, output
@vindex T2H_OUT
@opindex o
@opindex out_file

@option{-o filename}|@option{-out_file}
If set, generate monolithic document output @acronym{HTML}
into @file{filename}.

@c --------------------------------------------------------
@node OptionShortRef, OptionIndexSummary, OptionOutput, Options
@section Short Cross References
@cindex References, short
@cindex sections without numbers
@vindex T2H_SHORT_REF
@opindex short_ref
@option{-short_ref}
if set cross-references are given without section numbers

@c --------------------------------------------------------
@node OptionIndexSummary, OptionVerbose, OptionShortRef, Options
@section Index Summary
@cindex Index, Summary
@cindex Summary Index
@cindex HTML, Index
@vindex T2H_IDX_SUMMARY
@opindex idx_sum
@option{-idx_sum}
If value is set, then for each @code{@@prinindex $what}
@file{$docu_name_$what.idx} is created which contains lines of the
form @strong{$key\t$ref} sorted alphabetically (case
matters).

@c --------------------------------------------------------
@node OptionVerbose, OptionLanguage, OptionIndexSummary, Options
@section Verbose output
@cindex Output, verbose
@cindex Verbose output
@cindex Debugging, verbose output
@vindex T2H_VERBOSE
@opindex verbose
@option{-verbose}
if set, chatter about what we are doing.

@c --------------------------------------------------------
@node OptionLanguage, OptionL2H, OptionVerbose, Options
@section Language Support
@cindex Language Support
@cindex Support different languages
@vindex $T2H_LANG
@vindex $T2H_WORDS
@opindex lang
@option{-lang}
For page titles, use
@code{$T2H_WORDS->@{$T2H_LANG@}->@{...@}} as title. To add
a new language, supply list of titles (see @var{$T2H_WORDS}),
and use ISO 639 language codes (see e.g.@: perl module
@file{Locale-Codes-1.02.tar.gz} for definitions).

If you don't give a @option{-lang} then we got it from the
Texinfo source file (@@documentlanguage
@c Put a table with the language codes here!
@c Or better put a reference into the Texinfo
@c Manual, which has a table of ISO 639-Codes.
@c
@c Currently the @xref etc. does not work with
@c external documents, cause we don't know
@c reference (anchor) value or there is no way
@c to get it.
@c The following reference does only work correctly
@c in Info!!!
@pxref{documentlanguage,,,Texinfo}). If there is no
@code{@@documentlanguage} we use the default @code{en} for
the language.
@c
@c put some information about Month names etc. here
@c $MONTH_NAMES !!
@c Supplemental should be a naming scheme for variables in
@c different languages (MONTH_NAMES_DE etc.)
@c --------------------------------------------------------
@node OptionL2H, , OptionLanguage, Options
@section La@TeX{}2HTML for @code{@@math} and @code{@@tex}
@cindex La@TeX{}2HTML
@cindex Conversion of @@math and @@tex
@cindex @@tex
@cindex @@math
@vindex T2H_L2H
@opindex l2h
@option{-l2h}
if set, uses @command{latex2html} for generation of math
content.

@menu
* OptionL2HL2H::    Where to find La@TeX{}2HTML.
* OptionL2HSkip::   Skip calling La@TeX{}2HTML.
* OptionL2Htmp::    Temporary files for La@TeX{}2HTML.
@end menu

@c --------------------------------------------------------
@node OptionL2HL2H, OptionL2HSkip, OptionL2H, OptionL2H
@subsection Where to find @command{latex2html}
@cindex location, La@TeX{}2HTML
@cindex La@TeX{}2HTML, location
@vindex T2H_L2H_L2H
@opindex l2h_l2h
@option{-l2h_l2h}
name/location of @command{latex2html} program.

@c --------------------------------------------------------
@node OptionL2HSkip, OptionL2Htmp, OptionL2HL2H, OptionL2H
@subsection Skip calling La@TeX{}2HTML
@cindex La@TeX{}2HTML, skip calling
@vindex T2H_L2H_SKIP
@opindex l2h_skip
@option{-l2h_skip}
If set, skips actual call to @command{latex2html}: tries to
reuse previously generated content, instead.

@c --------------------------------------------------------
@node OptionL2Htmp, , OptionL2HSkip, OptionL2H
@subsection Temporary files for La@TeX{}2HTML
@cindex Temporary, La@TeX{}2HTML
@cindex La@TeX{}2HTML, Temporary files
@vindex T2H_L2H_TMP
@opindex l2h_tmp
@option{-l2h_tmp}
If set, l2h uses this directory for temporary files.  The
path leading to this directory may not contain a dot (i.e.,
a @samp{.}); otherwise, l2h will fail.


code:
@c
@c This file is part of the ``Texinfo to HTML Converter'' manual
@c which is part of the ``texi2html'' distribution.
@c
@c License:
@c    Copyright (C) 1999, 2000  Free Software Foundation, Inc.
@c
@c    This program is free software; you can redistribute it
@c    and/or modify it under the terms of the GNU General Public
@c    License as published by the Free Software Foundation;
@c    either version 2 of the License, or (at your option) any
@c    later version.
@c
@c    This program is distributed in the hope that it will be
@c    useful, but WITHOUT ANY WARRANTY; without even the implied
@c    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
@c    PURPOSE.  See the GNU General Public License for more
@c    details.
@c
@c    You should have received a copy of the GNU General
@c    Public License along with this program; if not, write to
@c    the Free Software Foundation, Inc., 59 Temple Place, Suite
@c    330, Boston, MA  02111-1307  USA
@c
@c
@c Revisions:
@c
@c
@c Author:
@c   Karl Heinz Marbaise <khmarbaise@gmx.de>
@c
@c Description:
@c   Here you can find the description on all
@c   subs in the original Perl file.
@c
@c ========================================================
@appendix Function Reference

@menu
* Refptocframe::           Print ToC Frame.
* Refpphead::              Print page head.
@end menu

@c Global variables:
@c T2H_USER which is created throught main part
@c (texi2html.pl)
@c You can use it. (On Windows? On Unix ?)
@c --------------------------------------------------------
@node Refptocframe,Refpphead,,Reference
@appendixsec Print ToC Frame

@defun T2H_DEFAULT_print_toc_frame (FileName)
@sp 1
Description of the subroutine.
What does it do? Which parameters it needs etc.
@end defun

@c --------------------------------------------------------
@node Refpphead,,Refptocframe,Reference
@appendixsec Print Page Head
@defun T2H_DEFAULT_print_page_head (FileName)
@sp 1
Description of the subroutine.
What does it do? Which parameters it needs etc.
@end defun


code:
texi texi2html.texi
texi2html texi2html.texi


code:
\input texinfo @c -*-texinfo-*-
@c
@c This is the ``Texinfo to HTML Converter'' manual which
@c which is part of the ``texi2html'' distribution.
@c
@c License:
@c    Copyright (C) 1999, 2000  Free Software Foundation, Inc.
@c
@c    This program is free software; you can redistribute it
@c    and/or modify it under the terms of the GNU General Public
@c    License as published by the Free Software Foundation;
@c    either version 2 of the License, or (at your option) any
@c    later version.
@c
@c    This program is distributed in the hope that it will be
@c    useful, but WITHOUT ANY WARRANTY; without even the implied
@c    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
@c    PURPOSE.  See the GNU General Public License for more
@c    details.
@c
@c    You should have received a copy of the GNU General
@c    Public License along with this program; if not, write to
@c    the Free Software Foundation, Inc., 59 Temple Place, Suite
@c    330, Boston, MA  02111-1307  USA
@c
@c
@c Revisions:
@c
@c
@c Author:
@c   Karl Heinz Marbaise <khmarbaise@gmx.de>
@c
@c --------------------------------------------------------
@c
@c Currently most of the material is copied out of
@c texi2html.init file. It's just a start point.
@c In other words this is a draft manual ;-)
@c
@setfilename texi2html.info
@c --------------------------------------------------------
@c Edition and last update date of the manual which might
@c differ to the scripts last update date etc.
@set MANUAL_UPD 14. August 2000
@set MANUAL_ED 0.21
@c
@set MANUAL_AUTHOR Karl Heinz Marbaise
@set MANUAL_AUTHOR_EMAIL khmarbaise@@gmx.de
@c
@c Get the version of the script itself through
@c configure/autoconf etc.
@c version.texi is automatically generated through
@c configure/autoconf.
@include version.texi
@c --------------------------------------------------------
@c Index for command line options
@defcodeindex op
@c --------------------------------------------------------
@settitle Texinfo to HTML
@c @setchapternewpage on
@setchapternewpage odd
@footnotestyle separate
@ifset shorttitlepage-enabled
@shorttitlepage Texinfo to HTML
@end ifset
@c --------------------------------------------------------
@c support old style Info Dir entries.
@ifset OLDSTYLE-INFO-DIR
@ifinfo
@format
START-INFO-DIR-ENTRY
* Texi2html: (texi2html).  Texinfo 2 HTML Converter (texi2html).
END-INFO-DIR-ENTRY
@end format
@end ifinfo
@end ifset
@c --------------------------------------------------------
@c Informations for install-info.
@c I think the conversion script should be found
@c where the documentation system lives.
@c What do you think?
@dircategory Texinfo documentation system
@direntry
* Texi2html: (texi2html).  Texinfo to HTML Converter.
@end direntry
@c --------------------------------------------------------
@ifinfo
This file documents the texi2html script which converts
Texinfo into HTML.

Copyright (C) 1999, 2000  Free Software Foundation, Inc.

This edition is for texi2html version @value{VERSION},
@value{UPDATED}.

Permission is granted to make and distribute verbatim
copies of this manual provided the copyright notice and
this permission notice are preserved on all copies.

@ignore
Permission is granted to process this file through TeX and
print the results, provided the printed document carries
copying permission notice identical to this one except for
the removal of this paragraph (this paragraph not being
relevant to the printed manual).

@end ignore
Permission is granted to copy and distribute modified
versions of this manual under the conditions for verbatim
copying, provided that the entire resulting derived work is
distributed under the terms of a permission notice
identical to this one.

Permission is granted to copy and distribute translations
of this manual into another language, under the above
conditions for modified versions, except that this
permission notice may be stated in a translation approved
by the Free Software Foundation.
@end ifinfo
@c --------------------------------------------------------
@titlepage
@title Texinfo to HTML Converter
@subtitle Manual Edition @value{MANUAL_ED}
@subtitle Last Update: @value{MANUAL_UPD}
@subtitle for Version @value{VERSION} of @command{texi2html} script.
@author Lionel Cons
@author Karl Berry
@author Olaf Bachmann
@author and many others.
@author Karl Heinz Marbaise (manual)
@page
@vskip 0pt plus 1filll
Copyright @copyright{} Lionel Cons@*
Copyright @copyright{} Karl Berry@*
Copyright @copyright{} Olaf Bachmann@*
Copyright @copyright{} and many others.@*
Copyright @copyright{} Karl Heinz Marbaise (manual)@*

Permission is granted to make and distribute verbatim
copies of this manual provided the copyright notice and
this permission notice are preserved on all copies.

Permission is granted to copy and distribute modified
versions of this manual under the conditions for verbatim
copying, provided that the entire resulting derived work is
distributed under the terms of a permission notice
identical to this one.

Permission is granted to copy and distribute translations
of this manual into another language, under the above
conditions for modified versions, except that this
permission notice may be stated in a translation approved
by the Free Software Foundation.
@sp 2
Cover art by Etienne Suvasa.
@end titlepage
@c ========================================================
@summarycontents
@contents
@c
@ifnottex
@node Top, Overview, (dir), (dir)
@top Texi2html
@c @page
@c ========================================================
@c @node Top, Overview, (dir), (dir)
@c @top
@c @chapter About

This Manual (Edition @value{MANUAL_ED}, last updated at
@value{MANUAL_UPD}) describes the @command{texi2html} Perl
script which converters
@c The following construct allows me to get
@c real URL link in HTML and working refs in
@c info.
@ifhtml
@uref{http://www.texinfo.org,Texinfo}
@end ifhtml
@ifnothtml
Texinfo (@pxref{Top,,Texinfo,Texinfo})
@end ifnothtml
into @acronym{HTML}.

@c @inforef{Top, Top, Texinfo} does not work yet ;-)
@c here we should paste a @inforef or @xref on the
@c Texinfo manual.

Please send bug reports about this manual to Karl Heinz
Marbaise @email{khmarbaise@@gmx.de}. Please state exact
version/edition of the manual (can be found at start of
Texinfo source file; use the entry Id under Revisions).

Please note:
@example
This manual is currently under
construction and of course incomplete ;-)
@end example

@c The following line within a menu does not work!
@c * Why texi2html and not Makeinfo?:whytexi2html.      Why texi2html and not makeinfo?.
@ifinfo
@menu
@c * MenuName:NodeName.       Description.
* Overview::                  Overview about @command{texi2html}.
* Installation::              Installation process.
* Customizing::               Customizing.
* CustomizingExpand::         Customizing what gets expanded.
* CustomizingPage::           Customizing page layout.
* CustHTML::                  Customizing HTML.
* InitFile::                  Initialization files.
@c * ExtFile::                   Extension file.
* IFOs::                      Initialization file options
* Options::                   Command Line Options.

* Reference::                 Reference Manual of functions.

@detailmenu

/// The Detailed Node Listing ///

--- Overview ---

* whytexi2html::              Why @file{texi2html} and
                                not @file{makeinfo}?.

--- Installation process ---

* Installation::             Installation process.

--- Initialization file options ---

* IFOnumber::                 Number sectioning.
* IFOmenu::                   Avoid menu redundancy.
* IFOCenterImage::            Center Image.
* IFOExampleIndentCell::      Example Indent Cell.
* IFOSampleIndentCell::       Sample Indent Cell.
* IFOSmallFontSize::          Small Font Size.
* IFOTopHeading::             Top Heading.
* IFOIndexChapter::           Index Chapter.
* IFOSplitIndex::             Split Index.
* IFOhrefDirInsteadFile::     HREF Dir Instead file.

--- Command Line Options ---

* OptionDebug::               Debugging.
* OptionDocType::             DocType (HTML)
* OptionCheck::               Checking files.
* OptionExpand::              Expanding info, tex areas etc.
* OptionGlossary::            Glossary.
* OptionInvisible::           Invisible.
* OptionIso::                 Iso.
* OptionInclude::             Include directories.
* OptionTopFile::             Top File.
* OptionTocFile::             Table of content File.
* OptionFrames::              Frames.
* OptionMenu::                Menus.
* OptionNumber::              Number sections.
* OptionSplit::               Splitting.
* OptionSectionNavigation::   Navigation.
* OptionSubDir::              Subdirectory.
* OptionShortExt::            Short extension.
* OptionPrefix::              Prefix.
* OptionOutput::              Output.
* OptionShortRef::            Short Ref.
* OptionIndexSummary::        Index Summary.
* OptionVerbose::             Verbose.
* OptionLanguage::            Language.
* OptionL2H::                 La@TeX{}2HTML.

--- La@TeX{}2HTML for @code{@@math} and @code{@@tex} ---

* OptionL2HL2H::              Where to find La@TeX{}2HTML.
* OptionL2HSkip::             Skip calling La@TeX{}2HTML.
* OptionL2Htmp::              Temporary files for La@TeX{}2HTML.

--- Indices ---

* Indexop::                   Command Line Option Index.
* Indexvr::                   Variable Index.
* Indexcp::                   Concept Index.
@end detailmenu
@end menu
@end ifinfo
@end ifnottex
@c ========================================================
@node Overview, HowToGetHTML, Top, Top
@chapter Overview about @command{texi2html}
@uref{http://www.texinfo.org,Texinfo} is the official
documentation format of the @uref{http://www.gnu.org,GNU}
project. It uses a single source file to produce both
online information and printed output.

@c much thinking about ...
It is often proposed to have a way to produce
@acronym{HTML} from Texinfo sources, like the GNU-Info
format. It is much simpler to create one converter instead
of writing all documentation new in @acronym{HTML}, cause
there is so much documentation in Texinfo all over
the world.

A few time ago @command{makeinfo} wasn't able to produce
@acronym{HTML} output format, but there are needth to have
@acronym{HTML}. This was the borning hour for
@command{texi2html}. The basic purpose of @file{texi2html}
is to convert Texinfo documents into HTML.

@menu
* HowToGetHTML::       Ways to get HTML files.
* whytexi2html::       Why texi2html and not makeinfo?.
@end menu
@c --------------------------------------------------------
@node HowToGetHTML, whytexi2html, Overview, Overview
@section Ways to get HTML
You would like to @acronym{HTML} files out of your Texinfo
files? There exist two ways which you can go.
This first is to use @command{makeinfo} itself to produce
@acronym{HTML} output. The second is to use
@command{texi2html}.

@c --------------------------------------------------------
@node whytexi2html, Installation, HowToGetHTML, Overview
@section Why @file{texi2html} and not @file{makeinfo}?
The basic idea of @command{makeinfo}'s @acronym{HTML}
output was to get an readable @acronym{HTML} output.
Nothing sophisticated nor good styling just readable.

The current development of texi2html is going into
different direction.

The main purpose is to get better styling, better design
etc. of the created @acronym{HTML} pages. This way is
supported using differnt command line options and of course
possible changings of the initialization file to fit your
own needs.

The main disadvantage of @acronym{makeinfo}'s
@acronym{HTML} output is your getting only one big file.
This is of course readable but not very usable. The problem
of this is, while you like to have splitted chapters or
nodes the Texinfo source has to be read at minimum twice
times. This makes it impossible to implement this in
@command{makeinfo}. This would result in complete new
implementation of @command{makeinfo}'s source.

@c think more about this????
In contrast to the HTML produced by @command{makeinfo
--html} (the @command{makeinfo} program is part of the
Texinfo distribution), the HTML output of @file{texi2html}
is highly configurable. Among other differences, with
@command{texi2html} allows you to customize your entire
page layout (like headers, footers, style sheets, etc),
split documents at various levels, and use
@command{latex2html} to convert @code{@@tex} sections.

@command{texi2html} should reasonably convert all Texinfo
4.0 constructs. If not, please send a bug report to
@email{texi2html@@mathematik.uni-kl.de}.

@c ========================================================
@node Installation, Customizing, whytexi2html, Top
@chapter Installation of @command{texi2html}
@cindex Installation
description of the installation process.
What do you need?
How?

@c ========================================================
@node Customizing, CustomizingExpand, Installation, Top
@chapter Customizing files
@cindex Installation
@opindex frames
@c 4.) Customizing files to output
@c   ==> -out_file, -prefix, -subdir, -split, -frames etc
Result based on using @option{-frames}

@example
texi2html -V -frames texi2html.texi
@end example
Explanation of the output differences against default,
whatever this is ;-)

@c ========================================================
@node CustomizingExpand, CustomizingPage, Customizing, Top
@chapter Customizing what gets expanded
@c 5.) Customizing what gets expanded
@c   ==> -expand, and latex2html
Test starting.

@option{-expand info}
@option{-expand tex}
Take a look at optionexpand.

@c ========================================================
@node CustomizingPage, CustHTML, CustomizingExpand, Top
@include custpage.texi
@c ========================================================
@node CustHTML, InitFile, CustomizingPage, Top
@include custhtml.texi
@c ========================================================
@node InitFile, IFOs, CustHTML, Top
@include initfile.texi
@c --------------------------------------------------------
@node IFOs, Options, InitFile, Top
@include ifo.texi
@c ========================================================
@c @include extfile.texi obsolete now, is not documented!
@c ========================================================
@node Options, Reference, IFOs, Top
@include options.texi
@c ========================================================
@node Reference, Indexop, Options, Top
@include reference.texi
@c ========================================================
@c commandline option index.
@node Indexop, Indexvr, Reference, Top
@appendix Indices
@appendixsec Command Line Option Index
@printindex op
@c --------------------------------------------------------
@node Indexvr, Indexcp, Indexop, Top
@appendixsec Variable Index
@printindex vr
@c --------------------------------------------------------
@node Indexcp, , Indexvr, Top
@appendixsec Concept Index
@printindex cp
@c printindex init file options dito.
@c concept index.
@bye


code:
@set UPDATED 15 September 2001
@set UPDATED-MONTH September 2001
@set EDITION 1.67
@set VERSION 1.67


code:
EXTRA_DIST = \
abbrevs.texi   entering.texi  keystrokes.texi  mule.texi      search.texi  \
basic.texi     files.texi     killing.texi     m-x.texi       sending.texi \
buffers.texi   fixit.texi     major.texi       new.texi       startup.texi \
building.texi  frame.texi     mark.texi        packages.texi  text.texi    \
calendar.texi  glossary.texi  menus.texi       picture.texi   trouble.texi \
cmdargs.texi   gnu.texi       mini.texi        programs.texi  undo.texi    \
custom.texi    help.texi      misc.texi        reading.texi   windows.texi \
display.texi   indent.texi    mouse.texi       regs.texi      xemacs.texi  \
 tests.txt
#res

DISTCLEANFILES = tests.log tests.out

distclean-local:
	rm -rf out out_all out_info diffs


code:
@node Abbrevs, Picture, Running, Top
@chapter Abbrevs
@cindex abbrevs
@cindex expansion (of abbrevs)

  An @dfn{abbrev} is a word which @dfn{expands} into some
different text.  Abbrevs are defined by the user to expand in specific
ways.  For example, you might define @samp{foo} as an abbrev expanding to
@samp{find outer otter}.  With this abbrev defined, you would be able to
get @samp{find outer otter } into the buffer by typing @kbd{f o o @key{SPC}}.

@findex abbrev-mode
@vindex abbrev-mode
  Abbrevs expand only when Abbrev mode (a minor mode) is enabled.
Disabling Abbrev mode does not cause abbrev definitions to be discarded,
but they do not expand until Abbrev mode is enabled again.  The command
@kbd{M-x abbrev-mode} toggles Abbrev mode; with a numeric argument, it
turns Abbrev mode on if the argument is positive, off otherwise.
@xref{Minor Modes}.  @code{abbrev-mode} is also a variable; Abbrev mode is
on when the variable is non-@code{nil}.  The variable @code{abbrev-mode}
automatically becomes local to the current buffer when it is set.

  Abbrev definitions can be @dfn{mode-specific}---active only in one major
mode.  Abbrevs can also have @dfn{global} definitions that are active in
all major modes.  The same abbrev can have a global definition and various
mode-specific definitions for different major modes.  A mode-specific
definition for the current major mode overrides a global definition.

 You can define Abbrevs interactively during an editing session.  You
can also save lists of abbrev definitions in files and reload them in later
sessions.  Some users keep extensive lists of abbrevs that they load in
every session.

  A second kind of abbreviation facility is called the @dfn{dynamic
expansion}.  Dynamic abbrev expansion happens only when you give an
explicit command and the result of the expansion depends only on the
current contents of the buffer.  @xref{Dynamic Abbrevs}.

@menu
* Defining Abbrevs::  Defining an abbrev, so it will expand when typed.
* Expanding Abbrevs:: Controlling expansion: prefixes, canceling expansion.
* Editing Abbrevs::   Viewing or editing the entire list of defined abbrevs.
* Saving Abbrevs::    Saving the entire list of abbrevs for another session.
* Dynamic Abbrevs::   Abbreviations for words already in the buffer.
@end menu

@node Defining Abbrevs, Expanding Abbrevs, Abbrevs, Abbrevs
@section Defining Abbrevs

@table @kbd
@item C-x a g
Define an abbrev to expand into some text before point
(@code{add-global-abbrev}).
@item C-x a l
Similar, but define an abbrev available only in the current major mode
(@code{add-mode-abbrev}).
@item C-x a i g
Define a word in the buffer as an abbrev (@code{inverse-add-global-abbrev}).
@item C-x a i l
Define a word in the buffer as a mode-specific abbrev
(@code{inverse-add-mode-abbrev}).
@item M-x kill-all-abbrevs
After this command, no abbrev definitions remain in effect.
@end table

@kindex C-x a g
@findex add-global-abbrev
  The usual way to define an abbrev is to enter the text you want the
abbrev to expand to, position point after it, and type @kbd{C-x a g}
(@code{add-global-abbrev}).  This reads the abbrev itself using the
minibuffer, and then defines it as an abbrev for one or more words
before point.  Use a numeric argument to say how many words before point
should be taken as the expansion.  For example, to define the abbrev
@samp{foo} as in the example above, insert the text @samp{find outer
otter}, then type @*@kbd{C-u 3 C-x a g f o o @key{RET}}.

  An argument of zero to @kbd{C-x a g} means to use the contents of the
region as the expansion of the abbrev being defined.

@kindex C-x a l
@findex add-mode-abbrev
  The command @kbd{C-x a l} (@code{add-mode-abbrev}) is similar, but
defines a mode-specific abbrev.  Mode-specific abbrevs are active only in a
particular major mode.  @kbd{C-x a l} defines an abbrev for the major mode
in effect at the time @kbd{C-x a l} is typed.  The arguments work the
same way they do for @kbd{C-x a g}.

@kindex C-x a i g
@findex inverse-add-global-abbrev
@kindex C-x a i l
@findex inverse-add-mode-abbrev
  If the text of an abbrev you want is already in the buffer instead of
the expansion, use command @kbd{C-x a i g} (@code{inverse-add-global-abbrev})
instead of @kbd{C-x a g}, or use @kbd{C-x a i l}
(@code{inverse-add-mode-abbrev}) instead of @kbd{C-x a l}.  These commands
are called ``inverse'' because they invert the meaning of the argument
found in the buffer and the argument read using the minibuffer.@refill

  To change the definition of an abbrev, just add the new definition.  You
will be asked to confirm if the abbrev has a prior definition.  To remove
an abbrev definition, give a negative argument to @kbd{C-x a g} or @kbd{C-x
a l}.  You must choose the command to specify whether to kill a global
definition or a mode-specific definition for the current mode, since those
two definitions are independent for one abbrev.

@findex kill-all-abbrevs
  @kbd{M-x kill-all-abbrevs} removes all existing abbrev definitions.

@node Expanding Abbrevs, Editing Abbrevs, Defining Abbrevs, Abbrevs
@section Controlling Abbrev Expansion

  An abbrev expands whenever it is in a buffer just before point and you
type a self-inserting punctuation character (@key{SPC}, comma,
etc.@:).  Most often an abbrev is used by inserting the abbrev followed
by punctuation.

@vindex abbrev-all-caps
  Abbrev expansion preserves case; thus, @samp{foo} expands into @samp{find
outer otter}, @samp{Foo} into @samp{Find outer otter}, and @samp{FOO} into
@samp{FIND OUTER OTTER} or @samp{Find Outer Otter} according to the
variable @code{abbrev-all-caps} (a non-@code{nil} value chooses the first
of the two expansions).@refill

   Two commands are available to control abbrev expansion:

@table @kbd
@item M-'
Separate a prefix from a following abbrev to be expanded
(@code{abbrev-prefix-mark}).
@item C-x a e
@findex expand-abbrev
Expand the abbrev before point (@code{expand-abbrev}).
This is effective even when Abbrev mode is not enabled.
@item M-x unexpand-abbrev
Undo last abbrev expansion.
@item M-x expand-region-abbrevs
Expand some or all abbrevs found in the region.
@end table

@kindex M-'
@findex abbrev-prefix-mark
  You may wish to expand an abbrev with a prefix attached.  For example,
if @samp{cnst} expands into @samp{construction}, you may want to use it
to enter @samp{reconstruction}.  It does not work to type @kbd{recnst},
because that is not necessarily a defined abbrev.  Instead, you can use
the command @kbd{M-'} (@code{abbrev-prefix-mark}) between the prefix
@samp{re} and the abbrev @samp{cnst}.  First, insert @samp{re}.  Then
type @kbd{M-'}; this inserts a minus sign in the buffer to indicate that
it has done its work.  Then insert the abbrev @samp{cnst}.  The buffer
now contains @samp{re-cnst}.  Now insert a punctuation character to
expand the abbrev @samp{cnst} into @samp{construction}.  The minus sign
is deleted at this point by @kbd{M-'}.  The resulting text is the
desired @samp{reconstruction}.@refill

  If you actually want the text of the abbrev in the buffer, rather than
its expansion, insert the following punctuation with @kbd{C-q}.  Thus,
@kbd{foo C-q -} leaves @samp{foo-} in the buffer.

@findex unexpand-abbrev
  If you expand an abbrev by mistake, you can undo the expansion (replace
the expansion by the original abbrev text) with @kbd{M-x unexpand-abbrev}.
You can also use @kbd{C-_} (@code{undo}) to undo the expansion; but that
will first undo the insertion of the punctuation character.

@findex expand-region-abbrevs
  @kbd{M-x expand-region-abbrevs} searches through the region for defined
abbrevs, and  offers to replace each one it finds with its expansion.
This command is useful if you have typed text using abbrevs but forgot
to turn on Abbrev mode first.  It may also be useful together with a
special set of abbrev definitions for making several global replacements at
once.  The command is effective even if Abbrev mode is not enabled.

@node Editing Abbrevs, Saving Abbrevs, Expanding Abbrevs, Abbrevs
@section Examining and Editing Abbrevs

@table @kbd
@item M-x list-abbrevs
Print a list of all abbrev definitions.
@item M-x edit-abbrevs
Edit a list of abbrevs; you can add, alter, or remove definitions.
@end table

@findex list-abbrevs
  The output from @kbd{M-x list-abbrevs} looks like this:

@example
(lisp-mode-abbrev-table)
"dk"           0    "define-key"
(global-abbrev-table)
"dfn"          0    "definition"
@end example

@noindent
(Some blank lines of no semantic significance, and some other abbrev
tables, have been omitted.)

  A line containing a name in parentheses is the header for abbrevs in a
particular abbrev table; @code{global-abbrev-table} contains all the global
abbrevs, and the other abbrev tables that are named after major modes
contain the mode-specific abbrevs.

  Within each abbrev table, each non-blank line defines one abbrev.  The
word at the beginning is the abbrev.  The number that appears is the number
of times the abbrev has been expanded.  Emacs keeps track of this to help
you see which abbrevs you actually use, in case you want to eliminate
those that you don't use often.  The string at the end of the line is the
expansion.

@findex edit-abbrevs
@kindex C-c C-c (Edit Abbrevs)
@findex edit-abbrevs-redefine
  @kbd{M-x edit-abbrevs} allows you to add, change or kill abbrev
definitions by editing a list of them in an Emacs buffer.  The list has
the format described above.  The buffer of abbrevs is called
@samp{*Abbrevs*}, and is in Edit-Abbrevs mode.  This mode redefines the
key @kbd{C-c C-c} to install the abbrev definitions as specified in the
buffer.  The  @code{edit-abbrevs-redefine} command does this.
Any abbrevs not described in the buffer are eliminated when this is
done.

  @code{edit-abbrevs} is actually the same as @code{list-abbrevs}, except
that it selects the buffer @samp{*Abbrevs*} whereas @code{list-abbrevs}
merely displays it in another window.

@node Saving Abbrevs, Dynamic Abbrevs, Editing Abbrevs, Abbrevs
@section Saving Abbrevs

  These commands allow you to keep abbrev definitions between editing
sessions.

@table @kbd
@item M-x write-abbrev-file
Write a file describing all defined abbrevs.
@item M-x read-abbrev-file
Read such an abbrev file and define abbrevs as specified there.
@item M-x quietly-read-abbrev-file
Similar, but do not display a message about what is going on.
@item M-x define-abbrevs
Define abbrevs from buffer.
@item M-x insert-abbrevs
Insert all abbrevs and their expansions into the buffer.
@end table

@findex write-abbrev-file
  Use @kbd{M-x write-abbrev-file} to save abbrev definitions for use in
a later session.  The command reads a file name using the minibuffer and
writes a description of all current abbrev definitions into the
specified file.  The text stored in the file looks like the output of
@kbd{M-x list-abbrevs}.

@findex read-abbrev-file
@findex quietly-read-abbrev-file
@vindex abbrev-file-name
  @kbd{M-x read-abbrev-file} prompts for a file name using the
minibuffer and reads the specified file, defining abbrevs according to
its contents.  @kbd{M-x quietly-read-abbrev-file} is the same but does
not display a message in the echo area; it is actually useful primarily
in the init file.  @xref{Init File}. If you give an empty argument to
either of these functions, the file name Emacs uses is the value of the
variable @code{abbrev-file-name}, which is by default
@code{"~/.abbrev_defs"}.

@vindex save-abbrevs
  Emacs offers to save abbrevs automatically if you have changed any of
them, whenever it offers to save all files (for @kbd{C-x s} or @kbd{C-x
C-c}).  Set the variable @code{save-abbrevs} to @code{nil} to inhibit
this feature.

@findex insert-abbrevs
@findex define-abbrevs
  The commands @kbd{M-x insert-abbrevs} and @kbd{M-x define-abbrevs} are
similar to the previous commands but work on text in an Emacs buffer.
@kbd{M-x insert-abbrevs} inserts text into the current buffer before point,
describing all current abbrev definitions; @kbd{M-x define-abbrevs} parses
the entire current buffer and defines abbrevs accordingly.@refill

@node Dynamic Abbrevs,, Saving Abbrevs, Abbrevs
@section Dynamic Abbrev Expansion

  The abbrev facility described above operates automatically as you insert
text, but all abbrevs must be defined explicitly.  By contrast,
@dfn{dynamic abbrevs} allow the meanings of abbrevs to be determined
automatically from the contents of the buffer, but dynamic abbrev expansion
happens only when you request it explicitly.

@kindex M-/
@findex dabbrev-expand
@table @kbd
@item M-/
Expand the word in the buffer before point as a @dfn{dynamic abbrev},
by searching in the buffer for words starting with that abbreviation
(@code{dabbrev-expand}).
@end table

  For example, if the buffer contains @samp{does this follow } and you type
@kbd{f o M-/}, the effect is to insert @samp{follow} because that is the
last word in the buffer that starts with @samp{fo}.  A numeric argument to
@kbd{M-/} says to take the second, third, etc.@: distinct expansion found
looking backward from point.  Repeating @kbd{M-/} searches for an
alternative expansion by looking farther back.  After the entire buffer
before point has been considered, the buffer after point is searched.

  Dynamic abbrev expansion is completely independent of Abbrev mode; the
expansion of a word with @kbd{M-/} is completely independent of whether it
has a definition as an ordinary abbrev.


code:
@c This is part of the XEmacs manual.
@c Copyright (C) 1985, 86, 87, 93, 94, 95, 1997 Free Software Foundation, Inc.
@c See file xemacs.texi for copying conditions.
@node Basic, Undo, Packages, Top
@chapter Basic Editing Commands

@kindex C-h t
@findex help-with-tutorial
  We now give the basics of how to enter text, make corrections, and
save the text in a file.  If this material is new to you, you might
learn it more easily by running the Emacs learn-by-doing tutorial.  To
use the tutorial, run Emacs and type @kbd{Control-h t}
(@code{help-with-tutorial}).  You can also use @b{Tutorials} item from
the @b{Help} menu.

XEmacs comes with many translations of tutorial.  If your XEmacs is with
MULE and you set up language environment correctly, XEmacs chooses right
tutorial when available (@pxref{Language Environments}).  If you want
specific translation, give @kbd{C-h t} a prefix argument, like @kbd{C-u
C-h t}.

  To clear the screen and redisplay, type @kbd{C-l} (@code{recenter}).

@menu

* Inserting Text::      Inserting text by simply typing it.
* Moving Point::        How to move the cursor to the place where you want to
			  change something.
* Erasing::	        Deleting and killing text.
* Files: Basic Files.   Visiting, creating, and saving files.
* Help: Basic Help.     Asking what a character does.
* Blank Lines::	        Commands to make or delete blank lines.
* Continuation Lines::  Lines too wide for the screen.
* Position Info::       What page, line, row, or column is point on?
* Arguments::	        Numeric arguments for repeating a command.
@c * Repeating::           A short-cut for repeating the previous command.
@end menu

@node Inserting Text, Moving Point, , Basic
@section Inserting Text

@cindex insertion
@cindex point
@cindex cursor
@cindex graphic characters
  To insert printing characters into the text you are editing, just type
them.  This inserts the characters you type into the buffer at the
cursor (that is, at @dfn{point}; @pxref{Point}).  The cursor moves
forward, and any text after the cursor moves forward too.  If the text
in the buffer is @samp{FOOBAR}, with the cursor before the @samp{B},
then if you type @kbd{XX}, you get @samp{FOOXXBAR}, with the cursor
still before the @samp{B}.

@kindex BS
@cindex deletion
   To @dfn{delete} text you have just inserted, use @key{BS}.  @key{BS}
deletes the character @emph{before} the cursor (not the one that the
cursor is on top of or under; that is the character @var{after} the
cursor).  The cursor and all characters after it move backwards.
Therefore, if you type a printing character and then type @key{BS}, they
cancel out.

@kindex RET
@cindex newline
   To end a line and start typing a new one, type @key{RET}.  This
inserts a newline character in the buffer.  If point is in the middle of
a line, @key{RET} splits the line.  Typing @key{DEL} when the cursor is
at the beginning of a line deletes the preceding newline, thus joining
the line with the preceding line.

  Emacs can split lines automatically when they become too long, if you
turn on a special minor mode called @dfn{Auto Fill} mode.
@xref{Filling}, for how to use Auto Fill mode.

  If you prefer to have text characters replace (overwrite) existing
text rather than shove it to the right, you can enable Overwrite mode,
a minor mode.  @xref{Minor Modes}.

@cindex quoting
@kindex C-q
@findex quoted-insert
  Direct insertion works for printing characters and @key{SPC}, but other
characters act as editing commands and do not insert themselves.  If you
need to insert a control character or a character whose code is above 200
octal, you must @dfn{quote} it by typing the character @kbd{Control-q}
(@code{quoted-insert}) first.  (This character's name is normally written
@kbd{C-q} for short.)  There are two ways to use @kbd{C-q}:

@itemize @bullet
@item
@kbd{C-q} followed by any non-graphic character (even @kbd{C-g})
inserts that character.

@item
@kbd{C-q} followed by a sequence of octal digits inserts the character
with the specified octal character code.  You can use any number of
octal digits; any non-digit terminates the sequence.  If the terminating
character is @key{RET}, it serves only to terminate the sequence; any
other non-digit is itself used as input after terminating the sequence.
(The use of octal sequences is disabled in ordinary non-binary Overwrite
mode, to give you a convenient way to insert a digit instead of
overwriting with it.)
@end itemize

@noindent
A numeric argument to @kbd{C-q} specifies how many copies of the quoted
character should be inserted (@pxref{Arguments}).

@findex backward-or-forward-delete-char
@findex newline
@findex self-insert
  Customization information: @key{DEL}, in most modes, runs the command
@code{backward-or-forward-delete-char}; @key{RET} runs the command
@code{newline}, and self-inserting printing characters run the command
@code{self-insert}, which inserts whatever character was typed to invoke
it.  Some major modes rebind @key{DEL} to other commands.

@node Moving Point, Erasing, Inserting Text, Basic
@section Changing the Location of Point

@cindex arrow keys
@kindex LEFT
@kindex RIGHT
@kindex UP
@kindex DOWN
@cindex moving point
@cindex movement
@cindex cursor motion
@cindex moving the cursor
  To do more than insert characters, you have to know how to move point
(@pxref{Point}).  The simplest way to do this is with arrow keys, or by
clicking the left mouse button where you want to move to.

  NOTE: Many of the following commands have two versions, one that uses
the function keys (e.g. @key{LEFT} or @key{END}) and one that doesn't.
The former versions may only be available on X terminals (i.e. not on
TTY's), but the latter are available on all terminals.

@kindex C-a
@kindex C-e
@kindex C-f
@kindex C-b
@kindex C-n
@kindex C-p
@kindex C-l
@kindex C-t
@kindex C-v
@kindex M-v
@kindex M->
@kindex M-<
@kindex M-r
@kindex LEFT
@kindex RIGHT
@kindex UP
@kindex DOWN
@kindex HOME
@kindex END
@kindex PGUP
@kindex PGDN
@kindex C-LEFT
@kindex C-RIGHT
@kindex C-HOME
@kindex C-END
@findex beginning-of-line
@findex end-of-line
@findex forward-char
@findex backward-char
@findex next-line
@findex previous-line
@findex recenter
@findex transpose-chars
@findex beginning-of-buffer
@findex end-of-buffer
@findex goto-char
@findex goto-line
@findex move-to-window-line
@table @kbd
@item C-a
@itemx HOME
Move to the beginning of the line (@code{beginning-of-line}).
@item C-e
@itemx END
Move to the end of the line (@code{end-of-line}).
@item C-f
@itemx RIGHT
Move forward one character (@code{forward-char}).
@item C-b
@itemx LEFT
Move backward one character (@code{backward-char}).
@item M-f
@itemx C-RIGHT
Move forward one word (@code{forward-word}).
@item M-b
@itemx C-LEFT
Move backward one word (@code{backward-word}).
@item C-n
@itemx DOWN
Move down one line, vertically (@code{next-line}).  This command
attempts to keep the horizontal position unchanged, so if you start in
the middle of one line, you end in the middle of the next.  When on the
last line of text, @kbd{C-n} creates a new line and moves onto it.
@item C-p
@itemx UP
Move up one line, vertically (@code{previous-line}).
@item C-v
@itemx PGDN
Move down one page, vertically (@code{scroll-up}).
@item M-v
@itemx PGUP
Move up one page, vertically (@code{scroll-down}).
@item C-l
Clear the frame and reprint everything (@code{recenter}).  Text moves
on the frame to bring point to the center of the window.
@item M-r
Move point to left margin, vertically centered in the window
(@code{move-to-window-line}).  Text does not move on the screen.

A numeric argument says which screen line to place point on.  It counts
screen lines down from the top of the window (zero for the top line).  A
negative argument counts lines from the bottom (@minus{}1 for the bottom
line).
@item C-t
Transpose two characters, the ones before and after the cursor
(@code{transpose-chars}).
@item M-<
@itemx C-HOME
Move to the top of the buffer (@code{beginning-of-buffer}).  With
numeric argument @var{n}, move to @var{n}/10 of the way from the top.
@xref{Arguments}, for more information on numeric arguments.@refill
@item M->
@itemx C-END
Move to the end of the buffer (@code{end-of-buffer}).
@item M-x goto-char
Read a number @var{n} and move point to buffer position @var{n}.
Position 1 is the beginning of the buffer.
@item M-g
Read a number @var{n} and move point to line number @var{n}
(@code{goto-line}).  Line 1 is the beginning of the buffer.
@c @item C-x C-n
@item M-x set-goal-column
@findex set-goal-column
Use the current column of point as the @dfn{semi-permanent goal column} for
@kbd{C-n} and @kbd{C-p} (@code{set-goal-column}).  Henceforth, those
commands always move to this column in each line moved into, or as
close as possible given the contents of the line.  This goal column remains
in effect until canceled.
@c @item C-u C-x C-n
@item C-u M-x set-goal-column
Cancel the goal column.  Henceforth, @kbd{C-n} and @kbd{C-p} once
again try to avoid changing the horizontal position, as usual.
@end table

@vindex track-eol
  If you set the variable @code{track-eol} to a non-@code{nil} value,
then @kbd{C-n} and @kbd{C-p} when at the end of the starting line move
to the end of another line.  Normally, @code{track-eol} is @code{nil}.
@xref{Variables}, for how to set variables such as @code{track-eol}.

@vindex next-line-add-newlines
  Normally, @kbd{C-n} on the last line of a buffer appends a newline to
it.  If the variable @code{next-line-add-newlines} is @code{nil}, then
@kbd{C-n} gets an error instead (like @kbd{C-p} on the first line).

@node Erasing, Basic Files, Moving Point, Basic
@section Erasing Text

@table @kbd
@item @key{DEL}
Delete the character before or after point
(@code{backward-or-forward-delete-char}).  You can customize
this behavior by setting the variable @code{delete-key-deletes-forward}.
@item C-d
Delete the character after point (@code{delete-char}).
@item C-k
Kill to the end of the line (@code{kill-line}).
@item M-d
Kill forward to the end of the next word (@code{kill-word}).
@item M-@key{DEL}
Kill back to the beginning of the previous word
(@code{backward-kill-word}).
@end table

@cindex killing characters and lines
@cindex deleting characters and lines
@cindex erasing characters and lines
  You already know about the @key{DEL} key which deletes the character
before point (that is, before the cursor).  Another key, @kbd{Control-d}
(@kbd{C-d} for short), deletes the character after point (that is, the
character that the cursor is on).  This shifts the rest of the text on
the line to the left.  If you type @kbd{C-d} at the end of a line, it
joins together that line and the next line.

  To erase a larger amount of text, use the @kbd{C-k} key, which kills a
line at a time.  If you type @kbd{C-k} at the beginning or middle of a
line, it kills all the text up to the end of the line.  If you type
@kbd{C-k} at the end of a line, it joins that line and the next line.

  @xref{Killing}, for more flexible ways of killing text.

@node Basic Files, Basic Help, Erasing, Basic
@section Files

@cindex files
  The commands described above are sufficient for creating and altering
text in an Emacs buffer; the more advanced Emacs commands just make
things easier.  But to keep any text permanently you must put it in a
@dfn{file}.  Files are named units of text which are stored by the
operating system for you to retrieve later by name.  To look at or use
the contents of a file in any way, including editing the file with
Emacs, you must specify the file name.

  Consider a file named @file{/usr/rms/foo.c}.  To begin editing
this file from Emacs, type:

@example
C-x C-f /usr/rms/foo.c @key{RET}
@end example

@noindent
Here the file name is given as an @dfn{argument} to the command @kbd{C-x
C-f} (@code{find-file}).  That command uses the @dfn{minibuffer} to
read the argument, and you type @key{RET} to terminate the argument
(@pxref{Minibuffer}).

  You can also use the @b{Open...} menu item from the @b{File} menu, then
type the name of the file to the prompt.

  Emacs obeys the command by @dfn{visiting} the file: creating a buffer,
copying the contents of the file into the buffer, and then displaying
the buffer for you to edit.  If you alter the text, you can @dfn{save}
the new text in the file by typing @kbd{C-x C-s} (@code{save-buffer}) or
choosing @b{Save Buffer} from the @b{File} menu.  This makes the changes
permanent by copying the altered buffer contents back into the file
@file{/usr/rms/foo.c}.  Until you save, the changes exist only inside
Emacs, and the file @file{foo.c} is unaltered.

  To create a file, visit the file with @kbd{C-x C-f} as if it already
existed or choose @b{Open...} from the @b{File} menu and provide the
name for the new file.  Emacs will create an empty buffer in which you
can insert the text you want to put in the file.  When you save the
buffer with @kbd{C-x C-s}, or by choosing @b{Save Buffer} from the
@b{File} menu, the file is created.

  To learn more about using files, @xref{Files}.

@node Basic Help, Blank Lines, Basic Files, Basic
@section Help

@cindex getting help with keys
  If you forget what a key does, you can find out with the Help
character, which is @kbd{C-h} (or @key{F1}, which is an alias for
@kbd{C-h}).  Type @kbd{C-h k} followed by the key you want to know
about; for example, @kbd{C-h k C-n} tells you all about what @kbd{C-n}
does.  @kbd{C-h} is a prefix key; @kbd{C-h k} is just one of its
subcommands (the command @code{describe-key}).  The other subcommands of
@kbd{C-h} provide different kinds of help.  Type @kbd{C-h} twice to get
a description of all the help facilities.  @xref{Help}.

@node Blank Lines, Continuation Lines, Basic Help, Basic
@section Blank Lines

@cindex inserting blank lines
@cindex deleting blank lines
  Here are special commands and techniques for putting in and taking out
blank lines.

@c widecommands
@table @kbd
@item C-o
Insert one or more blank lines after the cursor (@code{open-line}).
@item C-x C-o
Delete all but one of many consecutive blank lines
(@code{delete-blank-lines}).
@end table

@kindex C-o
@kindex C-x C-o
@cindex blank lines
@findex open-line
@findex delete-blank-lines
  When you want to insert a new line of text before an existing line, you
can do it by typing the new line of text, followed by @key{RET}.
However, it may be easier to see what you are doing if you first make a
blank line and then insert the desired text into it.  This is easy to do
using the key @kbd{C-o} (@code{open-line}), which inserts a newline
after point but leaves point in front of the newline.  After @kbd{C-o},
type the text for the new line.  @kbd{C-o F O O} has the same effect as
@w{@kbd{F O O @key{RET}}}, except for the final location of point.

  You can make several blank lines by typing @kbd{C-o} several times, or
by giving it a numeric argument to tell it how many blank lines to make.
@xref{Arguments}, for how.  If you have a fill prefix, then @kbd{C-o}
command inserts the fill prefix on the new line, when you use it at the
beginning of a line.  @xref{Fill Prefix}.

  The easy way to get rid of extra blank lines is with the command
@kbd{C-x C-o} (@code{delete-blank-lines}).  @kbd{C-x C-o} in a run of
several blank lines deletes all but one of them.  @kbd{C-x C-o} on a
solitary blank line deletes that blank line.  When point is on a
nonblank line, @kbd{C-x C-o} deletes any blank lines following that
nonblank line.

@node Continuation Lines, Position Info, Blank Lines, Basic
@section Continuation Lines

@cindex continuation line
@cindex wrapping
@cindex line wrapping
  If you add too many characters to one line without breaking it with
@key{RET}, the line will grow to occupy two (or more) lines on the
screen, with a curved arrow at the extreme right margin of all but the
last of them.  The curved arrow says that the following screen line is
not really a distinct line in the text, but just the @dfn{continuation}
of a line too long to fit the screen.  Continuation is also called
@dfn{line wrapping}.

  Sometimes it is nice to have Emacs insert newlines automatically when
a line gets too long.  Continuation on the screen does not do that.  Use
Auto Fill mode (@pxref{Filling}) if that's what you want.

@vindex truncate-lines
@cindex truncation
  Instead of continuation, long lines can be displayed by @dfn{truncation}.
This means that all the characters that do not fit in the width of the
frame or window do not appear at all.  They remain in the buffer,
temporarily invisible.  Right arrow in the last column (instead of the
curved arrow) inform you that truncation is in effect.

  Truncation instead of continuation happens whenever horizontal
scrolling is in use, and optionally in all side-by-side windows
(@pxref{Windows}).  You can enable truncation for a particular buffer by
setting the variable @code{truncate-lines} to non-@code{nil} in that
buffer.  (@xref{Variables}.)  Altering the value of
@code{truncate-lines} makes it local to the current buffer; until that
time, the default value is in effect.  The default is initially
@code{nil}.  @xref{Locals}.

  @xref{Display Vars}, for additional variables that affect how text is
displayed.

@node Position Info, Arguments, Continuation Lines, Basic
@section Cursor Position Information

  If you are accustomed to other display editors, you may be surprised
that Emacs does not always display the page number or line number of
point in the mode line.  In Emacs, this information is only rarely
needed, and a number of commands are available to compute and print it.
Since text is stored in a way that makes it difficult to compute the
information, it is not displayed all the time.

@table @kbd
@item M-x what-page
Print page number of point, and line number within page.
@item M-x what-line
Print line number of point in the buffer.
@item M-x line-number-mode
Toggle automatic display of current line number.
@item M-=
Print number of lines and characters in the current region
(@code{count-lines-region}).  @xref{Mark}, for information about the
region.
@item C-x =
Print character code of character after point, character position of
point, and column of point (@code{what-cursor-position}).
@end table

@findex what-page
@findex what-line
@cindex line number
@cindex page number
@kindex M-=
@findex count-lines-region

  There are several commands for printing line numbers:

@itemize @bullet
@item
@kbd{M-x what-line} counts lines from the beginning of the file and
prints the line number point is on.  The first line of the file is line
number 1.  You can use these numbers as arguments to @kbd{M-x
goto-line}.
@item
@kbd{M-x what-page} counts pages from the beginning of the file, and
counts lines within the page, printing both of them.  @xref{Pages}, for
the command @kbd{C-x l}, which counts the lines in the current page.
@item
@kbd{M-=} (@code{count-lines-region}) prints the number of lines in the
region (@pxref{Mark}).  @xref{Pages}, for the command @kbd{C-x l} which
counts the lines in the
@end itemize

@kindex C-x =
@findex what-cursor-position
  The command @kbd{C-x =} (@code{what-cursor-position}) can be used to find out
the column that the cursor is in, and other miscellaneous information about
point.  It prints a line in the echo area that looks like this:

@example
Char: c (0143, 99, 0x63)  point=18862 of 24800(76%)  column 53
@end example

@noindent
(In fact, this is the output produced when point is before @samp{column
53} in the example.)

  The four values after @samp{Char:} describe the character that follows
point, first by showing it and then by giving its character code in
octal, decimal and hex.

  @samp{point=} is followed by the position of point expressed as a character
count.  The front of the buffer counts as position 1, one character later
as 2, and so on.  The next, larger number is the total number of characters
in the buffer.  Afterward in parentheses comes the position expressed as a
percentage of the total size.

  @samp{column} is followed by the horizontal position of point, in
columns from the left edge of the window.

  If the buffer has been narrowed, making some of the text at the
beginning and the end temporarily invisible, @kbd{C-x =} prints
additional text describing the current visible range.  For example, it
might say:

@smallexample
Char: c (0143, 99, 0x63)  point=19674 of 24575(80%) <19591 - 19703>  column 69
@end smallexample

@noindent
where the two extra numbers give the smallest and largest character position
that point is allowed to assume.  The characters between those two positions
are the visible ones.  @xref{Narrowing}.

  If point is at the end of the buffer (or the end of the visible part),
@kbd{C-x =} omits any description of the character after point.
The output looks like

@smallexample
point=563026 of 563025(100%)  column 0
@end smallexample

@node Arguments,, Position Info, Basic
@section Numeric Arguments
@cindex numeric arguments

  In mathematics and computer usage, the word @dfn{argument} means
``data provided to a function or operation.''  Any Emacs command can be
given a @dfn{numeric argument} (also called a @dfn{prefix argument}).
Some commands interpret the argument as a repetition count.  For
example, giving an argument of ten to the key @kbd{C-f} (the command
@code{forward-char}, move forward one character) moves forward ten
characters.  With these commands, no argument is equivalent to an
argument of one.  Negative arguments are allowed.  Often they tell a
command to move or act  in the opposite direction.

@kindex M-1
@kindex M-@t{-}
@findex digit-argument
@findex negative-argument
  If your keyboard has a @key{META} key (labelled with a diamond on
Sun-type keyboards and labelled @samp{Alt} on some other keyboards), the
easiest way to specify a numeric argument is to type digits and/or a
minus sign while holding down the @key{META} key.  For example,
@example
M-5 C-n
@end example
@noindent
would move down five lines.  The characters @kbd{Meta-1}, @kbd{Meta-2},
and so on, as well as @kbd{Meta--}, do this because they are keys bound
to commands (@code{digit-argument} and @code{negative-argument}) that
are defined to contribute to an argument for the next command.  Digits
and @kbd{-} modified with Control, or Control and Meta, also specify
numeric arguments.

@kindex C-u
@findex universal-argument
  Another way of specifying an argument is to use the @kbd{C-u}
(@code{universal-argument}) command followed by the digits of the
argument.  With @kbd{C-u}, you can type the argument digits without
holding down modifier keys; @kbd{C-u} works on all terminals.  To type a
negative argument, type a minus sign after @kbd{C-u}.  Just a minus sign
without digits normally means @minus{}1.

  @kbd{C-u} followed by a character which is neither a digit nor a minus
sign has the special meaning of ``multiply by four''.  It multiplies the
argument for the next command by four.  @kbd{C-u} twice multiplies it by
sixteen.  Thus, @kbd{C-u C-u C-f} moves forward sixteen characters.  This
is a good way to move forward ``fast'', since it moves about 1/5 of a line
in the usual size frame.  Other useful combinations are @kbd{C-u C-n},
@kbd{C-u C-u C-n} (move down a good fraction of a frame), @kbd{C-u C-u
C-o} (make ``a lot'' of blank lines), and @kbd{C-u C-k} (kill four
lines).

  Some commands care only about whether there is an argument and not about
its value.  For example, the command @kbd{M-q} (@code{fill-paragraph}) with
no argument fills text; with an argument, it justifies the text as well.
(@xref{Filling}, for more information on @kbd{M-q}.)  Just @kbd{C-u} is a
handy way of providing an argument for such commands.

  Some commands use the value of the argument as a repeat count, but do
something peculiar when there is no argument.  For example, the command
@kbd{C-k} (@code{kill-line}) with argument @var{n} kills @var{n} lines,
including their terminating newlines.  But @kbd{C-k} with no argument is
special: it kills the text up to the next newline, or, if point is right at
the end of the line, it kills the newline itself.  Thus, two @kbd{C-k}
commands with no arguments can kill a non-blank line, just like @kbd{C-k}
with an argument of one.  (@xref{Killing}, for more information on
@kbd{C-k}.)

  A few commands treat a plain @kbd{C-u} differently from an ordinary
argument.  A few others may treat an argument of just a minus sign
differently from an argument of @minus{}1.  These unusual cases are
described when they come up; they are always for reasons of convenience
of use of the individual command.

  You can use a numeric argument to insert multiple copies of a
character.  This is straightforward unless the character is a digit; for
example, @kbd{C-u 6 4 a} inserts 64 copies of the character @samp{a}.
But this does not work for inserting digits; @kbd{C-u 6 4 1} specifies
an argument of 641, rather than inserting anything.  To separate the
digit to insert from the argument, type another @kbd{C-u}; for example,
@kbd{C-u 6 4 C-u 1} does insert 64 copies of the character @samp{1}.

  We use the term ``prefix argument'' as well as ``numeric argument'' to
emphasize that you type the argument before the command, and to
distinguish these arguments from minibuffer arguments that come after
the command.

@ignore
@node Repeating
@section Repeating a Command
@cindex repeating a command

@kindex C-x z
@findex repeat
  The command @kbd{C-x z} (@code{repeat}) provides another way to repeat
an Emacs command many times.  This command repeats the previous Emacs
command, whatever that was.  Repeating a command uses the same arguments
that were used before; it does not read new arguments each time.

  To repeat the command more than once, type additional @kbd{z}'s: each
@kbd{z} repeats the command one more time.  Repetition ends when you
type a character other than @kbd{z}, or press a mouse button.

  For example, suppose you type @kbd{C-u 2 0 C-d} to delete 20
characters.  You can repeat that command (including its argument) three
additional times, to delete a total of 80 characters, by typing @kbd{C-x
z z z}.  The first @kbd{C-x z} repeats the command once, and each
subsequent @kbd{z} repeats it once again.

@end ignore