Showing posts with label texlive-bibtex-extra. Show all posts
Showing posts with label texlive-bibtex-extra. Show all posts

10/25/2011

APAcite on Mac OS X (Lion) with texlive

I had to recently rebuild my Mac Book Pro (gasp!), and decided to upgrade to Lion.  The whole process was relatively painless. Files were copied back from backups, and updated from my SVN repositories, however I had troubles installing the appropriate Mac port package for the APACite classes.

sudo port install texlive-bibtex-extra

The latter yielded errors, which were logged in

/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-text-bibtex/p5.12-text-bibtex/main.log

Since the dependency p5.12-text-bibtex could not be installed, examination of the log file provided the following clues; error: 'main' must return 'int'

The same error was reported for;

  1. /opt/local//var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-text-bibtex/p5.12-text-bibtex/work/Text-BibTeX-0.60/btparse/tests/namebug.c
  2. /opt/local//var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-text-bibtex/p5.12-text-bibtex/work/Text-BibTeX-0.60/btparse/tests/tex_test.c

A quick rename of void to int enabled the package to be installed without further issues.

10/17/2011

APAcite on Mac OS X with texlive

While compiling a LaTeX document, a blank template of my PhD thesis to be exact, when I got the following error "! LaTeX Error: File `apacite.sty' not found." Again a quick search for Mac ports indicated that the texlive-bibtex-extra package was required. It was quickly installed using;

sudo port install texlive-bibtex-extra

Subsequent compile yielded more errors, this time it was "! Undefined control sequence. \abstract". This was solved using the texlive-latex-extra package, installed using;

sudo port install texlive-latex-extra


Then adding the following to define the abstract in the book documentclass;

% Define abstract in book documentclass
\pagestyle{empty}
\newenvironment{abstract}%
{
  \onehalfspacing%
  \null
  \vfill
  \chapter*{\centering Abstract}%
  \addcontentsline{toc}{chapter}{Abstract}
}%
{\vfill\null}

% Start the actual abstract
\begin{abstract}
\end{abstract}

More errors resulted "! Use of \@year@ doesn't match its definition." I had to add "\bibliographystyle{apacite}" to the bibligraphy page, and all was well once again.

References:
  1. https://trac.macports.org/wiki/TeXLivePackages
  2. http://www.cs.utexas.edu/~witchel/errorclasses.html