I can know the length in lines of a man page but not of an info manual.
I want to read the info manual of the latex program ('info latex') but I suspect it may be huge. To see the file length of the corresponding file isn't of much use, I think.
On the contrary, doing 'man cdrecord', for instance, I instantly get the number of lines.
What happens is that if I see the info manual is very large, I'll try to read some tutor or guide. But if the info were little enoough, I would gladly read it. The use I intend to to make of latex does not justify becoming an expert (only writing some little math expressions.
Suppose the name of the info file is foo.gz. Is it easy to find the relation between the number of lines (assuming say 70 chars per line) and size in bytes of foo.gz? The problem is made worse by the fact that info files contains many blank lines.
Any hint will be welcome. Thanks in advance.
LaTeX is a complex program, I believe. I'd find a tutorial online if I were you. As to finding the length, the simplest way would be to just start reading it and if it is really long don't bother with it. But, to see the size of a file (which if it is a text file then it will equal the amount of characters as 1 char = 1 byte) use the du command. "du" stands for Disk Usage, it tells the size of a file or all the files in a folder. For example:
Well. I've found a tutorial (Latex 2e in 141 minutes). As for the info file, its tree has so many levels and so many nodes within each level that it is impossible to get an appreciation of the real size once it is formatted for reading.
As for 'du' (or ls for that case), an info file is generally a compressed one, although I think it is left uncompressed somewhere on the hard disk after the first time it has been read.
As a separate matter, I'm unable to find the info, I do 'info latex' and there it is. Therefore the info file for latex should be somewhere on the hard disk. If I could know the name of the package where it belongs, then I would read the file /var/log/packages/<package-name-minus-the-extension> and look for the string 'info'. That would give me the exact location.
What I do in cases like this one, is 'grep -irl <program-name> /var/log/packages', and so I find the package name (in this case program-name is latex). But with latex this technique has failed. The output of 'grep -irl latex' is almost a screenful. However, using find, I know the exact path of latex. It ends in /bin/latex. But when I grep with this path ('grep -irl latex bin/latex') the output is
empty (grep doesn't return anything). It's a mystery. Well, good bye and thanks.
In order to have an apreciation of how much time it'll take me to read an info manual, I did this:
Let us say you type 'info latex' when you want to read the manual. The info file is '/usr/info/latex.info.gz' and it's easy to find its name and location. Now, all I have to do is
$ cp /usr/info/latex.info.gz ./
$ gzip latex.info.gz
$ ls -lh latex.info
$ blah..........blah latex.info
And I now have all the doc which was accessible by the command 'info latex' gathered into one and only one file. To see the number of lines, do 'less latex.info', go to the bottom of the file and read the number of lines less displays, in this case 4286. You can multiply by a factor between 0.90 and 0.95 due to the existence of the links and some LaTex commands. That's all. Regards.
|All times are GMT -5. The time now is 05:42 PM.|