Showing posts with label macbook pro. Show all posts
Showing posts with label macbook pro. Show all posts

10/22/2012

! LaTeX Error: File `algorithm2e.sty' not found.

During yet another LaTeX project on my MacBook, I added some algorithms to my paper. After checking a couple of examples online, and discussing with a colleage I decided to go with algorithm2e over others such as algorithm, algorithmic, algorithmicx, program and pseudocode[1].

However I got the following error "! LaTeX Error: File `algorithm2e.sty' not found." Since I am using macport, to resolve this I needed to install the texlive-science package by executing sudo port install texlive-science, and all was good again.

References:

  1. http://en.wikibooks.org/wiki/LaTeX/Algorithms_and_Pseudocode

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.

8/27/2011

Runtime on notebooks

Got an Apple MacBook Pro towards the start of the year. Issue was that closing the lid only puts the machine in stand by mode which still consumes power, so I wasn't getting as long a runtime as I would on my old HP nx6120 with a travel battery.

A Google search led me to Todd Huss's[2] page below. This identified the pmset[1] command as being quite useful. I followed the instructions and now have the MacBook hibernating when I close the lid. Since then I have been asked by a number of colleagues about this, so thought I better document it here.

I rebuilt the old HP nx6120 to run Ubuntu 10.04 LTS. Again noticed that I wasn't getting reasonable runtime, instead of the usual 8-10 hrs, I only got around 3-4hrs. A discussion with a colleague led me to Linux Laptop Tools. Again some "Googling" led to the Ubuntu power management[3] which seemed to increase the runtime.

References

  1. http://en.wikipedia.org/wiki/Pmset
  2. http://gabrito.com/post/hibernate-with-the-macbook-pro
  3. https://wiki.ubuntu.com/PowerManagement