Fabrice's web : CV · Blogs (⇢ Madrid · ⇢ Science · ⇢ Everything) |
---|
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!
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!
Elena took various pictures of her drawing Maternidad and wanted to do a timelapse. This lists the steps to do so.
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.
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.
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:
A sore to the eye!
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...
It's a pain that konqueror opens two panels by default in 'filemanagement' mode. I always have to close one by hand.
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}}):
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.
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].
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
This is the title I gave to this "kinetic digital sculpture" of mine, filed to the Wolfram Tweet-a-Program program:
I have upgraded my extension wz (named after Walter Zorn) to support more features of this great library that provides tooltips.
I am migrating from Evan Miller's extension of Google Maps, which is now archived (obsolete) to Pavel Astakhov's version, MultiMaps.
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.
Inkscape has a multipage extension: http://sourceforge.net/projects/inkscape-pages. Thanks to its authors: Cosmin Popescu!
Here is a short hack to turn Mathematica lists into hash tables.
\(\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.