### Basic @titlepage structure Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040titlepage.html A basic example showing the start of a title page using the @titlepage command. ```Texinfo @titlepage @title Sample Title ``` -------------------------------- ### Define an @example block Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040example.html An example of using the @example environment to display shell commands. ```texinfo @example cp foo @var{dest1}; \ cp foo @var{dest2} @end example ``` -------------------------------- ### Example @xref with Five Arguments Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Four-and-Five-Arguments.html An example of a five-argument @xref and its resulting Info output. ```Texinfo @xref{Electrical Effects, Lightning, Thunder and Lightning, weather, An Introduction to Meteorology}. ``` ```Info *Note Lightning: (weather)Electrical Effects. ``` -------------------------------- ### Info Index Entry Example Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Printing-Indices-_0026-Menus.html Example of an index entry as it appears in Info output. ```Info * First index entry: Top. (line 7) ``` -------------------------------- ### TeX output of @displaymath example Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Inserting-Math.html Shows the TeX math display that the @displaymath example produces, wrapped in \[ and \] delimiters. ```tex \[f(x) = {1\over\sigma\sqrt{2\pi}} e^{-{1\over2}\left({x-\mu\over\sigma}\right)^2} \] ``` -------------------------------- ### Rendered @example output Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040example.html The resulting output of the @example block, showing fixed-width font and indentation. ```text cp foo dest1; \ cp foo dest2 ``` -------------------------------- ### Marking Lisp code with @example lisp Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040lisp.html An alternative way to mark Lisp code by providing 'lisp' as an argument to the @example command. ```texinfo @example lisp Example lisp code @end example ``` -------------------------------- ### Rendered output of @defun example for apply Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Sample-Function-Definition.html The rendered output of the @defun example for the Lisp function 'apply', as it appears in the manual. It shows the function signature and the example usage with results and an error. ```lisp (setq f 'list) ⇒ list (apply f 'x 'y 'z) error→ Wrong type argument: listp, z (apply '+ 1 2 '(3 4)) ⇒ 10 (apply '+ '(1 2 3 4)) ⇒ 10 (apply 'append '((a b c) nil (x y z) nil)) ⇒ (a b c x y z) ``` -------------------------------- ### @format output example Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040format.html Shows the rendered output of the @format example, with text unindented and not filled. ```text This is an example of text written between a @format command and an @end format command. As you can see from this example, the @format command does not fill the text. ``` -------------------------------- ### Output of @w{ } indentation example Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040w.html The printed output of the previous example: six spaces followed by 'indentation.' ```text indentation. ``` -------------------------------- ### install-info synopsis Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Invoking-install_002dinfo.html Shows the general command-line syntax for install-info. The info-file and dir-file arguments are optional if the corresponding options are provided. ```bash install-info [option...] [info-file [dir-file]] ``` -------------------------------- ### Create a numbered list starting at a specific value Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040enumerate.html An example of an enumerated list starting at the number 3. ```texinfo @enumerate 3 @item Predisposing causes. @item Precipitating causes. @item Perpetuating causes. @end enumerate ``` -------------------------------- ### Example htmlxref.cnf entries for GNU hello manual Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/HTML-Xref-Configuration.html Example configuration lines from the canonical file defining variables and manual information for the GNU hello manual. Variable references like ${GS} are used in the urlprefix. ```text G = https://www.gnu.org GS = ${G}/software hello mono ${GS}/hello/manual/hello.html hello chapter ${GS}/hello/manual/html_chapter/ hello section ${GS}/hello/manual/html_section/ hello node ${GS}/hello/manual/html_node/ ``` -------------------------------- ### Create a default numbered list with @enumerate Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040enumerate.html An example of an enumerated list without arguments, which defaults to starting at 1. ```texinfo @enumerate @item Underlying causes. @item Proximate causes. @end enumerate ``` -------------------------------- ### Configure INFO_JS_DIR for JavaScript interface Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/HTML-Customization-Variables-List.html Example command to enable the experimental JavaScript browsing interface by specifying the output directory for interface files. ```bash texi2any --html -c INFO_JS_DIR=js manual.texi ``` -------------------------------- ### Set chapter to start on odd-numbered page Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040setchapternewpage.html Example of using the @setchapternewpage command to ensure each chapter begins on a fresh odd-numbered page. ```texinfo @setchapternewpage odd ``` -------------------------------- ### @chapter command example Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040chapter.html Place @chapter at the beginning of a line, followed by the chapter title on the same line. The chapter is numbered automatically starting from 1. ```texinfo @chapter Chapter Structuring ``` -------------------------------- ### Texinfo example using @nodedescription and @nodedescriptionblock Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Node-Descriptions.html Shows a Texinfo source with @node, @chapter, @section, and the two node description commands. The @nodedescriptionblock environment is used for a longer description. ```texinfo @node Tools @chapter Tools This chapter is on different tools you can use. @node Screwdrivers @nodedescription Flathead and Phillips. @section Screwdrivers This section is about screwdrivers. @node Drills @nodedescriptionblock Making holes in things with power screwdrivers, drill drivers, combi drills, impact drivers, hammer drills, breakers and demolition drills. @end nodedescriptionblock @section Drills This section is about drills. ``` -------------------------------- ### @image with height scaling example Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Image-Scaling.html Scales ridt.eps to one inch vertically with proportional width. Only effective in printed output; requires epsf.tex to be installed for TeX. ```texinfo @image{ridt,,1in} ``` -------------------------------- ### @need 800 example Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040need.html Shows the @need command with an argument of 800, which starts a new page in printed output if fewer than 800 mils remain on the current page. The command has no effect on non-paginated formats. ```texinfo @need 800 This paragraph is preceded by ... ``` -------------------------------- ### Example of a dir file menu Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Directory-File.html This snippet shows the structure of the top-level menu within the dir file, where each entry points to an Info file. ```text * Menu: * Info: (info). Documentation browsing system. * Emacs: (emacs). The extensible, self-documenting text editor. * Texinfo: (texinfo). With one source file, make either a printed manual using @TeX{} or an Info file. ... ``` -------------------------------- ### texi2any command with TREE_TRANSFORMATIONS=regenerate_master_menu Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Global-Customization-Variables.html Example command that updates the master menu in a document by setting TREE_TRANSFORMATIONS to regenerate_master_menu and outputting plaintexinfo format. Note that plaintexinfo output expands macros and conditionals, so differences must be removed before installing updates. ```shell texi2any \ -c TREE_TRANSFORMATIONS=regenerate_master_menu \ -c TEXINFO_OUTPUT_FORMAT=plaintexinfo \ mydoc.texi \ -o /tmp/out ``` -------------------------------- ### Pass custom options to texi2dvi using --Xopt Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/texi2any-Printed-Output.html Demonstrates how to use the --Xopt flag in texi2any to pass specific arguments to the underlying texi2dvi process. ```bash texi2any --Xopt -t --Xopt @afourpaper --pdf foo.texi ``` ```bash texi2dvi -t @afourpaper --pdf foo.texi ``` -------------------------------- ### Documenting an Operation with @defop Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Object_002dOriented-Methods.html Example of using the @defop command to describe an operation named 'expose' for the 'windows' class. ```Texinfo @defop Operation windows expose ``` -------------------------------- ### Basic @cartouche with @example Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040cartouche.html Surrounds a two-line example with a box with rounded corners. The example shows the @cartouche command wrapping an @example block. In Info output, @cartouche has no effect. ```texinfo @cartouche @example % pwd /usr/local/share/emacs @end example @end cartouche ``` -------------------------------- ### Output of basic @cartouche example Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040cartouche.html The output of the basic @cartouche example, showing the example content without the cartouche box in Info. ```text % pwd /usr/local/share/emacs ``` -------------------------------- ### Run Info-tagify Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Unsplit-and-Tagify.html After creating an unsplit Info file, run this command to create a tag table. ```text M-x Info-tagify ``` -------------------------------- ### Output of @exdent example Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040exdent.html The output produced by the @exdent example, showing the exdented line without indentation and the surrounding lines with normal example indentation. ```text This line follows an @example command. ``` ```text This line is exdented. ``` ```text This line follows the exdented line. The @end example comes on the next line. ``` -------------------------------- ### Included file example: foo.texi Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Sample-Include-File.html A sample of an included file containing a node and chapter content. ```texinfo @node First @chapter First Chapter Contents of first chapter ... ``` -------------------------------- ### Index Entry Placement Source: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Indexing-Commands.html Example showing that index entries should be placed before the visible material being indexed. ```Texinfo @cindex hello Hello, there! ```