Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to use the wasysym package to get access to characters such as lightning and clock. However, the following MWE for me gives different symbols.

\documentclass{article}
\usepackage{wasysym}
\begin{document}
$\lightning\clock$
\end{document}

This results in the following when I run pdflatex on it.

enter image description here

That is, lightning is instead rendered to a backtick and clock is instead rendered to a 0.

I have TeXLive 2012 on Ubuntu 12.04 and the same shows up when using Evince or Okular to view. I do not know if this is a problem with my LaTeX code or with my TeX installation or some encoding problem particular to my machine.

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

Don't use mathmode

\documentclass{article}
\usepackage{wasysym}
\begin{document}
\lightning\clock
\end{document}

enter image description here

I don't have much idea on mathmode. But here is a workaround using \text from amsmath:

\documentclass{article}
\usepackage{amsmath,wasysym}
\begin{document}
\lightning\clock $\text{\lightning}$
\end{document}

Or use \mbox{} --- $\mbox{\lightning}$ as noted by Gonzalo.

share|improve this answer
    
Thanks. Where are those symbols defined in mathmode? that is, why lighning goes to backtick and not something else and why doesnt it give me an error? Also, how can I use lightning in math mode? –  Xu Wang Nov 2 '12 at 1:42
    
@XuWang You can load amsmath (before wasysym)and enclose it in a \text{} macro, e.g. $x^{\text{\lightning}}$ –  Scott H. Nov 2 '12 at 1:48
    
No need to load amsmath and use \text; a simple \mbox is enough: $\mbox{\lightning}$. –  Gonzalo Medina Nov 2 '12 at 1:55
    
Great, thank you for the help all of you. –  Xu Wang Nov 2 '12 at 2:40
    
@GonzaloMedina -- although the original example doesn't use these symbols as superscripts, one of the comments to the answer does, and for that use, unless \lightning is wanted at full size (yech!), amsmath and \text are more appropriate than \mbox. –  barbara beeton Nov 2 '12 at 13:46
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.