Monatsarchiv: Juni 2012

Latex and SI-Units

Everybody knows the Problem: You are writing a formula, calculate something and then you end up with numbers – and some weird units. What to do? Until now, I always started something like
\frac{\mathrm{kg}*\mathrm{m}}{\mathrm{s}^2}. Thanks a lot! But today, I stumpled over the siunitx package. This makes it easier for you to attach units to numbers – both in text- and mathmode. The above SI-Unit would look like this:
\si{\kilo\gram\metre\per\square\second}
Or, if you prefer it shorter:
\si{kg.m/s^2}
You can even define your own units in the preamble:
\DeclareSIUnit{\koeartsforce}{\kilo\gram\metre\per\square\second}
Now I can write, that
The Monty Pythons' famous 16 Tons weight will smash you to the ground with a force of approx. \SI{156960.0}{\koeartsforce} - assumed you are standing on the surface of planet earth..

(Sorry Newton, I know this unit was actually dedicated to you!).

So, if you like doing things right go and check it out! You can find (german) introductory slides by suedraum.de at http://www.suedraum.de/latex/stammtisch/werte_und_einheiten_siunitx_2.pdf (they have other cool LaTeX stuff, check it out!), siunitx on ctan.org and – last but not least, on your local system:
texdoc siunitx.

If you have a tip on how to enable auto-discovery of SI-Units – I would be thankful for that as well!

Hinterlasse einen Kommentar

Eingeordnet unter diverses, news

How to write research papers

While browsing the web for help in writing advanced lab reports, I found this humourous guidelines: http://www.ruf.rice.edu/~bioslabs/tools/report/wrules.html.

Hinterlasse einen Kommentar

Eingeordnet unter diverses

Screen Magie: Split Windows

If you are using Linux and have to open a ssh connection to some other machine, you might already have used an awesome tool: GNU Screen. This handy window manager makes troubles with lost ssh connections dissappear. Magic.
You will find a lot of tutorials on the internets on how to use it, for example this one.
If you are kind of used to it, you will find yourself having a lot of windows beeing open pretty quick. But this is, when trouble sometimes start: You are doing this code editing in one window, on the other window you want to compile and check the results. For example, running a python interpreter like bpython. Switching between windows is tiredsome, also open a second terminal, connecting via ssh again, do a screen -x, having your screen open twice – terrible.

Today I discovered a new method: It’s called split windows.
If you press* ^a S (split) you can split the window you are currently in (horizontally. Depending on your screen version the pipe character „|“ does open a vertical split). The new part of the window is still blank. Now switch in it, using ^a ^i (focus). Having selected it, you can fill it with a already open window of your choice by pressing f.e. ^a 1 to show window #1 or creating a new window ^a c and so on and so forth.

To close a split window, don’t do a ^a d (except you have created a new window and/or you really want to close the window), but do a ^a :remove which closes the split but leaves the window open. A ^a TAB lets you cycle through your split screen windows.

I found a couple of the shortcuts here (there are more, too).

Enjoy working split-screen :)

*: The ^-character stands for your CTRL-key. But keybindings may differ :)

Hinterlasse einen Kommentar

Eingeordnet unter diverses, news