Sunday, October 26, 2014

et al. in Latex References

Hi guys,

I use a separate .bib file for including references in my LaTex documents.
i.e.
\bibliography{bib/mybib}
\bibliographystyle{IEEEtrans}

where bib is a folder and mybib.bib is the bibliography file. It has entries in the following format.

@article{dissanayake2001solution,
  title={A solution to the simultaneous localization and map building (SLAM) problem},
  author={Dissanayake, MWM Gamini and Newman, Paul and Clark, Steve and Durrant-Whyte, Hugh F and Csorba, Michael},
  journal={Robotics and Automation, IEEE Transactions on},
  volume={17},
  number={3},
  pages={229--241},
  year={2001},
  publisher={IEEE}
}

Now, if you are running out of space you can make the author list small by using et al. keyword. To use that just type "and others" in the authors sub-entry like this.

@article{dissanayake2001solution,
  title={A solution to the simultaneous localization and map building (SLAM) problem},
  author={Dissanayake, MWM Gamini and others},
  journal={Robotics and Automation, IEEE Transactions on},
  volume={17},
  number={3},
  pages={229--241},
  year={2001},
  publisher={IEEE}
}


By the way, you can export entries to BibTex from Google Scholar. Go to settings in Google scholar and in Bibliography manager "Show links to import citations into" choose BibTex.

That's it.


Cheers!!!

Friday, October 17, 2014

Writing Japanese using pLatex in Mac

This is how it is done!

First of all, the credit should go to Link and I am just copying from there.


  • Install Macports from here; follow any additional steps stated by them.
  • After installing Macports, type the following on the terminal
sudo port install pTeX +hiragino +otf +utf8 +motif +macosx
  • Install TeXShop if you do not already have it.
  • Open preferences in TeXShop and select "Set Default Values". In the drop down menu, choose Legacy pTeX (Shift JIS)
  • Save your tex file using Japanese SJIS encoding.
  • Press "Typeset" to build your file
  • If things are not working try the following.
    • modify the file “/Users/<your account>/Library/TeXShop/bin/platex2pdf-euc” to change path to “opt” instead of “usr”. That is 
from [export PATH=$PATH:/usr/local/bin:/usr/local/teTeX/bin
to [export PATH=$PATH:/opt/local/bin:/usr/local/teTeX/bin]
    • If fontspec is needed:
sudo tlmgr update –self
sudo tlmgr install fontspec

  • Here is a sample code
%\documentclass[twocolumn,11pt]{jarticle} %In case two column layout
\documentclass[a4j]{jarticle}
\usepackage{graphicx} %for including graphics
\usepackage{nidanfloat}
\usepackage{url}
\title{タイトル}
\author{ 僕の名前 }
\date{2010年}
\renewcommand{¥refname}{References}
\begin{document}
\maketitle
\section{テスト}
これはテストです。
\end{document}