Article View: gnu.misc.discuss
Article #63018Re: Texinfo --help pictures?
From: Robert J. Chassell
Date: Sat, 25 Mar 1995 15:54
Date: Sat, 25 Mar 1995 15:54
205 lines
7142 bytes
7142 bytes
cv@id.dth.dk (Constantin Vrinceanu) writes:
Anyone who knows if it's possible to include LaTeX pictures in Texinfo
(2.18..) or any other sort of pictures/graphics for that matter ?
Yes, you can include Encapsulated PostScript figures in Texinfo, to be
formatted by an appropropriate typesetter, but please try to avoid
doing so.
Texinfo is designed to produce both ASCII output that can be read on a
character-only terminal and typset output that can be read in a
printed book. Hence you need character diagrams for the online
version as well as the EPS figures for the typeset version. Also, the
person formatting must have the requisit typesetting software. Some
people do not have it.
Because the EPS figures are an addition to a regular Texinfo file,
they sometimes create a typeset version of the document that is
different from the online version. Moreover, it is reasonable to
presume that a large portion, perhaps a majority, of your readers will
read your work in Info. You do not want to shortchange them. For
this reason, you should avoid such figures whenever possible.
If you do include Postscript figures in your Texinfo file, they should
be similar to your character-only figures; and you should be sure to
include character-only figures for *both* the Info version and for a
version of the printed output that cannot handle EPS figures.
Here is what I have done:
--- First, near the beginning of the Texinfo file, write the
following, for the person formatting it:
@c ================ Included Figures ================
@c Set one or other of these, not both! Default should be `clear'.
@c set print-postscript-figures
@clear print-postscript-figures
@c Set print-postscript-figures if you print PostScript figures.
@c If you clear this, the figures will be printed as ASCII diagrams.
@c (This is not relevant to Info, since Info only handles ASCII.)
@c Your site may require editing changes to print PostScript; in this
@c case, search for `print-postscript-figures' and make appropriate changes.
@c ================ How to Typeset and Print ================
@c If you do not include PostScript figures, run either of the
@c following command sequences, or similar commands suited to your
@c system:
@c % texi2dvi emacs-lisp-intro.texi
@c % lpr -d emacs-lisp-intro.dvi
@c or else:
@c % tex emacs-lisp-intro.texi
@c % texindex emacs-lisp-intro.??
@c % tex emacs-lisp-intro.texi
@c % lpr -d emacs-lisp-intro.dvi
@c If you include the PostScript figures, you must convert the .dvi
@c file to a .ps file before printing. Run either of the
@c following command sequences, or one similar:
@c
@c % dvips -f < emacs-lisp-intro.dvi > emacs-lisp-intro.ps
@c
@c or else:
@c
@c % postscript -p < emacs-lisp-intro.dvi > emacs-lisp-intro.ps
@c
@c ================ How to Create an Info file ================
@c If you have `makeinfo' installed, run the following command
@c (where % is the shell prompt):
@c % makeinfo emacs-lisp-intro.texi
@c or else, inside of GNU Emacs, find the file and then run:
@c M-x texinfo-format-buffer
@c After creating the Info file, edit your Info `dir' file
@c appropriately. (The `dir' file is often in the `/usr/local/info/'
@c directory; you can use the START-INFO-DIR-ENTRY information below
@c to help you edit `dir'.)
--- Now here is a sample from the middle of the Texinfo file (in this
case an elementary introduction to Programming in Emacs Lisp).
--- Note that not everyone has `psfig.tex'; and there are other ways to
include Encapsulated PostScript files.
--- At same sites, you must provide the *full* pathnames for the
included files. Awkward!
--- Note also the repetition: a first diagram for Info, a second
diagram for printed Postscript, a third for a printed
character-only figure. You might reduce this to two diagrams, a
first for Info or for a printed character-only figure, and a
second for PostScript, but I found that this layout is simpler to
keep in mind, tedious as it is.
Earlier, for example, we had a function @code{multiply-by-seven}; it
multiplied its argument by 7. This function is similar, except it
divides its argument by 50; and, it has no name. The anonymous
equivalent of @code{multiply-by-seven} is:
@example
(lambda (number) (* 7 number))
@end example
@need 1250
@noindent
If we want to multiply 3 by 7, we can write:
@c lambda example diagram #1
@ifinfo
@example
@group
(multiply-by-seven 3)
\_______________/ ^
| |
function argument
@end group
@end example
@end ifinfo
@ifset print-postscript-figures
@sp 1
@tex
\input psfig.tex
\centerline{\psfig{figure=lambda-diagram1.eps}}
\catcode`\@=0 %
@end tex
@sp 1
@end ifset
@ifclear print-postscript-figures
@example
@group
(multiply-by-seven 3)
\_______________/ ^
| |
function argument
@end group
@end example
@end ifclear
@noindent
This expression returns 21.
@need 1250
@noindent
Similarly, we can write:
@c lambda example diagram #2
@ifinfo
@example
@group
((lambda (number) (* 7 number)) 3)
\____________________________/ ^
| |
anonymous function argument
@end group
@end example
@end ifinfo
@ifset print-postscript-figures
@sp 1
@tex
\input psfig.tex
\centerline{\psfig{figure=lambda-diagram2.eps}}
\catcode`\@=0 %
@end tex
@sp 1
@end ifset
@ifclear print-postscript-figures
@example
@group
((lambda (number) (* 7 number)) 3)
\____________________________/ ^
| |
anonymous function argument
@end group
@end example
@end ifclear
--- End of example.
All in all, I try to avoid diagrams.
Best wishes.
Robert J. Chassell bob@gnu.ai.mit.edu
25 Rattlesnake Mountain Road bob@grackle.stockbridge.ma.us
Stockbridge, MA 01262-0693 USA (413) 298-4725
--
Robert J. Chassell bob@gnu.ai.mit.edu
25 Rattlesnake Mountain Road bob@grackle.stockbridge.ma.us
Stockbridge, MA 01262-0693 USA (413) 298-4725
Technical Details
Message-ID:
<BOB.95Mar25105420@hill.gnu.ai.mit.edu>Path:
arc1-ca.pugleaf.net!nntp.gmd.de!stern.fokus.gmd.de!ceres.fokus.gmd.de!zib-berlin.de!fu-berlin.de!news.dfn.de!news.dkrz.de!news.rrz.uni-hamburg.de!unibwh.unibw-hamburg.de!Germany.EU.net!howland.reston.ans.net!gatech!udel!news.mathworks.com!uhog.mit.edu!grapevine.lcs.mit.edu!news.lcs.mit.edu!bobReferences:
<CV.95Mar24135003@idfs4.id.dth.dk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1025b4,63ef80f35a78d2ce X-Google-Attributes: gid1025b4,public X-Google-ArrivalTime: 1995-03-25 07:54:18 PST Path: arc1-ca.pugleaf.net!nntp.gmd.de!stern.fokus.gmd.de!ceres.fokus.gmd.de!zib-berlin.de!fu-berlin.de!news.dfn.de!news.dkrz.de!news.rrz.uni-hamburg.de!unibwh.unibw-hamburg.de!Germany.EU.net!howland.reston.ans.net!gatech!udel!news.mathworks.com!uhog.mit.edu!grapevine.lcs.mit.edu!news.lcs.mit.edu!bob From: bob@hill.gnu.ai.mit.edu (Robert J. Chassell) Newsgroups: gnu.misc.discuss Subject: Re: Texinfo --help pictures? Date: 25 Mar 1995 15:54:18 GMT Organization: GNU Project Lines: 205 Distribution: gnu Message-ID: <BOB.95Mar25105420@hill.gnu.ai.mit.edu> References: <CV.95Mar24135003@idfs4.id.dth.dk> NNTP-Posting-Host: hill.gnu.ai.mit.edu In-reply-to: cv@id.dth.dk's message of Fri, 24 Mar 1995 18:50:03 GMT