tag:blogger.com,1999:blog-19111263474348812952024-03-14T08:23:59.902+00:00bamacasaBas van der Lindenhttp://www.blogger.com/profile/11720909655397156739noreply@blogger.comBlogger26125tag:blogger.com,1999:blog-1911126347434881295.post-7553238343224880772020-12-08T12:58:00.005+00:002020-12-08T12:59:41.545+00:00Save a Matlab movie to an AVI file:<p> Simple example script to save a Matlab movie to an AVI file:</p><p><span style="font-family: courier;">Z = peaks;</span></p><p><span style="font-family: courier;">surf(Z); </span></p><p><span style="font-family: courier;">axis tight manual </span></p><p><span style="font-family: courier;">set(gca,'nextplot','replacechildren'); </span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;">v = VideoWriter('peaks.avi');</span></p><p><span style="font-family: courier;">open(v);</span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;">for k = 1:20 </span></p><p><span style="font-family: courier;"> surf(sin(2*pi*k/20)*Z,Z)</span></p><p><span style="font-family: courier;"> frame = getframe(gcf);</span></p><p><span style="font-family: courier;"> writeVideo(v,frame);</span></p><p><span style="font-family: courier;">end</span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;">close(v);</span></p>Martijn Anthonissenhttp://www.blogger.com/profile/05868086299527258676noreply@blogger.com0tag:blogger.com,1999:blog-1911126347434881295.post-73774817349125886972012-12-18T14:29:00.001+00:002012-12-18T14:30:53.164+00:00Installing TU/e-fonts for use in LaTeXThe TU/e-fonts (so-called huisstijl in Dutch) are available from <a href="https://www.dropbox.com/s/9hn9a2991ppvavn/latex_huisstijl.exe">https://www.dropbox.com/s/9hn9a2991ppvavn/latex_huisstijl.exe</a>. To use them in LaTeX:<br />
<ul>
<li>unzip the folder in your local LaTeX-folder (usually ~/texmf)</li>
<li>switch to the new subfolder dvips/config</li>
<li>run the command<br /> updmap --enable Map=tue.map</li>
</ul>
Martijn Anthonissenhttp://www.blogger.com/profile/05868086299527258676noreply@blogger.com0tag:blogger.com,1999:blog-1911126347434881295.post-28497630270562707122008-03-06T09:35:00.001+00:002008-03-06T09:37:28.722+00:00Movies in MatlabThis script shows the very basics on how to generate a movie in Matlab<br /><pre><br />% Generate a simple movie: plot f(t, x) = sin(x - t) on (0, 2pi) for different t<br /><br />for i = 1:25<br /><br /> % Make a figure<br /> t = 0.1 * i;<br /> fplot(@(x) sin(x - t), [0 2*pi])<br /> <br /> % Store the figure as a frame in the movie<br /> M(i)=getframe;<br /><br />end<br /><br />% Play the movie ten times<br />movie(M,10)<br /></pre>Martijn Anthonissenhttp://www.blogger.com/profile/05868086299527258676noreply@blogger.com0tag:blogger.com,1999:blog-1911126347434881295.post-45697869884181256202008-02-01T10:04:00.000+00:002008-02-01T10:06:56.829+00:00Change Matlab-figures for printIf you use Matlab to generate EPS-files for inclusion in LaTeX-documents, you'll soon find that lines are too thin and text is too small. I use the following script to increase thickness and size in the current figure in Matlab:<br /><pre>linewidth = 2;<br />fontsize = 16;<br />fig = gcf;<br />h = findall(fig, 'Type', 'Text');<br />set(h, 'FontSize', fontsize)<br />h = findall(fig, 'Type', 'Axes');<br />set(h, 'FontSize', fontsize)<br />h = findall(fig, 'Type', 'Line'); <br />set(h, 'LineWidth', linewidth)</pre>Martijn Anthonissenhttp://www.blogger.com/profile/05868086299527258676noreply@blogger.com0tag:blogger.com,1999:blog-1911126347434881295.post-70257927550531857492008-02-01T09:56:00.001+00:002008-02-01T10:03:16.129+00:00Source code in LaTeXIf you want to include source code in LaTeX, you can of course use the standard <span style="font-weight:bold;">verbatim</span> environment. There are however many advantages to refer to the actual source file on disk instead of copying its contents into your LaTeX document. Referring to a file on disk can be achieved by using the <span style="font-weight:bold;">moreverb</span> package.<br /><br />I use the following commands: <pre>\usepackage{moreverb}\def\verbatimtabsize{4\relax} <br /></pre> to include the package and to set the amount of white space for tab characters to 4 (default is 8). Next define <pre>\newcommand{\listscript}[1]{{\textbf{#1}\footnotesize\verbatimtabinput{#1}}}<br /></pre> to have a new command for including e.g. Matlab scripts. Use it as<br /><pre>\listscript{cp19.m}</pre> to have the file <span style="font-style:italic;">cp19.m</span> in your document.Martijn Anthonissenhttp://www.blogger.com/profile/05868086299527258676noreply@blogger.com0tag:blogger.com,1999:blog-1911126347434881295.post-73296592479316933782007-11-01T09:26:00.000+00:002007-11-01T09:32:23.620+00:00Passwordless sshIt is very convenient to use ssh to login into different workstations or for instance our Beowulf cluster elegast without having to re-type your password all the time. It is possible to setup things in such a way that this is possible. Here's the howto.<br /><br />First you need to generate a so-called RSA key. Type<br /><pre>ssh-keygen -t rsa</pre><br />This will create two files: id_rsa and id_rsa.pub. The first should be kept secret, the second is public. You should now login into the remote machine. If the file ~/.ssh/authorized_keys exists, append the contents from the file id_rsa.pub to it. If it does not exist, create the directory ~/.ssh (with permissions rwx for yourself and no permissions for group and others) and the file authorized_keys (with permissions rw- for yourself and r-- for group and others) with as its contents the file id_rsa.pub.<br /><br />You should now be able to do passwordless ssh logins.Martijn Anthonissenhttp://www.blogger.com/profile/05868086299527258676noreply@blogger.com0tag:blogger.com,1999:blog-1911126347434881295.post-30615659825123735462007-11-01T09:02:00.000+00:002007-11-01T09:32:52.434+00:00Bash programmingThe standard shell under Linux is called <span style="font-weight:bold;">Bash</span> (the GNU Bourne Again SHell). Even though people are generally used to do a lot of stuff using graphical user interfaces, the command prompt can be very convenient for some tasks. Here are a few simple examples of how to get things done using your keyboard rather than your mouse.<br /><br /><span style="font-weight:bold;">Command line use by example</span><br /><br />To convert all .gif files in a directory to .jpg, type<br /><pre>for file in *.gif; do convert ${file} ${file%gif}png; done</pre><br />To find all .tex files in a directory including the subdirectories, type<br /><pre>find . -name "*.tex"</pre><br />To filter out those files that contain the word "dimension", use<br /><pre>grep dimension `find . -name "*.tex"`</pre><br />The code between the backquotes (`) is evaluated first and the output it generated is listed as if you typed it at the end of the command. In Bash you can also use $(command) as an alternative to the backquotes, which has the benefit that it can be nested. For example to get the number of bytes of all tex-files that contain the word dimension, you can say<br /><pre>du -s -k $(grep -l dimension $(find . -name "*.tex"))</pre><br />To make the search on "dimension" case insensitive, use<br /><pre>grep -i dimension `find . -name "*.tex"`</pre><br />To count the number of occurences, use<br /><pre>grep -i dimension `find . -name "*.tex"` | wc -l</pre><br />which might be written shorter - but less illustrative - as<br /><pre>grep -c -i dimension `find . -name "*.tex"`</pre><br />I'm sure you can use these examples to do powerful text searches yourself.<br /><br />To rename a bunch of .gif files in a directory to new names like 001.gif, 002.gif etc., you could type<br /><pre><br />l=1<br />for f in *.gif; do<br /> mv $f $(printf '%03d' $l).gif<br /> l=$((l+1))<br />done<br /></pre><br />This example also shows how to use if statements. A simple for loop can be programmed as<br /><pre>for (( n = 1 ; n < 9 ; n++ )); do echo $n; done</pre><br /><br /><span style="font-weight:bold;">Writing scripts</span><br /><br />If you have many commands that you use more than once, you can also create a text file in your favourite editor, type #!/bin/bash as the first line, and then put some shell commands. If you save the file and make it executable with chmod (see below), you have written a shell script and can simply execute all command by typing the script's name. This is like creating a Matlab script versus typing commands in the Matlab command window. In bash scripts, you can use a couple of funny looking variable names that have special meaning:<br /><table border="1"><br /><tr><td>Variable </td><td>Meaning</td></tr><br /><tr><td>$0 </td><td>name of the script</td></tr><br /><tr><td>$# </td><td>number of arguments given on the command-line when calling the script</td></tr><br /><tr><td>$1 </td><td>first argument given to the script</td></tr><br /><tr><td>$* </td><td>all arguments</td></tr><br /><tr><td>$@ </td><td>all arguments</td></tr><br /><tr><td>$$ </td><td>PID of the script</td></tr><br /></table><br />The difference between $* and $@ is subtle. Usually the latter does what you think it will do, while the first one has a slightly different semantic meaning. If you say "$*" it will expand to the single string "$1$IFS$2$IFS$3...", where IFS is an environment variable that contains a space by default but might have another value, e.g. the character ':'. When you say "$@" it will expand to the list of strings "$1" "$2" "$3"..., which is usually what you mean.Martijn Anthonissenhttp://www.blogger.com/profile/05868086299527258676noreply@blogger.com0tag:blogger.com,1999:blog-1911126347434881295.post-17580621912948825752007-11-01T08:31:00.000+00:002007-11-01T08:33:46.022+00:00Parentheses in mathematical formulasIf you use <span style="font-weight:bold;">\left(</span> and <span style="font-weight:bold;">\right)</span> in LaTeX, it will automatically scale the parentheses for you to match the size of whatever you put between them. Sometimes LaTeX doesn't do a good job though, and you'll have to help the program. Here's an overview of the commands you can use for creating parentheses in different sizes:<br /><ul><br /> <li> (, )<br /> <li> bigl(, bigr)<br /> <li> Bigl(, Bigr)<br /> <li> biggl(, biggr)<br /> <li> Biggl(, Biggr)<br /></ul>Martijn Anthonissenhttp://www.blogger.com/profile/05868086299527258676noreply@blogger.com0tag:blogger.com,1999:blog-1911126347434881295.post-90859478297491098092007-10-31T12:15:00.000+00:002007-11-01T08:31:18.424+00:00Font sizes in LaTeXTo write text in different sizes in LaTeX, you can use the following standard size-changing commands (from p. 170 in <span style="font-style:italic;">The LaTeX Companion</span>):<br /><ul><br /> <li> \tiny<br /> <li> \scriptsize<br /> <li> \footnotesize<br /> <li> \small<br /> <li> \normalsize<br /> <li> \large<br /> <li> \Large<br /> <li> \LARGE<br /> <li> \huge<br /> <li> \Huge<br /></ul>Martijn Anthonissenhttp://www.blogger.com/profile/05868086299527258676noreply@blogger.com0tag:blogger.com,1999:blog-1911126347434881295.post-61825851400202435562007-10-23T13:04:00.000+01:002007-10-23T13:13:50.569+01:00Source code in LaTeXIf you want to include some source code into a LaTeX-document, you can of course use the <span style="font-weight:bold;">verbatim</span> environment. It can be useful to refer to an external file rather than copy & paste the source into the LaTeX-file.<br /><br />To refer to an external file (which has the advantage that you do not need to apply modifications in two places) can be done by using the <span style="font-weight:bold;">moreverb</span> package: insert <blockquote>\usepackage{moreverb}</blockquote>at the beginning of your document. I use the following macro <blockquote>\newcommand{\listscript}[1]{{\footnotesize\verbatiminput{#1}}}</blockquote><br /><br />You can now use <blockquote>\listscript{ex5.m}</blockquote> in your document if you want to include the source text in the file <span style="font-style:italic;">ex5.m</span>.Martijn Anthonissenhttp://www.blogger.com/profile/05868086299527258676noreply@blogger.com0tag:blogger.com,1999:blog-1911126347434881295.post-88972824723021708592007-06-11T21:52:00.000+01:002007-06-11T21:54:46.160+01:00TU/e campus softwareAlways forget the link for campus software like I do? Find <a href="http://w3.tue.nl/nl/diensten/dienst_ict/organisatie/groepen/wins/campus_software/">the list at this page</a>.Martijn Anthonissenhttp://www.blogger.com/profile/05868086299527258676noreply@blogger.com0tag:blogger.com,1999:blog-1911126347434881295.post-15828562698419969572007-06-11T15:01:00.000+01:002007-06-11T15:11:48.453+01:00MarcoPoloI use my MacBook every single day, both at home and at university. Although you can specify more than one outgoing mail server in Apple mail, it is a bit annoying that you have to change the setting every time you change location. Enter MarcoPolo. This is quite a new program, but I use it on a daily basis and am very happy with it. MarcoPolo guesses at which location you currently are and can do a numer of things based on this guess. For me it changes outgoing mail server, default printer and, at university, switches off wifi.<br /><br />It's free, it works great and, if you need this functionality, I strongly recommend it. Of course it also has builtin <a href="http://bamacasa.blogspot.com/2007/06/growl.html">Growl</a> support!<br /><br />Visit <a href="http://www.symonds.id.au/marcopolo/">MarcoPolo's website</a>.Martijn Anthonissenhttp://www.blogger.com/profile/05868086299527258676noreply@blogger.com0tag:blogger.com,1999:blog-1911126347434881295.post-29033128831795708542007-06-11T14:51:00.000+01:002007-06-11T15:07:05.587+01:00Growl!This is another type of application that you may not be familiar with. Growl is a program that shows <i>notifications</i>, little messages pop up on your screen. The great thing is that programs can let you know some task is completed, new mail has arrived, hardware was added to your system etc etc. This all happens without interfering with what you were doing. The messages do not distract, are yet informative and above all: different programs let you know stuff in a consistent way.<br /><br />Many programs have Growl support built in; for some you can install little helper scripts or programs. I have installed GrowlMail and HardwareGrowler.<br /><br />The program is free and super useful, so <a href="http://growl.info/downloads.php">go get it!</a>Martijn Anthonissenhttp://www.blogger.com/profile/05868086299527258676noreply@blogger.com0tag:blogger.com,1999:blog-1911126347434881295.post-82649178901500389512007-06-07T23:16:00.000+01:002007-06-07T23:21:55.432+01:00RulersEvery so often I need to measure data from a picture or pdf file. I keep searching for the perfect onscreen set of rulers. I found one a while ago that allowed me to first set up the scale with a few mouse clicks and then do the measurements. Alas, I have lost track of that app.<br /><br />However, this RealBASIC app seems to be quit up for doing the job, and better still it runs equally well on Windows as on Apple. (RealBASIC should even run on Linux, no?) Check it out at: <a href="http://www.omnidea.it/en/software/rulers/index.html">http://www.omnidea.it/en/software/rulers/index.html</a>Bas van der Lindenhttp://www.blogger.com/profile/11720909655397156739noreply@blogger.com0tag:blogger.com,1999:blog-1911126347434881295.post-45138007978099632732007-06-07T20:45:00.000+01:002007-06-07T21:05:02.064+01:00Journler: how to organize things<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNDPk4RXB3p6BcnuIiSOJyKEJ-T_twyPk_pac1w05YkxTK_PWMJZUnL-w84U4jvIVx5d2B94u9uPMETAYhIVxMbB7S6kPVzD3pIYijb_CVFYRaDOJauak6JfX7_ecLtZAfmQtfxpZgPbMk/s1600-h/screenshot_2.1.png"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNDPk4RXB3p6BcnuIiSOJyKEJ-T_twyPk_pac1w05YkxTK_PWMJZUnL-w84U4jvIVx5d2B94u9uPMETAYhIVxMbB7S6kPVzD3pIYijb_CVFYRaDOJauak6JfX7_ecLtZAfmQtfxpZgPbMk/s200/screenshot_2.1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5073414140272875138" /></a><br />Yesterday, I already discussed how to make more use of Spotlight with SpotInside. Spotlight is great for finding things, and you can find things even after you forgot where you have put things. I still tend to put things together in subfolders of subfolders, but sometimes wonder if things should go into my Programming/C++ folder or in my Work/SomeProject folder. In the end things tend to get scattered around anyway.<br /><br />Wishing I had a Mac at my disposable the whole day, I would use this program: <a href="http://journler.com/">http://journler.com/</a>. It lets you make a journal of things you collect. For me, when working on a project there is a lot of files on the periphery of the actual research or coding that can get lost. Scientific articles with interesting infomation, but how to store that knowledge. I tend to carry a lot of notes and articles with annotations. But these are all in paper, and that's hard to backup, or in half a year: hard to find. <br /><br />With this fabulous program, you can make notes, and store all kinds of files with those notes. This means I could store a PDF together with my own notes about why this article was useful to me or what idea I got from it, in a digital form. Digital for me means backup-able, re-findable, re-usable.<br /><br />Unfortunately having a Mac only at night, I cannot properly use to program, lest a sync all the files I generated or used during the day anyway. But that would mean I already would have organized them, and I need this program for that...Bas van der Lindenhttp://www.blogger.com/profile/11720909655397156739noreply@blogger.com0tag:blogger.com,1999:blog-1911126347434881295.post-43577125965991892132007-06-07T08:47:00.000+01:002007-06-07T09:30:48.972+01:00Early evaluationThings I miss from a wiki-type solution instead of this blog:<br /><ul><br /><li>possibility to edit (extend, change) other people's posts. Comments are available, but less visible and not suitable for e.g. typo's in the original post<br /><li>ease of editing. Typing HTML codes is more work than wiki markup<br /><li>not possible to see how some things (including pictures, making lists etc.) are done because you do not get to see the source of other people's messages<br /><li>no list of recent changes<br /></ul><br />Advantages are obviously that we have a nicer link to the site and that we do not need to run our own server. Also, the user interface for blogger is localized and gets improved by Google over time.Martijn Anthonissenhttp://www.blogger.com/profile/05868086299527258676noreply@blogger.com1tag:blogger.com,1999:blog-1911126347434881295.post-71969303125133538712007-06-06T14:24:00.000+01:002007-06-07T20:59:15.777+01:00QuickSilver - must have<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBzYAwdASB85p0q7mwnYd2CM_0CG79WzKP1k3Anz5LDSEcnxbkwdO_4jrk43wQ1gNUApymR4GrkwATAKm2iYILZyMT7TLESEJUpY2g4GzTcI0eb8d1edUxjouylWYXZL5FlvsvYHyPzdmy/s1600-h/Quicksilver.png"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBzYAwdASB85p0q7mwnYd2CM_0CG79WzKP1k3Anz5LDSEcnxbkwdO_4jrk43wQ1gNUApymR4GrkwATAKm2iYILZyMT7TLESEJUpY2g4GzTcI0eb8d1edUxjouylWYXZL5FlvsvYHyPzdmy/s200/Quicksilver.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5073414445215553170" /></a><br />Yeah, let's make this an Apple fan-boy blog! Inspired by Bas's previous two posts on Apple software, I thought I'd mention QuickSilver. This is a must have program, and it's free too!<br /><br />QuickSilver's website is quite obscure, as is the program's documentation. You get a very good impression of what you can do by <a href="http://vjarmy.com/archives/2004/03/quicksilver_a_b.php">this post</a> though. Check it out. You don't want to do without it once you've installed it on your Mac!Martijn Anthonissenhttp://www.blogger.com/profile/05868086299527258676noreply@blogger.com1tag:blogger.com,1999:blog-1911126347434881295.post-77674948545946553452007-06-06T14:00:00.000+01:002007-06-08T08:49:28.272+01:00SpotInside: usable spotlight queries<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOylhOGd57GBcdjEMxx5itNXV0Snr6k8YPhmdjxwRxCExubPDInPeZiiBtKQJiDVBL36El9AJnVsnjR_dpvFJDxnhKnKtHHdoZtUlpnwJwWR41z5Skv0ACT9GmB4tT2Ca6NijDJ-pd9PHw/s1600-h/spotinside.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOylhOGd57GBcdjEMxx5itNXV0Snr6k8YPhmdjxwRxCExubPDInPeZiiBtKQJiDVBL36El9AJnVsnjR_dpvFJDxnhKnKtHHdoZtUlpnwJwWR41z5Skv0ACT9GmB4tT2Ca6NijDJ-pd9PHw/s200/spotinside.png" alt="" id="BLOGGER_PHOTO_ID_5072937244284196466" border="0" /></a><br /><p>MacOS X comes with a handy desktop search built right in. However, choosing what you are looking for from a long list of results can be quite awkward. On my ageing Mac Mini — a real Mac being a PowerPC! — also the search-as-you-type feature of spotlight makes it painfully slow, to the point of unusable.</p>A better way to search the results is offered by <a href="http://www.oneriver.jp/SpotInside/">SpotInside</a>. It shows the contents of almost everything, makeing it a treasure to find what you are looking for.Bas van der Lindenhttp://www.blogger.com/profile/11720909655397156739noreply@blogger.com0tag:blogger.com,1999:blog-1911126347434881295.post-35968705494957696402007-06-06T13:45:00.000+01:002007-06-06T13:53:23.273+01:00References in LaTeX using bibtexIf you use LaTeX often you will soon find that you should keep track of references with <b>bibtex</b> rather than specifying them time and time again in a bibliography-environment in each document separately. Here's a short intro on working with bibtex.<br /><br />Somewhere in the beginning of your text document, you tell LaTeX which style to use for the references, e.g. <br /><code><br /> \bibliographystyle{plain}<br /></code><br />You can just cite papers and books with "\cite" as you do now. However, at the end of the document, you write<br /><code><br /> \bibliography{martijn}<br /></code><br />instead of the whole thebibliography environment you use now. That's all.<br /><br />Now, use "latex mytext" on your file twice, next run "bibtex mytext" and finally twice more "latex mytext". You don't have to do this every time - just when you have used new citations in your text, you need to run<br />"bibtex" again. (Explanation: bibtex actually generates the thebibliography environment for you, including all references you actually use. See the file mytext.bbl for the generated file.)<br /><br />I've enclosed a small example, see test.tex:<br /><code><br />\documentclass[a4paper]{article}<br /><br />\usepackage{euler}<br />\usepackage{palatino}<br />\usepackage{cite}<br /><br />% The following command changes the way your list of<br />% references will look, as well as how the citations in<br />% the text will look. Unquote "apalike" to get similar references as<br />% in my PhD thesis.<br />\bibliographystyle{plain}<br />%\bibliographystyle{apalike}<br /><br />\begin{document}<br /><br />Here is a reference to the first entry in my bibliography file<br />\cite{RANA9804}.<br /><br />If you would like to refer to a theorem or page in a reference,<br />use something like \cite[p.~100]{RANA9804} or \cite[Th.~4]{RANA9804}.<br /><br />If you use the \verb=cite=-package, lists of references will be<br />put in a nicer form, such as \cite{RANA9804,RWTH152,NAVW}.<br /><br />\bibliography{martijn}<br /><br />\end{document}<br /></code><br /><br />Here's the bibtex file martijn.bib:<br /><code><br />% Sample bibtex file<br /><br />@techreport{RANA9804,<br />author = "Martijn J. H. Anthonissen and Bas van 't Hof and Arnold A. Reusken",<br />title = {A finite volume scheme for solving elliptic boundary<br /> value problems on composite grids},<br />month = feb,<br />year = 1998,<br />institution = {Eindhoven University of Technology},<br />address = {Eindhoven},<br />number = {RANA 98-04}<br />}<br /><br />@techreport{RWTH152,<br />author = "Martijn Anthonissen and Bas van 't Hof and Arnold Reusken",<br />title = {A Finite Volume Scheme for Solving Elliptic Boundary<br /> Value Problems on Composite Grids},<br />month = feb,<br />year = 1998,<br />institution = {Institut f\"ur Geometrie und Praktisch Mathematik, RWTH Aachen},<br />address = {Aachen},<br />number = {Bericht Nr.~152}<br />}<br /><br />@article{NAVW,<br />author = "M. J. H. Anthonissen and B. van 't Hof and A. A. Reusken",<br />title = {An Iterative Finite Volume Discretization Method for Solving Elliptic Boundary<br /> Value Problems on Locally Refined Grids},<br />journal = {Nieuw Archief voor Wiskunde},<br />volume = 17,<br />pages = {111--123},<br />year = 1999<br />}<br /></code>Martijn Anthonissenhttp://www.blogger.com/profile/05868086299527258676noreply@blogger.com0tag:blogger.com,1999:blog-1911126347434881295.post-3471979369172472522007-06-06T13:38:00.000+01:002007-06-06T13:41:40.587+01:00References in LaTeXA quick LaTeX-tip on the authors field in an item in a bibtex-file. You should always use spaces in<br />between initials, so e.g.<br /><code><br /> author = "C. R. Traas and H. G. ter Morsche and R. M. J. van Damme",<br /></code><br /><br />If you do not include the spaces, bibtex thinks the first author has first name "C.R." rather than understanding that you mean he has initials "C" and "R".<br /><br />This makes a difference depending on which bibliography style you use.Martijn Anthonissenhttp://www.blogger.com/profile/05868086299527258676noreply@blogger.com0tag:blogger.com,1999:blog-1911126347434881295.post-50952132663290825132007-06-06T13:18:00.000+01:002007-11-01T09:31:57.681+00:00Shell scriptsThe following script is not an example of great programming, but shows some of the standard commands available in the UNIX shell:<br /><pre><br />l=1<br />for FILE in *.gif<br />do if test $l -ge 100<br /> then mv $FILE $l.gif<br /> elif test $l -ge 10<br /> then mv $FILE 0$l.gif<br /> else mv $FILE 00$l.gif<br /> fi<br /> l=$((l+1))<br />done<br /></pre><br />A standard loop can be programmed via<br /><code><br />for (( n=1 ; n<9 ; n=$((n+1)) )); do echo $n; done<br /></code>Martijn Anthonissenhttp://www.blogger.com/profile/05868086299527258676noreply@blogger.com1tag:blogger.com,1999:blog-1911126347434881295.post-28989269763095390222007-06-06T13:15:00.000+01:002007-06-06T13:16:50.192+01:00TU/e Dial-inIf you are ever in the sad situation that you want to use an old-fashioned telephone modem to access the internet, you can use the TU/e dial-in server. The telephone number is 06760 04321. Log in using your NT account.Martijn Anthonissenhttp://www.blogger.com/profile/05868086299527258676noreply@blogger.com0tag:blogger.com,1999:blog-1911126347434881295.post-51151685326680063652007-06-06T13:09:00.001+01:002007-06-06T13:17:18.535+01:00Using the shellNever underestimate the power of the UNIX shell! The following one-liner converts a batch of files from gif to jpeg for you<br /><blockquote><br />for file in *.gif; do convert ${file} ${file%gif}png; done<br /></blockquote><br />Note that the <b>%gif</b> removes <b>gif</b> from the file name for you. If you are trying to create such a one-liner it is very convenient to use <b>echo</b> to first print commands before actually executing them, so <br /><blockquote><br />for file in *.gif; do echo convert ${file} ${file%gif}png; done<br /></blockquote><br />is harmless but gives you an indication of what will happen.Martijn Anthonissenhttp://www.blogger.com/profile/05868086299527258676noreply@blogger.com0tag:blogger.com,1999:blog-1911126347434881295.post-10504990085669138282007-06-06T13:00:00.001+01:002007-06-06T13:41:00.043+01:00Index in LaTeXIf you want to add an index to a LaTeX document (say, a thesis), the simplest option to mark a word (e.g. <i>convection</i> is to use <b>\index{convection}</b>. More advanced uses include:<br /><ul><br /><li><b>\index{dimensions!rule!width}</b> - this is for subitems<br /><li>somewhere in your text you put <b>\index{domain decomposition|(}</b>, then you write a lot of stuff on this topic and you end with <b>\index{domain decomposition|)}</b> - this is for a page range<br /><li><b>\index{delta@$\delta$}</b> - this tells LaTeX that it should treat the letter as the word "delta" when compiling the index<br /><li><b>\index{topic|see{some other topic}}</b> - for a cross-reference<br /></ul>Martijn Anthonissenhttp://www.blogger.com/profile/05868086299527258676noreply@blogger.com0tag:blogger.com,1999:blog-1911126347434881295.post-17363131858622315322007-06-06T12:41:00.000+01:002007-06-06T12:59:27.870+01:00Brackets in LaTeXIf you use \left( and \right) in LaTeX it will automatically make the brackets larger, depending on what you put in between. Sometimes it doesn't do a good job and you should manually resize the brackets. These are, arranged from smaller to larger, your options:<br /><ul><br /><li>(, )<br /><li>\bigl(, \bigr)<br /><li>\Bigl(, \Bigr) <br /><li>\biggl(, \biggr) <br /><li>\Biggl(, \Biggr)<br /></ul>Martijn Anthonissenhttp://www.blogger.com/profile/05868086299527258676noreply@blogger.com0