Re: teTeX documentation
> I suppose you implemented something that searches through the file > names? Yes. > That is good, certainly, but what I wanted to suggest was an > idea of having something that searched through file *contents*. And this > would apply mainly for source forms like .tex or .dtx, since (at least > as far as I know) we don't have free & fast tools for searching dvi > files or pdf files. I don't think that texdoc should be extended in that way. IMHO, it should be a simple tool which just displays some documentation if you know the filename. For other things, use e.g. texdoctk or the helpindex. Thomas
Re: teTeX documentation
Thomas Esser <[EMAIL PROTECTED]> writes: > > texdoc -l -s 'regular-expression-for-grep' > > > > This would be slower, of course, but it would help to have it as a > > fallback for situations like > > > > texdoc teTeX > > texdoc amsthm > > > > that fail only because the documentation file is called by a different > > name. > > amsthm is badly chosen, since it does not match amsthdoc.dvi :-) Anyway, > I have just implemented that -s feature (it does not need -l, it only > displays filenames). I suppose you implemented something that searches through the file names? That is good, certainly, but what I wanted to suggest was an idea of having something that searched through file *contents*. And this would apply mainly for source forms like .tex or .dtx, since (at least as far as I know) we don't have free & fast tools for searching dvi files or pdf files. For example, the documentation for amsthm.sty consists of amsthm.dtx (technical commentary), amsthdoc.tex (for end users), and also an example file thmtest.tex. In the last case it is better for the user to look at thmtest.tex, or thmtest.tex + thmtest.dvi side by side, but not thmtest.dvi by itself, because it does not show how the examples were generated. I could change thmtest.tex so that the .dvi file showed both source code and examples, and maybe I will for the next release; but the dvi viewer I use most of the time is xdvi which does not support searching for strings, and that seems a fairly serious drawback of the dvi format, as things currently stand. > > I am willing to help work on some of these features but I wanted to ask first > > if some or all of them are already being addressed by others. > > Well, it was fun to implement these useful features myself :-) Thanks again for all your good work that has benefited so many people in the TeX community.
Re: teTeX documentation
First of all, thanks for all these suggestions about texdoc. > 1. Running texdoc with no arguments does nothing. Why not make it run > the --help option? Well, I don't know why it didn't do this from the beginning. It was easy to fix, though. > 2. It would be good if this command would show something useful: > texdoc texdoc Ok, it now runs "man texdoc". > 3. It would be good if this command would show something useful: > > texdoc teTeX > > Maybe by having symlinks teTeX.pdf -> TETEXDOC.pdf, teTeX.dvi -> > TETEXDOC.dvi, etc.? Ok, I have an entry TETEXDOC.pdf teTeX.pdf in texmf/aliases. > 4. It would be good if this command would show the FAQ with "more", or > something to that effect: > > texdoc teTeX-FAQ > > Instead what I see is this: > > /usr/local/bin/texdoc: /usr/local/teTeX/share/texmf/doc/tetex/teTeX-FAQ: cannot >execute > > Perhaps something along the lines of > > case "$filename" in > *FAQ *faq *.txt *README*) $TEXDOCVIEW_txt $filename ;; > ... Everything with empty extension will now be viewed using a pager. > 5. It would be good to have an additional option to allow grepping > through the documentation tree, perhaps > > texdoc -l -s 'regular-expression-for-grep' > > This would be slower, of course, but it would help to have it as a > fallback for situations like > > texdoc teTeX > texdoc amsthm > > that fail only because the documentation file is called by a different > name. amsthm is badly chosen, since it does not match amsthdoc.dvi :-) Anyway, I have just implemented that -s feature (it does not need -l, it only displays filenames). > This would only work well if it were a general practice to have *.tex > and other source formats in the doc tree for searching, in addition to > the derived formats for viewing. But I think this is a good idea anyway, > because not infrequently when looking at some documentation it is useful > also to look at the source to see how the documentation was produced. texdoc only operates in $TEXMF/doc, and the (docstrip) sources belong into texmf/source. I don't think that texdoc should look at texmf/source. > Or, perhaps, have a parallel subtree "docsource" ?? No. > I am willing to help work on some of these features but I wanted to ask first > if some or all of them are already being addressed by others. Well, it was fun to implement these useful features myself :-) Thomas
Re: teTeX documentation
> > texdoc -l -s 'regular-expression-for-grep' > > Allowing regexp search is always a good idea. Do we need an extra > commandline switch here? IMO it is sufficient to replace the > string-match by a regexp-match. texdoc usually uses kpsewhich to find files which is much faster than scanning disks for files using find. So, the default should be that string-match done using kpsewhich and the regexp-match is specified by an option "-s" for "search disk". > But I think that grep should be called as "grep -i". With my implementation, people can do texdoc -s '-i pattern' 'another pattern' Thomas
teTeX documentation
> "Michael" == Michael John Downes <[EMAIL PROTECTED]> writes: > 4. It would be good if this command would show the FAQ with > "more", or something to that effect: > texdoc teTeX-FAQ If you solve the problems with files that have no extension, either "more" is already used, or any other program set by the environment variable $PAGER. > 5. It would be good to have an additional option to allow > grepping through the documentation tree, perhaps > texdoc -l -s 'regular-expression-for-grep' Allowing regexp search is always a good idea. Do we need an extra commandline switch here? IMO it is sufficient to replace the string-match by a regexp-match. Even for people with no knowledge about regexps it is like a simple substring-match. But I think that grep should be called as "grep -i". Regards, Reinhard -- Reinhard Kotucha Phone: +49-511-751355 Berggartenstr. 9 D-30419 Hannover mailto:[EMAIL PROTECTED] Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
teTeX documentation
I would like to make a few small suggestions about the teTeX documentation, based on what I see in version 1.0. 1. Running texdoc with no arguments does nothing. Why not make it run the --help option? 2. It would be good if this command would show something useful: texdoc texdoc 3. It would be good if this command would show something useful: texdoc teTeX Maybe by having symlinks teTeX.pdf -> TETEXDOC.pdf, teTeX.dvi -> TETEXDOC.dvi, etc.? 4. It would be good if this command would show the FAQ with "more", or something to that effect: texdoc teTeX-FAQ Instead what I see is this: /usr/local/bin/texdoc: /usr/local/teTeX/share/texmf/doc/tetex/teTeX-FAQ: cannot execute Perhaps something along the lines of case "$filename" in *FAQ *faq *.txt *README*) $TEXDOCVIEW_txt $filename ;; ... 5. It would be good to have an additional option to allow grepping through the documentation tree, perhaps texdoc -l -s 'regular-expression-for-grep' This would be slower, of course, but it would help to have it as a fallback for situations like texdoc teTeX texdoc amsthm that fail only because the documentation file is called by a different name. This would only work well if it were a general practice to have *.tex and other source formats in the doc tree for searching, in addition to the derived formats for viewing. But I think this is a good idea anyway, because not infrequently when looking at some documentation it is useful also to look at the source to see how the documentation was produced. Or, perhaps, have a parallel subtree "docsource" ?? I am willing to help work on some of these features but I wanted to ask first if some or all of them are already being addressed by others.
