5

This is my code:

\documentclass{beamer}

\usepackage{amsmath, amssymb, amsthm}
\usepackage{ulsy}

\begin{document}
    \frame{
        \begin{align*}
            \blitza
        \end{align*}
    }
\end{document}

Why is the \blitza symbol displayed as a psi?

8
  • 2
    Not really an answer, but it's not psi outside math mode. So perhaps you should write \text{\blitza}.
    – Herr K.
    Dec 6, 2013 at 21:37
  • @KevinC: That works!
    – Jeroen
    Dec 6, 2013 at 21:41
  • 1
    @KevinC sorry so it is availabel as type1: ctan.org/tex-archive/fonts/ps-type1/ulsy I'll delete some of my earlier comments Dec 6, 2013 at 22:19
  • 1
    @KevinC That's the correct answer: the definition of \blitza is {\usefont{U}{ulsy}{m}{n}\symbol{'012}} and \usefont does nothing in math mode, so only \symbol{'012} is performed, which corresponds to a Psi.
    – egreg
    Dec 6, 2013 at 23:19
  • 1
    @egreg: Believe it or not, I was waiting for you to give the correct explanation :) Your comment should be made an answer, since the OP asked for a why instead of a how
    – Herr K.
    Dec 6, 2013 at 23:34

3 Answers 3

6

The definition of \blitza in ulsy.sty is

\newcommand{\blitza}{{\usefont{U}{ulsy}{m}{n}\symbol{'011}}}

which clearly means it's a symbol just for text mode.

In math mode \usefont does nothing at all, so what is executed is equivalent to {\symbol{'011}} which is just the same as

{\char'011\relax}

and the rules of TeX say that this will be the symbol in octal position '011 of mathgroup zero font, which is an uppercase Psi.

You can use it in math mode if you redefine it with \text:

\renewcommand{\blitza}{\text{\usefont{U}{ulsy}{m}{n}\symbol{'011}}}
8

the wasy fonts are more likely to be installed in most installations of Tex.

enter image description here

\documentclass{beamer}

\usepackage{amsmath, amssymb, amsthm}
\usepackage{wasysym}


\begin{document}
    \frame{
        \begin{align*}
            [\text{\lightning}]
        \end{align*}
    }
\end{document}

Incidentally I found that just by drawing the character:

enter image description here

1
  • 4
    Also an upvote for your beautiful drawing! :)
    – Jeroen
    Dec 6, 2013 at 23:59
1

There are a few different sources for a lightning character, depending on what is installed on your system.

In addition to

\usepackage{wasysym}
\lightning 

, there is also my favorite:

\usepackage{stmaryrd}
$\lightning$ 

(this one is for mathmode)

and

\usepackage{marvosym}
\Lightning 

Found that all three came up in Detexify enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .