Re: citations: named in source, auto-numbered in result
Matěj Cepl <[email protected]>
| Newsgroups | gmane.text.docutils.user |
|---|---|
| Organization | Red Hat Czech, s.r.o. |
| Message-ID | <[email protected]> |
On Fri, 2014-02-14 at 09:35 +0000, Guenter Milde wrote:
> > I want to spell my citations like this in the source: [Smith-2008]_,
> > and then have them rendered as auto-numbers in the resulting html and
> > pdf. My investigations so far have not indicated that this is
> > implemented. Is that right?
Not sure about HTML, but what works for me (and yes, it is a brutal
hack) is to define new role:
.. role:: cite
(i.e., there is just empty paragraph after this line) and then use
in the text :cite:`coase:NPS-1988`
in the end of the document I have
.. raw:: latex
\bibliographystyle{plainnat}
\bibliography{citation}
and then I have attached docutils.conf in the same directory.
This works for PDF (and XeLaTeX), but no idea about HTML.
Best,
Matěj
--
http://www.ceplovi.cz/matej/, Jabber: [email protected]
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC
Two things fill the heart with renewed and increasing awe and
reverence the more often and the more steadily that they are
meditated on: the starry skies above me and the moral law inside
me.
-- Immanuel Kant: Critique of Practical Reason
------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience. Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
docutils.conf
(text/plain, 836 B)
[xetex writer]
use-latex-citations: true
use-latex-abstract: true
table_style: booktabs
latex_preamble:
% Linux Libertine (free, wide coverage, not only for Linux)
\usepackage{xunicode}
\usepackage{url}
\usepackage{xltxtra}
\usepackage[american]{babel}
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth
\usepackage[authoryear,sort&compress]{natbib}
\makeatletter
\@ifundefined{bibpunct}{}{%
\bibpunct{[}{]}{;}{a}{,}{,}
}
\makeatother
% make url.sty work
\def\do@url@hyp{\do\-}
\usepackage{setspace}
%\doublespace
\onehalfspacing
% setting some basic LaTeX variables
\widowpenalty10000
%\brokenpenalty10000
\clubpenalty10000
\setlength{\overfullrule}{5pt}
\usepackage{verbatim}
\usepackage{xunicode}
signature.asc
(application/pgp-signature, 190 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iD8DBQBS/fiU4J/vJdlkhKwRAtjNAJ9hu4R3EtqLfsSfB7xq3lZ2NhwN9wCgi2mN sTiAFyLf7ABMBo0dJ4oATHw= =bQ8y -----END PGP SIGNATURE-----