Tag PDF

Tag PDF RSS 2.0 Feed

Custom code highlighting in LaTeX

LaTeX is the software that I prefer for creating presentation slides or small documents with technical and mathematical background. From time to time it is necessary to show code with highlighting in LaTeX documents. Sometimes also for less popular programming languages or file formats.

Continue reading ...

LaTeX - Illustrate similarity measures of time series

I need to illustrate similarity measures of time series in a paper. Common illustrations are the euclidean distance and dynamic time warping.

Continue reading ...

LaTeX - Multidimensional time series PGFPlots tikzpicture

I am working on my bachelor thesis and have to deal with multidimensional time series. Quite specifically time series containing acceleration data from the three sensors produced by a Wii controller. I would like to show on a small example how I represent multidimensional time series graphs in LaTeX.

Continue reading ...

LaTeX - Scale and change aspect ratio of PGFPlots tikzpicture

I need to change the size of a PGFPlots tikzpicture in my LaTeX document. There are two different things, scaling the graphic to the full or half width for example and changing the aspect ratio of a graphic.

Continue reading ...

LaTeX - Load table data for PGFPlots tikzpicture

My main resource to create tikzpicture graphics in PDF files generated via LaTeX is the PGFPlots Gallery. But I guess there are more than 400 examples on this page. Here a minimal example for a PGFPlots function visualisation with data loaded from an dat file.

Continue reading ...

Bootstrap responsive embed aspect ratio

Bootstrap responsive embed can be very helpful to show responsive PDF files or videos. But it supports only the aspect ration 16by9 and 4by3. But what about other aspect rations? For example 210by297 would be interesting to embed a A4 paper.

Continue reading ...

Ignore pause in LaTeX beamer with handout

When preparing my LaTeX slides with the beamer class for a presentation, I have used pretty often the pause command. This command splits a frame and hides the content under pause on the first frame. This is very helpful to give the audience step by step the content of a talk. But this can be very annoying when clicking throw the slides after the talk. There is a simple solution to ignore the pause commands.

Continue reading ...

PHPUnit compare generated PDF files with Imagick

Sometimes it is necessary to compare a generated PDF file with a given one in PHP. Just to check with one PHPUnit test that your PDF generation works the expected way. But pretty often generated PDF files are equal, but there content isn't the same. For example if you use FPDF the following assertion can fail if the files have different meta data.

$pdfContent1 = file_get_contents('path_to_pdf1');
$pdfContent2 = file_get_contents('path_to_pdf2');
$this->assertSame($pdfContent1, $pdfContent2);

Continue reading ...

Rotate every second page of a PDF file on Linux

A little bit special today, but I would like to show how to rotate every second page of every PDF file in a directory. This mostly happends if you scan a book for example and that looks something like this after scanning.

Continue reading ...