Writing Manuals with Texinfo in Emacs

News

Learning Texinfo

  • Learn a bit about Texinfo
  • Start writing an example book or manual
  • Attempt to export the manual to different formats (HTML, PDF, ePUB, .info)
  • Take a look at Org Mode's Texinfo export backend

In Guix, run this command to enter a shell that makes it easy to run Texinfo!

guix shell texinfo texlive-scheme-small texlive-texinfo

Add this to your Emacs configuration to automatically load .info files in the Info viewer:

;; Load the info system for info files
(add-to-list 'auto-mode-alist '("\\.info\\'" . Info-on-current-buffer))

Alternatively, you can use the C-u C-h i key binding to be prompted for an info file to load. (Or C-u M-x info)

Generating Texinfo Output Files

makeinfo -D 'VERSION 6.6.6' -D 'UPDATED Jan 26, 2024' mymanual.texinfo
makeinfo --html --no-split mymanual.texinfo
makeinfo --pdf mymanual.texinfo

Document Contents

#+begin_src texinfo

\input texinfo @settitle Sample Manual 1.0

@copying This is a short example of a complete Texinfo file.

Copyright @copyright{} 2016 Free Software Foundation, Inc. @end copying

@titlepage @title Sample Title @page @vskip 0pt plus 1filll @insertcopying @end titlepage

@contents

@node Top @top System Crafters IRC Manual

This manual is for System Crafters IRC (version @value{VERSION}, @value{UPDATED}).

@menu

How to Join:: Where to find the System Crafters IRC.

Clients to Use:: Suggested IRC Clients

Concept Index:: Concept index.

Programming Index:: Programming index.

@end menu

@node How to Join @chapter How to Join

@cindex chapter, first @cindex index entry, another @findex hello-world This is the first chapter.

Here is a numbered list.

@enumerate @item This is the first item.

@item This is the second item. @end enumerate

@node First Section @section First Section

First section of first chapter.

@node Second Section @section Second Section

Second section of first chapter.

@node Clients to Use @chapter Clients to Use

@lisp (use-modules (guix inferior) (guix channels) (srfi srfi-1)) ;for 'first'

(define channels ;; This is the old revision from which we want to ;; extract guile-json. (list (channel (name 'guix) (url "https://git.savannah.gnu.org/git/guix.git") (commit "65956ad3526ba09e1f7a40722c96c6ef7c0936fe"))))

(define inferior ;; An inferior representing the above revision. (inferior-for-channels channels))

;; Now create a manifest with the current "guile" package ;; and the old "guile-json" package. (packages->manifest (list (first (lookup-inferior-packages inferior "guile-json")) (specification->package "guile"))) @end lisp

@node Concept Index @unnumbered Concept Index

@printindex cp

@node Programming Index @unnumbered Programming Index @printindex fn

@bye

#+end_src

Enjoyed this stream? Explore our hands-on courses for deeper, structured learning on Guile Scheme and more.

Get the System Crafters Newsletter
Updates on open source tools, tutorials, and community projects. We'll also occasionally let you know about new courses and resources.
Name (optional)
Email Address