Typography with TeX and LaTeX

## Kile 2.1 beta 5 released

Dezember 31st, 2010 by Stefan Kottwitz

The fifth beta version of the LaTeX editor Kile has been released yesterday. As it’s still in beta status it’s intended for testing but not recommended for production.

Again, there are many fixes to the previous beta version plus some new features. You can read about it in the ChangeLog file after you downloaded the archive kile-2.1b5.tar.bz2.

The latest available stable version for KDE3 is 2.0.3.

This text is available in German. Dieser Text ist auch in Deutsch verfügbar.

Category: News, IDEs and Editors | No Comments »

## Circled numbers in text

Dezember 13th, 2010 by Stefan Kottwitz

Martin Tapankov asked on TeX.SX:

What is a good way to make circled numbers in text?

I’m trying to make some good-looking numbers in a circle, using the simple command:

\textcircled{1}

However, the circle is misaligned vertically with the number, and look a bit sloppy:

Any suggestions how can I adjust the vertical alignment so that the numbers look more centered w.r.t to the circles? Or, if that’s not an option, what other ways to achieve the same results are possible?

I will use those only for numbers, and in very few places, so manual adjustment per glyph is an option.

I’m using pdfLaTeX with Computer Modern, if that matters.

Here’s a TikZ solution:

\documentclass{article} \usepackage{tikz} \newcommand*\circled[1]{\tikz[baseline=(char.base)]{ \node[shape=circle,draw,inner sep=2pt] (char) {#1};}} \begin{document} Numbers aligned with the text: \circled{1} \circled{2} \circled{3} end. \end{document}

It’s just a node. TikZ options are used to align the base line, to adjust the size and to get the circle shape. You’re free to choose further options regarding size or circle thickness (option thick). There’s more: for example you could even name the nodes by another argument to connect them by arrows later.

If one like to use it for an enumerated list, for example, it’s easy but has to be protected:

\usepackage{enumitem} ... \begin{enumerate}[label=\protect\circled{\arabic*}] \item First item \item Second item \item Third item \item Fourth item \end{enumerate}

Category: TikZ | No Comments »

## Harpoons in TikZ

Dezember 11th, 2010 by Stefan Kottwitz

Yasser Sobhdel asked on TeX.SX:

Can I have any harpoons in TikZ?

I refer to my previous question on harpoons: “How to draw protocol interaction” using amsmath. The closest thing I have found is this code:

\begin{tikzpicture}[decoration={bent,aspect=.3}] \node[circle,draw] (A) at (.5,.5) {A}; \node[circle,draw] (B) at (3,1.5) {B}; \draw[->,decorate] (A) -- (B); \draw[->,decorate] (B) -- (A); \end{tikzpicture}

There are so called partial arrow tips in TikZ. Use for instance left to, right to, left hook or right hook. They are described in section 23.7 of the pfg 2.10 manual (22.6 in the pgf 2.0 manual).

Inserting this into your example:

\documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows} \begin{document} \begin{tikzpicture} \node[circle,draw] (A) at (.5,.5) {A}; \node[circle,draw] (B) at (3,1.5) {B}; \draw[-left to] (A.north east) -- (B.west); \draw[-left to] (B) -- (A); \end{tikzpicture} \end{document}

Category: TikZ | No Comments »

## LyX 2.0.0 beta 2 released

Dezember 10th, 2010 by Stefan Kottwitz

The second beta version of LyX 2.0.0 has been released. Testers of the first beta are encouraged to test the new version.

The current stable release for any serious work remains 1.6.

For a list of new features have a look at a previous blog post or visit

This text is available in German. Dieser Text ist auch in Deutsch verfügbar.

Category: News, IDEs and Editors | No Comments »

## Scaling and fitting a box

Dezember 3rd, 2010 by Stefan Kottwitz

Peter Smit asked on TeX.SX:

Why does fit not scale?

I have a problem with the fit library in TikZ.

When I scale the figure (with the TikZ scale command), the fit box doesn’t!

Why is that? Could I somehow change it?

Example:

\documentclass{article} \usepackage{tikz} \usetikzlibrary{fit} \begin{document} \begin{tikzpicture}[state/.style={circle,draw,thick, loop above,inner sep=0,minimum width=10}] \node[state] (a) at (0,1) {} edge [loop above, thick] coordinate (al) (); \node[state] (b) at (1,1) {} edge [loop above, thick] coordinate (bl) (); \node[draw,rectangle,fit=(a) (b) (al) (bl)] {}; \end{tikzpicture}   \begin{tikzpicture}[scale=2,state/.style={circle,draw,thick, loop above,inner sep=0,minimum width=10}] \node[state] (a) at (0,1) {} edge [loop above, thick] coordinate (al) (); \node[state] (b) at (1,1) {} edge [loop above, thick] coordinate (bl) (); \node[draw,rectangle,fit=(a) (b) (al) (bl)] {}; \end{tikzpicture} \end{document}

Add the option transform shape to scale also the box resp. shapes:

\begin{tikzpicture}[scale=2,transform shape, state/.style={circle,draw,thick,loop above,inner sep=0, minimum width=10}]

Output:

Category: TikZ | No Comments »

## TikZ questions and answers

November 16th, 2010 by Stefan Kottwitz

The {TeX} Q&A site turned out to be a valuable resource regarding TiKZ problems.

For example, during a discussion of ball shadings pictures such as this had been drawn:

There are two open questions, where the best answer will get a reward of site reputation points:

Maybe you are able to answer them? It seems that there are already valuable contributions.

Other examples, which have been answered resp. solved, and which I find interesting, are:

At the moment there are 101 TikZ questions on the site, most of them with several answers. If you have a pgf/TikZ related question, you may ask it there - I’ve seen that there are friendly, capable users who like to deal with TikZ problems.

There’s also the active and helpful pgf-users mailing list.

Category: TeX.SX, pgf/TikZ, Online Ressources, Graphics | No Comments »

## {TeX} site launched with new design

November 11th, 2010 by Stefan Kottwitz

The new Q&A site {TeX} aka “TeX, LaTeX and friends” alias tex.stackexchange.com has ended its beta phase today. Since today the site appears in an impressive new design and it’s now officially launched.

During the 3 month beta, 1,775 users registered and asked 1,492 questions, of which 99% have been answered. Such statistics can be read at the site proposal. Regarding the new design, the announcement and its discussion can be read on the meta site.

This text is available in German. Dieser Text ist auch in Deutsch verfügbar.

Category: TeX.SX, Online Ressources | No Comments »

## First beta of LyX 2.0 released

November 10th, 2010 by Stefan Kottwitz

The first beta release of LyX 2.0.0 has been published today. New features are

• A new debugging pane showing the progress of compilation, debugging messages and output of external programs
• An instant preview inset based on the preview package
• Spell-checking on the fly
• A multilingual Thesaurus
• Advanced search feature with format consideration
• Forward search - directly jumping from a particular row in LyX to the DVI/PDF output
• A document comparison feature
• Context menus for the outliner
• XHTML Output
• Support for multiple indices
• Support for XeTeX typesetting
• Better output control
• Native \includeonly support for compiling selected subdocuments
• Support for more LaTeX commands and packages (\phantom commands, \makebox, \nameref, ulem, lettrine, …)
• Support of the refstyle package instead of prettyref
• Support for further languages (Swiss, Turkmen) and encodings (applemac)
• Enhanced branches feature
• Improved table handling
• Some new size features
• Better color handling
• Support for required arguments (beside optional)
• New subversion features
• Support for Lilypond music notation

and there are many more.

This text is available in German. Dieser Text ist auch in Deutsch verfügbar.

Category: News, IDEs and Editors | No Comments »

## ConTeXt Mark IV support in MiKTeX

Oktober 31st, 2010 by Stefan Kottwitz

The recently released version 2.9 of MiKTeX, which is the first MiKTeX release with LuaTeX integration, now supports ConTeXt Mark IV, as Christian Schenk announced.

Category: MiKTeX, LaTeX Distributions, News | No Comments »

## TeX Live 2010 and MacTeX 2010 released

September 12th, 2010 by Stefan Kottwitz

TeX Live 2010 is available now.

Some changes in 2010, like announced in this blog post:

• pdfLaTeX automatically converts EPS files for inclusion, as already been planned but dismissed for the previous release
• The execution of a some external commands from TeX, via \write18, is now enabled by default.
• The default PDF version for the output is now 1.5 allowing a better compression.
• Some programs have been added: pTeX for Japanese typesetting, chktex, the dvisvgm converter, further BibTeXU for Unicode support in BibTeX.
• XeTeX now uses microtype for margin kerning but doesn’t support font expansion yet.