Proposal for texsrc command

Zdenek Wagner zdenek.wagner at gmail.com
Mon Aug 17 23:34:22 CEST 2020


po 17. 8. 2020 v 19:43 odesílatel Boris Veytsman <borisv at lk.net> napsal:
>
> NP> Date: Sun, 16 Aug 2020 21:47:01 +0900
> NP> From: Norbert Preining <norbert at preining.info>
>
> NP> Hi Niranjan,
>
>
> NP> Not really. You are assuming that
> NP>     package name == style file name for LaTeX
> NP> Unfortunately this breaks for a large set of packages.
>
> NP> Example where it works:
>
> NP> package 12many
> NP>     file .../texmf-dist/tex/latex/12many/12many.sty
>
> NP> example where it does not work:
> NP> package IEEEconf
> NP>     file .../texmf-dist/tex/latex/IEEEconf/IEEEconf.cls
> NP> (because it ships a class file and not a style file)
>
> NP> another example
> NP> package adfsymbols
> NP>     file .../texmf-dist/tex/latex/adfsymbols/adfarrows.sty
> NP> (style file is named different from package name)
>
> NP> And there are many many more differences. So there is no easy way to
> NP> find **THE** source file.
>
> I would think that for LaTeX packages the best choice for source is
> the commented dtx file.  So I'd like texsrc to return
>
If there is a dtx file, it is better to use ltxdoc to generate a
pretty printed document with table of contents, index etc. However, it
is often available in the documentation.

> texsrc 12many
> /usr/local/texlive/2020/texmf-dist/source/latex/12many/12many.dtx
>
> texsrc IEEEconf
> /usr/local/texlive/2020/texmf-dist/source/latex/IEEEconf/IEEEconf.dtx
>
> Only if the file is absent, we need to use .sty or .cls, as for
> adfarrows.sty.
>
> I think the algorithm for searching sources is complex enough to make
> a texsrc command implementing it useful.
>
.sty and .cls can be found by kpsewhich

> --
> Good luck
>
> -Boris
>

Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz


> Yinkel, n.:
>         A person who combs his hair over his bald spot, hoping no one
>         will notice.
>                 -- Rich Hall, "Sniglets"



More information about the tex-live mailing list.