PDF content of this website

Next: , Previous: , Up: Top   [Contents][Index]


4 Learning GNU Texinfo

4.1 GNU Texinfo web resources

You will have to learn a little GNU Texinfo. See the GNU Texinfo Manual and the GNU Texinfo Reference Card. Don’t be alarmed at the size of the GNU Texinfo Manual. Few Texinfo commands are needed to have great looking multi-format content.

4.2 Basic changes

Inside the directory texinfopublisher-1.1/ you will see a file Website.texi. This is the source file that is compiled when the command make is run. The result of the compilation is the building of your content. Change your working directory to texinfopublisher-1.1/ and type

make

You have compiled a basic template with examples. The Makefile is verbose and will give instructions to view the resulting output formats.

Using your favorite editor (vi, emacs, gedit, kate, notepad) edit

texinfopublisher-1.1/Website.texi

Trying adding simple text to any of the nodes/sections and running make to re-compile from the command line. View the resulting output to confirm the changes.

4.3 GNU Texinfo commands

4.3.1 @node

Create new nodes (chapters) with the @node command followed with a @chapter command. All nodes names must also be declared between the @menu and @end menu section of the .texi file.

Based on all the references to “Chapter 9” in texinfopublisher-1.1/Website.texi think of what modifications would have to be made to the file to create a “Chapter 10”.

Try creating a “Chapter 10”. Try creating a chapter named “Information”.

4.3.2 @section / @subsection / @subsubsection

Content between @node commands such as text between “@node Chapter 1” and “@node Chapter 2” in texinfopublisher-1.1/Website.texi can be broken down into sections, subsections and subsubsections.

Try adding text content to sections / subsections and subsubsections. Try adding more sections. Add text like the following

@section Another section example

4.3.3 @

The at sign @ is a special character that starts all Texinfo commands. To generated an at sign @ character in Texinfo two @@ characters must be entered in the source .texi file. The email address anthony_bradford@yahoo.com will have to be written as anthony_bradford@@yahoo.com in a .texi file.

The { and } characters also have to be preceded with an at sign @. Use @{ to generate { and @} to generate }.

4.3.4 @c

The @c Texinfo command generates a comment. This would be a comment in a Texinfo file.

@c This is a comment.

4.3.5 @*

The @* command creates a line break.

Try adding some line breaks between sentences.

4.3.6 @b

Write in bold text by using the @b command. If you write

@b{This will produce bold text}.

You will get

This will produce bold text.

4.3.7 @i

Write in italics by using the @i command. If you write

@i{This will produce italics text}.

You will get

This will produce italics text.

4.3.8 @sansserif

Write in sans serif font by using the @sansserif command. If you write

@sansserif{This will produce sans serif}.

You will get

This will produce sans serif.

4.3.9 @url

@url produces a hypertext URL link

@url{http://fsf.org} produces http://fsf.org.

@url{http://fsf.org,The Free Software Foundation} produces The Free Software Foundation.

4.3.10 @email

@email produces a hypertext mailto: email address. Remember to generate an at sign @ two are needed @@.

@email{anthony_bradford@@yahoo.com} produces anthony_bradford@yahoo.com.

@email{anthony_bradford@@yahoo.com,Anthony Bradford} produces Anthony Bradford.

Note that anthony_bradford@@yahoo.com produces anthony_bradford@yahoo.com, which is a email address with no hyperlink properties.

4.3.11 @example / @smallexample

@example
This is example text
@end example

Produces

This is example text.

@smallexample
This is small example text.
@end smallexample

Produces

This is small example text.

4.3.12 @itemize

@itemize
@item one
@item two
@item three
@item four
@end itemize

Will produce

See the GNU Texinfo Manual for other list and table commands such as @enumerate, @table and @multitable. The GNU Texinfo Manual has many examples.

4.3.13 @image

Keep all images in the directory texinfopublisher-1.1/images/. Image file name extensions (.jpg, .png, .eps) should always be kept lowercase. The images/ directory is never cleaned by make clean. The command

@image{images/open_book_blue,,80pt,Picture of a open book,png}

inserts the image texinfopublisher-1.1/images/open_book_blue.png into your content.
Producing

Picture of a open book

Use the @center command to center the image

@center @image{images/open_book_blue,,80pt,Picture of a open book,png}

Produces

Picture of a open book


The argument “80pt” is the image point scaling. This is impacting to PDF/DVI/PostScript output but not impacting to HTML/EPUB output. The following examples are scaled larger in the PDF/DVI/PostScript content but are the same size in the HTML/EPUB content. Switch to other content formats by clicking here here.

@image{images/open_book_blue,,120pt,Picture of a open book,png}

Produces

Picture of a open book

@image{images/open_book_blue,,150pt,Picture of a open book,png}

Produces

Picture of a open book

@image{images/open_book_blue,,180pt,Picture of a open book,png}

Produces

Picture of a open book

4.3.14 @cindex

Index items using the @cindex command.

@cindex blueberry

Will place the word blueberry in the ending index of this document. See Concept index, and look for blueberry.

4.3.15 @paragraphindent

To turn off automatic paragraph indenting use the command

@paragraphindent none

Place this command towards the top the of Website.texi file. This manual was written with paragraph indenting turned off.

4.3.16 @cartouche

@cartouche
This is a test.
@end cartouche

Produces text in a box.

This is a test.

@cartouche is not translated into the EPUB book format.


Next: , Previous: , Up: Top   [Contents][Index]

PDF content of this website