Modify Pillar's pillarPostExport.sh script from pillar.conf?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Modify Pillar's pillarPostExport.sh script from pillar.conf?

Julien Delplanque
Hi,

I am generating LaTeX using Pillar and I would like the
'pillarPostExport.sh'
to compile my bibliography. So, the default 'pillarPostExport.sh' do:

...
pdflatex output.tex
pdflatex output.tex
...

And I would like it to do:

...
pdflatex output.tex
bibtex biblio
pdflatex output.tex
pdflatex output.tex
...

Is it possible to override the default LaTeX's compilation script
from pillar.conf?

Julien

Reply | Threaded
Open this post in threaded view
|

Re: Modify Pillar's pillarPostExport.sh script from pillar.conf?

Damien Cassou-2
Julien Delplanque <[hidden email]> writes:

> I am generating LaTeX using Pillar and I would like the
> 'pillarPostExport.sh'
> to compile my bibliography. So, the default 'pillarPostExport.sh' do:
>
> ...
> pdflatex output.tex
> pdflatex output.tex
> ...
>
> And I would like it to do:
>
> ...
> pdflatex output.tex
> bibtex biblio
> pdflatex output.tex
> pdflatex output.tex
> ...
>
> Is it possible to override the default LaTeX's compilation script
> from pillar.conf?

you can override the latexCommand parameter in this way (untested):

"latexCommand" : "pdflatex -halt-on-error -file-line-error -interaction batchmode {fileName} 2>&1 1>/dev/null
ret=$?
if [[ $ret -ne 0 ]]; then
  tail -n 20 {fileNameWithoutExtension}.log
  echo \"Can't generate the PDF!\"
  exit 1
fi
bibtex biblio"

This will unfortunately run bibtex twice, but that's probably acceptable.

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill