4

I would like to create a command to automatically generate accented letters like è or é.

I tried:

\newcommand{\ar}[1]{\´#1}
\newcommand{\al}[1]{\`#1}

\ar{e}
\al{e}

but the result was "Undefined sequence".

Anyone know how to solve this problem?

1
  • Welcome to LaTeX! You don't need to add thanks to your posts. Upvote answers you like, which is the TeX.SE way of saying thank you.
    – percusse
    Jul 26, 2012 at 21:31

1 Answer 1

10

I think you may have a non-ascii character, ´, in the first \newcommand; hence, TeX doesn't recognize the control sequence and generates an error message. Just use an ordinary apostrophe instead: \'.

The following modified form of your code should do the job for you:

\documentclass{article}
\newcommand{\ar}[1]{\'{#1}}
\newcommand{\al}[1]{\`{#1}}
\begin{document}
\ar{e}
\al{e}
\end{document}​

enter image description here

You must log in to answer this question.

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