2015.08.01

Step 1

Make an installer drive on a USB stick or a USB harddrive. Use a GUID partition, Extended Mac OS X Journaling. Download Yosemite installer on App Store.

createinstallmedia does not work on Snow Leopards.

Instead, use Option 2 of this article. I forgot the copying the .dmg at the top level of the drive and I got an instalation error.

Step 2

Back up current OS with Carbon Copy Cloner version 3 (I used 30-day-trial and it worked fine). My mac kept on crashing and it was because it was indexing the new harddrive while it was cloning. Make sure to turn off indexing on the Spotlight settings.

Step 3

Erase current OS disk. Boot to the newly created boot drive by pressing Option key while the computer is starting up. Go to utilities and erase the old OS to an empty Mac OS Extended Journaling.

2015.05.01

I’ve been trying to login from my desktop PC to my Raspberry Pi. It worked before but recently I wasn’t able to ssh from it.

I tried ssh -v pi@raspberry and it seems that it has these errors repeated 5 times for different keys.

debug1: Authentications that can continue: publickey,password
Offering RSA public key: ansshkey@something

Turns out that my desktop has too many keys in ssh-add -l that it kept on trying to login with keys. ssh-add -D did not simply work. You have to manually remove unneeded keys from ~/.ssh/ folder. Finally I can login again ^o^

2015.02.12

catchfilebetweentags

To quote from other tex file (ie. indicating that you have added this specific file in the paper). In the file you want to quote:

%<*tag>
This is the line I want to quote.
%</tag>

In rebuttal file:

...
\usepackage{catchfilebetweentags}
...
\ExecuteMetaData[path/to/file.ext]{tag}
...

xr

To get reference numbers from other file (ie. putting the same section/figure/table number in your rebuttal file as in your paper).

...
\usepackage{xr}
\externaldocument{path/to/file.ext}
...
Section \ref{sec:Method}
...

xr-hyper

Alternative of xr. To get name of section of other file from reference name (ie. replaces \nameref{sec:intro} to Introduction). When you click the link, it links to the section of the linked pdf file! Neat!

In file to get reference from:

...
\usepackage{xr-hyper} %put link between files
\usepackage{hyperref} %for nameref, use [draft]{hyperref} for disabling linking
...
\section{Introduction}\label{sec:intro}.
...

In rebuttal file:

...
\usepackage{xr-hyper} %put link between files
\usepackage{hyperref} %for nameref, use [draft]{hyperref} for disabling linking
\externaldocument{path/to/ref/file.ext}
...
As explained in Section \nameref{sec:intro}.
...

Remove the aux files of both, then compile (ie. run pdflatex) the original file twice, then compile the rebuttal file twice.

Same cite reference number

To get the same reference number as used in the original file. You must compile the original file first and produce the .bbl file before compiling the rebuttal file. This snippet below allow the Reference section to be hidden.

\clearpage
\newsavebox\mytempbib
\savebox\mytempbib{\parbox{\textwidth}{\input{path/to/file.bbl}}}

latexdiff

To see how different your initial submission is to your revision. I like to have my added words written in red and the deleted ones not shown (by default it is blue). After doing latexdiff draft.tex revision.tex > diff.tex, edit diff.tex

\providecommand{\DIFaddtex}[1]{ {\protect\color{red}#1} } %change this to red color
\providecommand{\DIFdel}[1]{} % Don't show deleted text

Then compile diff.tex to produce the pdf.

Supplementary materials

To add “S” in front of table and figure numbers, insert at the header.

\makeatletter 
\setcounter{figure}{0}
\renewcommand{\thefigure}{S\@arabic\c@figure}
\setcounter{table}{0}
\renewcommand{\thetable}{S\@arabic\c@table}
\makeatother
2015.02.10

Download zip file and copy it to the install folder, then do texhash

 sudo unzip ~/Downloads/glossaries.tds.zip -d /usr/local/share/texmf
 sudo texhash
2015.02.07

OSX 10.8.5, UpTeX installed, (Not sure what else I installed).

Running tlmgr installs package in /usr/local/texlive/2013basic/texmf-dist/tex/latex/biblatex. Put a symbolic link into /Applications/UpTeX.app/teTeX/share/texmf-dist/tex/latex and run texhash.

$texhash
texhash: Updating /Applications/UpTeX.app/teTeX/share/texmf/ls-R...
texhash: Updating /Applications/UpTeX.app/teTeX/share/texmf-config/ls-R...
texhash: Updating /Applications/UpTeX.app/teTeX/share/texmf-dist/ls-R...
texhash: Updating /Applications/UpTeX.app/teTeX/share/texmf-var/ls-R...
texhash: Updating /Applications/UpTeX.app/texfonts/ls-R...
texhash: Done.

Then I can run the new package with pdflatex.