Hi,

Answering my own question but posing a followup.  I am getting a "double" references section because I substitute a custom template on translation to latex which contains the following code adding a bibliography:

$head_prefix% generated by Docutils <http://docutils.sourceforge.net/>
\usepackage{fixltx2e} % LaTeX patches, \textsubscript
\usepackage{cmap} % fix search and cut-and-paste in Acrobat
$requirements
%%% Custom LaTeX preamble
...
\bibliography{Articles,Books,Theses}
\bibliographystyle{no_abstract}
\end{body}

Eliminating the problematic stuff from my template it would seem that the relevant code in  docutils/writers/latex2e/__init__.py should do the right thing if the use_bibtex string is not null

        # * bibliography
        #   TODO insertion point of bibliography should be configurable.
        if self._use_latex_citations and len(self._bibitems)>0:
            if not self.bibtex:
                widest_label = ''
                for bi in self._bibitems:
                    if len(widest_label)<len(bi[0]):
                        widest_label = bi[0]
                self.out.append('\n\\begin{thebibliography}{%s}\n' %
                                 widest_label)
                for bi in self._bibitems:
                    # cite_key: underscores must not be escaped
                    cite_key = bi[0].replace(r'\_','_')
                    self.out.append('\\bibitem[%s]{%s}{%s}\n' %
                                     (bi[0], cite_key, bi[1]))
                self.out.append('\\end{thebibliography}\n')
            else:
                self.out.append('\n\\bibliographystyle{%s}\n' %
                                self.bibtex[0])
                self.out.append('\\bibliography{%s}\n' % self.bibtex[1])

But it looks like the writer is evaluating self.bibtex as null.

I thought that I was setting this correctly by setting: (all the other settings seem to push through correctly to the latex writer with appropriate changes when set to different values.

ltx_overrides = {
    'input_encoding': 'utf8',
    'output_encoding': 'utf8',
    'doctitle_xform': True,
    'initial_header_level': 2,
    'use-latex_abstract': True,
    'use_latex_citations': True,
    'use_bibtex': 'no_abstract,Articles,Books,Theses',
    'template': 'my_default.tex',
    'use_bibtex': '',
    'latex_preamble':'\input{my_preamble}',
    'documentoptions':'letterpaper,11pt'
}

but self.bibtex seems to think it has a null string.  So once again, what am I doing wrong?

Michael


On Mon, May 13, 2013 at 12:50 PM, Michael Prisant <michael.prisant@gmail.com> wrote:
Hi,

I have been experimenting with the --use-bibtex=mybibsty,mybib option.  The good news is I am able to this to properly process citations in reST.  But the latex translation creates tex code on processing which has two references sections.  Is this the way it is supposed to work? What am I doing wrong?

Here is my example:

- This reST snippet (extracted and edited):

Here is a citation [HLD+00]_. Here is more text with citations [PM60]_.
Donec id elit non mi porta gravida at eget metus.
Fusce dapibus, tellus accursus commodo, tortormauris condimentum nibh, ut fermentum massa justo sit ametrisus.
Etiam porta sem malesuada magna mollis euismod [Dwy04]_.

.. [HLD+00]
.. [PM60]
.. [Dwy04]

- Produces this tex (extracted and edited):
Here is a citation \cite{HLD+00}. Here is more text with citations \cite{PM60}. 
Donec id elit non mi porta gravida at eget metus.
Fusce dapibus, tellus ac cursus commodo,tortor mauris condimentum nibh, ut fermentum massa justo sit ametrisus.
Etiam porta sem malesuada magna mollis euismod \cite{Dwy04}.

\begin{thebibliography}{HLD+00}
\bibitem[HLD+00]{HLD+00}{}
\bibitem[PM60]{PM60}{}
\bibitem[Dwy04]{Dwy04}{}
\end{thebibliography}

\bibliography{Articles,Books,Theses}
\bibliographystyle{no_abstract}


- This in turn produces two bibliographies when processed to pdf.  I would like to get rid of the "\begin{thebibliography}..\end{thebibliography}" without kludgey postprocessing of the tex source. Can this be done?

Michael

--
Michael G. Prisant,
 




--
Michael G. Prisant,