Saturday, October 22, 2011

remove i386 from amd64 Ubuntu systems

Upgrading an amd64 Ubuntu to oneiric caused the package manager to load not only amd64 list of packages, but also i386 ones. The solution is to remove the multiarch file from /etc/dpkg/dpkg.cfg.d :
# cd /etc/dpkg/dpkg.cfg.d 
# mv multiarch multiarch.backup 
# aptitude update 
Since Ubuntu 12.10, you should use %dpkg --remove-architecture i386

Tuesday, August 9, 2011

figure dash in XeLaTeX

Figure dash ‒ is used for dashes in numbers (0763‒5345). It does not indicate a range, for which the en dash is used. In LaTeX there are commands for:
  • endash: \textendash
  • emdash: \textemdash
  • minus: \textminus
Because the code for figure dash is 0x2012 I define the following command for a figure dash in XeLaTeX:
\newcommand{\textfigdash}{\char"2012 }%figure dash ‒

Monday, March 28, 2011

URL rewriting tutorial

a very good apache url rewriting tutorial is here.

Monday, March 7, 2011

latex: arabic footnotes in minipage environment

To get arabic footnote markers in the minipage environment renew \thempfn command:


Saturday, February 26, 2011

latex warning output

To make latex print an warning at output one can use:
  • \@latex@warning{My message}prints "file.tex:10: My message on input line 10"
  • \@latex@warning@no@line{My message}prints "file.tex:0: My message"

One can define a \todo command to get warnings about uncompleted sections. The following todo command will print a
in the PDF and the warning message passed as a parameter \todo{Finish Thanks section!}

Code for pasting in LaTeX package(.sty file)

\newcommand{\todo}[1][]{\@latex@warning{TODO #1}\fbox{TODO\dots}}

Friday, February 25, 2011

bugfix> remove unwanted spaces in tokenizer package

As notice here \GetTokens inserts unwanted spaces. The bugfix is to use the following code instead of just "\usepackage[trim]{tokenizer}":
    \ifx\SH@trimtokens\SH@true% strip spaces if requested

I will report this bugfix to the developer Sascha Herpers

Thursday, February 10, 2011

get rid of latex badboxes on framed figures

If you include in a LaTeX document a graphics file with a frame
you will get a badbox warning. The solution is to substract twice the size of the frame:
For multicolumn:

Sunday, January 30, 2011

virtual flying birds

I have created a 2D simulation of a a flock of flying birds that are scared of mouse movement. Here is the link