text from http://www.loremipsum.de |
Just my Linux Blog
Donnerstag, 30. August 2012
Placing text and figure side-by-side in a section in LaTeX.
After struggling a long time i want to share my information with you. It was so hard to find this out but now it works. I wanted to have a picture beside text. But as you know in LaTeX it is not so easy to place a picture at a fix position. In the Picture you can see how i wanted it to be.
And here is the source code for this (a bit shorten but with all relevant information):
I had to define a new environment which isn't floating [1]. The Environment doesn't change anything, but you can do so if you like (see Wikibooks). Right after my subsection started i placed my new environment and started a minipage inside it [2]. I use the positioning parameter t, which tells LaTeX to place the minipage and the content on top. In [3] i use vspace to define no Space to the top of the minipage. As far as i understand this has to be used because pictures will always be placed on the bottom. Then i place the picture in the second part of the minipage. I have to use captionof [4] to define a caption outside a floating environment. I tried a lot of stuff (placeins, float, \clearpage, \FloatBarrier, etc.) but in the end only this worked for me.
Labels:
\captionof,
\clearpage,
\FloatBarrier,
\newenvironment,
figures,
LaTeX,
minipage,
placeins,
placing,
section,
side-by-side,
subsection,
two-column
Montag, 25. Juni 2012
Bitlbee and ICQ
From time to time you should change your passwords, thats what they say. So I decided to change my ICQ Password. I used my last one for a very long time...
I just changed my password on icq.com to a very secure one.
After that I wanted to change my password in bitlbee also. So I used the command
Bitlbee said everything worked fine. But it didn't connect to ICQ. I tried a lot of stuff and it took me about one and a half hour to figure out that the problem was a password longer than 8 digits...
If I tried to log in at icq.com, no problem but bitlbee was unable to log in.
So take care if you want to change your password!
Samstag, 28. April 2012
Just one picture every day
The Idea is simple: one Photo every day. I knew that if I would have to do this by myself, I would forget it. If not at the first day at least at the third one...
I had an old webcam, so i decided to connect the webcam to my router and let it upload the pictures to my webserver. And because he does all the stuff, he could also take a photo every fourth hour.
I had to struggle a bit but after all it wasn't too hard.
First install the required software to connect the webcam.
I figured this out from this List: http://www.ideasonboard.org/uvc/ Now i can connect to my webcam. The tool I used to actually take the photos is fswebcam. you have to create a config file to use fswebcam with your preferred settings. I also changed some stuff to get a better image quality I just edited my video settings and the output file. I also added a command to the end of the settings file. I need this later to read out the name of the last picture. Now you can test it and take a photo: You should now have a photo in your /root directory with date- and timestamp. Nearly done. Because my router is very limited in space, I need to upload the files. Also because I want to view them in my browser. So I wrote a little script which does all the Stuff. As you see, not very difficult. Now the hard part has begun. Dropbear is a very lightweight ssh server and client. You can't use normal keys with it. See this error: So i had to create a 'little' Key. Now you can add converted_key.pub to the authorized_keys on your server. I found this here For all this you need a user on your server: And for the end we need to call the script every fourth hour, so we add a cron job: I had to start and enable it. Now you should get a photo every fourth hour. Now lean back and enjoy the photo series next year ;) One thing to remember: my webcam takes crappy pictures! €1: really crappy pictures! Have to fix this soon.
I had an old webcam, so i decided to connect the webcam to my router and let it upload the pictures to my webserver. And because he does all the stuff, he could also take a photo every fourth hour.
I had to struggle a bit but after all it wasn't too hard.
First install the required software to connect the webcam.
I figured this out from this List: http://www.ideasonboard.org/uvc/ Now i can connect to my webcam. The tool I used to actually take the photos is fswebcam. you have to create a config file to use fswebcam with your preferred settings. I also changed some stuff to get a better image quality I just edited my video settings and the output file. I also added a command to the end of the settings file. I need this later to read out the name of the last picture. Now you can test it and take a photo: You should now have a photo in your /root directory with date- and timestamp. Nearly done. Because my router is very limited in space, I need to upload the files. Also because I want to view them in my browser. So I wrote a little script which does all the Stuff. As you see, not very difficult. Now the hard part has begun. Dropbear is a very lightweight ssh server and client. You can't use normal keys with it. See this error: So i had to create a 'little' Key. Now you can add converted_key.pub to the authorized_keys on your server. I found this here For all this you need a user on your server: And for the end we need to call the script every fourth hour, so we add a cron job: I had to start and enable it. Now you should get a photo every fourth hour. Now lean back and enjoy the photo series next year ;) One thing to remember: my webcam takes crappy pictures! €1: really crappy pictures! Have to fix this soon.
Abonnieren
Posts (Atom)