2 Elements

2.1 Inline Elements

Inline elements look like this:

2.2 Block Elements

2.2.1 @quotation

In Texinfo, the @quotation command is used for quotations, and for information messages—why is that? I don’t know. The former looks like this:

Whenever you find yourself on the side of the majority, it is time to pause and reflect.

Mark Twain

Information messages such as notes, tips, warnings, etc., look like this:

Note: Emacs users can use RainbowDelimiters to make it easier to read deeply nested s-expressions.

2.2.2 @indentedblock

This is a normal block of content.

And this one is indented.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

This content is back to normal.

2.2.3 @example

According to the Texinfo manual, the @example command is used to indicate examples of code, computer input or output.

So, for example, if you run the guix command with the option --version in a terminal, you will see the following output:

$ guix --version
guix (GNU Guix) 0.11.0
Copyright (C) 2016 the Guix authors
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

And this is some Python code:

#!/usr/bin/python3
#
# Hello GTK

from gi.repository import Gtk

win = Gtk.Window()
win.connect("delete-event", Gtk.main_quit)
win.show_all()
Gtk.main()

2.2.4 @verbatim

The @verbatim command has the same uses of the @example command. The difference is that no text in the verbatim block is interpreted. So, if one writes Texinfo in a verbatim block, it is displayed without interpretation:

@quotation
Do not try to survive @url{https://en.wikipedia.org/wiki/Life, life},
since no one has come out of it alive.

@author Unknown author

2.2.5 @lisp

;;; Hello HTTP server
(use-modules (web server))

(define (my-handler request request-body)
  (values '((content-type . (text/plain)))
          "Hello World!"))

(run-server my-handler)

2.2.6 @display

Sing with me! (this is like @indentblock, but line breaks are left unchanged).

If you’re happy and you know it, clap your hands!
If you’re happy and you know it, clap your hands!
If you’re happy and you know it, and you really want to show it;
If you’re happy and you know it, clap your hands!

Enough.

2.2.7 @format

Let’s sing たなばたさま! (this is like @display, but there is no indentation).

笹の葉 さらさら
軒端にゆれる
お星様 キラキラ
金銀砂子

五紙器の短冊
私が書いた
お星様キラキラ
空から見てる

Good.

2.2.8 Lists

Itemized:

  • Gram flour (1 cup).
  • Water (1 cup).
  • Tomato (2 medium size).
  • Coriander (1 handful).
  • Onion (1 handful of any kind).
  • Salt (to taste).

Enumerated:

  1. Save your work.
  2. Turn the computer off.
  3. Turn around three times in your chair.
  4. Stand up.
  5. Go out for a walk.

2.2.9 Tables

CommandDescriptionKeyboard shortcut
file-newCreate a new file.Ctrl + N
file-saveSave the current file.Ctrl + S
app-quitClose the Application.Ctrl + Q

2.2.10 Images

Look at this Eye of a bird in a paragraph. Or enjoy this awesome landscape by Frederic Edwin Church:

El río de Luz

2.2.11 Captioned Media

With captioned media I mean any kind of content like images, figures, tables, code, etc., put in a @float block, so it is numbered, and captioned. For example, let’s caption some code:

;;; Hello world program
(define name "World")
(display (string-append "Hello " name "!"))
(newline)

Code 2.1: A Hello World program in Guile Scheme illustrating string concatenation.

And now a painting:

Painting.

Painting 2.1: Aurora Borealis, by Frederic Edwin Church (1865).

And so on, and so on...

2.2.12 Footnotes

You start the game as one of the Grütchen1, who are in a quest for the Forkiades2.

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa3 qui officia deserunt mollit anim id est laborum.

2.2.13 Definitions

This is how definitions of functions, variables, macros, commands, user options, etc., look like.

Record: language

A language object is a representation of a natural or constructed language.

Field: string name

The long name of the language. For example "Canadian English".

Field: string code

IETF language code of the language. For example "en-CA".

Function: range a b

Return the list of integers in the range [a, b]. For example:

> (range 2 6)
(list 2 3 4 5 6)
Parameter: integer a

A number indicating the lower limit of the range (inclusive).

Parameter: integer b

A number indicating the upper limit of the range (inclusive).

Return value: list of integer .

A list of numbers from a to b, including both, the lower and upper limits.


Footnotes

(1)

Little beings that live in the limit of the reigns of spirits and reality.

(2)

The three sisters of chaos, who do not have anything in pairs—just one eye, one arm, one leg, etc.

(3)

In Spanish, culpa means guilt, but this is not a text in Spanish, so who cares.