6/19/2009

The way to define current reference string for your own LaTeX environment

That is, the way to define output style of \ref{foo} when \label{foo} is within your own environment.
\newcounter{sidebar}[chapter]
\renewcommand{\thesidebar}{\thechapter.\arabic{sidebar}}
\newenvironment{sidebar}{%
 \refstepcounter{sidebar}}{%
 ...
...}
\refstepcounter is essential. It is this command that defines the current reference string which is available as \thesidebar command ('sidebar' is that in 'thesidebar'). All you have to do is renewcommand this \thesidebar command to your favorite style like above example.

5/25/2009

When you get below error from GitHub,
You can't push to git://github.com/user/repo.git
Use git@github.com:user/repo.git
and you are supposed to be the owner of that repo clone, you must have cloned (or checked out) the 'Public Clone URL' instead of 'Your Clone URL'. For me, the instant cure is to open .git/config file with editor and rewrite the url in [remote "origin"] entry.

12/08/2008

We are visiting Taiwan for the first time in a couple of years. For these years, we couldn't have been here since we got a baby. Thus, we have an infant in this trip. It's less of a problem so far. Both the airline and the hotel have given us a great amount of cares. I didn't know the airplane has places for attaching cradles.

DSC_0086

But the hotel room we booked is not allowed to use the crib, and the baby fell off the bed. Of cause it's not the hotel's fault. The stuffs are very honest.

DSC_0090

Today I had a rush visit to Ping-Ling. Ping-Ling is one of the production center of chinese tea, and is located in the contryside of Taipei. It's too far to go with baby. So I went alone. My spouse and the baby spent the first day of Taipei lokking around this appealing city.

DSC_0093

11/27/2008

Playing with a baby

It's becoming more and more fun as he grows gradually.

11/26/2008

envy

I realize that I'm easily envious of someone. I've even been envious of someone because he could make me felt envious. Sometime, an envy brought me some degree of motivation. But those motivation never caused a real effort. I should restrict envy to myself or keep away from greatness. Apparently, both of these approachs must be wrong.

11/25/2008

Math is hard

Yes. But no. To do math is easy. To achieve math is hard. And, in that sense, anything is hard. Especially, commision is hard, Even to do it inevitably depends on someone else's resource. What can I do? Do anyway, I know.

11/24/2008

Peace as Tuna

Rain. We are in trouble with drying diapers.

I hard a radio news this morning that reports a local TV actor catch a 300kg bluefin tuna. It's not the politics or economics that was provided as the top news of today. Instead, it was the story of a man and a 600lb fish. Cool. In Japan, it seems that there's no more serious news than tuna, even when the dreadful financial crisis or wars around the world. Sure, we love it. And you should invest in this crazy peaceful country, NOW.