Skip to topic | Skip to bottom

Arthur.ScientificWritingr1.15 - 31 Jan 2006 - 21:55 - ArthurVanDamtopic end

Start of topic | Skip to actions

Scientific Writing

Use LaTeX

Of course...

Useful packages/commands/scripts

Theme uubeamer

A latex-beamer theme in Utrecht University colors, including the sol logo. Read more on my uubeamer page.

beamer2handout converter

Producing handouts of your PDF files (e.g. talk slides) is easily done with PDFjam/pdfnup from David Firth. It takes quite some options though, and I made a small script that converts a pdf to an either 4- or 6upped pdf in the usual way. It is used like this:
$ beamer2handout myslides.pdf
$ beamer2handout myslides.pdf 6up
$ beamer2handout myslides.pdf 4up otheroutputfile.pdf

If you would like to use it get beamer2handout here. The setup is as follows:

  1. Save it in some convenient location
  2. Make it executable: chmod u+x beamer2handout
  3. Edit beamer2handout, specify your location of pdfnup

Known problems: I used to run TeXLive 6, but some parts of it were too old for PDFJam, so I switched to TeXLive 8. (MI-colleagues: just edit your ~/.login where it says source /usr/local/startup/texlive6).
More specifically, I now have it working with pdfpages v0.3a and pdftex.def v0.03k

Block (un)commenting in NEdit

Open your NEdit settings file file (i.e. in ~/.nedit/nedit.rc for versions >= 5.4, or ~/.nedit for older versions)

First, find in this file:

nedit.macroCommands: \

Next, look up the first Comments> line, and just above that, add:

        Comments>% Comment@LaTeX:::R: {\n\
                replace_in_selection("^.*$", "%&", "regex")\n\
        Comments>% Uncomment@LaTeX:::R: {\n\
                replace_in_selection("(^[ \\\\t]*%)(.*)$", "\\\\2", "regex")\n\

Or, including shortcut keys ([Shift]+[Ctrl]+C for commenting, [Shift]+[Ctrl]+[Alt]+C for uncommenting):

        Comments>% Comment@LaTeX:Shift+Ctrl+C:c:R: {\n\
                replace_in_selection("^.*$", "%&", "regex")\n\
        Comments>% Uncomment@LaTeX:Shift+Ctrl+Alt+C:u:R: {\n\
                replace_in_selection("(^[ \\\\t]*%)(.*)$", "\\\\2", "regex")\n\
Save the settings file and (re-)start NEdit.

Adding custom classes by hand

Adding classes/packages fonts to your existing TeX installation is not difficult. Either create a directory where all packages go into and add this dir to variable TEXINPUTS.

The more clean approach is described for example here.

LateX picture to eps converter

Converting a LaTeX figure file (for example created by XFig) into an eps, with proper LaTeX fonts:
#!/bin/bash -f
#!set -x
\\documentclass{article} \n\
\\usepackage{epsfig,color,amsfonts,amssymb} \n\
\\\nonstopmode \n\
\\\begin{document} \n\
\\\titlepage \n\
\input{$1} \n\
\\\end{document} \n\
\004 \n\
echo -e $HEADER > TEMPFILE.tex
latex TEMPFILE.tex > /dev/null
dvips -E -q  -o $2 TEMPFILE.dvi
Save the above in a file texfig2eps, run chmod u+x texfig2eps, and use it as texfig2eps inputfile outputepsfile.

(Script by Yuri Kuznetsov.)

Ignore LaTeX temporaries in subversion (svn)

Most of my LaTeX work is stored in my subversion repository (install notes). latex produces quite some additional files (.log, .toc, and many more), which turn up marked with ? in the result from svn status. That is unnecessary information to me, it clutters up the other ? marks of files that I want to recognize as new/unversioned. I set the svn:ignore property on the containing directory using a file with patterns:
svn propset svn:ignore -F ~/tex/texignore .
The pattern file ~/tex/texignore contains these lines:

Use BibTex

Also read 'Cite it Right!'.

Other citation formats

I use bibutils by Chris Putnam to convert e.g. RIS to BibTeX. See my own install instructions on how to get things going.

How I search my bib files

I use BibTool by Gerd Neugebauer, which can parse, search, pretty-print BibTeX files, and probably more. See my own install instructions on how to get things going. I created a tiny wrapper script around the BibTool executable for searching. This is bibsearch:
bibtool -- "select{$*}" -i ~/mybibdir/*.bib

Now, I can issue command like (I use single quotes in the terminal to avoid the need for escaping)

$ bibsearch 'author "Brio"'
$ bibsearch 'title "MHD"'
(double quotes in search string are necessary)

Often used abbreviations

  • e.g. (Latin) exempli gratia, for example.
  • i.e. (Latin) id est, that is; that is to say; in other words
  • viz. (Latin) videlicet, contraction of videre licet, "it is permitted to see", That is; namely. Used to introduce examples, lists, or items.
  • cf. (Latin) confer, compare.
  • qed. (Latin) quod erat demonstrandum, which was to be demonstrated.

Other expressions

  • A priori (Latin) before (the fact), from the former. A priori knowledge is knowledge gained or justified by reason alone, without the direct or indirect influence of experience (here, experience usually means observation of the world through sense perception.) (WP)
  • A posteriori (Latin) after (the fact). A posteriori knowledge is any other sort of knowledge; that is, knowledge the attainment or justification of which requires reference to experience.
  • A fortiori (Latin). For a still stronger, more certain reason; "if you are wrong then, a fortiori, so am I"

to top

Arthur.ScientificWriting r1.15 - 31 Jan 2006 - 21:55 - ArthurVanDam
Revisions: | r1.15 | > | r1.14 | > | r1.13 | Total page history

You are here: Arthur > Research > ScientificWriting