Viewing File: /usr/share/doc/texinfo/html/Tag-and-Split-Files.html

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This manual is for GNU Texinfo (version 6.7, 23 September 2019),
a documentation system that can produce both online information and a
printed manual from a single source using semantic markup.

Copyright (C) 1988, 1990, 1991, 1992, 1993, 1995, 1996, 1997,
1998, 1999, 2001, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Free Software
Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts.  A copy of the license is included in the section entitled
"GNU Free Documentation License". -->
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Tag and Split Files (GNU Texinfo 6.7)</title>

<meta name="description" content="Tag and Split Files (GNU Texinfo 6.7)">
<meta name="keywords" content="Tag and Split Files (GNU Texinfo 6.7)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2any">
<link href="index.html" rel="start" title="Top">
<link href="Command-and-Variable-Index.html" rel="index" title="Command and Variable Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Creating-an-Info-File.html" rel="up" title="Creating an Info File">
<link href="Installing-an-Info-File.html" rel="next" title="Installing an Info File">
<link href="Batch-Formatting.html" rel="prev" title="Batch Formatting">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>


</head>

<body lang="en">
<span id="Tag-and-Split-Files"></span><div class="header">
<p>
Previous: <a href="Batch-Formatting.html" accesskey="p" rel="prev">Batch Formatting</a>, Up: <a href="Creating-an-Info-File.html" accesskey="u" rel="up">Creating an Info File</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Command-and-Variable-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<span id="Tag-Files-and-Split-Files"></span><h4 class="subsection">21.1.5 Tag Files and Split Files</h4>
<span id="index-Making-a-tag-table-automatically"></span>
<span id="index-Tag-table_002c-making-automatically"></span>

<p>If a Texinfo file has more than 30,000 bytes,
<code>texinfo-format-buffer</code> automatically creates a tag table
for its Info file; <code>makeinfo</code> always creates a tag table.  With
a <em>tag table</em>, Info can jump to new nodes more quickly than it can
otherwise.
</p>
<span id="index-Indirect-subfiles"></span>
<p>In addition, if the Texinfo file contains more than about 300,000
bytes, <code>texinfo-format-buffer</code> and <code>makeinfo</code> split the
large Info file into shorter <em>indirect</em> subfiles of about 300,000
bytes each.  Big files are split into smaller files so that Emacs does
not need to make a large buffer to hold the whole of a large Info
file; instead, Emacs allocates just enough memory for the small, split-off
file that is needed at the time.  This way, Emacs avoids wasting
memory when you run Info.  (Before splitting was implemented, Info
files were always kept short and <em>include files</em> were designed as
a way to create a single, large printed manual out of the smaller Info
files.  See <a href="Include-Files.html">Include Files</a>, for more information.  Include files are
still used for very large documents, such as <cite>The Emacs Lisp
Reference Manual</cite>, in which each chapter is a separate file.)
</p>
<p>When a file is split, Info itself makes use of a shortened version of
the original file that contains just the tag table and references to
the files that were split off.  The split-off files are called
<em>indirect</em> files.
</p>
<p>The split-off files have names that are created by appending &lsquo;<samp><span class="nolinebreak">-1</span></samp>&rsquo;<!-- /@w -->,
&lsquo;<samp><span class="nolinebreak">-2</span></samp>&rsquo;<!-- /@w -->, &lsquo;<samp><span class="nolinebreak">-3</span></samp>&rsquo;<!-- /@w --> and so on to the file name specified by the
<code>@setfilename</code> command.  The shortened version of the original file
continues to have the name specified by <code>@setfilename</code>.
</p>
<p>At one stage in writing this document, for example, the Info file was saved
as the file <samp>test-texinfo</samp> and that file looked like this:
</p>
<div class="example">
<pre class="example">Info file: test-texinfo,    -*-Text-*-
produced by texinfo-format-buffer
from file: new-texinfo-manual.texinfo

^_
Indirect:
test-texinfo-1: 102
test-texinfo-2: 50422
</pre><pre class="example">test-texinfo-3: 101300
^_^L
Tag table:
(Indirect)
Node: overview^?104
Node: info file^?1271
</pre><pre class="example">Node: printed manual^?4853
Node: conventions^?6855
&hellip;
</pre></div>

<p>(But <samp>test-texinfo</samp> had far more nodes than are shown here.)  Each of
the split-off, indirect files, <samp>test-texinfo-1</samp>,
<samp>test-texinfo-2</samp>, and <samp>test-texinfo-3</samp>, is listed in this file
after the line that says &lsquo;<samp>Indirect:</samp>&rsquo;.  The tag table is listed after
the line that says &lsquo;<samp>Tag table:</samp>&rsquo;.
</p>
<p>In the list of indirect files, the number following the file name
records the cumulative number of bytes in the preceding indirect
files, not counting the file list itself, the tag table, or any
permissions text in the first file.  In the tag table, the number
following the node name records the location of the beginning of the
node, in bytes from the beginning of the (unsplit) output.
</p>
<p>If you are using <code>texinfo-format-buffer</code> to create Info files,
you may want to run the <code>Info-validate</code> command.  (The
<code>makeinfo</code> command does such a good job on its own, you do not
need <code>Info-validate</code>.)  However, you cannot run the <kbd>M-x
Info-validate</kbd> node-checking command on indirect files.  For
information on how to prevent files from being split and how to
validate the structure of the nodes, see <a href="Using-Info_002dvalidate.html">Using <code>Info-validate</code></a>.
</p>

<hr>
<div class="header">
<p>
Previous: <a href="Batch-Formatting.html" accesskey="p" rel="prev">Batch Formatting</a>, Up: <a href="Creating-an-Info-File.html" accesskey="u" rel="up">Creating an Info File</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Command-and-Variable-Index.html" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>
Back to Directory File Manager