TeXblog

 Typography with TeX and LaTeX

Archive for the 'LaTeX General' Category

New package: pdfcomment

9 December 2008 by Stefan Kottwitz

Though pdflatex provides the command \pdfannot for pdf annotations it is somehow complicated to use. The new package pdfcomment offers a user-friendly way to insert comments/ annotations into pdf files.

pdfcomment requires the packages hyperref, xkeyval, ifpdf, marginnote and packages needed by them.

pdfcomment provides options for subject, author and color of annotations, supports icons used as graphics for pdf annotations.

For further information you could have a look at

Category: Tools for LaTeX, LaTeX General | No Comments »

TeXblog related news

4 December 2008 by Stefan Kottwitz

Some weeks ago I began to work as IT Technician onboard of a passenger ship. I’ve already worked some years as IT Administrator on a ship (for a different company) and also in the position of the IT Communication Officer there, so it’s not completely new to me but will require most of my time.
That’s why I will publish less posts here at the moment, at least for some time.
I’m hoping that readers of this blog would return from time to time to check out if there’s something new. ;-) I will continue working on this site.

Stefan

Category: LaTeX General | 3 Comments »

KOMA-Script 3 available

3 November 2008 by Stefan Kottwitz

The new version KOMA-Script 3 by Markus Kohm et al. has been released today.

Some of the new features are:

  • possibility to change almost all settings, even the paper or font size, after loading the class and even after \begin{document},
  • arbitrary base font size, not only in pt, also in other units of measure like pica (pc),
  • new key=value interface, backward compatible,
  • new package tocbasic for generation of table of contents and other lists, supporting the multilingual babel package,
  • arbitrary choice where chapters are allowed to start,
  • improved documentation.

To download KOMA-Script 3, visit http://developer.berlios.de/projects/koma-script3/.

There are release notes in English and more extensive in German.

edit Nov 11: KOMA-Script 3 is available now also as MiKTeX package. I’ve installed it with TeX Live on Ubuntu Linux by the MiKTeX package manager.

Category: LaTeX General | No Comments »

Using \expandafter for macro redefinitions

26 October 2008 by Stefan Kottwitz

Sometimes I want to redefine a macro of a class or package but want to use its original definition. Instead of copy&paste one could use the original macro directly:

  1. come up with a new macro, ensure that it’s not defined yet,
  2. save the definition of the original macro to the new macro,
  3. redefine the original macro using the new macro with the saved original code,

I will give a very simple example for a demonstration. Today a LaTeX Community member said that he’s using the quote environment but wants the enclosed text to have a smaller size. A straightforward solution is to use \renewenvironment copying the original code, let’s say from article.cls, and to make a small modification:

\renewenvironment{quote}
  {\list{}{\rightmargin\leftmargin}%
   \item\relax\small}
  {\endlist}

Just the \small was added. This solution needs the writer to examine the class source, that may also be changed later.

The second solution is the method I’ve described above:

\newcommand*\origquote{}
\let\origquote\quote
\renewcommand*\quote{\origquote\small}

The \newcommand line may be omitted, I’ve just used it to ensure that an error would be raised if a macro with that name was already defined by somehing else.
The last code works like the first solution, but respects the original class code and it will also respect further changes of the class, therefore I’m preferring it.

But the third solution is similar, shorter and doesn’t need the creation of another macro. It’s doing the same job but uses the original macro directly, avoiding a recursion problem by using \expandafter:

\expandafter\def\expandafter\quote\expandafter{\quote\small}

You can find the same method applied in my comment to a previous blog post.

If you want to know how expandafter works you will find explanations in TeX books and documentations. Further there’s an extensive tutorial by Stephan v. Bechtolsheim (TUGboat, Volume 9, 1988), old but still valid of course.

This topic was discussed in the LaTeX Community Forum and on Matheplanet.com.

Category: LaTeX General, plain TeX | No Comments »

German LaTeX wiki launched

7 October 2008 by Stefan Kottwitz

The German LaTeX site goLaTeX.de has opened its wiki, as stated by J. Aehling yesterday evening. LaTeX users are invited to contribute. The long-term objective is to provide a language reference, useful tips and docs and answers to frequently asked questions.

The wiki has been published under the terms of the GNU Free Documentation License. Its address:

        http://golatex.de/wiki/

Category: Online Ressources, LaTeX General | No Comments »

Software Freedom Day 2008

18 September 2008 by Stefan Kottwitz

software freedom day 08

The Software Freedom Day is a worldwide celebration of Free and Open Source Software. The goal in this celebration is to educate the worldwide public about of the benefits of using high quality free and open source software in education, in government, at home and in business. The non-profit company Software Freedom International coordinates this event at a global level, volunteer teams around the world organize local SFD events. Already over 500 teams in over 90 countries all around the world have announced to celebrate the SFD.

One event will take place September 20th, 2008 in Berlin, supported by FSFE and FFII Berlin. You can find more details here: Team Freie Software Berlin.

Category: Online Ressources, LaTeX General | 2 Comments »