[tex-live] bibtex with pdflatex
kap4lin at gmail.com
Sat Dec 5 23:41:43 CET 2009
Kindly CC me.
On Sat, Dec 5, 2009 at 2:43 PM, kap4lin <kap4lin at gmail.com> wrote:
> On Sat, Dec 5, 2009 at 8:42 AM, John Collins <collins at phys.psu.edu> wrote:
>> You could take a look at my Perl script latexmk. On CTAN it's at
>> http://www.ctan.org/tex-archive/support/latexmk/ It can be installed by
>> TeXLive 2009 (or you may have it already installed).
>> To do exactly what you want, you simply run latexmk with the options -pdf.
>> This overrides latexmk's default of generating a dvi file by latex instead
>> of a pdf file by pdflatex. A configuration file can be made to avoid typing
>> options on the command line everytime you use latexmk.
>> Latexmk will do a first run of pdflatex. Then it will detect that your
>> document uses bibtex and will run bibtex automatically. It will repeat the
>> runs of pdflatex as many times as needed to resolve cross references etc.
> This looks great. There is one small question. Texworks sends two
> option to pdflatex, namely, '$synctexoption' and '$fullname'. So, to
> be able to use the synctexoption, do I have to redefine the pdflatex
> command as:
> $pdflatex = 'pdflatex $synctexoption %T'
> In this case what is the exact value for $synctexoption (may be some
> texworks folks here?). And then:
> latexmk -pdf $fullname ???
> BTW, How are the options corresponding to '%O' identified? Would the
> following command work?
> latexmk -pdf $synctexoption $fullname
> where both the variables are supplied by Tw while calling latexmk.
So, a little trial and error later, this worked:
latexmk -e '$pdflatex=q/pdflatex -synctex=1 %T/' -pdf file.tex
Thanks Prof Collins! BTW, does this do makeindex too?
More information about the tex-live