Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Most printer friendly version of the documentation?

by blazar (Canon)
on Aug 07, 2008 at 14:45 UTC ( [id://702890]=perlquestion: print w/replies, xml ) Need Help??

blazar has asked for the wisdom of the Perl Monks concerning the following question:

I personally believe that lately I'm somewhat "forced" to post slightly OT stuff, for even this is not strictly a SoPW just as much as SoP-info-W. Namely, I want to print the documentation for some CPAN module (yes, my eyes are bleeding and I prefer not to waste paper, but I will have to stay away from the pc for some time, later...) So, I was just about to fire up the printer on the web page above, but before doing so I'll ask: which is the Best™ way to do so?

I know that CPAN has many alternatives/mirrors and I was wondering wheter any of them would provide me with a particularly printer friendly version of the same documentation: less paper and ink/toner, or a ready made pdf rendering... stuff like this.

--
If you can't understand the incipit, then please check the IPB Campaign.

Replies are listed 'Best First'.
Re: Most printer friendly version of the documentation?
by kyle (Abbot) on Aug 07, 2008 at 14:54 UTC

      I personally believe that since I spoke of generic "alternatives" in the first place, your answer does qualify as a good one, and indeed I already knew about that particular formatter: but to be more precise I was not (necessarily) thinking of a translator for modules installed on my system as much as a web page (or some such) offering a printer friendly... thingy. Which is what I was implicitly referring to with "ready made" in full lazy style!- Apologies for not making this clear to start with.

      --
      If you can't understand the incipit, then please check the IPB Campaign.
Re: Most printer friendly version of the documentation?
by Bloodnok (Vicar) on Aug 07, 2008 at 15:08 UTC
    IMO, Pod::Latex takes some beating for the more LaTeX orientated environment :-))

    Just a personal preference ...

    Update

    Many thanx to blazar for pointing out my typo - for Pod::Latex read Pod::LaTeX.

    A user level that continues to overstate my experience :-))

      I personally believe that as an old time LaTeX aficionado, I should second your suggestion. (I installed TeXLive on this very pc only a few days ago, BTW.) While the same remark as the one I wrote in reply to kyle's comment applies, one difference is that I didn't know about Pod::LaTeX, (Incidentally, you spelled it wrong and may want to correct it...) which is a further reason why I have to thank you. I presume it may turn out very useful...

      --
      If you can't understand the incipit, then please check the IPB Campaign.

        I've been considering trying to do this sort of thing as a program -- Andy Lester says he'll write me out of his will if I say "script" -- with two basic goals: 1) Roll up all the core docs as a LaTeX "book" document, 2) do the same with an arbitrary path, or paths, like for a local install. Then it could be kept as PDF or printed (or even perfect bound at an on demand print shop).

        It's about 5th on my list of "fun" projects though and I'm plenty short on the old tuits...

        Thanx for your spelling correction - which has, as you are probably already aware, been made.

        FWIW, I (currently) use MiKTeX and TeXnicCenter on XP - I'm anticipating using a Linux box in the not too distant future - back to something approaching an OS of choice:-))

        A user level that continues to overstate my experience :-))
Re: Most printer friendly version of the documentation?
by Fletch (Bishop) on Aug 07, 2008 at 15:11 UTC

    Assuming you have an appropriate *roff toolchain installed you can always run the output from pod2man through it and get decent looking results. Most variants (such as groff) can be convinced to spit out PostScript which can then be run through ps2pdf.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

      Actually I don't have it on this very machine... (redmondish one with some *NIX twist, but not that particular one!) However I have reasonably easy access to some that do. Of course I may either install all the required tools (which I don't possibly feel the need for any other reason) here or install the "wanted" module there; or more reasonably, just work on the pod. Either way, too much work especially if you take into account my previous remark.

      All in all I would regard kyle's and Bloodnok's as better alternatives. (With the latter not intended for daily work, but as a precious resource "just in case...")

      Funnily enough, the story goes as follows: I just stumbled upon that particular module -as it often happens- and I'm not really sure if I'm interested in it, let alone install it, but I'm curious and just want to learn more about it - I would generally read it online, but then being tired of many hours staring at a computer monitor and having to stay away from the pc for a while in any case I decide to print it. And then I would like to do that in a reasonably printer friendly manner, albeit without being manic about it. And the funny bit of the funnily enough incipt is that eventually I'm spending on this matter more time and resources that I would have thought of: which in turn is fine! In fact I'm not complaining, for it's turning out to be very instructive...

      --
      If you can't understand the incipit, then please check the IPB Campaign.
Re: Most printer friendly version of the documentation?
by JavaFan (Canon) on Aug 07, 2008 at 15:23 UTC
    If you want to optimize for the least amount of paper used, you could do:
    pod2man Module.pm | a2ps -9
    That puts the entire documentation of CGI.pm on 6 sheets. If that's too small for you, you might want to use a2ps -6 or a2ps -4. But you'll need more paper then.

      I personally believe that I must have given a wrong impression: I'm not aiming at extreme paper saving, just reasonable. If it were for that, I knew a2ps. (Although I've always been frightened by the number of its switches and never really bothered to learn them all, just using it for quick shots.) But then if I were to do a similar job, I would probably follow kyle's suggestion or Bloodnok's in conjunction with tools like psnup or pdfpages.

      --
      If you can't understand the incipit, then please check the IPB Campaign.

        Well, extreme paper saving would be not printing at all, or converting the source with Acme::Bleach (skipping the first line of the result) prior to printout.

        An A5 booklet from an A4 printout with both sides covered looks like a very reasonable way of paper saving (to me, that i ;-)

        --shmem

        _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                      /\_¯/(q    /
        ----------------------------  \__(m.====·.(_("always off the crowd"))."·
        ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
Re: Most printer friendly version of the documentation?
by shmem (Chancellor) on Aug 07, 2008 at 20:02 UTC
    a particularly printer friendly version of the same documentation: less paper and ink/toner, or a ready made pdf rendering...

    ...would be running the plain manual pages through a2ps, a powerful text to PostScript converter which is included in many linux distros or repositories. E.g, running

    perldoc perlboot | a2ps -B -=book --printer=your_printer

    on a duplex-capable printer will print the manual in landscape mode, two pages on each sheet, double sided, and with the pages sorted as a booklet: take them from the printer, fold the bunch in the middle, and voilà - you have a compact manual to take with you.

    For a single sided printer things get interestingly more difficult; check the a2ps info pages.

    update: just saw that JavaFan gave a related answer. The above command would print the 54 page CGI manual on 13 pages.

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
Re: Most printer friendly version of the documentation?
by talexb (Chancellor) on Aug 07, 2008 at 15:42 UTC

    I usually bring up the CPAN web page for the module, then print that two up, one-sided. I get the benefit of proportional fonts and spacing, and it's an efficient way of using paper.

    Most of the time I staple the resulting pile in a corner, but if I need to study it, I can also spread it out on a table and read it top to bottom, easily going back over an earlier page if necessary.

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Re: Most printer friendly version of the documentation?
by MidLifeXis (Monsignor) on Aug 07, 2008 at 16:00 UTC

    I typically print booklet style. I end up putting a single staple through the fold point to hold the pages together.

    --MidLifeXis

Re: Most printer friendly version of the documentation?
by actualize (Monk) on Aug 07, 2008 at 15:21 UTC

    I printed some stuff from CPAN the other day and I had no problem. What exacly is making your eyes bleed? the font? What browser are you using?

    -Actualize
Re: Most printer friendly version of the documentation?
by chromatic (Archbishop) on Aug 08, 2008 at 06:54 UTC
    ... lately I'm somewhat "forced" to post slightly OT stuff...

    No one is "forcing" you to include that ridiculous cliché in all of your posts.

      Just as much as nobody is "forcing" you to only refer to yourself by means of a pseudonym and not letting anyone know your real given name and family name - a habit which someone also finds to be ridiculous: it's all a matter of personal freedom. Anyway: ++ because what you claim is definitely true: well, to some extent. In fact I often can't cast what I want to say in "IPB form" (as in this very post - except that I did it on purpose) in a reasonably simple manner. And then I both delete the incipit and strike the part of the signature it refers to: FWIW I consider it a mental exercise, to find a way to begin any speech that way, and a funny one. Fun is good, ain't it? But seriously: do you find it that annoying?!? I'm literally astonished that some people do. (Others privately wrote me to tell me they share the fun instead.) Somebody, you perhaps, told me he would ignore me by means of a css setting: which somehow saddens me if that particular person is a knowledgeable monk - like you. But I still can't understand, to the best of my efforts: it's a matter of three damned words; it takes such a negligible fraction of time to read them that one doesn't even realize...

      Why can't I have my little bit of cranky trademark behaviour? Because I'm only a mediocre Perl programmer? I'm beginnig to think that if I were considered a Perl Guru then these "problems" wouldn't arise...

      --
      If you can't understand the incipit, then please check the IPB Campaign.
        But seriously: do you find it that annoying?!?

        Yes; it's the Steve Urkel of PerlMonks: an annoying combination of stupid catchphrases the writers consider popular yet have to invent ever more ridiculous situations to include. It's noise. It's repetitive. It adds nothing to the discussion. I block signatures, because they fail the signal test in the same ways. I can't block your pointless logorrhea without ignoring all of your posts. After several weeks of growing steadily more annoyed at its inclusion, I decided it was a fair trade.

        Somebody, you perhaps, told me he would ignore me by means of a css setting: which somehow saddens me if that particular person is a knowledgeable monk - like you.

        That was me. It only blocks your replies. If I could block your top-level posts in Newest Nodes, I would.

        Why can't I have my little bit of cranky trademark behaviour?

        You are free to do so, the same way you're free to join London.pm and post your Super Mario Brothers Furry Fanfiction for everyone to read. Whether other people like it is a different story. I only speak for myself, but I don't like it.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://702890]
Approved by EvanK
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-07-23 09:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.