LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 10-07-2005, 05:23 PM   #1
TGWDNGHN
Member
 
Registered: Aug 2003
Distribution: Slackware 10.0
Posts: 94
Blog Entries: 1

Rep: Reputation: 15
Exclamation Printing Info Pages


When I want to print out documentation, I usually find myself going to the package's website and hoping there is a nice HTML or PDF file out there I can print, but when worst comes to worse I find myself copying and pasting from the info file into a text editor and printing it out


Please tell me there is a better way!

Thanks a Mucho
 
Old 10-07-2005, 06:20 PM   #2
nixcraft
Member
 
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379

Rep: Reputation: 30
You can use command line:

info foo | lpr
info foo | lprint

See for more info http://blogs.cyberciti.biz/hm/index....nd-info-pages/
 
Old 10-07-2005, 06:40 PM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
One option is to install the source package. This will give you access to the topic.tex source.
For example:
rpm -Uhv core-utils-<version>.src.rpm
cd /usr/src/packages/SPECS # The "packages" part may be different on your system.
rpmbuild -bp core-utils.spec # This may apply patches to the document sources
cd ../BUILD
cd core-utils-<version>/
./configure
# There may by targets to produce the documentation such as
make dvi
or
make ps
or make pdf

As a last resort, cd to the "doc" subdirectory, and if a core-utils.tex file exists:
tex core-utils.tex

This will produce a .dvi file which you can print out from kdvi or xdvi, or you could use dvips to convert it to postscript.

This may seem like a lot of work, but will become routine after a few times. The documents produced look very good. Also, many of the documents you will discover this way are lengthy manuals. The bashref, and core-utils manual s are long enough to fill a 3 ring binder. Having them nicely typeset makes using them easier.

Also consider printing out man pages this way:
man -t <topic> | lp -d <printername>

You might want to preview an example this way:
man -t tar | gv -scale 2 -antialias -media letter -

Last edited by jschiwal; 10-07-2005 at 06:44 PM.
 
Old 10-07-2005, 06:52 PM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,776

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
To print man pages:
In this example, using tar man pages.

man -t tar | lpr -Pdraft

Print man pages for tar (will be formatted by troff or groff,
usually for PostScript)
Pipe to lpr
Send to printer <draft> [optional]. The command will
print to the default printer if given as:
man -t tar | lpr

===============================

To print info pages:
In this example, using tar info pages.

cp /usr/share/info/tar.info.gz /home/<user>

Copy the info page to another location to avoid breaking
your on-line documentation.

gunzip /home/<user>/tar.info.gz

After decompressing the file, use a2ps to convert to PostScript.

a2ps tar.info

This produces a PostScript formatted file called tar.info.
Open in your favorite editor and print from there.

===============================

To convert output to PDF format

man -t tar | ps2pdf > tar.pdf

===============================

I've tried info2html and didn't like the result.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
howto access man and info pages? SciYro Programming 5 07-23-2004 11:21 AM
Info pages failure kAyOw Slackware 2 07-21-2004 06:13 PM
Info Pages rch LQ Suggestions & Feedback 4 08-02-2003 11:14 PM
emacs info pages and custumization nakkaya Linux - Software 1 04-23-2003 06:27 PM
man/info pages no help dunbar Linux - Newbie 25 01-21-2003 12:48 PM


All times are GMT -5. The time now is 04:04 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration