I am writing a mac os double-click bash command file X.command to execute a sequence of pdflatex-ing of various LaTeX files. In the directory containing the files there is an included style file BICA.sty that the LaTeX Files use.
>ls BICA.sty X.command cover.tex
A MWE for X.command is
#!/bin/bash DIRNAME=`dirname "$0"` pdflatex "$DIRNAME"/cover.tex read -p
When I open a finder window and double-click X.command I get this error:
! LaTeX Error: File `BICA.sty' not found.
- there will be several files in the directory to pdflatex.
- It all works fine if I run it from a terminal window command line.
- I am writing this command for less sophisticated users to use.