30

I know I can use the macros \TeX and \LaTeX for typesetting the names of TeX and LaTeX (including the necessary vertical alignment trick).

But how am I supposed to typeset "TikZ"? (I am asking because I'd like to mention TikZ in the Colophon of a book).

Jay
  • 2,895
  • 2
  • 27
  • 38

1 Answers1

35

Look at the manual. It’s typeset as Ti\textit{k}Z

You may create a new command if you would like to use it more than one time. If you use xspace, it takes care of the following space.

\documentclass{article}

\usepackage{xspace}
\newcommand{\TikZ}{Ti\textit{k}Z\xspace}

\begin{document}
\TikZ with a following space and without \TikZ.
\end{document}

For further reading: Drawbacks of xspace

As said in the the comments, there are some other possible definitions:

  1. Ti\emph{k}Z, which will have an italic k in upright context and an upright k in italic context. So the k is always emphasizes, which may satisfies the source of the name “TikZ ist kein Zeichenprogramm” (TikZ is no drawing software), where the word kein should be emphasized.

  2. \textup{Ti\textit{k}Z} will produce the version with upright T, i and Z and italic k in all cases. This may be preferable, when the original appearance should be kept for the whole document.

Tobi
  • 56,353
  • 5
    In the sources of the pgfmanual (/pgf/doc/generic/pgf/macros/pgfmanual-en-macros.tex) : \def\tikzname{Ti\emph{k}Z} possible \newcommand*\Tikz{Ti\textit kZ} – Alain Matthes Jul 04 '12 at 16:59
  • 2
    It’s on the title page, page 3, 19, 20, 21, … and many more ;-) – Tobi Jul 04 '12 at 17:00
  • Ooh -- of course! Use the source... :-) – Jay Jul 04 '12 at 17:01
  • 5
    @Altermundus: I prefer \textit to be sure that it’s italic – Tobi Jul 04 '12 at 17:01
  • 1
    Yes I gave the macro found in pgfmanual-en-macros.tex. It's strange to use two different definitions ... – Alain Matthes Jul 04 '12 at 17:04
  • 5
    If you want to be sure that the k is italic, you might want to ensure that the T, i, and Z are upright, as in \newcommand*\TikZ{\textup{Ti\textit kZ}}. – Niel de Beaudrap Dec 05 '13 at 01:44
  • I would also use @NieldeBeaudrap 's suggestion if for example someone uses it in an italic or emphasized environment just to be sure it is typeset correctly. – percusse Dec 05 '13 at 08:54
  • All this discussion in the comments happen because TikZ has no \TikZ macro defined. What a shame. I refuse to create a macro that should be provided by the package itself. I will just write TikZ. :-( – André Caldas Sep 02 '22 at 13:50