Proposal for texsrc command
zdenek.wagner at gmail.com
Sun Aug 16 15:44:44 CEST 2020
ne 16. 8. 2020 v 15:31 odesílatel निरंजन <niranjanvikastambe at gmail.com> napsal:
> Thanks, I did not know that. What about other distributions though?
This is a feature of TeXLive and unix-like systems, hence it works
even on Mac. MiKTeX has a different command instead of kpsewhich.
Windows with cygwin or with GNU utilities can do the same (I hope).
> On Sun, 16 Aug 2020 at 18:53, Zdenek Wagner <zdenek.wagner at gmail.com> wrote:
>> ne 16. 8. 2020 v 14:33 odesílatel निरंजन <niranjanvikastambe at gmail.com> napsal:
>> > Hello friends,
>> > I am Niranjan. I wanted to propose a command named texsrc for seeing the source code of a package. Currently TeXLive provides the texdoc command which opens the documentation of any desired package, but there is no such command for opening the source (.sty) file which is strange.
>> > I am a Linux user and I have TL2020, therefore I have made a shell script in my /usr/bin/. It works for me (but only till I retain TL2020) and opens the source text of the desired package. The code is this -
>> > #!/bin/sh
>> > xdg-open /usr/local/texlive/2020/texmf-dist/tex/latex/$@/$@.sty
>> No script needed:
>> vim `kpsewhich something.sty`
>> or replace "vim" with whatever editor you like, or you can just use
>> "more" or "cat", if you are afraid of modifying the package by
>> > This is a very minimal script. It needs to be refined as per the distribution year, os and path. I am no expert in shell to satisfy these requirements, but is it possible to build such a command?
>> > Regards,
>> > Niranjan
>> Zdeněk Wagner
More information about the tex-live