brucemiller / LaTeXML

LaTeXML: a TeX and LaTeX to XML/HTML/ePub/MathML translator.
http://dlmf.nist.gov/LaTeXML/
Other
938 stars 99 forks source link

apacite.sty #711

Open dginev opened 8 years ago

dginev commented 8 years ago

The apacite package appears to be essential for a number of scientific subfields that follow the APA citation guidelines.

It has been requested in Authorea, in particular w.r.t the \citeNP citation macro, so I am opening an issue here for bookkeeping.

I consider this a part of the #559 bundle.

A simple demonstration of using apacite.sty:

\documentclass{article}
\usepackage[utf8x]{inputenc}
\usepackage{apacite}

\begin{document}

Simple demo:
\begin{itemize}
    \item cite: \cite{pijnacker2}
    \item citeNP: \citeNP{pijnacker2}
    \item fullcite: \fullcite{pijnacker2}
    \item shortcite: \shortcite{pijnacker2}
\end{itemize}

\vspace{1em}

From the manual:
\begin{itemize}
\item cite: \cite<e.g.,>[p.~11]{Jone01,Ross87} 
\item citeA: \citeA<e.g.,>[p.~11]{Jone01,Ross87} 
\item citeauthor: \citeauthor<e.g.,>[p.~11]{Jone01,Ross87} 
\item citeyear: \citeyear<e.g.,>[p.~11]{Jone01,Ross87}
\item citeyearNP: \citeyearNP<e.g.,>[p.~11]{Jone01,Ross87}
\item citeNP: \citeNP<e.g.,>[p.~11]{Jone01,Ross87}
\end{itemize}

\bibliographystyle{apacite}
\bibliography{example}

\end{document}

with example bibtex:

@article{pijnacker2,
Author = {J. Pijnacker and B. Geurts and M. van Lambalgen and J. Buitelaar and P. Hagoort},
Date-Added = {2014-02-06 15:14:32 +0100},
Date-Modified = {2014-02-06 15:17:39 +0100},
Journal = {Journal of {C}ognitive {N}euroscience},
Number = {2},
Pages = {471--480},
Title = {Reasoning with Exceptions: An Event-related Brain Potentials Study},
Volume = {23},
Year = {2010}}

@inproceedings{Ross87,
  author    = {Floyd E. Ross},
  title     = {{FDDI} - An Overview},
  booktitle = {COMPCON'87, Digest of Papers, Thirty-Second {IEEE} Computer Society
               International Conference, San Francisco, California, USA, February
               23-27, 1987},
  pages     = {434--440},
  publisher = {{IEEE} Computer Society},
  year      = {1987},
  timestamp = {Tue, 27 Jun 2006 14:43:07 +0200},
  biburl    = {https://dblp.org/rec/conf/compcon/Ross87.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}

@article{Jone01,
  doi = {10.1046/j.1360-0443.2001.961575.x},
  url = {https://doi.org/10.1046/j.1360-0443.2001.961575.x},
  year = {2001},
  month = jan,
  publisher = {Wiley},
  volume = {96},
  number = {1},
  pages = {57--72},
  author = {Barry T. Jones and Will Corbin and Kim Fromme},
  title = {A review of expectancy theory and alcohol consumption},
  journal = {Addiction}
}
brucemiller commented 7 years ago

You ought to take a look at the natbib package; it can be made to do most anything in terms of how things are cited. Moreover, the binding is pretty good and has a lot of support in the postprocessing. Probably some projection or extension of the macros and techniques in natbib should cover apacite; and I would bet it would be relatively easy once you'd understood natbib (which may be a contradiction in terms).

brucemiller commented 6 years ago

A good testcase that exercises any special macros from apacite would be very helpful.

dginev commented 3 years ago

Since you referred to natbib, the apacite manual mentions in section 4.2:

With the natbibapa option, apacite loads natbib with the options longnamesfirst and sort. The former inserts the full author lists in the first citation and the short author lists in subsequent citations, in the same way the apaciteclassic commands do. The sort option sorts the citations within the same citation com- mand in the same order as in the reference list, as required by the APA manual (p. 178). In addition to loading natbib, apacite includes some code to improve the interoperability, and it defines some additional commands that are specific to the natbib-apacite combination

So there is indeed a direct connection between the packages. I updated the issue description with some sample uses of apacite.

That said, this package is almost non-existent in arXiv (0.05%) so for now I think the issue milestone is correctly further down the line.