ArticleslgStudy

computer science

Texinfo

Texinfo is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Texinfo rather than just read about it. In short: Texinfo is a typesetting syntax used for generating documentation in both on-line and printed form (creating filetypes as dvi, html, pdf, etc., and a specific hypertext format, Info) with a single source file. It is implemented by a computer program released as free software of the same name, created and made available by the GNU Project from the Free Software Foundation.

Texinfo — main illustration
Texinfo — illustration

Key takeaways

  • Texinfo belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Texinfo to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Texinfo from memory before moving on to harder problems.

Reference excerpt

Texinfo is a typesetting syntax used for generating documentation in both on-line and printed form (creating filetypes as dvi, html, pdf, etc., and a specific hypertext format, Info) with a single source file. It is implemented by a computer program released as free software of the same name, created and made available by the GNU Project from the Free Software Foundation. The main purpose of Texinfo is to provide a way to easily typeset software manuals. Similar to the LaTeX syntax, all the normal features of a book, such as chapters, sections, cross references, tables and indices are available for use in documents. Using the various output generators that are available for Texinfo, it is possible to keep several documentation types up-to-date (such as on-line documentation provided via a Web site, and printed documentation, as generated using the TeX typesetting system) using only a single source file. The official Texinfo documentation states that the first syllable of "Texinfo" is pronounced so as to rhyme with "speck", not "hex"; this pronunciation is derived from the pronunciation of TeX, in which the X represents the Greek letter chi rather than the English letter x. The maintainers state that "Texinfo" should be written with only a capital "T" and the rest of the letters in lower case.

Output formats In order to make it possible for several documentation output formats to be updated all at once, upon changing the original Texinfo (.texi) source file, several syntax converters are available that can be used to generate translations of the Texinfo file into other formats. Most of these are created using the texi2any program, also known as makeinfo, which is part of the GNU Texinfo distribution.

HTML (Generated via texi2any --html.) As HTML is the standard language for documents presented on the World Wide Web, this output format can effectively be used to produce online documentation pages. The manual notes that the texi2any output is intentionally quite plain for maximum portability and accessibility. texi2any HTML output is highly customizable. DVI (Generated via texi2dvi.) The device independent file format is output by the TeX typesetting system, and can be used for generating device-specific commands that can be viewed or printed; for example, translation to PostScript (ps files). PDF (Generated via texi2dvi --pdf or texi2pdf.) Based on the PostScript language, this format was developed by Adobe Systems for portable document interchange. It can represent the exact appearance of a document and supports arbitrary scaling. It is intended to be platform-independent and can be viewed with a large variety of software. By default, Texinfo uses the pdftex program, a variant of TeX, to output PDF. LaTeX (Generated via texi2any --latex.) This is a typesetting system built on top of TeX. The LaTeX output can be further processed into DVI, PostScript, or PDF. Docbook (Generated via texi2any --docbook.) This is an XML-based markup language for technical documentation that bears some resemblance to Texinfo, in broad outlines. It is also possible to convert Docbook files to Texinfo, using the docbook2X program. EPUB (Generated via texi2any --epub3.) EPUB is a format designed for reading electronic books on portable devices. It is a derivative of HTML. XML (Generated via texi2any --xml.) Unlike all the other output formats, is a transliteration of the Texinfo source, rather than finished output. The purpose of the Texinfo XML output is to allow further processing by XML tools. Info (Generated via texi2any.) This is a specific format which essentially is a plain text transliteration of the original Texinfo source, with the addition of a few control characters to separate nodes and provide navigational elements for menus, cross-references, indices, and so on. Files in Info format can be browsed with the info program, which is distributed along with Texinfo, as well as with several third-party info viewers. Plain text (Generated via texi2any --plaintext.) This is almost the same as Info output with the navigational control characters omitted.

Man output Notably, man is not available as an output format from the standard Texinfo tools. While Texinfo is used for writing the documentation of GNU software, which typically is used in Unix-like environments such as Linux, where man pages are the traditional format for documentation, the rationale for this is that man pages have a strict conventional format, used traditionally as quick reference guides, whereas typical Texinfo applications are for tutorials as well as reference manuals. Moreover, many GNU projects eschew man pages almost completely, referring the reader of the provided man page (which often describes itself as seldom maintained) to the Info document.

Texinfo source file Texinfo enables structuring a document like a book with chapters, sections, cross references and indices. The source is almost plain text, but technically it is formatted text marked up by commands that begin with "@". A sample of a part of a source file:

The commands mark structure such as chapters, mark words, examples, lists and tables or denote a part of the source to be processed only for certain types of output.

History and status Texinfo is used as the official documentation system for the GNU Project. The GNU Texinfo distribution is licensed under the GNU General Public License. The Texinfo format was created by Richard M. Stallman, combining another system for print output in use at MIT called BoTeX, with the online Info hyperlinked documentation system, also created by Stallman on top of the TECO implementation of Emacs. BoTeX itself was based on an earlier system called Bolio (associated with David A. Moon, and used for documentation of the Lisp Machine), converted to use TeX for its output. Robert Chassell helped Stallman to create the first translator to create Info in Emacs Lisp. Texinfo is "loosely based on Brian Reid's Scribe and other formatting languages of the time". The Texinfo software distribution development was led by Brian Fox (up to version 3.8), Karl Berry (through version 5.2), and by Gavin Smith (since Dec. 2014).

See also TeX List of TeX extensions AmigaGuide

Notes and references

External links

Official website

Illustrations

Texinfo illustration

Worked examples

Example 1 — a first encounter with Texinfo

Start with the simplest possible case. Write down what Texinfo claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Texinfo before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Texinfo ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Texinfo

In research
Texinfo appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Texinfo in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Texinfo is common in secondary-school and first-year university syllabi. It links to neighbouring topics Free TeX software, GNU Project software, Hypertext, so understanding it makes those chapters shorter.
In everyday life
Look for Texinfo outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Texinfo” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Texinfo in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Texinfo means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Texinfo out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Texinfo in simple terms?

Texinfo is a typesetting syntax used for generating documentation in both on-line and printed form (creating filetypes as dvi, html, pdf, etc., and a specific hypertext format, Info) with a single source file. It is implemented by a computer program released as free software of the same name, creat…

Why does Texinfo matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Texinfo?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Texinfo.

Tags

  • Free TeX software
  • GNU Project software
  • Hypertext
  • Markup languages

Keep exploring