[texhax] Running tex from a command line
Jim.Diamond at acadiau.ca
Sun Sep 3 21:55:39 CEST 2017
On Sun, Sep 3, 2017 at 15:08 (-0400), Michael Barr wrote:
> I have not run tex other than from a command line ever. When I
> install texlive from CTAN (although I just got a disk from tug, it
> is useless as my computers don't have readers) it adds it to the
> path. I can certainly say on the command line latex filename, but I
> actually have three tiny batch files. Each one looks to see if a
> filename is supplied. If it is, it sets a variable dfile = filename
> (no filetype). If not, it uses dfile. The other batch files load
> my editor and load the pdf reader (I use Sumatra.pdf), all using (or
> setting) the dfile. This is under Windows (although it goes back to
> my DOS days) and cannot be implemented under any version of Linux I
> have ever tried since there is no way to set the dfile that doesn't
> go away when the batch file terminates.
If, in Linux (or Unix) you "source" a shell script instead of
executing it, variables it sets will be preserved.
I don't know whether that exactly meets your idea of "when the batch
file terminates" or not, but certainly can be used to do what I assume
you are describing above.
More information about the texhax