Kpfonts 2.3 released

The version 2.3 of the font package kpfonts has been released on CTAN as announced today over the ctan-ann mailing list. Kpfonts provide an extensive set of fonts for LaTeX including roman, sans-serif, monospaced and math symbol fonts in regular and bold shape, true small caps and more.
The current release introduces

  • a new option nofligatures with no fi, fl, ff, ffi and ffl ligatures and redesigned f glyphs to achieve better results,
  • a new shape with slanted small caps.
  • improved small caps kerning.

To get more information have a look at the documentation.

15. September 2008 by stefan
Categories: Uncategorized | Leave a comment

Paper sizes with pdfTeX

I’m frequently noticing questions regarding problems with paper size and pdfLaTeX, for instance Bug 215561 and Bug 244043 on Launchpad, yesterday on mrunix.de and also yesterday on matheplanet.com.
If you manually change \paperwidth or \paperheight or use the landscape option of LaTeX classes like for instance article it could happen that the paper size of the resulting pdf differs.
A solution is to adjust the \pdfpagewidth and \pdfpageheight values:

\setlength{\pdfpagewidth}{\paperwidth}
\setlength{\pdfpageheight}{\paperheight}

To use the geometry package could correct it too. But if you use it together with gmeometric, it may still be necessary to adjust the pdf page size like written above, see for instance goLaTeX.de.

12. September 2008 by stefan
Categories: Uncategorized | Leave a comment

TeX Live 2008 released

TeX Live 2008 is now officially released. This information was posted by Karl Berry to comp.text.tex yesterday, though it’s been available for download since some days already. In this version the underlying package infrastructure has been redesigned and reimplemented, it allows dynamic package updates over the internet like with MiKTeX for years. That’s a big step forward!
You can find more information about new and changed features by reading the original release notes.

See also:

03. September 2008 by stefan
Categories: Uncategorized | Leave a comment

TikZ: shaded cube

With just a few lines of code you can create a drawing of a cube with a 3D impression, though if it’s not really perspective or raytraced:

\begin{tikzpicture}[on grid]
  \shade[yslant=-0.5,right color=gray!10, left color=black!50]
    (0,0) rectangle +(3,3);
  \draw[yslant=-0.5] (0,0) grid (3,3);
  \shade[yslant=0.5,right color=gray!70,left color=gray!10]
    (3,-3) rectangle +(3,3);
  \draw[yslant=0.5] (3,-3) grid (6,0);
  \shade[yslant=0.5,xslant=-1,bottom color=gray!10,
    top color=black!80] (6,3) rectangle +(-3,-3);
  \draw[yslant=0.5,xslant=-1] (3,0) grid (6,3);
\end{tikzpicture}

This example uses the positioning tikz library.

Output screenshot:

pgf/TikZ 3D cube

By adding some slanted numbers we will get a Sudoku 3D cube:

pgf/TikZ sudoku 3D

TeX source code and pdf output are provided.

I’ve programmed it to answer a question posted on matheplanet.de. At first I wanted to use the matrix tikz library but it seemed to me that matrices of nodes cannot be slanted, at least I didn’t find a way.

10. August 2008 by stefan
Categories: Uncategorized | 5 comments

pgf/TikZ 3D drawings

Today Tomek posted very impressive 3D drawings made with pgf/TikZ in the LaTeX Community Forum.

Here’s one of the drawings showing a cylindrical projection:

pgf/TikZ 3D example

More examples and their complete sourcecode by Tomasz M. Trzeciak can be found in the corresponding posting in the LaTeX Community Forum.

For even more examples demonstrating the capabilities of pgf/TikZ visit the TikZ example gallery provided by Kjell Magne Fauske.

07. August 2008 by stefan
Categories: Uncategorized | 2 comments

Jpgfdraw example

Here’s an example illustration made with Jpgfdraw following a drawing in Singer/Thorpe Lecture Notes in Elementary Topology and Geometry, I made freehand it to illustrate homotopy of paths in my notes.

Screenshot:

Jpgfdraw example homotopy

Output in pdf format: homotopy.pdf
Jpgfdraw binary file: homotopy.jdr
exported tex file: homotopy.tex

LaTeX main document:

\documentclass[a4paper,10pt]{article}
\usepackage[landscape]{geometry}
\usepackage{amsmath,pgf}
\pagestyle{empty}
\begin{document}
\centering
\input{homotopy}
\end{document}

07. August 2008 by stefan
Categories: Uncategorized | Leave a comment

Jpgfdraw 0.5b released

The vector graphics application for LaTeX users Jpgfdraw beta version 0.5b has been released today.

The author Nicola Talbot announced:

    Jpgfdraw is a graphics application written in Java. You can use Jpgfdraw to:

  • Construct shapes using lines, moves and cubic Bezier segments;
  • Edit shapes by changing the defining control points;
  • Incorporate text and bitmap images (for annotation and background effects);
  • Extract the parameters for TeX’s parshape command and for shapepar (defined in the shapepar package);
  • Construct frames for use with the flowfram package;
  • Pictures can be saved in Jpgfdraw’s native binary format (JDR) or native ascii format (AJR) or can be exported as:
    • a pgfpicture environment for use in LaTeX documents with the pgf package;
    • a LaTeX2e package based on the flowfram package;
    • an encapsulated postscript file;
    • a PNG image file;
    • an SVG image file;
  • Incorporate text and bitmap images (for annotation and background effects);
  • Alternative text may be specified for use when exporting to a LaTeX file (e.g. if the text contains symbols or if it should be set in maths mode);
  • Mappings may be used to specify what LaTeX font declarations should be used when exporting to a LaTeX file.

That sounds very promising. I made a quick test today with Ubuntu Linux 8.04. After installing sun-java6-jre I downloaded and installed jpgfdraw-0.5b-us. It worked immediately. For the test I created a drawing and exported it into a pgf picture, tex format. After including it into a tex document and compiling I got the error Illegal unit of measure (pt inserted). It was caused by the numbers of the export file, they were using a comma instead of a decimal point. That problem is mentioned in the Jpgfdraw FAQ, but contrary to the FAQ it is still occuring with version 0.5b as I noticed using the locale de_DE.UTF-8.
After correction It worked perfectly, the drawing was displayed with high quality. Jpgfdraw could establish itself as a very useful tool.

Links:

02. August 2008 by stefan
Categories: Uncategorized | 1 comment

Around the Bend

Recently Michael Downes collection of TeX challenges “Around the Bend“, originally in ASCII format, has been typeset in pdf format by Peter Wilson and has now been released on CTAN.
The document contains exercises posing a problem and one or several solutions.

26. July 2008 by stefan
Categories: Uncategorized | Leave a comment

New package: stampinclude

The stampinclude package v1.0 has been released. It replaces includeonly and will select the files for inclusion by inspecting the time stamp of the .aux files. Files will be selected for inclusion if the .aux file doesn’t yet exist or if it’s older than the corresponding .tex file. stampinclude does a similar job like the askinclude package but not interactively. The pdftex command pdffilemoddate is internally used, include is redefined and includeonly is ignored.

17. July 2008 by stefan
Categories: Uncategorized | Leave a comment

New LaTeX course released

A new beamer class based presentation introducing LaTeX has been released these days. The author Dr. Engelbert Buxbaum created this presentation for a LaTeX course at the Biochemistry faculty at RUSM and released it for use under GNU Copyleft. It’s based on the tex-kurs by Rainer Rupprecht, translated to English using additional info from l2short. The source code is available too. For download see it’s CTAN directory.

17. July 2008 by stefan
Categories: Uncategorized | Leave a comment

Speed up the work by shell scripts II

In addition to the shell scripts mentioned in this post I wrote another small script:

#!/bin/bash
# texcd - change into the directory
#   corresponding to a certain tex related file
if [ $# -eq 0 ]; then
  echo 1>&2 Usage:    . texcd filename [pattern]
  echo 1>&2 examples: . texcd beamer.cls
  exit 1
fi
cd `kpsewhich $1 | sed 's/(.*)/.*$/1/'`
echo Changed to: `pwd`

It’s purpose is to change into the directory where a certain tex related file resides. For instance if you want to search through some beamer class theme files, you don’t have to know the directory, just type
. texcd beamer.cls
and you will enter (for instance) the directory /usr/share/texmf/tex/latex/beamer/base/. The dot at the beginning of the command is important. Thats one reason why I show this small script too. Normally if you change the directory inside a script, after the script is finished you will be back inside the directory where you were before, because the script starts a new shell for itself. If you want to run the commands inside your current shell you can use the source command, the dot I’ve used is just an abbreviation for source.

Some additional hints I didn’t mention in the other post: instead of putting the scripts into your home directory you could copy them into your local file system, for instance:
sudo cp texcd /usr/local/bin/
and those scripts should be made executable using chmod:
chmod a+x /usr/local/bin/texcd
Thats recommendable for the other scripts too.

15. July 2008 by stefan
Categories: Tools for LaTeX | 2 comments

Adobe Reader: unwanted color change

If you include a picture within a pdf document and view it with the Adobe Reader you may notice a change of color under certain circumstances. Let’s test this png file:

pdf color test original

This short example will be enough to produce a pdf by pdflatex:

\documentclass[a4paper,10pt]{article}
\usepackage{graphicx}
\begin{document}
\includegraphics{test}
\end{document}

You may compile by yourself or look at the pdf output. Here’s a screenshot of the Adobe Reader:

pdf color test Adobe Reader

Nice blue color, but not the original one. Compare this color with a screenshot of the open source pdf viewer Evince:

pdf color test Evince

Because most people use the freely available Adobe Reader it may be necessary to fix this issue. I found a solution by converting the color mode from RGB to an indexed palette using the freely available open source software GIMP. Here is the changed png file, and here the pdf file, finally the screenshot:

pdf color test Adobe Reader

Using GIMP it’s possible to automate the conversion by GIMP’s batch mode using the procedure gimp-image-convert-indexed.

This topic was discussed in the LaTeX Community Forum.

14. July 2008 by stefan
Categories: Uncategorized | 2 comments

← Older posts

Newer posts →