JezK
Edit File: _0040group.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <!-- Created by GNU Texinfo 6.8, https://www.gnu.org/software/texinfo/ --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- This manual is for GNU Texinfo (version 6.8, 8 June 2021), a documentation system that can produce both online information and a printed manual from a single source using semantic markup. Copyright (C) 1988, 1990-1993, 1995-1999, 2001-2021 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". --> <title>@group (GNU Texinfo 6.8)</title> <meta name="description" content="@group (GNU Texinfo 6.8)"> <meta name="keywords" content="@group (GNU Texinfo 6.8)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="texi2any"> <meta name="viewport" content="width=device-width,initial-scale=1"> <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="Breaks.html" rel="up" title="Breaks"> <link href="_0040need.html" rel="next" title="@need"> <link href="_0040page.html" rel="prev" title="@page"> <style type="text/css"> <!-- a.copiable-anchor {visibility: hidden; text-decoration: none; line-height: 0em} a.summary-letter {text-decoration: none} blockquote.indentedblock {margin-right: 0em} div.display {margin-left: 3.2em} div.example {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} span:hover a.copiable-anchor {visibility: visible} ul.no-bullet {list-style: none} --> </style> </head> <body lang="en"> <div class="section" id="g_t_0040group"> <div class="header"> <p> Next: <a href="_0040need.html" accesskey="n" rel="next"><code>@need <var>mils</var></code>: Prevent Page Breaks</a>, Previous: <a href="_0040page.html" accesskey="p" rel="prev"><code>@page</code>: Start a New Page</a>, Up: <a href="Breaks.html" accesskey="u" rel="up">Forcing and Preventing Breaks</a> [<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="g_t_0040group_003a-Prevent-Page-Breaks"></span><h3 class="section">12.9 <code>@group</code>: Prevent Page Breaks</h3> <span id="group"></span><span id="index-group"></span> <span id="index-Group-_0028hold-text-together-vertically_0029"></span> <span id="index-Holding-text-together-vertically"></span> <span id="index-Vertically-holding-text-together"></span> <p>The <code>@group</code> command (on a line by itself) is used inside an <code>@example</code> or similar construct to begin an unsplittable vertical group, which will appear entirely on one page in the printed output. The group is terminated by a line containing only <code>@end group</code>. These two lines produce no output of their own, and in the Info file output they have no effect at all. </p> <p>Although <code>@group</code> would make sense conceptually in a wide variety of contexts, its current implementation works reliably only within <code>@example</code> and variants, and within <code>@display</code>, <code>@format</code>, <code>@flushleft</code> and <code>@flushright</code>. See <a href="Quotations-and-Examples.html">Quotations and Examples</a>. (What all these commands have in common is that each line of input produces a line of output.) In other contexts, <code>@group</code> can cause anomalous vertical spacing. </p> <p>This formatting requirement means that you should write: </p> <div class="example"> <pre class="example">@example @group … @end group @end example </pre></div> <p>with the <code>@group</code> and <code>@end group</code> commands inside the <code>@example</code> and <code>@end example</code> commands. </p> <p>The <code>@group</code> command is most often used to hold an example together on one page. In this Texinfo manual, more than 100 examples contain text that is enclosed between <code>@group</code> and <code>@end group</code>. </p> <p>If you forget to end a group, you may get strange and unfathomable error messages when you run TeX. This is because TeX keeps trying to put the rest of the Texinfo file onto the one page and does not start to generate error messages until it has processed considerable text. It is a good rule of thumb to look for a missing <code>@end group</code> if you get incomprehensible error messages in TeX. </p> </div> <hr> <div class="header"> <p> Next: <a href="_0040need.html"><code>@need <var>mils</var></code>: Prevent Page Breaks</a>, Previous: <a href="_0040page.html"><code>@page</code>: Start a New Page</a>, Up: <a href="Breaks.html">Forcing and Preventing Breaks</a> [<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>