Fabrice's web : CV · Blogs (⇢ Madrid · ⇢ Science · ⇢ Everything)
HackerLogo.png

Blog: Hacks

This is a collection of tricks, scripts, one-liners, patches, hacks of all sort & anything related to computers and computing. Try at your own risks!

Forcing et al. for all BibTeX entries with more than one author.

If you're tight in space (e.g., for a conference abstract) and want all entries to read F. Author et al., BibTeX doesn't usually help you much (biblatex would allow that but the more common natbib doesn't). The easiest fix is to hack the .bst file!

→ continue reading...

Timelapse of a drawing

Elena took various pictures of her drawing Maternidad and wanted to do a timelapse. This lists the steps to do so.

→ continue reading...

Supplementary TeX material on arXiv

Papers increasingly come with a supplementary material. This is in principle good as providing all the gory details, except that often this is where the authors flush out what didn't fit in the allotted space of the main text, so supplementary of PRL, for instances, are particularly tough (as often required-reading)

When you upload your prose to arXiv, you typically want the supplementary to be there as well. That's not easy to do.

→ continue reading...

Common.js on mediawiki

Each mediawiki web has a MediaWiki:Common.js page (see, e.g., that of Wikipedia) that runs java script on each page. That's a powerful tool (apparently to be deprecated at some point). Installation should be straightforward but for some reason, can sometimes be frustratingly painful, so I give a particular example that should work on its own.

→ continue reading...

Removing trailing spaces for makeindex

Makeindex, $\mathrm{\LaTeX}$'s historical index-building engine, is irritatingly buggy. One recurrent problem that plagues the output from careless index makers is that of duplicated entries:

Spectacle.E26420.png

A sore to the eye!

→ continue reading...

Making space in gmail

We all eventually get there:

Gmail-full.png

→ continue reading...

Referencing figures by a label in mediawiki

If you want to refer to images in Mediawiki the way you would in a $\mathrm{\LaTeX}$ document, you can use this cheap trick of mine...

→ continue reading...

KDE default profile

It's a pain that konqueror opens two panels by default in 'filemanagement' mode. I always have to close one by hand.

→ continue reading...

Emacs regexp for our compound decay rates notation

We find that algebraic sums of decay rates are fairly common, which make a notation such as $\gamma_{\widetilde{ij}}=i \gamma_a + j\gamma_\sigma$ useful (e.g., $\gamma_{\widetilde{31}}=3\gamma_a+\gamma_\sigma$). This is, however, a bit of a pain to typeset:

(e.g., $\gamma_{\widetilde{31}}=3\gamma_a+\gamma_\sigma$)

In emacs, this regexp substitution allows to transliterate \gamma_{31} into the widetilde form:

Replace regexp (default _{\([0-9][0-9]\)} -> _{\\widetilde{\1}}): 

Snowing in the browser

For Christmas, it's nice to feature a goody on one's website to participate to the overall merrier atmosphere. A favorite and immemorial web touch is the snow fall. It used to be popular on UNIX boxes as well though it apparently isn't so standard nowadays. As for the good old web, we like to use Scott Schiller's snowstorm, bringing snow to the web since 2003.

→ continue reading...

21844 files

If you look at what computers can do in terms of storing data, you feel sort of safe.

It's $2^{32}-1$ files (that makes 4 294 967 295) for NTFS, only 4 194 304 for FAT32 and a minuscule 65 536 for FAT16 which is however obsolete, while exFAT reads "Nearly Unlimited" [1].

→ continue reading...

Changing file extensions in multiple LaTeX files

That's a pretty concrete problem: I have multiple .tex file which include .eps extensions. I have converted all the postscript (old fashioned) stuff into brand new converted pdf, now calling figure.eps by figure.eps.convto.pdf.

This piece of code says the $\mathrm{\TeX}$ files about that daring move:

perl -pi -w -e 's/\\includegraphics(\S+)pics\/(\S+)\}/\\includegraphics$1fig\/$2\.convto\.pdf\}/g;' *.tex

→ continue reading...

Inflationary bubbles

This is the title I gave to this "kinetic digital sculpture" of mine, filed to the Wolfram Tweet-a-Program program:

→ continue reading...

Walter Zorn's tooltips v°0.2

I have upgraded my extension wz (named after Walter Zorn, see a photoWalterZorn.jpg) to support more features of this great library that provides tooltips.

→ continue reading...

Wikilog titles and links

The Mediawiki Wikilog extension needs a hack to display title properly on our site.

→ continue reading...

From maps to multimaps

I am migrating from Evan Miller's extension of Google Maps, which is now archived (obsolete) to Pavel Astakhov's version, MultiMaps.

→ continue reading...

Mediawiki 1.22.1, lua, Scribunto and templates from Wikipedia

I am upgrading laussywiki to MediaWiki 1.22.1, mainly to support the new citation templates from wikipedia. They are great and I want a better/more thorough and more consistent quotation system.

→ continue reading...

Multipage extension for Inkscape

Inkscape has a multipage extension: http://sourceforge.net/projects/inkscape-pages. Thanks to its authors: Cosmin Popescu!

→ continue reading...

Turning Mathematica lists into hashes

Here is a short hack to turn Mathematica lists into hash tables.

→ continue reading...

Defining macros for Mathjax extension

\(\newcommand{\pt}{\partial_t}\)With MathJax, you can use \newcommand in enclosed $...$ characters to define a macro in any given page (e.g., \newcommand{\pt}{\partial_t} turns $\pt$ into $\pt$). If you want a popular macro to be defined once and for all, without having to include the definition each time, you have to declare it in a Config.js file.

→ continue reading...

« newest ‹ newer 20 ... oldest »