I'm trying to define some unicode characters to add a halloween theme to my upcoming homework, but I'm getting "Undefined control sequence" when I try to use a character that I've declared.
Here is my LaTeX file:
\Documentclass[24pt,a4paper,margin=1in]{report}
\usepackage[utf8]{inputenc}
\DeclareUnicodeCharacter{00E4}{\pumpkin}
\begin{document}
\pumpkin
\end{document}
And here is the console output up through the error when I build it with pdflatex:
$ pdflatex.exe hw5.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7140 64-bit)
entering extended mode
(hw5.tex
LaTeX2e <2018-12-01>
("D:\MiKTeX 2.9\tex/latex/base\report.cls"
Document Class: report 2018/09/03 v1.4i Standard LaTeX document class
("D:\MiKTeX 2.9\tex/latex/base\size10.clo"))
("D:\MiKTeX 2.9\tex/latex/base\inputenc.sty")
LaTeX Warning: Unused global option(s):
[24pt,margin=1in].
(hw5.aux)
! Undefined control sequence.
l.11 \pumpkin
Any help would be appreciated.
\pumpkinsomewhere. A quick search reveals the conveniently timedhalloweenmathpackage: https://tex.stackexchange.com/q/336768/134574. – Phelype Oleinik Oct 26 '19 at 01:4300E4) to expand to the given control sequence. More or less like a shortcut. In this case you are makingäexpand to\pumpkin. Not a terribly good idea, if you intend to useäin your document, but definitely valid for trick-or-treating ;-) – Phelype Oleinik Oct 26 '19 at 01:48