## Posts

Showing posts from August, 2011

### Extract a clip from a video with mencoder

mencoder -ss 00:38:46 -endpos 00:05:40 -oac copy -ovc copy movie.avi -o excerpt.avi

00:38:46 is the start position and 00:05:40 is the duration

### Latex: Pushing floats to the end of a document

The endfloat package is kind of fancy but the problem I faced with it is that I was renumbering figures in the middle of the document and the latex referencing algorithms were handling it fine, but when the figures appeared at the end of the document their numbering was screwed up.

There is an easy way, however, to push the figures to the end of the document as I wanted. From some hints here about how LaTeX decides whether there is enough space on a page to put in a figure

\renewcommand{\textfraction}{1.0}
\renewcommand{\floatpagefraction}{0.9}

in the preamble does the trick, by fooling LaTeX into deciding there is NEVER enough space to put figures on a page until it is all out of text and has to just dump the figures as best as it can, one to a page.

### Latex + Unicode = XeTeX

Never bothered to figure out what this xetex thing was. Turns out it can handle unicode. For texmaker just replace pdflatex command with xelatex and use a unicode aware font (e.g. \usepackage{helvet}) and things should work

From here